diff --git a/MOLPayXDKExample/platforms/android/android.json b/MOLPayXDKExample/platforms/android/android.json index 919b953..63d7611 100644 --- a/MOLPayXDKExample/platforms/android/android.json +++ b/MOLPayXDKExample/platforms/android/android.json @@ -125,11 +125,11 @@ ], "plugin_metadata": { "cordova-plugin-android-permissions": "0.10.0", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-plugin-whitelist": "1.3.2", "cordova-plugin-x-toast": "2.6.0", "cordova-save-image-gallery": "0.0.26", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" } } \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js b/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js index 8ec1b0b..6bc6e9e 100644 --- a/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js @@ -51,12 +51,12 @@ module.exports.metadata = // TOP OF METADATA { "cordova-plugin-android-permissions": "0.10.0", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-plugin-whitelist": "1.3.2", "cordova-plugin-x-toast": "2.6.0", "cordova-save-image-gallery": "0.0.26", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" }; // BOTTOM OF METADATA }); \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/js/index.js b/MOLPayXDKExample/platforms/android/assets/www/js/index.js index 4476fb7..771a8e0 100644 --- a/MOLPayXDKExample/platforms/android/assets/www/js/index.js +++ b/MOLPayXDKExample/platforms/android/assets/www/js/index.js @@ -46,7 +46,9 @@ var app = { // 'mp_bill_name_edit_disabled': true, // Optional, explicitly force disable billing name edit. // 'mp_bill_email_edit_disabled': true, // Optional, explicitly force disable billing email edit. // 'mp_bill_mobile_edit_disabled': true, // Optional, explicitly force disable billing mobile edit. - // 'mp_bill_description_edit_disabled': true // Optional, explicitly force disable billing description edit. + // 'mp_bill_description_edit_disabled': true, // Optional, explicitly force disable billing description edit. + // 'mp_language': 'EN', // Optional, EN, MS, VI, TH, FIL, MY, KM, ID, ZH. + // 'mp_dev_mode': false // Optional, enable for online sandbox testing. }; var molpayCallback = function (transactionResult) { diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html index e06c9e0..c10252a 100644 --- a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html +++ b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html @@ -1 +1 @@ -

{{label_preparing}}

{{label_pleasewait}}

{{label_loading}}
\ No newline at end of file +

{{label_preparing}}

{{label_pleasewait}}

{{label_loading}}
\ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js new file mode 100644 index 0000000..f2c601e --- /dev/null +++ b/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('!1a(a){if("3i"==1p 2n&&"3Q"!=1p 4i)4i.2n=a();2p if("1a"==1p cG&&cG.eI)cG([],a);2p{1d b;"3Q"!=1p 2t?b=2t:"3Q"!=1p fr?b=fr:"3Q"!=1p gn&&(b=gn),b.4I=a()}}(1a(){1d a;1e 1a b(a,c,d){1a e(g,h){if(!c[g]){if(!a[g]){1d i="1a"==1p dY&&dY;if(!h&&i)1e i(g,!0);if(f)1e f(g,!0);1d j=1m 1E("3y R1 4i \'"+g+"\'");1D j.nk="Rf",j}1d k=c[g]={2n:{}};a[g][0].1K(k.2n,1a(b){1d c=a[g][1][b];1e e(c?c:b)},k,k.2n,b,a,c,d)}1e c[g].2n}1I(1d f="1a"==1p dY&&dY,g=0;ge;)b=a.cF(e++),b>=s1&&R8>=b&&f>e?(c=a.cF(e++),s3==(Qi&c)?d.1L(((ge&b)<<10)+(ge&c)+s0):(d.1L(b),e--)):d.1L(b);1e d}1a j(a){1e g(a,1a(a){1d b="";1e a>Q3&&(a-=s0,b+=L(a>>>10&ge|s1),a=s3|ge&a),b+=L(a)}).8L("")}1a k(a){1e 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}1a l(a,b){1e a+22+75*(26>a)-((0!=b)<<5)}1a m(a,b,c){1d d=0;1I(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);1e K(d+(J+1)*a/(a+A))}1a n(a){1d b,c,d,e,g,h,i,l,n,o,p=[],q=a.1i,r=0,s=D,t=C;1I(c=a.Rq(E),0>c&&(c=0),d=0;c>d;++d)a.cF(d)>=3V&&f("2a-pI"),p.1L(a.cF(d));1I(e=c>0?c+1:0;q>e;){1I(g=r,h=1,i=x;e>=q&&f("rZ-1X"),l=k(a.cF(e++)),(l>=x||l>K((w-r)/h))&&f("9g"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("9g"),h*=o;b=p.1i+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("9g"),s+=K(r/b),r%=b,p.ad(r++,0,s)}1e j(p)}1a o(a){1d b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];1I(a=i(a),q=a.1i,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],3V>p&&u.1L(L(p));1I(d=e=u.1i,e&&u.1L(E);q>d;){1I(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);1I(r=d+1,j-b>K((w-c)/r)&&f("9g"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("9g"),p==b){1I(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.1L(L(l(o+t%s,0))),k=K(t/s);u.1L(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}1e u.8L("")}1a p(a){1e h(a,1a(a){1e F.7k(a)?n(a.9E(4).8F()):a})}1a q(a){1e h(a,1a(a){1e G.7k(a)?"xn--"+o(a):a})}1d r="3i"==1p d&&d,s="3i"==1p c&&c&&c.2n==r&&c,t="3i"==1p b&&b;(t.fr===t||t.2t===t)&&(e=t);1d u,v,w=Sq,x=36,y=1,z=26,A=38,B=Su,C=72,D=3V,E="-",F=/^xn--/,G=/[^ -~]/,H=/\\Sx|\\Sw|\\Sv|\\Sh/g,I={9g:"Sf: 1X Se Si Sl to mn","2a-pI":"Sz 1X >= T9 (2a a pI nk oF)","rZ-1X":"3u 1X"},J=x-y,K=1R.aN,L=2o.56;if(u={pl:"1.2.4",dV:{ow:i,2f:j},ow:n,2f:o,T4:q,SP:p},"1a"==1p a&&"3i"==1p a.eI&&a.eI)a("gx",1a(){1e u});2p if(r&&!r.6c)if(s)s.2n=u;2p 1I(v in u)u.9v(v)&&(r[v]=u[v]);2p e.gx=u}(1b)}).1K(1b,"3Q"!=1p fr?fr:"3Q"!=1p gn?gn:"3Q"!=1p 2t?2t:{})},{}],2:[1a(a,b,c){1a d(a,b,c){!a.9y||b===a.9y.rG&&c===a.9y.rI||a.9y.o7(b,c)}1a e(a,b){3c{b&&(b.1n=a.1n,b.1v=a.1v,b.4J("2d").RJ(a.4J("2d").v1(0,0,a.1n,a.1v),0,0))}2S(c){h("RB to Rw 2l 7I Rz",a,c)}}1a f(a,b){1I(1d c=3===a.6c?1J.dW(a.Ry):a.qh(!1),d=a.bw;d;)(b===!0||1!==d.6c||"qH"!==d.6T)&&c.4K(f(d,b)),d=d.sd;1e 1===a.6c&&(c.rW=a.rU,c.s5=a.s4,"vl"===a.6T?e(a,c):("oA"===a.6T||"oL"===a.6T)&&(c.1k=a.1k)),c}1a g(a){if(1===a.6c){a.rU=a.rW,a.s4=a.s5;1I(1d b=a.bw;b;)g(b),b=b.sd}}1d h=a("./4R");b.2n=1a(a,b,c,e,h,i,j){1d k=f(a.4H,h.c9),l=b.3z("S2");1e l.eV="4I-8E",l.2M.oW="aY",l.2M.3M="gA",l.2M.1y="-RT",l.2M.1Q="he",l.2M.e9="0",l.1n=c,l.1v=e,l.RY="no",b.2A.4K(l),1m 3K(1a(b){1d c=l.7t.1J;l.7t.8n=l.8n=1a(){1d a=S1(1a(){c.2A.qQ.1i>0&&(g(c.4H),S0(a),"fM"===h.1S&&(l.7t.o7(i,j),!/(NQ|NT|NW)/g.7k(NJ.w8)||l.7t.NH===j&&l.7t.ND===i||(c.4H.2M.1Q=-j+"px",c.4H.2M.1y=-i+"px",c.4H.2M.3M="pr")),b(l))},50)},c.4Y(),c.p8("<2T>"),d(a,i,j),c.qi(c.Oh(k),c.4H),c.44()})}},{"./4R":13}],3:[1a(a,b,c){1a d(a){1b.r=0,1b.g=0,1b.b=0,1b.a=1s;1b.se(a)||1b.s6(a)||1b.cO(a)||1b.9W(a)||1b.sb(a)||1b.sg(a)}d.1g.e3=1a(a){1d b=1-a;1e 1m d([1R.5m(1b.r*b),1R.5m(1b.g*b),1R.5m(1b.b*b),1b.a])},d.1g.eW=1a(){1e 0===1b.a},d.1g.wg=1a(){1e 0===1b.r&&0===1b.g&&0===1b.b},d.1g.se=1a(a){1e bf.cK(a)&&(1b.r=1R.7b(a[0],1O),1b.g=1R.7b(a[1],1O),1b.b=1R.7b(a[2],1O),a.1i>3&&(1b.a=a[3])),bf.cK(a)};1d e=/^#([a-f0-9]{3})$/i;d.1g.sg=1a(a){1d b=1s;1e 1s!==(b=a.4t(e))&&(1b.r=2H(b[1][0]+b[1][0],16),1b.g=2H(b[1][1]+b[1][1],16),1b.b=2H(b[1][2]+b[1][2],16)),1s!==b};1d f=/^#([a-f0-9]{6})$/i;d.1g.sb=1a(a){1d b=1s;1e 1s!==(b=a.4t(f))&&(1b.r=2H(b[1].2w(0,2),16),1b.g=2H(b[1].2w(2,4),16),1b.b=2H(b[1].2w(4,6),16)),1s!==b};1d g=/^cO\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;d.1g.cO=1a(a){1d b=1s;1e 1s!==(b=a.4t(g))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3])),1s!==b};1d h=/^9W\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d?\\.?\\d+)\\s*\\)$/;d.1g.9W=1a(a){1d b=1s;1e 1s!==(b=a.4t(h))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3]),1b.a=ax(b[4])),1s!==b},d.1g.1t=1a(){1e 1s!==1b.a&&1!==1b.a?"9W("+[1b.r,1b.g,1b.b,1b.a].8L(",")+")":"cO("+[1b.r,1b.g,1b.b].8L(",")+")"},d.1g.s6=1a(a){a=a.8F();1d b=i[a];if(b)1b.r=b[0],1b.g=b[1],1b.b=b[2];2p if("Mn"===a)1e 1b.r=1b.g=1b.b=1b.a=0,!0;1e!!b},d.1g.uP=!0;1d i={Mu:[8I,gq,1O],N4:[6Y,oP,s8],Nl:[0,1O,1O],Np:[g0,1O,uJ],Nr:[8I,1O,1O],N9:[8S,8S,b0],Ok:[1O,q9,rA],Pi:[0,0,0],Po:[1O,oP,8h],P7:[0,0,1O],Pb:[PP,43,PU],Pz:[qd,42,42],Py:[go,s7,oE],P3:[95,uM,gP],Oz:[g0,1O,0],Oy:[ex,67,30],Ox:[1O,g0,80],Ow:[3H,Ov,Op],On:[1O,gq,b0],Or:[b0,20,60],Ou:[0,1O,1O],Ot:[0,0,8T],Os:[0,8T,8T],OH:[s7,uU,11],OX:[bB,bB,bB],OW:[0,3H,0],OV:[bB,bB,bB],P2:[P1,P0,qf],OU:[8T,0,8T],OL:[85,qf,47],OJ:[1O,pt,0],OI:[gK,50,i4],OO:[8T,0,0],OP:[OS,OR,lM],Te:[gm,rs,gm],UL:[72,61,8T],Y8:[47,79,79],Y1:[47,79,79],WE:[0,eD,i3],WT:[X4,0,9S],X3:[1O,20,oG],X2:[0,rP,1O],Xd:[67,67,67],Wv:[67,67,67],Y9:[30,fL,1O],XD:[s9,34,34],XZ:[1O,6Y,8I],Xe:[34,8T,34],Xf:[1O,0,1O],WU:[b0,b0,b0],Xn:[gq,gq,1O],WV:[1O,s8,0],Xh:[i5,qd,32],Xg:[3V,3V,3V],Xm:[0,3V,0],X8:[q6,1O,47],Wx:[3V,3V,3V],Ws:[8I,1O,8I],WL:[1O,67,oM],Xo:[8h,92,92],Xx:[75,0,om],XH:[1O,1O,8I],Uq:[8I,9O,pt],Ut:[9O,9O,6Y],Uu:[1O,8I,8S],Uo:[v3,Uh,0],Uj:[1O,6Y,8h],Um:[q6,op,9O],Uz:[8I,3V,3V],UP:[eK,1O,1O],UO:[6Y,6Y,ex],UR:[9S,9S,9S],UK:[fL,ap,fL],UJ:[9S,9S,9S],Tw:[1O,uH,Tk],Tj:[1O,gP,lM],Tq:[32,s9,qg],Tn:[oE,eD,6Y],TP:[rS,rR,gK],U7:[rS,rR,gK],Ua:[lP,rA,go],TX:[1O,1O,eK],TU:[0,1O,0],TS:[50,8h,50],TY:[6Y,8I,9O],U1:[1O,0,1O],UX:[3V,0,0],VW:[rt,8h,qg],VZ:[0,0,8h],W0:[W3,85,9S],VT:[oG,b8,rD],VM:[60,rQ,VL],VK:[ug,uO,ap],VO:[0,6Y,rM],VS:[72,i3,i4],VR:[VQ,21,rz],W4:[25,25,b8],W5:[8S,1O,6Y],Wi:[1O,q9,rw],Wh:[1O,q9,Wj],Wk:[1O,go,q6],We:[0,0,3V],Wa:[Wc,8S,9O],Wb:[3V,3V,0],VJ:[qf,uL,35],Vd:[1O,qd,0],Vg:[1O,69,0],V8:[i5,b8,V1],V0:[ap,uK,qg],V7:[rB,V5,rB],Vl:[Vy,ap,ap],Vx:[rD,b8,oG],Vw:[1O,Vz,VB],VF:[1O,i5,VD],Vv:[8h,rz,63],Vo:[1O,gM,tA],Vn:[ry,gP,ry],Vm:[lP,eK,9O],Vp:[3V,0,3V],Vq:[rt,51,gK],Vt:[1O,0,0],Vs:[rs,gm,gm],K3:[65,67,rw],E3:[8T,69,19],E2:[6Y,3V,E1],E4:[v4,v5,96],E5:[46,8T,87],E8:[1O,8S,ap],E7:[gP,82,45],Ej:[gM,gM,gM],Ed:[oE,eD,oP],Ei:[uS,90,8h],DP:[b8,3V,fL],Dl:[b8,3V,fL],Dd:[1O,6Y,6Y],D4:[0,1O,g0],Dc:[70,om,oM],yc:[ex,oM,pt],Du:[0,3V,3V],Dx:[op,rP,op],Ey:[1O,99,71],Ex:[64,eK,m8],EB:[ap,om,ap],EJ:[8S,go,rQ],EF:[1O,1O,1O],EZ:[8S,8S,8S],F0:[1O,1O,0],Fd:[rM,8h,50]};b.2n=d},{}],4:[1a(b,c,d){1a e(a,b){1d c=x++;if(b=b||{},b.gd&&(r.1B.gd=!0,r.1B.5Z=aG.cQ()),b.cN="3Q"==1p b.cN?!0:b.cN,b.9J="3Q"==1p b.9J?!1:b.9J,b.cZ="3Q"==1p b.cZ?!0:b.cZ,b.c9="3Q"==1p b.c9?!1:b.c9,b.cS="3Q"==1p b.cS?nC:b.cS,b.2D="1a"==1p b.2D?b.2D:n,b.2g=!!b.2g,"ar"==1p a){if("ar"!=1p b.5e)1e 3K.g4("tS 2X be Fb e0 rK 78");1d d=1s!=b.1n?b.1n:2t.rL,e=1s!=b.1v?b.1v:2t.rH;1e u(l(a),b.5e,1J,d,e,b).2K(1a(a){1e g(a.7t.1J.4H,a,b,d,e)})}1d h=(1x 0===a?[1J.4H]:a.1i?a:[a])[0];1e h.3x(w+c,c),f(h.6i,b,h.6i.9y.rL,h.6i.9y.rH,c).2K(1a(a){1e"1a"==1p b.gY&&(r("1B.gY is Fh, 4I Fa a 3K F1 a7 2l"),b.gY(a)),a})}1a f(a,b,c,d,e){1e t(a,a,c,d,b,a.9y.rG,a.9y.rI).2K(1a(f){r("F6 Ar");1d h=w+e,i="["+h+"=\'"+e+"\']";a.pm(i).As(h);1d j=f.7t,k=j.1J.pm(i),l="1a"==1p b.rJ?3K.4y(b.rJ(j.1J)):3K.4y(!0);1e l.2K(1a(){1e g(k,f,b,c,d)})})}1a g(a,b,c,d,e){1d f=b.7t,g=1m m(f.1J),l=1m o(c,g),n=v(a),q="fM"===c.1S?d:j(f.1J),s="fM"===c.1S?e:k(f.1J),t=1m c.2D(q,s,l,c,1J),u=1m p(a,t,g,l,c);1e u.g6.2K(1a(){r("sI rK");1d d;1e d="fM"===c.1S?i(t.2l,{1n:t.2l.1n,1v:t.2l.1v,1Q:0,1y:0,x:0,y:0}):a===f.1J.2A||a===f.1J.4H||1s!=c.2l?t.2l:i(t.2l,{1n:1s!=c.1n?c.1n:n.1n,1v:1s!=c.1v?c.1v:n.1v,1Q:n.1Q,1y:n.1y,x:0,y:0}),h(b,c),d})}1a h(a,b){b.cZ&&(a.pj.aj(a),r("Af up 8E"))}1a i(a,b){1d c=1J.3z("2l"),d=1R.7b(a.1n-1,1R.5f(0,b.1y)),e=1R.7b(a.1n,1R.5f(1,b.1y+b.1n)),f=1R.7b(a.1v-1,1R.5f(0,b.1Q)),g=1R.7b(a.1v,1R.5f(1,b.1Q+b.1v));c.1n=b.1n,c.1v=b.1v;1d h=e-d,i=g-f;1e r("AY 2l at:","1y:",b.1y,"1Q:",b.1Q,"1n:",h,"1v:",i),r("AV B4 ez 1n",b.1n,"2Q 1v",b.1v,"ez x",d,"2Q y",f),c.4J("2d").9j(a,d,f,h,i,b.x,b.y,h,i),c}1a j(a){1e 1R.5f(1R.5f(a.2A.sh,a.4H.sh),1R.5f(a.2A.cH,a.4H.cH),1R.5f(a.2A.si,a.4H.si))}1a k(a){1e 1R.5f(1R.5f(a.2A.sQ,a.4H.sQ),1R.5f(a.2A.cI,a.4H.cI),1R.5f(a.2A.sR,a.4H.sR))}1a l(a){1d b=1J.3z("a");1e b.81=a,b.81=b.81,b}1d m=b("./6D"),n=b("./sP/2l"),o=b("./sS"),p=b("./sT"),q=b("./8M"),r=b("./4R"),s=b("./4L"),t=b("./gr"),u=b("./5e").pn,v=s.eL,w="1l-4I-1P",x=0;e.cb=n,e.AP=q,e.4R=r,e.4L=s;1d y="3Q"==1p 1J||"1a"!=1p 1u.3n||"1a"!=1p 1J.3z("2l").4J?1a(){1e 3K.g4("No 2l 6D")}:e;c.2n=y,"1a"==1p a&&a.eI&&a("4I",[],1a(){1e y})},{"./gr":2,"./sS":11,"./4R":13,"./8M":14,"./sT":15,"./5e":16,"./sP/2l":20,"./6D":22,"./4L":26}],5:[1a(a,b,c){1a d(a){if(1b.3a=a,e("sO 1I",a),!1b.8c||!1b.1W){e("Ay sO"),d.1g.1W=1m 9e;1d b=1b.1W;d.1g.8c=1m 3K(1a(a,c){b.8n=a,b.7v=c,b.3a=f(),b.md===!0&&a(b)})}}1d e=a("./4R"),f=a("./4L").lF;b.2n=d},{"./4R":13,"./4L":26}],6:[1a(a,b,c){1a d(a,b){1d c,d,f=1J.3z("1h"),g=1J.3z("7g"),h=1J.3z("1r"),i="C4 Cm";f.2M.oW="aY",f.2M.gg=a,f.2M.2v=b,f.2M.7w=0,f.2M.gL=0,1J.2A.4K(f),g.3a=e(),g.1n=1,g.1v=1,g.2M.7w=0,g.2M.gL=0,g.2M.sK="p5",h.2M.gg=a,h.2M.2v=b,h.2M.7w=0,h.2M.gL=0,h.4K(1J.dW(i)),f.4K(h),f.4K(g),c=g.cC-h.cC+1,f.aj(h),f.4K(1J.dW(i)),f.2M.vC="eb",g.2M.sK="3Z",d=g.cC-f.cC+1,1J.2A.aj(f),1b.p5=c,1b.p4=1,1b.ld=d}1d e=a("./4L").lF;b.2n=d},{"./4L":26}],7:[1a(a,b,c){1a d(){1b.1l={}}1d e=a("./5M");d.1g.x2=1a(a,b){1e 1x 0===1b.1l[a+"-"+b]&&(1b.1l[a+"-"+b]=1m e(a,b)),1b.1l[a+"-"+b]},b.2n=d},{"./5M":6}],8:[1a(a,b,c){1a d(b,c,d){1b.1W=1s,1b.3a=b;1d e=1b,g=f(b);1b.8c=(c?1m 3K(1a(a){"BC:ty"===b.7t.1J.C0||1s==b.7t.1J.4H?b.7t.8n=b.8n=1a(){a(b)}:a(b)}):1b.sM(d.5e,g,d)).2K(1a(b){1d c=a("./sN");1e c(b.7t.1J.4H,{1S:"fM",1n:b.1n,1v:b.1v,5e:d.5e,c9:d.c9,cZ:d.cZ,9J:d.9J,cS:d.cS/2})}).2K(1a(a){1e e.1W=a})}1d e=a("./4L"),f=e.eL,g=a("./5e").pn;d.1g.sM=1a(a,b,c){1d d=1b.3a;1e g(d.3a,a,d.6i,b.1n,b.1v,c)},b.2n=d},{"./sN":4,"./5e":16,"./4L":26}],9:[1a(a,b,c){1a d(a){1b.3a=a.1k,1b.73=[],1b.1S=1s,1b.x0=.5,1b.y0=.5,1b.x1=.5,1b.y1=.5,1b.8c=3K.4y(!0)}d.gQ={lL:1,uZ:2},d.oZ=/^\\s*(9W?\\(\\s*\\d{1,3},\\s*\\d{1,3},\\s*\\d{1,3}(?:,\\s*[0-9\\.]+)?\\s*\\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\\s+(\\d{1,3}(?:\\.\\d+)?)(%|px)?)?(?:\\s|$)/i,b.2n=d},{}],10:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1m 9e;1d c=1b;1b.eX=1s,1b.8c=1m 3K(1a(d,e){c.1W.8n=d,c.1W.7v=e,b&&(c.1W.g8="K5"),c.1W.3a=a,c.1W.md===!0&&d(c.1W)})}b.2n=d},{}],11:[1a(a,b,c){1a d(a,b){1b.e1=1s,1b.1B=a,1b.6D=b,1b.a0=1b.pg(2t.bT.81)}1d e=a("./4R"),f=a("./su"),g=a("./sr"),h=a("./sq"),i=a("./st"),j=a("./gl"),k=a("./sp"),l=a("./gj"),m=a("./sk"),n=a("./4L").fP;d.1g.sY=1a(a){1d b=[];1e a.t5(1a(a,b){4F(b.1P.6T){1U"vm":1e a.5R([{3O:[b.1P.3a],5v:"78"}]);1U"2U":1U"oC":1e a.5R([{3O:[b.1P],5v:b.1P.6T}])}1e a},[]).3P(1b.ox(b,1b.ou),1b),b},d.1g.t1=1a(a,b){1e b.oy().2E(1b.sU).3P(1b.ox(a,1b.ou),1b),a},d.1g.ox=1a(a,b){1e 1a(c){c.3O.3P(1a(d){1b.t2(a,d)||(a.ad(0,0,b.1K(1b,c)),e("Ky 1W #"+a.1i,"ar"==1p d?d.2w(0,3H):d))},1b)}},d.1g.sU=1a(a){1e"4D"!==a.5v},d.1g.ou=1a(a){if("78"===a.5v){1d b=a.3O[0];1e!1b.oR(b)||1b.6D.2U||1b.1B.9J?b.4t(/1l:1W\\/.*;7T,/i)?1m f(b.2B(/78\\([\'"]{0,}|[\'"]{0,}\\)$/gi,""),!1):1b.pf(b)||1b.1B.9J===!0||1b.oR(b)?1m f(b,!1):1b.6D.uq&&!1b.1B.9J&&1b.1B.Kx?1m f(b,!0):1b.1B.5e?1m h(b,1b.1B.5e):1m g(b):1m j(b)}1e"lE-gO"===a.5v?1m l(a):"gO"===a.5v?1m m(a):"2U"===a.5v?1m k(a.3O[0],1b.6D.2U):"oC"===a.5v?1m i(a.3O[0],1b.pf(a.3O[0].3a),1b.1B):1m g(a)},d.1g.oR=1a(a){1e"2U"===a.2w(a.1i-3).8F()||j.1g.mh(a)},d.1g.t2=1a(a,b){1e a.gc(1a(a){1e a.3a===b})},d.1g.pf=1a(a){1e 1b.pg(a)===1b.a0},d.1g.pg=1a(a){1d b=1b.e1||(1b.e1=1J.3z("a"));1e b.81=a,b.81=b.81,b.Kv+b.Ko+b.Kn},d.1g.sZ=1a(a){1e 1b.gZ(a,1b.1B.cS)["2S"](1a(){1d b=1m g(a.3a);1e b.8c.2K(1a(b){a.1W=b})})},d.1g.eZ=1a(a){1d b=1s;1e 1b.2R.gc(1a(c){1e(b=c).3a===a})?b:1s},d.1g.r0=1a(a){1e 1b.2R=a.t5(n(1b.t1,1b),1b.sY(a)),1b.2R.3P(1a(a,b){a.8c.2K(1a(){e("Jx eJ 1W #"+(b+1),a)},1a(c){e("Jz cz 1W #"+(b+1),a,c)})}),1b.g6=3K.mm(1b.2R.5l(1b.sZ,1b)),e("sI Jk 2R"),1b},d.1g.gZ=1a(a,b){1d c,d=3K.Jj([a.8c,1m 3K(1a(d,f){c=b3(1a(){e("Jm Jn cz 1W",a),f(a)},b)})]).2K(1a(a){1e sH(c),a});1e d["2S"](1a(){sH(c)}),d},b.2n=d},{"./sr":5,"./st":8,"./su":10,"./gj":12,"./4R":13,"./sq":17,"./gl":23,"./sp":24,"./4L":26,"./sk":27}],12:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S=e.gQ.lL;1d b=d.sj.7k(a.3O[0])||!e.oZ.7k(a.3O[0]);b?a.3O[0].5S(/\\s+/).tm().3P(1a(a,b){4F(a){1U"1y":1b.x0=0,1b.x1=1;2C;1U"1Q":1b.y0=0,1b.y1=1;2C;1U"1G":1b.x0=1,1b.x1=0;2C;1U"7q":1b.y0=1,1b.y1=0;2C;1U"to":1d c=1b.y0,d=1b.x0;1b.y0=1b.y1,1b.x0=1b.x1,1b.x1=d,1b.y1=c;2C;1U"4j":2C;1j:1d e=.oh*5W(a,10);if(iv(e))2C;0===b?(1b.y0=e,1b.y1=1-1b.y0):(1b.x0=e,1b.x1=1-1b.x0)}},1b):(1b.y0=0,1b.y1=1),1b.73=a.3O.9E(b?1:0).5l(1a(a){1d b=a.4t(e.oZ),c=+b[2],d=0===c?"%":b[3];1e{3q:1m f(b[1]),7x:"%"===d?c/3H:1s}}),1s===1b.73[0].7x&&(1b.73[0].7x=0),1s===1b.73[1b.73.1i-1].7x&&(1b.73[1b.73.1i-1].7x=1),1b.73.3P(1a(a,b){1s===a.7x&&1b.73.9E(b).gc(1a(c,d){1e 1s!==c.7x?(a.7x=(c.7x-1b.73[b-1].7x)/(d+1)+1b.73[b-1].7x,!0):!1},1b)},1b)}1d e=a("./iH"),f=a("./3q");d.1g=1u.3n(e.1g),d.sj=/^\\s*(?:to|1y|1G|1Q|7q|4j|\\d{1,3}(?:\\.\\d+)?%?)(?:\\s|$)/i,b.2n=d},{"./3q":3,"./iH":9}],13:[1a(a,b,c){1d d=1a(){d.1B.gd&&2t.3l&&2t.3l.4R&&LP.1g.fP.1K(2t.3l.4R,2t.3l).6R(2t.3l,[aG.cQ()-d.1B.5Z+"ms","4I:"].5R([].9E.1K(aZ,0)))};d.1B={gd:!1},b.2n=d},{}],14:[1a(a,b,c){1a d(a,b){1b.1P=a,1b.2x=b,1b.8r=1s,1b.a2=1s,1b.5y=1s,1b.3L=[],1b.9q=[],1b.eH=1s,1b.em=1s,1b.cM=1s,1b.oU={},1b.ek={},1b.ef=1s,1b.eg=1s,1b.gk=1s,1b.eQ=!1,1b.91=1s}1a e(a){1d b=a.1B[a.LZ||0];1e b?b.1w||"":""}1a f(a){if(a&&"eY"===a[1])1e a[2].5S(",").5l(1a(a){1e 5W(a.55())});if(a&&"sD"===a[1]){1d b=a[2].5S(",").5l(1a(a){1e 5W(a.55())});1e[b[0],b[1],b[4],b[5],b[12],b[13]]}}1a g(a){1e-1!==a.1t().3U("%")}1a h(a){1e a.2B("px","")}1a i(a){1e 5W(a)}1d j=a("./3q"),k=a("./4L"),l=k.eL,m=k.lD,n=k.eH;d.1g.gs=1a(a){a.em=1b.em,a.5y=1b.5y,a.a2=1b.a2,a.3L=1b.3L,a.9q=1b.9q,a.cM=1b.cM,a.ek=1b.ek,a.ef=1b.ef,a.91=1b.91},d.1g.qb=1a(){1e 1s===1b.91?1b.91=1b.sn("91"):1b.91},d.1g.vS=1a(a){1b.8r=a,a.dZ.1L(1b)},d.1g.gC=1a(){1e 1b.1P.6c===9h.gy?1b.2x.em:"4D"!==1b.2z("7j")&&"aY"!==1b.2z("oW")&&!1b.1P.m2("1l-4I-LX")&&("gB"!==1b.1P.6T||"aY"!==1b.1P.eU("1S"))},d.1g.2z=1a(a){1e 1b.cM||(1b.cM=1b.eQ?1b.2x.gw(1b.7U?":7U":":os"):1b.gw(1s)),1b.ek[a]||(1b.ek[a]=1b.cM[a])},d.1g.p0=1a(a){1d b=["ov","gt","ms","o"],c=1b.2z(a);1e 1x 0===c&&b.gc(1a(b){1e c=1b.2z(b+a.3j(0,1).9a()+a.3j(1)),1x 0!==c},1b),1x 0===c?1s:c},d.1g.gw=1a(a){1e 1b.1P.6i.9y.L4(1b.1P,a)},d.1g.7P=1a(a){1d b=2H(1b.2z(a),10);1e iv(b)?0:b},d.1g.3q=1a(a){1e 1b.oU[a]||(1b.oU[a]=1m j(1b.2z(a)))},d.1g.sn=1a(a){1d b=5W(1b.2z(a));1e iv(b)?0:b},d.1g.gf=1a(){1d a=1b.2z("gf");4F(2H(a,10)){1U KX:a="vj";2C;1U uI:a="eb"}1e a},d.1g.qr=1a(){1d a=1b.2z("3L").4t(1b.sA);1e a?{1Q:2H(a[1],10),1G:2H(a[2],10),7q:2H(a[3],10),1y:2H(a[4],10)}:1s},d.1g.oy=1a(){1e 1b.ef||(1b.ef=m(1b.2z("KT")))},d.1g.gh=1a(a,b){1d c=(1b.2z(a)||"").5S(",");1e c=c[b||0]||c[0]||"7n",c=c.55().5S(" "),1===c.1i&&(c=[c[0],g(c[0])?"7n":c[0]]),c},d.1g.tF=1a(a,b,c){1d d,e,f=1b.gh("La",c);if(g(f[0]))d=a.1n*5W(f[0])/3H;2p{if(/so|Ln/.7k(f[0])){1d h=a.1n/a.1v,i=b.1n/b.1v;1e i>h^"so"===f[0]?{1n:a.1v*i,1v:a.1v}:{1n:a.1n,1v:a.1n/i}}d=2H(f[0],10)}1e e="7n"===f[0]&&"7n"===f[1]?b.1v:"7n"===f[1]?d/b.1n*b.1v:g(f[1])?a.1v*5W(f[1])/3H:2H(f[1],10),"7n"===f[0]&&(d=e/b.1v*b.1n),{1n:d,1v:e}},d.1g.tt=1a(a,b,c,d){1d e,f,h=1b.gh("Ld",c);1e e=g(h[0])?(a.1n-(d||b).1n)*(5W(h[0])/3H):2H(h[0],10),f="7n"===h[1]?e/b.1n*b.1v:g(h[1])?(a.1v-(d||b).1v)*5W(h[1])/3H:2H(h[1],10),"7n"===h[0]&&(e=f/b.1v*b.1n),{1y:e,1Q:f}},d.1g.tw=1a(a){1e 1b.gh("Ji",a)[0]},d.1g.wL=1a(){1d a=1b.2z("Hc"),b=[];if(a&&"4D"!==a)1I(1d c=a.4t(1b.sE),d=0;c&&d0?(1b.pd=0,1b.gI(1b.az,a)):a():(1b.az.3P(1b.oH,1b),a())},1b))},1b))}1a e(a){1e a.2x&&a.2x.3L.1i}1a f(a){1e a.2B(/(\\-[a-z])/g,1a(a){1e a.9a().2B("-","")})}1a g(){}1a h(a,b,c,d){1e a.5l(1a(e,f){if(e.1n>0){1d g=b.1y,h=b.1Q,i=b.1n,j=b.1v-a[2].1n;4F(f){1U 0:j=a[0].1n,e.3O=l({c1:[g,h],c2:[g+i,h],c3:[g+i-a[1].1n,h+j],c4:[g+a[3].1n,h+j]},d[0],d[1],c.eO,c.ev,c.eT,c.e7);2C;1U 1:g=b.1y+b.1n-a[1].1n,i=a[1].1n,e.3O=l({c1:[g+i,h],c2:[g+i,h+j+a[2].1n],c3:[g,h+j],c4:[g,h+a[0].1n]},d[1],d[2],c.eT,c.e7,c.eS,c.e4);2C;1U 2:h=h+b.1v-a[2].1n,j=a[2].1n,e.3O=l({c1:[g+i,h+j],c2:[g,h+j],c3:[g+a[3].1n,h],c4:[g+i-a[3].1n,h]},d[2],d[3],c.eS,c.e4,c.eR,c.e5);2C;1U 3:i=a[3].1n,e.3O=l({c1:[g,h+j+a[2].1n],c2:[g,h],c3:[g+i,h+a[0].1n],c4:[g+i,h+j]},d[3],d[0],c.eR,c.e5,c.eO,c.ev)}}1e e})}1a i(a,b,c,d){1d e=4*((1R.I5(2)-1)/3),f=c*e,g=d*e,h=a+c,i=b+d;1e{p7:k({x:a,y:i},{x:a,y:i-g},{x:h-f,y:b},{x:h,y:b}),p6:k({x:a,y:b},{x:a+f,y:b},{x:h,y:i-g},{x:h,y:i}),oV:k({x:h,y:b},{x:h,y:b+g},{x:a+f,y:i},{x:a,y:i}),oX:k({x:h,y:i},{x:h-f,y:i},{x:a,y:b+g},{x:a,y:b})}}1a j(a,b,c){1d d=a.1y,e=a.1Q,f=a.1n,g=a.1v,h=b[0][0]f+c[3].1n?0:k-c[3].1n,l-c[0].1n).p6.9f(.5),eS:i(d+s,e+r,m,n).oV.9f(.5),e4:i(d+1R.7b(s,f-c[3].1n),e+1R.7b(r,g+c[0].1n),1R.5f(0,m-c[1].1n),n-c[2].1n).oV.9f(.5),eR:i(d,e+t,o,p).oX.9f(.5),e5:i(d+c[3].1n,e+t,1R.5f(0,o-c[3].1n),p-c[2].1n).oX.9f(.5)}}1a k(a,b,c,d){1d e=1a(a,b,c){1e{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}};1e{5Z:a,I0:b,HW:c,cj:d,9f:1a(f){1d g=e(a,b,f),h=e(b,c,f),i=e(c,d,f),j=e(g,h,f),l=e(h,i,f),m=e(j,l,f);1e[k(a,g,j,m),k(m,l,i,d)]},et:1a(a){a.1L(["qE",b.x,b.y,c.x,c.y,d.x,d.y])},p9:1a(d){d.1L(["qE",c.x,c.y,b.x,b.y,a.x,a.y])}}}1a l(a,b,c,d,e,f,g){1d h=[];1e b[0]>0||b[1]>0?(h.1L(["5o",d[1].5Z.x,d[1].5Z.y]),d[1].et(h)):h.1L(["5o",a.c1[0],a.c1[1]]),c[0]>0||c[1]>0?(h.1L(["5o",f[0].5Z.x,f[0].5Z.y]),f[0].et(h),h.1L(["5o",g[0].cj.x,g[0].cj.y]),g[0].p9(h)):(h.1L(["5o",a.c2[0],a.c2[1]]),h.1L(["5o",a.c3[0],a.c3[1]])),b[0]>0||b[1]>0?(h.1L(["5o",e[1].cj.x,e[1].cj.y]),e[1].p9(h)):h.1L(["5o",a.c4[0],a.c4[1]]),h}1a m(a,b,c,d,e,f,g){b[0]>0||b[1]>0?(a.1L(["5o",d[0].5Z.x,d[0].5Z.y]),d[0].et(a),d[1].et(a)):a.1L(["5o",f,g]),(c[0]>0||c[1]>0)&&a.1L(["5o",e[0].5Z.x,e[0].5Z.y])}1a n(a){1e a.7P("cY")<0}1a o(a){1e a.7P("cY")>0}1a p(a){1e 0===a.7P("cY")}1a q(a){1e-1!==["eu","eu-af","eu-qs"].3U(a.2z("7j"))}1a r(a){1e a 2Y V}1a s(a){1e a.1P.1l.55().1i>0}1a t(a){1e/^(eb|4D|he)$/.7k(a.2x.2z("If"))}1a u(a){1e["Ie","Ic","Ig","Es"].5l(1a(b){1d c=a.2z("e9"+b+"Ii"),d=c.5S(" ");1e d.1i<=1&&(d[1]=d[0]),d.5l(G)})}1a v(a){1e a.6c===9h.gy||a.6c===9h.eq}1a w(a){1d b=a.2z("3M"),c=-1!==["pr","Ij","gA"].3U(b)?a.2z("cY"):"7n";1e"7n"!==c}1a x(a){1e"Ik"!==a.2z("3M")}1a y(a){1e"4D"!==a.2z("Ih")}1a z(a){1e-1!==["eu-af","eu-qs"].3U(a.2z("7j"))}1a A(a){1d b=1b;1e 1a(){1e!a.6R(b,aZ)}}1a B(a){1e a.1P.6c===9h.eq}1a C(a){1e a.eQ===!0}1a D(a){1e a.1P.6c===9h.gy}1a E(a){1e 1a(b,c){1e b.7P("cY")+a.3U(b)/a.1i-(c.7P("cY")+a.3U(c)/a.1i)}}1a F(a){1e a.qb()<1}1a G(a){1e 2H(a,10)}1a H(a){1e a.1n}1a I(a){1e a.1P.6c!==9h.eq||-1===["qH","Il","Im","Is","BR","It"].3U(a.1P.6T)}1a J(a){1e[].5R.6R([],a)}1a K(a){1d b=a.3j(0,1);1e b===a.3j(a.1i-1)&&b.4t(/\'|"/)?a.3j(1,a.1i-2):a}1a L(a){1I(1d b,c=[],d=0,e=!1;a.1i;)M(a[d])===e?(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)),e=!e,d=0):d++,d>=a.1i&&(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)));1e c}1a M(a){1e-1!==[32,13,10,9,45].3U(a)}1a N(a){1e/[^\\Ir-\\Iq]/.7k(a)}1d O=a("./4R"),P=a("gx"),Q=a("./8M"),R=a("./wu"),S=a("./wA"),T=a("./wx"),U=a("./3q"),V=a("./wv"),W=a("./4L"),X=W.fP,Y=W.eL,Z=W.lD,$=W.eH;d.1g.qn=1a(){1b.cn.3P(1a(a){if(B(a)){C(a)&&a.pq(),a.5y=1b.wC(a);1d b="aY"===a.2z("9g")?[a.5y.3L]:[],c=a.qr();c&&-1!==["pr","gA"].3U(a.2z("3M"))&&b.1L([["ew",a.a2.1y+c.1y,a.a2.1Q+c.1Q,c.1G-c.1y,c.7q-c.1Q]]),a.3L=e(a)?a.2x.3L.5R(b):b,a.9q="aY"!==a.2z("9g")?a.3L.5R([a.5y.3L]):a.3L,C(a)&&a.pk()}2p D(a)&&(a.3L=e(a)?a.2x.3L:[]);C(a)||(a.a2=1s)},1b)},d.1g.gI=1a(a,b,c){c=c||aG.cQ(),1b.oH(a[1b.pd++]),a.1i===1b.pd?b():c+20>aG.cQ()?1b.gI(a,b,c):b3(X(1a(){1b.gI(a,b)},1b),0)},d.1g.r7=1a(a){1b.ot(a,"."+S.1g.pb+\':7U { 7I: "" !7m; 7j: 4D !7m; }.\'+S.1g.pa+\':os { 7I: "" !7m; 7j: 4D !7m; }\')},d.1g.r8=1a(a){1b.ot(a,"* { -ov-4O: 4D !7m; -gt-4O: 4D !7m; -o-4O: 4D !7m; 4O: 4D !7m; -ov-gF: 4D !7m; -gt-gF: 4D !7m; -o-gF: 4D !7m; gF: 4D !7m;}")},d.1g.ot=1a(a,b){1d c=a.3z("2M");c.hy=b,a.2A.4K(c)},d.1g.rl=1a(a){1d b=[[a]];if(a.1P.6c===9h.eq){1d c=1b.ok(a,":7U"),d=1b.ok(a,":os");c&&b.1L(c),d&&b.1L(d)}1e J(b)},d.1g.ok=1a(a,b){1d c=a.gw(b);if(!c||!c.7I||"4D"===c.7I||"-gt-HQ-7I"===c.7I||"4D"===c.7j)1e 1s;1I(1d d=K(c.7I),e="78"===d.3j(0,3),g=1J.3z(e?"7g":"HS"),h=1m S(g,a,b),i=c.1i-1;i>=0;i--){1d j=f(c.1H(i));g.2M[j]=c[j]}if(g.eV=S.1g.pb+" "+S.1g.pa,e)1e g.3a=Z(d)[0].3O[0],[h];1d k=1J.dW(d);1e g.4K(k),[h,1m R(k,h)]},d.1g.q1=1a(a){1e J([].2E.1K(a.1P.qQ,v).5l(1a(b){1d c=[b.6c===9h.gy?1m R(b,a):1m Q(b,a)].2E(I);1e b.6c===9h.eq&&c.1i&&"oA"!==b.qU?c[0].gC()?c.5R(1b.q1(c[0])):[]:c},1b))},d.1g.q8=1a(a,b){1d c=1m V(b,a.qb(),a.1P,a.2x);a.gs(c);1d d=b?c.m3(1b):c.2x.8r;d.8Y.1L(c),a.8r=c},d.1g.rd=1a(){1b.cn.3P(1a(a){B(a)&&(1b.vH(a)||F(a)||w(a)||1b.vM(a)||a.9G())?1b.q8(a,!0):B(a)&&(x(a)&&p(a)||z(a)||y(a))?1b.q8(a,!1):a.vS(a.2x.8r)},1b)},d.1g.vM=1a(a){1e"J5"===a.1P.6T&&a.2x.3q("gE").eW()},d.1g.vH=1a(a){1e 1s===a.2x},d.1g.pQ=1a(a){a.8Y.J7(E(a.8Y.9E(0))),a.8Y.3P(1b.pQ,1b)},d.1g.wG=1a(a){1e 1a(b,c,d){if("4D"!==a.2x.2z("wT").3j(0,4)||0!==b.55().1i){if(1b.6D.lY&&!a.2x.9G()){1d e=d.9E(0,c).8L("").1i;1e 1b.w7(a.1P,e,b.1i)}if(a.1P&&"ar"==1p a.1P.1l){1d f=a.1P.vU(b.1i),g=1b.w2(a.1P,a.2x.9G());1e a.1P=f,g}}2p(!1b.6D.lY||a.2x.9G())&&(a.1P=a.1P.vU(b.1i));1e{}}},d.1g.w2=1a(a,b){1d c=a.6i.3z("vz"),d=a.pj,e=a.qh(!0);c.4K(a.qh(!0)),d.qi(c,a);1d f=b?$(c):Y(c);1e d.qi(e,c),f},d.1g.w7=1a(a,b,c){1d d=1b.qa||(1b.qa=a.6i.ed());1e d.Jf(a,b),d.Jg(a,b+c),d.eG()},d.1g.ac=1a(a){1d b=a.8Y.2E(n),c=a.dZ.2E(B),d=c.2E(A(y)),e=d.2E(A(x)).2E(A(q)),f=c.2E(A(x)).2E(y),h=d.2E(A(x)).2E(q),i=a.8Y.5R(d.2E(x)).2E(p),j=a.dZ.2E(D).2E(s),k=a.8Y.2E(o);b.5R(e).5R(f).5R(h).5R(i).5R(j).5R(k).3P(1a(a){1b.az.1L(a),r(a)&&(1b.ac(a),1b.az.1L(1m g))},1b)},d.1g.oH=1a(a){3c{a 2Y g?1b.2D.2V.lp():D(a)?(C(a.2x)&&a.2x.pq(),1b.oz(a),C(a.2x)&&a.2x.pk()):1b.vW(a)}2S(b){if(O(b),1b.1B.2g)1D b}},d.1g.vW=1a(a){r(a)&&(1b.2D.uB(a.91),1b.2D.2V.iF(),a.9G()&&1b.2D.uD(a.vY())),"gB"===a.1P.6T&&"tO"===a.1P.1S?1b.vk(a):"gB"===a.1P.6T&&"9Z"===a.1P.1S?1b.vc(a):1b.vZ(a)},d.1g.vZ=1a(a){1d b=a.aS();1b.2D.3L(a.9q,1a(){1b.2D.u4(a,b,a.5y.5y.5l(H))},1b),1b.2D.3L(a.3L,1a(){1b.2D.oS(a.5y.5y)},1b),1b.2D.3L(a.9q,1a(){4F(a.1P.6T){1U"2U":1U"oC":1d c=1b.2R.eZ(a.1P);c?1b.2D.gv(a,b,a.5y,c):O("1E cz <"+a.1P.6T+">",a.1P);2C;1U"vm":1d d=1b.2R.eZ(a.1P.3a);d?1b.2D.gv(a,b,a.5y,d):O("1E cz <7g>",a.1P.3a);2C;1U"vl":1b.2D.gv(a,b,a.5y,{1W:a.1P});2C;1U"oL":1U"gB":1U"oA":1b.vq(a)}},1b)},d.1g.vk=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v),d={1n:c-1,1v:c-1,1Q:b.1Q,1y:b.1y},e=[3,3],f=[e,e,e,e],g=[1,1,1,1].5l(1a(a){1e{3q:1m U("#vd"),1n:a}}),i=j(d,f,g);1b.2D.3L(a.9q,1a(){1b.2D.9o(d.1y+1,d.1Q+1,d.1n-2,d.1v-2,1m U("#vb")),1b.2D.oS(h(g,d,i,f)),a.1P.vf&&(1b.2D.5M(1m U("#vg"),"eb","eb","vj",c-3+"px","IH"),1b.2D.1w("✔",d.1y+c/6,d.1Q+c-1))},1b)},d.1g.vc=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v)-2;1b.2D.3L(a.9q,1a(){1b.2D.uN(b.1y+1,b.1Q+1,c,1m U("#vb"),1,1m U("#vd")),a.1P.vf&&1b.2D.4T(1R.eM(b.1y+c/4)+1,1R.eM(b.1Q+c/4)+1,1R.aN(c/2),1m U("#vg"))},1b)},d.1g.vq=1a(a){1d b=a.vr();if(b.1i>0){1d c=a.1P.6i,d=c.3z("vz"),e=["vC","54","gg","gf","2v","3q","tL","tM","tW","u5","1n","1v","HL","Gy","Gz","GC","Gx","Gw","Gs"];e.3P(1a(b){3c{d.2M[b]=a.2z(b)}2S(c){O("4I: Gt: Gv GJ in GK: "+c.aK)}});1d f=a.aS();d.2M.3M="gA",d.2M.1y=f.1y+"px",d.2M.1Q=f.1Q+"px",d.H2=b,c.2A.4K(d),1b.oz(1m R(d.bw,a)),c.2A.aj(d)}},d.1g.oz=1a(a){a.ul();1d b=P.dV.ow(a.1P.1l),c=1b.1B.GO&&!t(a)||N(a.1P.1l)?b.5l(1a(a){1e P.dV.2f([a])}):L(b),d=a.2x.gf(),e=a.2x.2z("2v"),f=a.2x.2z("gg"),g=a.2x.wL();1b.2D.5M(a.2x.3q("3q"),a.2x.2z("Gp"),a.2x.2z("Gb"),d,e,f),g.1i?1b.2D.uo(g[0].3q,g[0].wO,g[0].wE,g[0].wF):1b.2D.uh(),1b.2D.3L(a.2x.3L,1a(){c.5l(1b.wG(a),1b).3P(1a(b,d){b&&(1b.2D.1w(c[d],b.1y,b.7q),1b.wZ(a.2x,b,1b.wQ.x2(f,e)))},1b)},1b)},d.1g.wZ=1a(a,b,c){4F(a.2z("wT").5S(" ")[0]){1U"G7":1b.2D.9o(b.1y,1R.5m(b.1Q+c.p5+c.p4),b.1n,1,a.3q("3q"));2C;1U"Gf":1b.2D.9o(b.1y,1R.5m(b.1Q),b.1n,1,a.3q("3q"));2C;1U"5o-mQ":1b.2D.9o(b.1y,1R.eM(b.1Q+c.ld+c.p4),b.1n,1,a.3q("3q"))}};1d 9M={wh:[["e3",.6],["e3",.1],["e3",.1],["e3",.6]]};d.1g.wC=1a(a){1d b=a.aS(),c=u(a),d=["Gn","Go","Gl","Gk"].5l(1a(b,c){1d d=a.2z("e9"+b+"Gh"),e=a.3q("e9"+b+"Gj");"wh"===d&&e.wg()&&(e=1m U([1O,1O,1O,e.a]));1d f=9M[d]?9M[d][c]:1s;1e{1n:a.7P("e9"+b+"Hx"),3q:f?e[f[0]](f[1]):e,3O:1s}}),e=j(b,c,d);1e{3L:1b.wf(a,e,d,c,b),5y:h(d,b,e,c)}},d.1g.wf=1a(a,b,c,d,e){1d f=a.2z("9q"),g=[];4F(f){1U"7I-wn":1U"gL-wn":m(g,d[0],d[1],b.ev,b.e7,e.1y+c[3].1n,e.1Q+c[0].1n),m(g,d[1],d[2],b.e7,b.e4,e.1y+e.1n-c[1].1n,e.1Q+c[0].1n),m(g,d[2],d[3],b.e4,b.e5,e.1y+e.1n-c[1].1n,e.1Q+e.1v-c[2].1n),m(g,d[3],d[0],b.e5,b.ev,e.1y+c[3].1n,e.1Q+e.1v-c[2].1n);2C;1j:m(g,d[0],d[1],b.eO,b.eT,e.1y,e.1Q),m(g,d[1],d[2],b.eT,b.eS,e.1y+e.1n,e.1Q),m(g,d[2],d[3],b.eS,b.eR,e.1y+e.1n,e.1Q+e.1v),m(g,d[3],d[0],b.eR,b.eO,e.1y,e.1Q+e.1v)}1e g},b.2n=d},{"./3q":3,"./wx":7,"./4R":13,"./8M":14,"./wA":18,"./wv":21,"./wu":25,"./4L":26,gx:1}],16:[1a(a,b,c){1a d(a,b,c){1d d="Hp"in 1m uW;if(!b)1e 3K.g4("No 5e Hb");1d e=g(d),i=h(b,a,e);1e d?k(i):f(c,i,e).2K(1a(a){1e o(a.7I)})}1a e(a,b,c){1d d="g8"in 1m 9e,e=g(d),i=h(b,a,e);1e d?3K.4y(i):f(c,i,e).2K(1a(a){1e"1l:"+a.1S+";7T,"+a.7I})}1a f(a,b,c){1e 1m 3K(1a(d,e){1d f=a.3z("rV"),g=1a(){Hd 2t.4I.5e[c],a.2A.aj(f)};2t.4I.5e[c]=1a(a){g(),d(a)},f.3a=b,f.7v=1a(a){g(),e(a)},a.2A.4K(f)})}1a g(a){1e a?"":"H9"+aG.cQ()+"9M"+ ++p+"9M"+1R.5m(qX*1R.nW())}1a h(a,b,c){1e a+"?78="+hC(b)+(c.1i?"&H8=4I.5e."+c:"")}1a i(a){1e 1a(b){1d c,d=1m wr;3c{c=d.H5(b,"1w/2T")}2S(e){m("wr 2a lT, wt v9 to oY"),c=1J.H7.oY("");3c{c.4Y(),c.p8(b),c.44()}2S(f){m("oY p8 2a lT, wt v9 to 1J.2A.hy"),c.2A.hy=b}}1d g=c.pm("tR");if(!g||!g.81.Hk){1d h=c.3z("tR");h.81=a,c.tQ.tI(h,c.tQ.bw)}1e c}}1a j(a,b,c,e,f,g){1e 1m d(a,b,2t.1J).2K(i(a)).2K(1a(a){1e n(a,c,e,f,g,0,0)})}1d k=a("./g7"),l=a("./4L"),m=a("./4R"),n=a("./gr"),o=l.eF,p=0;c.tS=d,c.tP=e,c.pn=j},{"./gr":2,"./4R":13,"./4L":26,"./g7":28}],17:[1a(a,b,c){1a d(a,b){1d c=1J.3z("a");c.81=a,a=c.81,1b.3a=a,1b.1W=1m 9e;1d d=1b;1b.8c=1m 3K(1a(c,f){d.1W.g8="Lg",d.1W.8n=c,d.1W.7v=f,1m e(a,b,1J).2K(1a(a){d.1W.3a=a})["2S"](f)})}1d e=a("./5e").tP;b.2n=d},{"./5e":16}],18:[1a(a,b,c){1a d(a,b,c){e.1K(1b,a,b),1b.eQ=!0,1b.7U=":7U"===c}1d e=a("./8M");d.1g.gs=1a(a){d.1g.gs.1K(1b,a),a.eQ=!0,a.7U=1b.7U},d.1g=1u.3n(e.1g),d.1g.pq=1a(){1b.7U?1b.2x.1P.tI(1b.1P,1b.2x.1P.bw):1b.2x.1P.4K(1b.1P),1b.2x.1P.eV+=" "+1b.pc()},d.1g.pk=1a(){1b.1P.pj.aj(1b.1P),1b.2x.1P.eV=1b.2x.1P.eV.2B(1b.pc(),"")},d.1g.pc=1a(){1e 1b["Lr"+(1b.7U?"Ls":"Lq")]},d.1g.pb="Lm",d.1g.pa="Lo",b.2n=d},{"./8M":14}],19:[1a(a,b,c){1a d(a,b,c,d,e){1b.1n=a,1b.1v=b,1b.2R=c,1b.1B=d,1b.1J=e}1d e=a("./4R");d.1g.gv=1a(a,b,c,d){1d e=a.7P("tL"),f=a.7P("tM"),g=a.7P("tW"),h=a.7P("u5"),i=c.5y,j=b.1n-(i[1].1n+i[3].1n+e+g),k=b.1v-(i[0].1n+i[2].1n+f+h);1b.9j(d,0,0,d.1W.1n||j,d.1W.1v||k,b.1y+e+i[3].1n,b.1Q+f+i[0].1n,j,k)},d.1g.u4=1a(a,b,c){b.1v>0&&b.1n>0&&(1b.u7(a,b),1b.u1(a,b,c))},d.1g.u7=1a(a,b){1d c=a.3q("gE");c.eW()||1b.9o(b.1y,b.1Q,b.1n,b.1v,c)},d.1g.oS=1a(a){a.3P(1b.u3,1b)},d.1g.u3=1a(a){a.3q.eW()||1s===a.3O||1b.uV(a.3O,a.3q)},d.1g.u1=1a(a,b,c){1d d=a.oy();d.tm().3P(1a(d,f,g){4F(d.5v){1U"78":1d h=1b.2R.eZ(d.3O[0]);h?1b.tq(a,b,h,g.1i-(f+1),c):e("1E cz 6H-1W",d.3O[0]);2C;1U"lE-gO":1U"gO":1d i=1b.2R.eZ(d.1k);i?1b.ux(i,b,c):e("1E cz 6H-1W",d.3O[0]);2C;1U"4D":2C;1j:e("L1 6H-1W 1S",d.3O[0])}},1b)},d.1g.tq=1a(a,b,c,d,e){1d f=a.tF(b,c.1W,d),g=a.tt(b,c.1W,d,f),h=a.tw(d);4F(h){1U"5x-x":1U"5x no-5x":1b.gJ(c,g,f,b,b.1y+e[3],b.1Q+g.1Q+e[0],u9,f.1v,e);2C;1U"5x-y":1U"no-5x 5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+e[0],f.1n,u9,e);2C;1U"no-5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+g.1Q+e[0],f.1n,f.1v,e);2C;1j:1b.ln(c,g,f,{1Q:b.1Q,1y:b.1y},e[3],e[0])}},b.2n=d},{"./4R":13}],20:[1a(a,b,c){1a d(a,b){f.6R(1b,aZ),1b.2l=1b.1B.2l||1b.1J.3z("2l"),1b.1B.2l||(1b.2l.1n=a,1b.2l.1v=b),1b.2V=1b.2l.4J("2d"),1b.gG=1b.1J.3z("2l").4J("2d"),1b.2V.L3="7q",1b.nT={},h("Lt cb ez 5r",a,"x",b)}1a e(a){1e a.1i>0}1d f=a("../2D"),g=a("../gj"),h=a("../4R");d.1g=1u.3n(f.1g),d.1g.cw=1a(a){1e 1b.2V.lk="3i"==1p a&&a.uP?a.1t():a,1b.2V},d.1g.9o=1a(a,b,c,d,e){1b.cw(e).ii(a,b,c,d)},d.1g.4T=1a(a,b,c,d){1b.cw(d),1b.2V.uk(),1b.2V.M7(a+c/2,b+c/2,c/2,0,2*1R.PI,!0),1b.2V.um(),1b.2V.e2()},d.1g.uN=1a(a,b,c,d,e,f){1b.4T(a,b,c,d),1b.2V.M6=f.1t(),1b.2V.M5()},d.1g.uV=1a(a,b){1b.pV(a),1b.cw(b).e2()},d.1g.uY=1a(a){if(1s===a.eX){1b.gG.9j(a.1W,0,0);3c{1b.gG.v1(0,0,1,1),a.eX=!1}2S(b){1b.gG=1J.3z("2l").4J("2d"),a.eX=!0}}1e a.eX},d.1g.9j=1a(a,b,c,d,e,f,g,h,i){(!1b.uY(a)||1b.1B.9J)&&1b.2V.9j(a.1W,b,c,d,e,f,g,h,i)},d.1g.3L=1a(a,b,c){1b.2V.iF(),a.2E(e).3P(1a(a){1b.pV(a).3L()},1b),b.1K(c),1b.2V.lp()},d.1g.pV=1a(a){1e 1b.2V.uk(),a.3P(1a(a,b){"ew"===a[0]?1b.2V.ew.6R(1b.2V,a.9E(1)):1b.2V[0===b?"Mj":a[0]+"To"].6R(1b.2V,a.9E(1))},1b),1b.2V.um(),1b.2V},d.1g.5M=1a(a,b,c,d,e,f){1b.cw(a).5M=[b,c,d,e,f].8L(" ").5S(",")[0]},d.1g.uo=1a(a,b,c,d){1b.cA("uc",a.1t()).cA("Mg",b).cA("Md",c).cA("Me",d)},d.1g.uh=1a(){1b.cA("uc","9W(0,0,0,0)")},d.1g.uB=1a(a){1b.2V.LF=a},d.1g.uD=1a(a){1b.2V.ak(a.a0[0],a.a0[1]),1b.2V.cp.6R(1b.2V,a.eY),1b.2V.ak(-a.a0[0],-a.a0[1])},d.1g.cA=1a(a,b){1e 1b.nT[a]!==b&&(1b.nT[a]=1b.2V[a]=b),1b},d.1g.1w=1a(a,b,c){1b.2V.tU(a,b,c)},d.1g.gJ=1a(a,b,c,d,e,f,g,h,i){1d j=[["5o",1R.5m(e),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(h+f)],["5o",1R.5m(e),1R.5m(h+f)]];1b.3L([j],1a(){1b.ln(a,b,c,d,i[3],i[0])},1b)},d.1g.ln=1a(a,b,c,d,e,f){1d g=1R.5m(d.1y+b.1y+e),h=1R.5m(d.1Q+b.1Q+f);1b.cw(1b.2V.Ly(1b.uC(a,c),"5x")),1b.2V.ak(g,h),1b.2V.e2(),1b.2V.ak(-g,-h)},d.1g.ux=1a(a,b){if(a 2Y g){1d c=1b.2V.LM(b.1y+b.1n*a.x0,b.1Q+b.1v*a.y0,b.1y+b.1n*a.x1,b.1Q+b.1v*a.y1);a.73.3P(1a(a){c.LQ(a.7x,a.3q.1t())}),1b.9o(b.1y,b.1Q,b.1n,b.1v,c)}},d.1g.uC=1a(a,b){1d c=a.1W;if(c.1n===b.1n&&c.1v===b.1v)1e c;1d d,e=1J.3z("2l");1e e.1n=b.1n,e.1v=b.1v,d=e.4J("2d"),d.9j(c,0,0,c.1n,c.1v,0,0,b.1n,b.1v),e},b.2n=d},{"../gj":12,"../4R":13,"../2D":19}],21:[1a(a,b,c){1a d(a,b,c,d){e.1K(1b,c,d),1b.uA=a,1b.8Y=[],1b.dZ=[],1b.91=(1b.2x?1b.2x.8r.91:1)*b}1d e=a("./8M");d.1g=1u.3n(e.1g),d.1g.m3=1a(a){1d b=1b.2x?1b.2x.8r:1s;1e b?b.uA?b:b.m3(a):a.8r},b.2n=d},{"./8M":14}],22:[1a(a,b,c){1a d(a){1b.lY=1b.uf(a),1b.uq=1b.ue(),1b.2U=1b.ud()}d.1g.uf=1a(a){1d b,c,d,e,f=!1;1e a.ed&&(b=a.ed(),b.eG&&(c=a.3z("JI"),c.2M.1v="JH",c.2M.7j="af",a.2A.4K(c),b.JD(c),d=b.eG(),e=d.1v,ug===e&&(f=!0),a.2A.aj(c))),f},d.1g.ue=1a(){1e"3Q"!=1p(1m 9e).g8},d.1g.ud=1a(){1d a=1m 9e,b=1J.3z("2l"),c=b.4J("2d");a.3a="1l:1W/2U+eC,<2U wc=\'gV://9d.w3.wp/wq/2U\'>";3c{c.9j(a,0,0),b.eo()}2S(d){1e!1}1e!0},b.2n=d},{}],23:[1a(a,b,c){1a d(a){1b.3a=a,1b.1W=1s;1d b=1b;1b.8c=1b.mc().2K(1a(){1e b.mh(a)?3K.4y(b.ub(a)):e(a)}).2K(1a(a){1e 1m 3K(1a(c){2t.4I.2U.eB.JN(a,b.lI.1K(b,c))})})}1d e=a("./g7"),f=a("./4L").eF;d.1g.mc=1a(){1e 2t.4I.2U&&2t.4I.2U.eB?3K.4y():3K.g4(1m 1E("4I.2U.js is 2a eJ, JW 7M 2U"))},d.1g.ub=1a(a){1e/^1l:1W\\/2U\\+eC;7T,/.7k(a)?1b.eF(1b.lA(a)):1b.lA(a)},d.1g.lA=1a(a){1e a.2B(/^1l:1W\\/2U\\+eC(;7T)?,/,"")},d.1g.mh=1a(a){1e/^1l:1W\\/2U\\+eC/i.7k(a)},d.1g.lI=1a(a){1d b=1b;1e 1a(c,d){1d e=1m 2t.4I.2U.eB.JR("c");b.1W=e.uj,e.JS(d.1n).JT(d.1v).wK(2t.4I.2U.eB.JC.JB(c,d)).Jo(),a(e.uj)}},d.1g.eF=1a(a){1e"1a"==1p 2t.un?2t.un(a):f(a)},b.2n=d},{"./4L":26,"./g7":28}],24:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1s;1d c=1b;1b.8c=b?1m 3K(1a(b,d){c.1W=1m 9e,c.1W.8n=b,c.1W.7v=d,c.1W.3a="1l:1W/2U+eC,"+(1m Jl).Jr(a),c.1W.md===!0&&b(c.1W)}):1b.mc().2K(1a(){1e 1m 3K(1a(b){2t.4I.2U.eB.Js(a,c.lI.1K(c,b))})})}1d e=a("./gl");d.1g=1u.3n(e.1g),b.2n=d},{"./gl":23}],25:[1a(a,b,c){1a d(a,b){f.1K(1b,a,b)}1a e(a,b,c){1e a.1i>0?b+c.9a():1x 0}1d f=a("./8M");d.1g=1u.3n(f.1g),d.1g.ul=1a(){1b.1P.1l=1b.cp(1b.2x.2z("Jw"))},d.1g.cp=1a(a){1d b=1b.1P.1l;4F(a){1U"Jt":1e b.8F();1U"Ju":1e b.2B(/(^|\\s|:|-|\\(|\\))([a-z])/g,e);1U"Jv":1e b.9a();1j:1e b}},b.2n=d},{"./8M":14}],26:[1a(a,b,c){c.lF=1a(){1e"1l:1W/JZ;7T,Ks///Kt"},c.fP=1a(a,b){1e 1a(){1e a.6R(b,aZ)}},c.eF=1a(a){1d b,c,d,e,f,g,h,i,j="Kr+/",k=a.1i,l="";1I(b=0;k>b;b+=4)c=j.3U(a[b]),d=j.3U(a[b+1]),e=j.3U(a[b+2]),f=j.3U(a[b+3]),g=c<<2|d>>4,h=(15&d)<<4|e>>2,i=(3&e)<<6|f,l+=64===e?2o.56(g):64===f||-1===f?2o.56(g,h):2o.56(g,h,i);1e l},c.eL=1a(a){if(a.eG){1d b=a.eG(),c=1s==a.cH?b.1n:a.cH;1e{1Q:b.1Q,7q:b.7q||b.1Q+b.1v,1G:b.1y+c,1y:b.1y,1n:c,1v:1s==a.cI?b.1v:a.cI}}1e{}},c.eH=1a(a){1d b=a.uG?c.eH(a.uG):{1Q:0,1y:0};1e{1Q:a.cC+b.1Q,7q:a.cC+a.cI+b.1Q,1G:a.v0+b.1y+a.cH,1y:a.v0+b.1y,1n:a.cH,1v:a.cI}},c.lD=1a(a){1d b,c,d,e,f,g,h,i=" \\r\\n ",j=[],k=0,l=0,m=1a(){b&&(\'"\'===c.3j(0,1)&&(c=c.3j(1,c.1i-2)),c&&h.1L(c),"-"===b.3j(0,1)&&(e=b.3U("-",1)+1)>0&&(d=b.3j(0,e),b=b.3j(e)),j.1L({KD:d,5v:b.8F(),1k:f,3O:h,1W:1s})),h=[],b=d=c=f=""};1e h=[],b=d=c=f="",a.5S("").3P(1a(a){if(!(0===k&&i.3U(a)>-1)){4F(a){1U\'"\':g?g===a&&(g=1s):g=a;2C;1U"(":if(g)2C;if(0===k)1e k=1,1x(f+=a);l++;2C;1U")":if(g)2C;if(1===k){if(0===l)1e k=0,f+=a,1x m();l--}2C;1U",":if(g)2C;if(0===k)1e 1x m();if(1===k&&0===l&&!b.4t(/^78$/i))1e h.1L(c),c="",1x(f+=a)}f+=a,0===k?b+=a:c+=a}}),m(),j}},{}],27:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S="lE"===a.3O[0]?e.gQ.lL:e.gQ.uZ}1d e=a("./iH");d.1g=1u.3n(e.1g),b.2n=d},{"./iH":9}],28:[1a(a,b,c){1a d(a){1e 1m 3K(1a(b,c){1d d=1m uW;d.4Y("ro",a),d.8n=1a(){eE===d.1Z?b(d.Km):c(1m 1E(d.rh))},d.7v=1a(){c(1m 1E("dM 1E"))},d.Kl()})}b.2n=d},{}]},{},[4])(4)}),!1a(a,b){"3i"==1p 2n&&"3i"==1p 4i?4i.2n=b():"1a"==1p cG&&cG.eI?cG("2k-5g",[],b):"3i"==1p 2n?2n["2k-5g"]=b():a["2k-5g"]=b()}(1b,1a(){1e 1a(a){1a b(d){if(c[d])1e c[d].2n;1d e=c[d]={2n:{},id:d,eJ:!1};1e a[d].1K(e.2n,e,e.2n,b),e.eJ=!0,e.2n}1d c={};1e b.m=a,b.c=c,b.p="",b(0)}([1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(43),f=d(e);b["1j"]=2k.4i("2k-5g",[]).wl("K6",f["1j"]),a.2n=b["1j"]},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a e(a,b){c(1b,e),1b.1l=a,1b.1w=b.1w||a,1b.1B=b};b["1j"]=d},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(){c(1b,a),1b.tB="7l",1b.ts="7l",1b.tC="b1",1b.uX=["K7","K4","G4","K0","K1","K2","K8","K9","Kg","Kj"],1b.v2=["Kk","Kf","Ke","Kb","Kc","Kd","Ml","F2","Au","At"],1b.v7=["Ae","Aj","Ak","B0","B1","AK","Az","AA","AB","AJ"]}1e a.1g.2f=1a(a,b,c){1d d="";c=c||"";1I(1d e=0;ec;c++)a="0"+a;1e a}1u.2y(b,"1F",{1k:!0});1d i=c(1),j=d(i),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1I(1d a="v6",b=0;b<1b.1l.1i;b++){1d c=2H(1b.1l[b]),d=c.1t(2);d=h(d,4-d.1i);1I(1d e=0;e=eE)d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):3H===d?c=1b.bb(a,b+1):98===d?(a[0]=a[0]>95?a[0]-96:a[0],c=1b.aW(a,b+1)):c=1b.aW(a,b+1);2p{1d e=a[0];d=32>e?e+64:e-32,a.9T(),c=1b.aW(a,b+1)}1d f=1b.b5(d),g=d*b;1e{3o:f+c.3o,7e:g+c.7e}},b.1g.bb=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):7l===d?c=1b.aW(a,b+1):98===d?(a[0]=a[0]<32?a[0]+96:a[0],c=1b.bb(a,b+1)):c=1b.bb(a,b+1)):(d=a[0]-32,a.9T(),c=1b.bb(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b.1g.cD=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),c=3H===d?1b.bb(a,b+1):7l===d?1b.aW(a,b+1):1b.cD(a,b+1)):(d=10*(a[0]-48)+a[1]-48,a.9T(),a.9T(),c=1b.cD(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b}(i["1j"]),k=1a(a){1a b(){e(1b,b);1d c=f(1b,a.1K(1b));1e c.1C="Aw",c.aK="me Av tV 2a 5Z ez a 5Z dS.",c}1e g(b,a),b}(1E);b["1j"]=j},1a(a,b){"2r 2g";1a c(a){1I(1d b=0,c=0;c0?b.2v+b.6M:0)+b.7s+b.bn}1a f(a,b,c){if(c.53&&a>b){if("4j"==c.54)1e 1R.aN((a-b)/2);if("1y"==c.54)1e 0;if("1G"==c.54)1e 1R.aN(a-b)}1e 0}1a g(a,b,c){1I(1d d=0;db&&(b=a[c].1v);1e b}1a j(a,b,c){1d d;d="3Q"==1p c?1J.3z("2l").4J("2d"):c,d.5M=b.cX+" "+b.2v+"px "+b.5M;1d e=d.Ag(a).1n;1e e}1u.2y(b,"1F",{1k:!0}),b.hP=b.it=b.ua=b.uQ=b.hO=1x 0;1d k=c(6),l=d(k);b.hO=i,b.uQ=e,b.ua=f,b.it=g,b.hP=h},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){z.1g[b]=z.1g[b.9a()]=z.1g[b.8F()]=1a(c,d){1d e=1b;1e e.lV.m1(1a(){1d g=l["1j"](e.8D,d);g=t["1j"](g);1d h=a[b],i=f(c,h,g);1e e.ey.1L(i),e})}}1a f(a,b,c){a=""+a;1d d=1m b(a,c);if(!d.2L())1D 1m w.ik(d.49.1C,a);1d e=d.2f();e=n["1j"](e);1I(1d f=0;f=2?2o.56(ex)+k(a):c>d?2o.56(m8)+i(a):2o.56(i3)+j(a),b=b.2B(/[\\tv\\tz]([^])[\\tv\\tz]/,1a(a,b){1e 2o.56(tA)+b})}1a i(a){1d b=a.4t(/^([\\b2-\\eA\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\b2-\\eA\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(8h)+j(a.2w(c[0].1i))}1a j(a){1d b=a.4t(/^([\\cE-\\b6\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\cE-\\b6\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(eD)+i(a.2w(c[0].1i))}1a k(a){1d b=a.4t(/^(\\5q*[0-9]{2}\\5q*)+/)[0],c=b.1i;if(c===a.1i)1e a;a=a.2w(c);1d d=a.4t(/^[\\b2-\\eA\\7d-\\5q]*/)[0].1i,e=a.4t(/^[\\cE-\\b6\\7d-\\5q]*/)[0].1i;1e d>=e?b+2o.56(eD)+i(a):b+2o.56(8h)+j(a)}1u.2y(b,"1F",{1k:!0});1d l=c(4),m=d(l),n=1a(a){1a b(c,d){if(e(1b,b),-1!==c.2N(/^[\\b2-\\b6\\7d-\\tE]+$/))1d g=f(1b,a.1K(1b,h(c),d));2p 1d g=f(1b,a.1K(1b,c,d));1e f(g)}1e g(b,a),b}(m["1j"]);b["1j"]=n},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.hZ=b.hW=b.hV=b.by=1x 0;1d e=c(15),f=d(e),g=c(12),h=d(g),i=c(13),j=d(i),k=c(14),l=d(k);b.by=f["1j"],b.hV=h["1j"],b.hW=j["1j"],b.hZ=l["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1e i(k(a))}1a i(a){1e q[a].1t(2)}1a j(a){1e p[a]}1a k(a){1e p.3U(a)}1a l(a){1I(1d b=0,c=0;cb;b+=2)c+=2H(a[b]);1I(b=1;12>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{12}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e!d.mf&&d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g.i9=d.i9,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{13}$/)&&1b.1l[12]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.mg=1a(){1e["td","FB","FC","Fz","Fy","Fv","Fw","Fx","Ew","Ev"]},b.1g.hT=1a(){1d a=1m j["1j"],b=[],c=1b.mg()[1b.1l[0]],d=1b.1l.3j(1,6),e=1b.1l.3j(7,6);1e 1b.1B.53&&b.1L({1l:"Dv",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),b.1L({1l:a.2f(d,c),1w:1b.1w.3j(1,6),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(e,"m7"),1w:1b.1w.3j(7,6),1B:{2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),1b.1B.i9&&1b.1B.53&&(b.1L({1l:"bX"}),b.1L({1l:"Dw",1w:1b.1B.i9,1B:{2v:1b.2v}})),b},b.1g.hU=1a(){1d a=1m j["1j"],b="",c=1b.mg()[1b.1l[0]];1e b+="7l",b+=a.2f(1b.1l.3j(1,6),c),b+="b1",b+=a.2f(1b.1l.3j(7,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["LL","LG","GL","GG"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{2}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.ia[2H(1b.1l)%4],c="tD";1e c+=a.2f(1b.1l,b,"oh"),{1l:c,1w:1b.1w}},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["Dt","Dq","Dr","Ds","Dy","Dz","DH","DI","DL","DF"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{5}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.7e(),c="tD";1e c+=a.2f(1b.1l,1b.ia[b],"oh"),{1l:c,1w:1b.1w}},b.1g.7e=1a(){1d a=0;1e a+=3*2H(1b.1l[0]),a+=9*2H(1b.1l[1]),a+=3*2H(1b.1l[2]),a+=9*2H(1b.1l[3]),a+=3*2H(1b.1l[4]),a%10},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=0;7>b;b+=2)c+=3*2H(a[b]);1I(b=1;7>b;b+=2)c+=2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){1e e(1b,b),-1!==c.2N(/^[0-9]{7}$/)&&(c+=h(c)),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{8}$/)&&1b.1l[7]==h(1b.1l)},b.1g.2f=1a(){1d a=1m j["1j"],b="",c=1b.1l.3j(0,4),d=1b.1l.3j(4,4);1e b+=a.tB,b+=a.2f(c,"Dp"),b+=a.tC,b+=a.2f(d,"Da"),b+=a.ts,{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=1;11>b;b+=2)c+=2H(a[b]);1I(b=0;11>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{11}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.53=d.53,d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{12}$/)&&1b.1l[11]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.hU=1a(){1d a=1m j["1j"],b="";1e b+="7l",b+=a.2f(1b.1l.3j(0,6),"td"),b+="b1",b+=a.2f(1b.1l.3j(6,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b.1g.hT=1a(){1d a=1m j["1j"],b=[];1e 1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l"+a.2f(1b.1l[0],"L"),1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(1,5),"D2"),1w:1b.1w.3j(1,5),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(6,5),"D3"),1w:1b.1w.3j(6,5),1B:{2v:1b.2v}}),b.1L({1l:a.2f(1b.1l[11],"R")+"7l",1B:{1v:1b.aB}}),1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(11,1),1B:{54:"1G",2v:1b.2v}}),b},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.er=b.ih=b.ig=b.hX=b.hY=1x 0;1d e=c(18),f=d(e),g=c(21),h=d(g),i=c(20),j=d(i),k=c(19),l=d(k),m=c(22),n=d(m);b.hY=f["1j"],b.hX=h["1j"],b.ig=j["1j"],b.ih=l["1j"],b.er=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iw=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1e{1l:"De",1w:1b.1w}},b.1g.2L=1a(){1e!0},b}(i["1j"]);b.iw=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1I(1d b=0,c=0;13>c;c++)b+=2H(a[c])*(3-c%2*2);1e 10*1R.eM(b/10)-b}1u.2y(b,"1F",{1k:!0}),b.iA=1x 0;1d i=c(1),j=d(i),k=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{13}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{14}$/)&&1b.1l[13]==h(1b.1l)},b.1g.2f=1a(){1I(1d a="tG",b=0;14>b;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(j["1j"]);b.iA=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iy=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^([0-9]{2})+$/)},b.1g.2f=1a(){1I(1d a="tG",b=0;b<1b.1l.1i;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(i["1j"]);b.iy=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.eN(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.eN(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.lX(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.lX(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.iE=b.iG=b.iC=b.iB=b.ix=1x 0;1d e=c(3),f=d(e),g=c(27),h=d(g),i=c(29),j=d(i),k=c(28),l=d(k),m=c(30),n=d(m);b.ix=f["1j"],b.iB=h["1j"],b.iC=j["1j"],b.iG=l["1j"],b.iE=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iD=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b),0===c.2N(/^[0-9\\-\\$\\:\\.\\+\\/]+$/)&&(c="A"+c+"A");1d g=f(1b,a.1K(1b,c.9a(),d));1e g.1w=g.1B.1w||g.1w.2B(/[A-D]/g,""),g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[A-D][0-9\\-\\$\\:\\.\\+\\/]+[A-D]$/)},b.1g.2f=1a(){1I(1d a=[],b=1b.tY(),c=0;c<1b.1l.1i;c++)a.1L(b[1b.1l.Ek(c)]),c!==1b.1l.1i-1&&a.1L("0");1e{1w:1b.1w,1l:a.8L("")}},b.1g.tY=1a(){1e{0:"Et",1:"Eu",2:"Er",3:"Eq",4:"Em",5:"Eo",6:"Ep",7:"Ea",8:"E9",9:"DV","-":"DW",$:"DX",":":"DU","/":"DT",".":"DQ","+":"DR",A:"DS",B:"DY",C:"E0",D:"E6"}},b}(i["1j"]);b.iD=j},1a(a,b,c){"2r 2g";1u.2y(b,"1F",{1k:!0});1d d=c(17),e=c(16),f=c(23),g=c(25),h=c(26),i=c(31),j=c(34),k=c(32),l=c(24);b["1j"]={hR:d.hR,by:e.by,hV:e.hV,hW:e.hW,hZ:e.hZ,hY:f.hY,hX:f.hX,ig:f.ig,ih:f.ih,er:f.er,iA:g.iA,iy:h.iy,ix:i.ix,iB:i.iB,iC:i.iC,iG:i.iG,iE:i.iE,im:j.im,iD:k.iD,iw:l.iw}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.im=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.3B=2H(c,10),g}1e g(b,a),b.1g.2f=1a(){1I(1d a=1b.3B,b="";!iv(a)&&0!=a;)a%2===0?(b="Vk"+b,a=(a-2)/2):(b="3H"+b,a=(a-1)/2);1e b=b.9E(0,-2),{1l:b,1w:1b.1w}},b.1g.2L=1a(){1e 1b.3B>=3&&1b.3B<=V6},b}(i["1j"]);b.im=j},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(b){c(1b,a),1b.aX=b}1e a.1g.u8=1a(a){if("ik"!==a.1C)1D a;if(1b.aX.8D.2L===1b.aX.u2.2L)1D a.aK;1b.aX.8D.2L(!1),1b.aX.7M=1a(){}},a.1g.m1=1a(a){3c{1d b=a.6R(1x 0,aZ);1e 1b.aX.8D.2L(!0),b}2S(a){1e 1b.u8(a),1b.aX}},a}();b["1j"]=d},1a(a,b){"2r 2g";1a c(a){1e a.7s=a.7s||a.7w,a.bn=a.bn||a.7w,a.9V=a.9V||a.7w,a.8J=a.8J||a.7w,a}1u.2y(b,"1F",{1k:!0}),b["1j"]=c},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){1d b={};1I(1d c in i["1j"])i["1j"].9v(c)&&(a.m2("m5-"+c.8F())&&(b[c]=a.eU("m5-"+c.8F())),a.m2("1l-"+c.8F())&&(b[c]=a.eU("1l-"+c.8F())));1e b.1k=a.eU("m5-1k")||a.eU("1l-1k"),b=g["1j"](b)}1u.2y(b,"1F",{1k:!0});1d f=c(8),g=d(f),h=c(9),i=d(h);b["1j"]=e},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){if("ar"==1p a)1e f(a);if(bf.cK(a)){1I(1d b=[],c=0;c0?(e=0,c.54="1y"):"1G"==a.54?(e=b.1n-1,c.54="1G"):(e=b.1n/2,c.54="4j"),c.tU(b.1w,e,f)}},a.1g.tT=1a(a){1d b=1b.2l.4J("2d");b.ak(a.1n,0)},a.1g.v8=1a(){1d a=1b.2l.4J("2d");a.lp()},a}();b["1j"]=i},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(40),f=d(e),g=c(42),h=d(g);b["1j"]={cb:f["1j"],ws:h["1j"]}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b,c){1d d=1J.ly(l,"g");1e d.3x("cp","ak("+a+", "+b+")"),c.4K(d),d}1a g(a,b){a.3x("2M","e2:"+b.es+";")}1a h(a,b,c,d,e){1d f=1J.ly(l,"ew");1e f.3x("x",a),f.3x("y",b),f.3x("1n",c),f.3x("1v",d),e.4K(f),f}1u.2y(b,"1F",{1k:!0});1d i=c(6),j=d(i),k=c(10),l="gV://9d.w3.wp/wq/2U",m=1a(){1a a(b,c,d){e(1b,a),1b.2U=b,1b.4V=c,1b.1B=d}1e a.1g.7M=1a(){1d a=1b.1B.8J;1b.wz();1I(1d b=0;b<1b.4V.1i;b++){1d c=1b.4V[b],d=j["1j"](1b.1B,c.1B),e=f(a,d.7s,1b.2U);g(e,d),1b.wy(e,d,c),1b.ww(e,d,c),a+=c.1n}},a.1g.wz=1a(){1I(;1b.2U.bw;)1b.2U.aj(1b.2U.bw);k.it(1b.4V,1b.1B);1d a=k.hP(1b.4V),b=k.hO(1b.4V),c=a+1b.1B.8J+1b.1B.9V;1b.wd(c,b),1b.1B.6H&&h(0,0,c,b,1b.2U).3x("2M","e2:"+1b.1B.6H+";")},a.1g.wy=1a(a,b,c){1d d,e=c.1l;d="1Q"==b.bo?b.2v+b.6M:0;1I(1d f=0,g=0,i=0;i0&&(h(g-b.1n*f,d,b.1n*f,b.1v,a),f=0);f>0&&h(g-b.1n*(f-1),d,b.1n*f,b.1v,a)},a.1g.ww=1a(a,b,c){1d d=1J.ly(l,"1w");if(b.53){1d e,f;d.3x("2M","5M:"+b.cX+" "+b.2v+"px "+b.5M),f="1Q"==b.bo?b.2v-b.6M:b.1v+b.6M+b.2v,"1y"==b.54||c.dX>0?(e=0,d.3x("1w-lj","5Z")):"1G"==b.54?(e=c.1n-1,d.3x("1w-lj","cj")):(e=c.1n/2,d.3x("1w-lj","ld")),d.3x("x",e),d.3x("y",f),d.4K(1J.dW(c.1w)),a.4K(d)}},a.1g.wd=1a(a,b){1d c=1b.2U;c.3x("1n",a+"px"),c.3x("1v",b+"px"),c.3x("x","he"),c.3x("y","he"),c.3x("U3","0 0 "+a+" "+b),c.3x("wc",l),c.3x("pl","1.1"),c.2M.cp="ak(0,0)"},a}();b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(11),f=d(e);b["1j"]=1a(){"U4";1e{2B:!0,wk:"E",dY:"U5",5O:{wb:"@",wa:"@?",cm:"="},Ub:"",e1:1a(a,b,c,d){1d e=1a(){1d b=a.wa||"5g",c="";4F(a.wb){1U"2U":c=\'<2U 1f="\'+b+\'">\';2C;1U"7g":c=\'<7g 1f="\'+b+\'">\';2C;1U"2l":c=\'<2l 1f="\'+b+\'">\';2C;1j:c=\'<7g 1f="\'+b+\'">\'}1e c},g={9l:"by",es:"#nw",1n:2,1v:3H,53:!1,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:10,7s:10,bn:10,8J:10,9V:10,2L:1a(){1e!0}},h=1a(a){1e 1u.wm(g).3P(1a(b){a.9v(b)?a[b]=a[b]||g[b]:a[b]=g[b]}),a},i=1a(a){1d c=2k.5b(e()),g=d.$U6||"",h=f["1j"](c[0],g,a);1e 2k.3P(b.dZ(),1a(a){1e a.U8()}),b.TQ(c),h};i(h(a.9v("cm")&&"3Q"!=1p a.cm?a.cm:g)),a.$9L("cm",1a(a){i(a)},!0),d.$7M=1a(){i(a.cm)}}}},a.2n=b["1j"]}])}),2k.4i("5j",["Tm","Tl","Tg","ab-7T","ng.oa","ui.Ts","Tt","e8-4F","2k-5g","oe","2k.2z.TB","TE.wj","TI.Tz"]).wl("jD",["$66",1a(a){1e{wk:"A",e1:1a(b,c,d){c.on("Tx",1a(){a.wJ()})}}}]).hq("wi",1a(){1e{mK:1a(a){1e a.gZ=nC,a}}}).Ue(["$Uf","$UI",1a(a,b){a.e0("/",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/9p",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/6O",{4P:"3m/6O.2T",3p:"vp",hc:"6O"}).e0("/7r",{4P:"3m/7r.2T",3p:"zw",hc:"7r"}).UH({UF:"/"}),b.UC.1L("wi")}]).kC(["$66","$bT","$gV","7T","o9","oa","$2E","n5","UE","oe","$hs","wj","$w0","1N","$Wo",1a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){1a p(){a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.nr=a.3A+"4C/3o.4W"}UN.UU(1J.2A),a.nI=1a(a,b){a&&b3(1a(){a.UV=b,a.UT=b},0)},2o.1g.hv=1a(a,b,c){1e 1b.2B(1m wB(a.2B(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"gi":"g"),"ar"==1p b?b.2B(/\\$/g,"$$$$"):b)},a.hd=1a(a,b){1d c=1m wB(a,"g"),d=c.UB(b);1e d},a.hm=1a(b){1d c=/^[a-zA-og-9.!#$%&’*+\\/=?^9M`{|}~-]+@[a-zA-og-9-]+(?:\\.[a-zA-og-9-]+)*$/i,d={};1e d.1Z=!0,d.8m=1x 0,b&&d.1Z&&!c.7k(b)&&(d.8m=n[a.1c.1M].6C,d.1Z=!1),d},a.hl=1a(b,c){1d d=/^[^a-z]*$/i,e={};if(e.1Z=!0,e.8m=1x 0,b&&c&&e.1Z)3c{e.1Z=2t.Un.Uk(b,c),e.8m=n[a.1c.1M].5P}2S(f){e.8m=f,""===f&&(e.8m=n[a.1c.1M].5P),e.1Z=!1}1e b&&e.1Z&&!d.7k(b)&&(e.8m=n[a.1c.1M].5P,e.1Z=!1),e},a.h9=!0,a.1q=!1,a.w9="3.12.",a.h9||(a.1q=!0),a.wV="fQ://9d.Ug.hE.my/",a.np="fQ://qM.bm.hE/",a.nm="fQ://Ui.bm.co.id/",a.ns="fQ://9P.bm.hE/",a.3A=a.wV,a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.dH="",a.6F="",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.bJ="",a.rY="XI://",a.mW="XN://",a.hk="XM://",a.Xt="Xv://",a.Xw="XA://",a.bz="XP://",a.vV="Xy://",a.nr=a.3A+"4C/3o.4W",a.vt="XO.do",a.vy="Y6/8W/ec/Y5",a.vx="Y4.do",a.nN=!1,a.bI=!0,a.77=[],a.5L=0,a.nM=!1,a.al=!1,a.wD=!1,a.5F=1x 0,a.rC=nC,a.hA=Y2,a.n4=0,a.ne=!1,a.ai=!1,a.2P=1a(){1d a={};1e a.6j=n.3l.6j,a.6k=n.3l.6k,a.6p=n.3l.6p,a.6v=n.3l.6v,a.6X=n.3l.6X,a.6s=n.3l.6s,a.6I=n.3l.6I,a.6G=n.3l.6G,a.5E=n.3l.5E,a.6L=n.3l.6L,a.6r=n.3l.6r,a.6A=n.3l.6A,a.6B=n.3l.6B,a.6x=n.3l.6x,a.6u=n.3l.6u,a.6b=n.3l.6b,a.6Q=n.3l.6Q,a.6K=n.3l.6K,a.6t=n.3l.6t,a.5N=n.3l.5N,a.6h=n.3l.6h,a.6Z=n.3l.6Z,a.5C=n.3l.5C,a.6m=n.3l.6m,a},a.1c={3E:"",3D:"",1T:"",2J:"",3h:"",2i:"",bv:"",3F:"4B",3g:"MY",2F:"",4z:!0,vw:!1,2b:"",9H:!0,4o:"",3I:"",3t:"",3r:"",5c:"",hr:"0",eP:!1,XT:"",hx:"",4l:"",3J:"",7o:"",hu:"2",XW:"",cR:"",aE:"",hn:"",hF:"bm-4Q-nl-9d",Y0:!1,8C:"",5G:"",5t:"",7h:"",bh:"",bj:"",5k:"",3w:!0,6o:"MY",ci:"bW",6d:"",8U:"",bt:"",oK:"",ht:"1",5d:"",6a:"",4m:"",lx:"",au:"",hH:!0,nX:"",6N:"vu",8O:"0",c0:!1,ep:!1,nB:"",bg:"",bl:"",w1:"",nz:"",bS:"",t4:"",fC:"",fl:"",nK:!1,4Z:!1,4M:!1,fe:!1,cJ:!1,cW:!1,1M:"EN",ff:"",fG:"",jI:!1,jH:!1,jE:!1,jF:!1,wH:!1,nn:!1},!a.h9,a.1c.1M&&(a.1c.1M=2o(a.1c.1M).9a()),a.XX=n[a.1c.1M].6J,a.XY=n[a.1c.1M].7u,a.Xz=n[a.1c.1M].6e,a.$9L("1c.6o",1a(){1d b=n.4E[a.1c.1M],c=[];1I(1d d in b)c.1L([d,b[d]]);1d e=c,f=g("2E")(e,a.1c.6o,!0);f.1i?a.1c.ci=f[0][1]:a.1c.6o=""}),a.$9L("1c.5t",1a(){if(a.1c.5t){1d b=2o(a.1c.5t);b=b.2B(/\\//g,"");1d c="";b.1i>4&&(b=b.2w(0,4)),1===b.1i&&(c=2H(b.2w(0,1)),c>1&&(b="")),2===b.1i&&(c=2H(b.2w(0,2)),c>12&&(b=b.2w(0,1))),b.1i>2&&(b=b.2w(0,2)+"/"+b.2w(2,b.1i)),a.1c.5t=b,a.nI(2k.5b(1J.8R("vs"))[0],b.1i),5===a.1c.5t.1i&&(a.1c.bh=a.1c.5t.2w(0,2),a.1c.bj=a.1c.5t.2w(3,5))}}),a.$9L("1c.3w",1a(){if(a.1c.3w)a.1c.8C="",a.1c.6d="",a.1c.5G="",a.1c.5t="",a.1c.7h="",a.1c.bh="",a.1c.bj="",a.1c.5k="";2p if(a.1c.6a){if(a.1c.6a.1i>0&&!a.1c.4m)if(a.1c.fC){1d b=g("2E")(a.1c.6a,a.1c.fC,!0);if(b.1i){a.1q;1d c=a.1c.6a.3U(b[0]);a.1c.4m=a.1c.6a[c]}2p a.1c.4m=a.1c.6a[0]}2p a.1c.4m=a.1c.6a[0];a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k}}),a.$9L("1c.4m",1a(){!a.1c.3w&&a.1c.4m&&(a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k)}),a.n6=1a(){1e a.hd("nD 4.1",a.1c.aE)||a.hd("nD 4.2",a.1c.aE)||a.hd("nD 4.3",a.1c.aE)?!0:!1},a.6g=1a(){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.5c||b||(c.2Z=n[a.1c.1M].8s,b=!0),a.1c.5c&&a.1c.5c.1i<5&&!b&&(c.2Z=n[a.1c.1M].6h,b=!0),"c5"!==a.1c.2b||b||(c.2Z=n[a.1c.1M].5u,b=!0),"4X"!==a.1c.2b&&"aA"!==a.1c.2b||b||(a.1c.8C&&!(a.1c.8C.1i<16)||b||(c.2Z=n[a.1c.1M].8t,b=!0),l.aT(a.1c.8C)||!a.1c.3w||b||(c.2Z=n[a.1c.1M].8q,b=!0),a.1c.5t&&!(a.1c.5t.1i<5)||b||(c.2Z=n[a.1c.1M].7O,b=!0),a.1c.5G&&!(a.1c.5G.1i<3)||b||(c.2Z=n[a.1c.1M].8w,b=!0),a.1c.7h||(a.1c.7h="o1 wR"),a.1c.bS&&!b&&a.1c.bS.1i>0&&(b=e.mt(a.1c.8C))),"cq"!==a.1c.2b||b||(a.1c.8U&&!(a.1c.8U.1i<10)||b||(c.2Z=n[a.1c.1M].7F,b=!0),a.1c.bt||b||(c.2Z=n[a.1c.1M].7C,b=!0)),b){1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){},1a(){2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1,a.1c.fe=!1,m.oc()})}2p a.1c.nK?e.t3():a.1c.wH?e.qm():e.qw()},a.WG=1a(a){1d b,c;1J.ed?(b=1J.ed(),b.WQ(a),b.x7(!1),c=2t.WP(),c.WO(),c.WM(b)):1J.WN&&(b=1J.2A.WD(),b.WC(a),b.x7(!1),b.hS())},a.$9L("1c.6d",1a(){if(a.1c.6d){1d b=2o(a.1c.6d);if(b=b.2B(/ /g,""),6===b.1i&&a.1c.8O&&"1"===a.1c.8O&&e.sv(b),6===b.1i&&a.1c.bS&&a.1c.bS.1i>0){1d c=e.mt(b);c&&(a.1c.6d="")}b.1i>16&&(b=b.2w(0,16)),a.n6()||(b.1i>4&&b.1i<=8?b=b.2w(0,4)+" "+b.2w(4,b.1i):b.1i>8&&b.1i<=12?b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,b.1i):b.1i>12&&b.1i<16&&(b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,b.1i))),16===b.1i&&(a.1c.8C=b,b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,16)),b&&(a.1c.6d=b,a.nI(2k.5b(1J.8R("vv"))[0],b.1i))}}),a.$9L("1c.5G",1a(){if(a.1c.5G){1d b=2o(a.1c.5G);b.1i>4&&(b=b.2w(0,4)),a.1c.5G=b}}),a.$9L("5L",1a(){a.1c.4Z||(a.1q,a.5L>0?(a.1q,a.nN=!0):0===a.5L&&a.al&&(a.1q,a.nN=!1,a.wD=!0,a.o0()))}),a.o0=1a(){a.1q,a.1c.fe&&!a.nM?(a.nM=!0,a.6g()):a.1c.fe||(a.1q,2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1)},a.wJ=1a(){if(!a.1c.6a&&a.1c.3I&&a.1c.3t&&a.1c.3r){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(b){a.1c.6a=1x 0;1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){m.oc()},1a(){})}2p e.mD()}},a.hb=1a(b){a.1q,i.wK(b)},a.wM=1a(b){1d c=!1,d=n.4E[a.1c.1M],e=[];1I(1d f in d)e.1L([f,d[f]]);1d h=e,i=g("2E")(h,b,!0);1e i.1i&&(c=!0),c},a.Xb=1a(b){a.1q;1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3G),c},a.z7=1a(){1d b=a.1c.2i,c=5W(b);c=3H*c,a.1c.oK=c.dU(0)},a.f5=1a(){if(a.1c.1M&&n[a.1c.1M]||(a.1c.1M="EN"),a.1c.1M=2o(a.1c.1M).9a(),o.X9(),!a.1c.3F)1e 1x h.3f({1E:a.2P().6L});3c{a.1c.3F=2o(a.1c.3F.55())}2S(b){a.1q}if(!a.1c.2i)1e 1x h.3f({1E:a.2P().5E});1d c;if("vR"===a.1c.3F||"RP"===a.1c.3F){if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2),c=g("3B")(a.1c.2i,0),a.1c.bv=2o(c).2B(/,/g,".");2p if(2k.wN(a.1c.2i)){1d i=a.1c.2i.5S(",");if(2===i.1i)c=2o(i[0]).2B(/\\./g,""),c=c+"."+i[1];2p if(1===i.1i)if("."===i[0].2w(i[0].1i-3,i[0].1i-2)){1d k=i[0].2w(0,i[0].1i-3);k=k.2B(/\\./g,"");1d l=i[0].2w(i[0].1i-2);c=k+"."+l}2p c=i[0].2B(/\\./g,"");2p if(i.1i>2)1e 1x h.3f({1E:a.2P().6m});if(c=5W(c).dU(2),a.1c.2i=c,a.1c.bv=g("3B")(a.1c.2i,0),a.1c.bv=2o(a.1c.bv).2B(/,/g,"."),!a.1c.2i)1e 1x h.3f({1E:a.2P().5E})}}2p{if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2);2p if(2k.wN(a.1c.2i)&&(c=5W(a.1c.2i).dU(2),a.1c.2i=c,!a.1c.2i))1e 1x h.3f({1E:a.2P().5E});a.1c.bv=g("3B")(a.1c.2i,2)}if(a.1c.2i){1d m=ax(a.1c.2i);if(0>=m)1e 1x h.3f({1E:a.2P().6m})}if(!a.1c.3E)1e 1x h.3f({1E:a.2P().6v});3c{a.1c.3E=2o(a.1c.3E.55())}2S(b){a.1q}if(!a.1c.3D)1e 1x h.3f({1E:a.2P().6X});3c{a.1c.3D=2o(a.1c.3D.55())}2S(b){a.1q}if(!a.1c.1T)1e 1x h.3f({1E:a.2P().6s});3c{a.1c.1T=2o(a.1c.1T.55())}2S(b){a.1q}if(!a.1c.2J)1e 1x h.3f({1E:a.2P().6I});3c{a.1c.2J=2o(a.1c.2J.55())}2S(b){a.1q}if(!a.1c.3h)1e 1x h.3f({1E:a.2P().6G});3c{a.1c.3h=2o(a.1c.3h.55())}2S(b){a.1q}if(!a.1c.3g)1e 1x h.3f({1E:a.2P().6r});3c{a.1c.3g=2o(a.1c.3g.55())}2S(b){a.1q}if(!a.wM(a.1c.3g))1e 1x h.3f({1E:a.2P().6A});if(!a.1c.2F)1e 1x h.3f({1E:a.2P().6B});3c{a.1c.2F=2o(a.1c.2F.55())}2S(b){a.1q}if((1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d q=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,q).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,q).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,q).1t()}}2S(b){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);if(1x 0===a.1c.hn&&(a.1c.hn="x"),a.1c.cR=a.w9+a.1c.hn,a.1c.aE=f.WZ.w8,a.1c.hu="2",a.1c.ht="1",1x 0===a.1c.hr&&(a.1c.hr="0"),a.1c.vw=!1,a.1c.cJ||(a.1c.cJ=!1),a.1c.cW||(a.1c.cW=!1),a.1c.8O||(a.1c.8O="0"),1x 0===a.1c.hH&&(a.1c.hH=!0),a.1c.hF||(a.1c.hF="bm-4Q-nl-9d"),a.1c.9H||(a.1c.9H=!1),a.1c.2b?"c5"===a.1c.2b&&(a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u):(a.1c.2b="c5",a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u),a.1c.4o||(a.1c.4o=!1),a.1c.3I&&a.1c.3t&&a.1c.3r&&a.1c.5c&&a.1c.3I||(a.1c.4o=!0),a.1c.3t){3c{a.1c.3t=2o(a.1c.3t.55())}2S(b){a.1q}if(a.1c.cJ&&!a.1c.4o){1d r=a.hm(a.1c.3t);if(!r.1Z)1e 1x h.3f({1E:a.2P().6K})}if(a.1c.3t.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6Z})}if(a.1c.3r){3c{a.1c.3r=2o(a.1c.3r.55())}2S(b){a.1q}if(a.1c.cW&&!a.1c.4o){1d r=a.hl(a.1c.3r,a.1c.3g);if(!r.1Z)1e 1x h.3f({1E:a.2P().6t})}if(a.1c.3r.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5C})}if(a.1c.5c){3c{a.1c.5c=2o(a.1c.5c.55())}2S(b){a.1q}if(a.1c.5c.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6h})}if(a.1c.3I){3c{a.1c.3I=2o(a.1c.3I.55())}2S(b){a.1q}if(a.1c.3I.1i<3&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5N})}1e a.1c.eP||(a.1c.eP=!1),a.1c.6o="MY",a.1c.ci="bW",a.1c.3w=!0,a.1c.4M=!1,a.1c.fl||(a.1c.fl="Wz"),a.1c.nK&&(a.1c.hx=["4X","aA"]),1x 0!==a.1c.4Z&&a.1c.4Z?a.1c.4Z&&(a.1c.6N="9r"):(a.1c.4Z=!1,a.1c.6N="vu"),"9Q"!==a.1c.3J||a.1c.4l?(a.1c.ff||(a.1c.ff=2o(2H(a.1c.ff))),a.1c.fG||(a.1c.fG=2o(2H(a.1c.fG))),a.1c.nB&&b3(1a(){a.$6R(a.hb(a.1c.nB))},0),(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl",XR.XQ(n.4E.ID)),p()),a.1c.nn&&(a.3A=a.ns,p()),1x(a.1c.3J&&"ft"===a.1c.3J?a.cU():e.rb())):1x h.3f({1E:a.2P().6x})},a.XS=1a(){1e a.1c.aE},a.vE=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].4v),c},a.vF=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3W+" "+d[0].1C),c},a.r2=1a(b){1d c="",d=g("2E")(a.1c.5d,{3G:b},!0);1e d.1i&&(c=d[0].1C),c},a.f4=1a(a,b){1e 1R.aN(1R.nW()*(b-a+1)+a)},a.fq=1a(b){1d c=!1;if(b&&b.9c&&b.5p&&b.52&&b.3e){1d d=a.1c.1T,e=a.1c.2F;if(a.1c.4z){1d f=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();e=1Y.4A.5B(a.1c.2F.1t(),f).1t(1Y.5z.5w)}1d g=d+b.9c+b.5p+b.52+b.3e+e,h=1Y.7i(g).1t();h===b.7o.1t()&&(c=!0)}1e c},2t.Yb=1a(){a.ai=!0},2t.f5=1a(b,c){a.1c={},c&&(a.nt=c),a.1q;3c{a.1c=5H.ac(b)}2S(d){a.1c=2k.vB(a.1c,b)}a.1q,a.f5()},2t.XU=1a(b){1d c=b.nA;3c{c=5H.ac(b).nA}2S(d){c=b.nA}a.1q;1d f="";c.3U(a.nr)>-1?(a.1q,a.dH=c,e.sy(),f=a.hk,a.5U(f)):(c.3U(a.vt)>-1||c.3U(a.vx)>-1||c.3U(a.vy)>-1)&&(a.1q,a.n3(),f=a.hk,a.5U(f))},a.vD=1a(){1d b=a.hk;a.5U(b)},a.nq=1a(){a.5F?a.5F.44("XG"):(a.hB(),a.vD())},2t.nq=1a(){a.nq()},a.cU=1a(){"9Q"===a.1c.3J&&a.1c.4l&&""!==a.1c.4l?a.bH():a.1c.4l&&""!==a.1c.4l?a.bH():a.hB()},2t.cU=1a(){a.cU()},2t.XB=1a(b){b&&(a.1c.3h=b),a.cU()},2t.Xp=1a(b){b&&(a.1c.4l=b),a.cU()},2t.Wt=1a(a){1d b=2o(a),c=f.h0;1e a&&"vh"===c&&(b=b.2B(/\\-/g,"+"),b=b.2B(/\\9M/g,"=")),b},2t.hb=1a(b){a.hb(b)},2t.Wy=1a(b,c){a.1c={},a.1q,c&&(a.9I=c);3c{a.1c=5H.ac(b)}2S(f){a.1c=2k.vB(a.1c,b)}if(a.1q,(1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d g=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,g).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,g).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,g).1t()}}2S(f){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl"),p()),a.1c.nn&&(a.3A=a.ns,p()),e.mF()},a.5U=1a(b){1d c=b,d=f.h0;a.1q,a.1q,a.nt?(a.nt(b),a.1q):("vh"===d&&(c=b.2B(/\\+/g,"-"),c=c.2B(/\\=/g,"9M")),a.1c.nz&&(c=a.1c.nz+c,a.1q),2t.bT=c)},a.wo=1a(){a.f5(),b.6V("/9p").2B()},a.h9||a.f5()}]),2k.4i("5j").3p("Y3",1a(){}),2k.4i("5j").3p("nv",["$5O","$66","$bT","$hs","o9","1N",1a(a,b,c,d,e,f){a.1N=f[b.1c.1M],a.r3=1a(){1d a=!1;1e b.1c.8O&&b.1c.3w&&"1"===2o(b.1c.8O)&&(b.1c.c0||(a=!0)),a},a.wW=1a(){if(!b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uu.2T",3p:"z0",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.we=1a(){if(b.1c.9H){1d c=d.4Y({4O:!0,4P:"3m/uw.2T",3p:"z6",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.vX=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uz.2T",3p:"z3",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.t7=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uE.2T",3p:"z4",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.qR=1a(){b.6g()}}]),2k.4i("5j").3p("vp",["$5O","$66","7T","1N",1a(a,b,c,d){1a e(a){1d b="Y7";if(a){1d c="Xr";b=c+a,b=b.2w(b.1i-c.1i)}1e b}1a f(a){1d c=1m 9e;c.8n=1a(){1d c=1J.3z("2l");c.1n=1b.vo,c.1v=1b.vn,c.4J("2d").9j(1b,0,0);3c{a(c.eo("1W/3C"))}2S(d){b.1q,a(1s)}},c.7v=1a(){b.1q,a(1s)},c.3a="2R/4h.3C"}1a g(a,c){1d d=1m 9e;d.8n=1a(){1d a=1J.3z("2l");a.1n=1b.vo,a.1v=1b.vn,a.4J("2d").9j(1b,0,0);3c{c(a.eo("1W/3C"))}2S(d){b.1q,f(c)}},d.7v=1a(){b.1q,f(c)},d.3a=a}a.1N=d[b.1c.1M],2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),b.bI=!1,a.bc={9l:"er",es:"#nw",1n:2,1v:60,53:!0,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:0,7s:1x 0,bn:1x 0,8J:1x 0,9V:1x 0,2L:1a(a){}},a.p3=b.vE(b.2I.3S),a.iQ=!0,a.t6=b.vF(b.2I.3S).1t(),a.8H=5H.ac(5H.8z(b.2I)),a.8H.a9=e(a.8H.a9),a.8H.5p=e(a.8H.5p),a.8H.cP=e(a.8H.cP),2t.Om=1a(){1e b.o6},a.sl=1a(){g(a.p3,1a(d){d?1J.8R("6O-iL").3a=d:a.iQ=!1,a.$6R(),2t.o7(0,0);3c{b3(1a(){4I(1J.8R("6O"),{gY:1a(a){b.o6=a.eo().2B(/^1l:1W\\/(3C|OC);7T,/,"");1d d={OD:b.o6,OB:b.1c.3h+".3C"},e=c.2f(5H.8z(d,1s,"")),f=b.vV+e;b.1q,b.5U(f)}})},50)}2S(e){b.1q}})}}]),2k.4i("5j").hq("o9",["7T","$gV","$66","$gZ","oa","n5","$bT","oe","$hs","$2E","$P4","$w0","1N",1a(a,b,c,d,e,f,g,h,i,j,k,l,m){1d n={};1e n.5J=1a(a,b){l.oc(),c.al||(c.5L=3,c.al=!0,c.1q),c.1q;1d d=1s;if(a===c.d3.1t())d=[{1C:"PB-Px",3W:"vN aU","1j":1,1Z:1,4n:["4B"],3G:"4X",3M:"1",4v:"2R/4h.3C"},{1C:"w6-Pw",3W:"w6","1j":1,1Z:1,4n:["4B"],3G:"Pu",3M:"2",4v:"2R/4h.3C"},{1C:"Pv",3W:"a8 PC","1j":1,1Z:2,4n:["RM","4B"],3G:"PD",3M:"2",4v:"2R/4h.3C"},{1C:"PV",3W:"PX","1j":1,1Z:1,4n:["4B"],3G:"PZ",3M:"3",4v:"2R/4h.3C"},{1C:"PQ-w4",3W:"dB PJ vG","1j":1,1Z:1,4n:["4B"],3G:"PO",3M:"4",4v:"2R/4h.3C"},{1C:"eh-w5",3W:"eh w5","1j":1,1Z:1,4n:["4B"],3G:"Ps",3M:"5",4v:"2R/4h.3C"},{1C:"h1-w4",3W:"h1 Pc","1j":1,1Z:1,4n:["4B"],3G:"Pd",3M:"6",4v:"2R/4h.3C"},{1C:"vK-aH",3W:"Pe","1j":0,1Z:2,4n:["4B"],3G:"aH",3M:"7",4v:"2R/4h.3C"},{1C:"vT-4w",3W:"vT 4w","1j":0,1Z:2,4n:["4B"],3G:"cq",3M:"8",4v:"2R/4h.3C"},{1C:"vK-P5",3W:"7-P6","1j":0,1Z:1,4n:["4B"],3G:"bN",3M:"9",4v:"2R/4h.3C"},{1C:"P8-Pf",3W:"Pg","1j":1,1Z:1,4n:["4B"],3G:"Pn",3M:"13",4v:"2R/4h.3C"},{1C:"Pp",3W:"Pm","1j":1,1Z:1,4n:["4B"],3G:"Pl",3M:"16",4v:"2R/4h.3C"},{1C:"PM-Pj",3W:"oO jL","1j":1,1Z:1,4n:["4B","RM","vJ","Pk","nU"],3G:"Ol",3M:"18",4v:"2R/4h.3C"},{1C:"vL",3W:"vL","1j":1,1Z:1,4n:["4B","RM","nU","Nd","vJ"],3G:"Nb",3M:"19",4v:"2R/4h.3C"},{1C:"vI-N5",3W:"vI vG","1j":1,1Z:1,4n:["4B"],3G:"N8-Nf",3M:"22",Nj:2,4v:"2R/4h.3C"},{1C:"o3",3W:"o3","1j":0,1Z:1,4n:["4B"],3G:"o3",3M:"38",4v:"2R/4h.3C"},{1C:"o2",3W:"o2","1j":0,1Z:1,4n:["4B"],3G:"o2",3M:"50",4v:"2R/4h.3C"},{1C:"Nn",3W:"Nk a8","1j":1,1Z:2,4n:["RM","4B"],3G:"Nm",3M:"57",4v:"2R/4h.3C"},{1C:"N3",3W:"vN aU","1j":0,1Z:1,4n:["nU","Mv","Ms","Mr","vR","Mo","Mp","Mq","Mw","Mx","N0","N1","4B"],3G:"aA",3M:"58",4v:"2R/4h.3C"}],f.n0(d),c.5L--;2p if(a===c.dj.1t())d=[{1C:"MJ rg MI (M) 2W"},{1C:"vQ 3v 2W"},{1C:"vQ aM 3v 2W"},{1C:"AL qI hp & Mz MB (4S) 2W"},{1C:"vO 3v 4S 2W"},{1C:"vO aM 3v 4S 2W"},{1C:"Nt (M) 2W"},{1C:"Nu 3v 2W"},{1C:"3v O7 4S 2W"},{1C:"3v O8 O9 4S 2W"},{1C:"3v rf 4S 2W"},{1C:"3v O6 4S 2W (O5)"},{1C:"3v re r5"},{1C:"eh 3v 2W"},{1C:"eh aM 3v 2W"},{1C:"O2 2W"},{1C:"O3 O4 (4S) qB ql"},{1C:"nQ Oa 4S 2W"},{1C:"nQ 3v 4S 2W"},{1C:"vP x6 3v 2W"},{1C:"vP x6 aM 3v 2W"},{1C:"Oi Oj Og 3v OF Oc (4S) 2W"},{1C:"Od Oe O1"},{1C:"nR hp 2W"},{1C:"rc aM 2W"},{1C:"sX AL-O0 3v 2W"},{1C:"sX 3v (4S) 2W"},{1C:"qF 3v 2W"},{1C:"qF aM 3v 2W"},{1C:"h1 3v 2W"},{1C:"h1 aM 3v 2W"},{1C:"qx qv 3v 4S 2W"},{1C:"qx qv Nz 2W"},{1C:"Nv Nw qB. ql."},{1C:"Ny NK 3v (4S) 2W"},{1C:"rc"},{1C:"nQ 4S"},{1C:"3v re r5"},{1C:"NV 3v 4S"},{1C:"3v rf"},{1C:"AL qI 3v 4S"},{1C:"NN 4S"}],f.n2(d),c.5L--;2p if(a===c.d5.1t())d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"},{5k:"NS",cv:"Q0",cx:"Q1",aF:"RZ",ei:"eh 3v 2W",ej:"MY",kT:"rg"}],"1"===c.1c.8O&&(d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"}]),f.n1(d),c.5L--;2p if(a===c.bY.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d j=["bM S8"],d={};d.8P=!0,d.1Z="kk",d.qD=c.1c.3h.1t(),d.fm=c.f4(qW,qV),d.bK="";1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e j}}});k.3o.2K(1a(a){},1a(a){d.3e=1x 0,d.1E=1x 0,d.4M=1x 0,a.cV&&"6g"===a.cV.1t()?f.mV(d):g.6V("/9p").2B()})}2p if(a===c.9K.1t()||a===c.bZ.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d d={},n=[];d.52=c.1c.2i.1t(),d.9m=c.f4(qX,S4),d.5p=c.f4(qW,qV),d.7y="0",n=["C6","D8"],d.9c=n[1R.aN(1R.nW()*n.1i)];1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e 1s}}});k.3o.2K(1a(a){},1a(a){if("1s"===d.3e)d.1E=1x 0,d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.nc="Rx",d.iI="mx 2a 3Y";2p if("1E"===d.3e)d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.9c=1x 0;2p{if(d.1E=1x 0,d.qK=aG.cQ(),d.Rr=c.1c.3h.1t(),d.qJ="o1 Rt on 9r 5X",d.3S=c.r2(c.1c.2b.1t()),"aH"===c.1c.2b||"bN"===c.1c.2b){d.7y=1,d.9m="",d.jm=c.1c.3F.1t();1d b=1m aG;b.RC(b.qT()+48),d.qN=b.RK(),d.3J="9Q";1d e=b.RL()+1;e.1t().1i<10&&(e="0"+e.1t());1d h=b.RI()+"-"+e+"-"+b.RH()+" "+b.qT()+":"+b.RD()+":"+b.RF();d.ee=["** aL qM 7U "+h],d.oT=c.1c.2i.1t(),d.cP=c.f4(qL,Sd),d.jo="T0 T2"}2p d.qK=1x 0,d.qJ=1x 0;"aH"!==c.1c.2b&&"bN"!==c.1c.2b||"22"===d.3e||(d.9m=1x 0,d.jm=1x 0,d.qN=1x 0,d.ee=1x 0,d.oT=1x 0,d.cP=1x 0,d.jo=1x 0)}1d i=c.1c.1T,j=c.1c.2F;if(c.1c.4z){1d k=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();j=1Y.4A.5B(c.1c.2F.1t(),k).1t(1Y.5z.5w)}1d l=i+d.9c+d.5p+d.52+d.3e+j;d.7o=1Y.7i(l).1t(),a.cV&&"6g"===a.cV.1t()?(("1s"===d.3e||"1E"===d.3e)&&(d.7o=1x 0),d.fS&&(d.7o=d.fS,d.fS=1x 0),g.6V("/7r").2B(),f.mV(d)):g.6V("/9p").2B()})}if(c.al&&0===c.5L){1d o={};o.a1=m[c.1c.1M].6U,o.2Z=m[c.1c.1M].7D;1d k=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e o}}});k.3o.2K(1a(){},1a(){});1d p=2k.5b(1J.qO("2A")).2z("1v");p&&""!==p.1t()||2k.5b(1J.qO("2A")).2z({1v:"SQ"}),c.1c.fe||2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),c.bI=!1,c.al=!1,c.1q,c.o0()}},c.8g=1a(a,d,e){if(c.1c.hH){c.1q;1d f="v=1",g="&Tc=UA-Td-7",i=c.1c.nX;2t.nZ&&!i?(i=2t.nZ.Ta("qP"),i?c.1q:(i=h.hG().1t(),2t.nZ.T7("qP",i),c.1q)):i||(i=h.hG().1t(),c.1c.nX=i,c.1q);1d j="&Sk="+i,k="&r4=4D";c.1c.1T&&(k="&r4="+c.1c.1T.1t());1d l="&t=Sj",m="&dp=nY",n="&dt=nY",o="&cd=nY",p="&an="+c.1c.hF.1t(),q="&rj=bm-4Q-nl-9d";c.1c.2J&&(q="&rj="+c.1c.2J.1t());1d r="&av="+c.1c.cR.1t(),s="&ec="+a.1t(),t="&ea="+d.1t(),u="&el="+e.1t(),v="fQ://9d.Ss-Sp.hE/Sr?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5v:"mM",78:v};b(w).2K(1a(a){c.1q},1a(a){c.1q})}},n.7i=1a(a){1e 1Y.7i(a).1t()},n.9R=1a(a){1e 1Y.9R(a).1t()},n.bE=1a(a,b){1e"bM="+a+"&Rp="+5H.8z(b,1s,"")},n.7c=1a(d,e){c.1q,c.1q;1d g=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();g="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i={5v:"mM",78:d,mL:{mC:"c6/bU",ss:g,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:e};c.al||(c.al=!0),c.77.1L(i),c.5L=c.77.1i,c.1q,b(i).2K(1a(a){if(c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,a.1l.1Z)c.1q,"ko"===a.1l.1Z?f.3f({1E:a.1l.Qv}):f.mY(d,a.1l.3o);2p if("OK"===a.rh){if(c.1q,a.1l.1Z===!1)4F(a.1l.3o.nk){1U rm:1U Qn:c.1q,f.3f({1E:c.2P().6k}),c.9I&&c.9I(!1,c.2P().6k);2C;1U Qo:c.1c.3w=!0}d===c.9K||d===c.dH||d===c.bY?f.mY(d,a.1l):d===c.bZ&&f.mT(a.1l)}2p c.1q},1a(){c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q,f.3f({1E:c.2P().6j}),c.9I&&c.9I(!1,c.2P().6j)})},n.Qp=1a(a){1d d={5v:"ro",78:a,mL:{mC:"c6/bU","mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU"}};c.77.1L(d),c.5L=c.77.1i,c.1q,b(d).2K(1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i},1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q})},n.bD=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}c.1q;1d d=n.7i(a).1t(),e=c.1c.1T+c.1c.2J+d;c.1q;1d f=n.9R(e).1t();1e c.1q,f},n.qo=1a(a){1d b=c.1c.2F;if(c.1c.4z){1d d=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();b=1Y.4A.5B(c.1c.2F.1t(),d).1t(1Y.5z.5w)}1d e=c.1c.2i,f=c.1c.1T,g=c.1c.3h,h=b,i=a,j=n.7i(e+f+g+h+i).1t();1e j},n.qq=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h=1s;3c{h=n.7i(d+e+f+g).1t()}2S(i){}1e h},n.sx=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.4l,g=a,h="C5",i=n.7i(e+h+f+d+g).1t();1e i},n.sB=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="D7",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},n.sF=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="mS",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},c.QH=1a(a){1d b=c.mH,d=c.1c.1T+a+c.1c.aE,e=d+n.bD();c.1q;1d f=n.9R(e).1t();c.1q;1d g={hw:c.1c.1T,aK:a+c.1c.aE},h=n.bE(f,g);c.1q,n.7c(b,h)},n.mF=1a(){1d a=c.d3,b=c.1c.1T+c.1c.3F,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T,4n:c.1c.3F},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.qk=1a(){1d a=c.dj,b=c.1c.1T,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.mD=1a(){1d a="T1",b=c.1c.8O,d=c.d5,e=hC("+"),f=2o(c.1c.3r).hv("+",e),g=c.1c.1T+c.1c.3I+c.1c.3t+c.1c.3r+c.1c.2J+a+b,h=g;c.1q;1d i=n.9R(h).1t(),j=i+n.bD();c.1q;1d k={f8:c.1c.1T,qC:c.1c.3I,qt:c.1c.3t,qA:f,qz:c.1c.2J,9c:a,2E:b},l=n.bE(j,k);c.1q,c.1c.4Z?n.5J(d,l):n.7c(d,l)},n.rb=1a(){n.mF(),n.qk(),(c.1c.3I&&c.1c.3t&&c.1c.3r||c.1c.4Z)&&n.mD()},n.qm=1a(){1d b=c.bZ,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();f="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i,j={93:"&93="+c.1c.1T,fJ:"&fJ="+c.1c.3h,fK:"&fK="+c.1c.fl,fR:"&fR="+c.1c.2b,fV:"&fV="+c.1c.3F,fT:"&fT="+c.1c.2i,fW:"&fW="+c.1c.3I,fU:"&fU="+c.1c.3t,fI:"&fI="+e,fF:"&fF="+c.1c.5c,fi:"&fi="+n.qq(),fh:"&fh=4Q://"},k={hI:"",hJ:"",hN:"",hM:"",hL:"",hK:"",hD:""};"4X"===c.1c.2b||"aA"===c.1c.2b?(k.hJ="&hJ="+c.1c.5G,k.hN="&hN="+c.1c.bh,k.hM="&hM="+c.1c.bj,!c.1c.3w&&c.1c.5k?k.hL="&hL="+c.1c.5k:k.hI="&hI="+c.1c.8C,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hI+k.hJ+k.hN+k.hM+k.hL):"cq"===c.1c.2b?(k.hK="&hK="+c.1c.8U,k.hD="&hD="+c.1c.bt,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hK+k.hD):i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh,c.ai&&(i.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,i):(g.6V("/7r").2B(),n.7c(b,i))},n.qw=1a(){c.6F="B3";1d a=c.6F,b=c.9K,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f={52:c.1c.2i,qz:c.1c.2J,R9:c.1c.5c,qt:c.1c.3t,qA:e,qC:c.1c.3I,3S:c.1c.2b,jm:c.1c.3F,hu:c.1c.hu,f8:c.1c.1T,9c:a,qD:c.1c.3h,ht:c.1c.ht,4E:c.1c.3g,Rm:n.qo(a),8U:c.1c.8U,2E:c.1c.8O,Rl:c.1c.hr,Rg:c.1c.fl,Rj:c.1c.ff,R4:c.1c.fG};"4X"===c.1c.2b||"aA"===c.1c.2b?(f.8X=c.1c.5G,f.bh=c.1c.bh,f.bj=c.1c.bj,f.QS=c.1c.7h,!c.1c.3w&&c.1c.5k?f.5k=c.1c.5k:f.QT=c.1c.8C):"cq"===c.1c.2b&&(f.8U=c.1c.8U,f.bt=c.1c.bt),c.ai&&(f.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,f):(g.6V("/7r").2B(),n.7c(b,f))},n.sy=1a(){1d a=c.dH,b="";c.1q,n.7c(a,b)},c.bH=1a(){c.6F="C5";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,5p:c.1c.4l,52:c.1c.2i,7o:n.sx(),9c:a};c.1q,g.6V("/7r").2B(),n.7c(b,d)},c.hB=1a(){c.6F="D7";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sB(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},c.n3=1a(){c.6F="mS";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sF(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},n.sv=1a(d){1d e=d;if(c.1q,e){c.1c.c0=!1,c.1c.ep=!0;1d f=c.mO,g=c.1c.1T+e,h=g+n.bD();c.1q;1d j=n.9R(h).1t();c.1q;1d k={hw:c.1c.1T,QW:e},l=n.bE(j,k);c.1q;1d o=c.1c.f6;if(c.1c.4z){1d p=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();o="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),p).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),p).1t(1Y.5z.5w))}1d q={5v:"mM",78:f,mL:{mC:"c6/bU",ss:o,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:l};b(q).2K(1a(a){if(c.1c.ep=!1,a.1l.1Z&&(c.1q,t0(a.1l.1Z)&&(c.1c.c0=t0(a.1l.3o.1Z),!c.1c.c0))){1d b={};b.a1=m[c.1c.1M].6l,b.2Z=m[c.1c.1M].7N;1d d=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e b}}});d.3o.2K(1a(){},1a(){c.1c.6d=""})}},1a(){if(c.1c.ep=!1,c.1c.4Z){1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7Q;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.c0=!0})}2p{1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7X;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.6d=""})}})}},n.mt=1a(a){1d b=!1,d=a;if(c.1q,d){d.1i>5&&(d=a.2w(0,6),c.1q),c.1q;1d e=j("2E")(c.1c.bS,d,!0);if(c.1q,0===e.1i){1d f={};f.a1=m[c.1c.1M].6l,f.2Z=c.1c.t4;1d g=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e f}}});1e g.3o.2K(1a(){},1a(){c.1c.3w&&(c.1c.6d="")}),b=!0}}1e b},n.t3=1a(){if(c.1q,"4X"===c.1c.2b||"aA"===c.1c.2b){1d a=c.bY,b={93:c.1c.1T,fd:"",5h:c.1c.3h,fc:c.1c.3F,fA:c.1c.2i,"4u h6":c.1c.3I,"4u aP":c.1c.3t,"4u h7":c.1c.3r,"4u h8":c.1c.5c},d="",e=c.1c.2F;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();e=1Y.4A.5B(c.1c.2F.1t(),h).1t(1Y.5z.5w)}1d i="";!c.1c.3w&&c.1c.5k?(b.bP="T",b["bQ / bR"]=c.1c.5k,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b.bM):(b.bP="P",b["bQ / bR"]=c.1c.8C,b.n8=c.1c.bh+c.1c.bj,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.n8+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.n8+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b["4u h6"]+"|"+b["4u aP"]+"|"+b["4u h7"]+"|"+b["4u h8"]+"|"+b.bM),c.1q,g.6V("/7r").2B();1d j=k([d]);c.1c.4Z?n.5J(a,j):n.7c(a,j)}2p f.3f({1E:c.2P().6Q})},n}]),2k.4i("5j").hq("n5",["$66","7T","$bT","$2E","1N",1a(a,b,c,d,e){1d f={};1e f.n0=1a(b){if(b){a.1c.5d=b,a.9I&&a.1c.5d.1i>0&&a.9I(!0,5H.8z(a.1c.5d));1d c="";if(a.n6()){1d g=["4X","aA"];c=d("2E")(a.1c.5d,1a(a){1e-1===g.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}1d h=!0;if(h){1d i=["KC"];c=d("2E")(a.1c.5d,1a(a){1e-1===i.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}a.1c.hx&&(a.1q,c=d("2E")(a.1c.5d,1a(b){1e-1!==a.1c.hx.3U(b.3G)}),c.1i&&(a.1q,a.1c.5d=c)),0===a.1c.5d.1i?(a.1q,f.3f({1E:a.2P().6p}),a.9I&&a.9I(!1,a.2P().6p),a.8g(a.1c.6N,"mZ-Jp","11")):a.8g(a.1c.6N,"mZ-"+a.1c.2b.1t(),"bX"),"c5"!==a.1c.2b?(c=d("2E")(a.1c.5d,{3G:a.1c.2b},!0),c.1i?a.1c.au=c[0].3W:(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u,a.1c.9H=!0)):(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u),("9Q"===a.1c.3J||a.1c.4l)&&a.bH()}a.1q},f.n1=1a(b){a.1c.fC&&"1m"===a.1c.fC||b&&(a.1c.6a=b,a.1c.6a.1i>0?a.1c.3w=!1:a.1c.3w=!0),a.1q},f.n2=1a(b){b&&(a.1c.lx=b),a.1q},f.zD=1a(c){if(a.1q,c&&c.1i>0){1d d=b.2f(c);a.1q;1d e=a.mW+d;a.5U(e),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"bX")}2p{a.1q;3c{1d g=1s;3c{g=5H.ac(c)}2S(h){g=c}if(a.1q,g.nc&&g.iI&&g.iI.1i>0){1d i=g.nc+", "+g.iI;f.3f({1E:i}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}2S(h){f.3f({1E:a.2P().6u}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}},f.zy=1a(b){a.bJ=b,a.1q,a.bJ&&""!==a.bJ&&(a.1c.4l=a.bJ.fm,a.1c.7o=a.bJ.7o,a.bH())},f.zd=1a(d){a.2I=d,a.fq(d)&&(a.1c.4M=!0),a.2I.4M=a.1c.4M,a.2I.7y&&1===a.2I.7y&&(a.2I.3J="9Q"),a.1c.3J&&(a.2I.3J=a.1c.3J,"9Q"===a.2I.3J&&a.2I&&a.2I.3e&&"11"===a.2I.3e&&(a.1q,a.2I.3J="")),a.1q;1d e=b.2f(5H.8z(a.2I,1s,""));a.1q;1d f=a.bz+e;a.5U(f),("9Q"===a.1c.3J||1===a.2I.7y)&&a.2I&&a.2I.3e&&"11"!==a.2I.3e&&(a.1q,c.6V("/6O").2B());1d g=a.2I.3e;g||(g="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),g.1t())},f.zz=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));a.1q;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())},f.zB=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));if(a.1q,"22"!==a.5Q.3e||a.5Q.7y&&1===a.5Q.7y){a.ne=!1;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())}2p a.n40&&(d.bK=b.a4[0])}),b.q4=1a(){c.6P({cV:"q4"})},b.6g=1a(){c.6P({cV:"6g"})}}]),2k.4i("5j").3p("n7",["$66","$5O","$aO","8b","1N",1a(a,b,c,d,e){b.1N=e[a.1c.1M],b.8b=d,b.tn=1a(a){c.6P(a)},b.44=1a(){c.6P()}}]),2k.4i("5j").hq("1N",1a(){1d a={};1e a.3l={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.EN={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.MS={5h:"ID QN",8u:"bA",8i:"aP",8p:"QM QL",7K:"mI xZ",8d:"QK QP",5u:"QQ QR R5",5D:"Rh",5s:"Rk",8v:"Ro",83:"xL Rn mz",6W:"Ya",No:"lJ",7B:"7W xL",7Z:"6f",7E:"xP R7",89:"BB/TT",6S:"i8",7R:"mJ i8",7f:"bA a8",7H:"mJ a8",84:"xN R6 4k (8K = 3H 4k xN)",7G:"7W Ra 4w 8V 43",8a:"(7W 10-dT Rd)",7V:"iq mJ",7S:"xO 1Z dn",7u:"Rc x9",86:"mG hg (QJ)",6y:"QI",8f:"7W Qf",88:"y4 xE",6q:"Qg",8k:"Qk Qj",6J:"xO...",6e:"Qb...",6l:"mI dn 2c 5I",7z:"bA 2c 5I",6C:"Q5 2c 5I",5P:"7W nS y2 2c 5I",8s:"mI 2c 5I",8t:"7W hf d4 2c 5I",8q:"7W hf d4 2c 5I (8G)",8w:"7W 6f 2c 5I",7O:"xP Q7 2c 5I",7F:"7W 4k 2c 5I",7C:"oN 4k 2c 5I",7N:"7W hf aa fY 2c 5I",1E:"iq",8Z:"Qa xK - 8B hg",7X:"xJ 6w, Q9 Q8 gp Ql xK 6w",7Q:"xG hf i6/d4 QC",6U:"yZ",7D:"mG hg -QD",8l:"xm mG QE",8e:"lR QG QF g3 xo i7:

Qy Qq i7 dk 8B hg xd Qs 5X Qw So (Sn), Sg xA dk Sm fY Sy.",6n:"T8",6j:"xw iq, ir T6 T5 6w, fX SF lB SU SW",6k:"xq xp, ir xF id T3, fX xs, lB Sc xH",6p:"xJ dh 8x, ir xF g2 y5 Rv",6v:"3E 2c 8x",6X:"3D 2c 8x",6s:"1T 2c 8x",6I:"2J 2c 8x",6G:"3h 2c 8x",5E:"2i 2c 8x",6L:"3F 2c 8x",6r:"3g 2c 8x",6A:"3g g2 2c 5I",6B:"2F 2c 8x",6x:"4l g2 g3 y6 Rs 2c RA",6u:"iq S6 S5, ir yG S7",6b:"Sb nV cy",6Q:"xE RV 2c RR RX yK dh gp",6K:"xG e-xR aR cy",6t:"7W xH nS lc cy",5N:"bA xQ iu 9X ip 2 xI-xI",6h:"NY xQ iu 9X ip 4 mk",6Z:"E-xR NM iu 9X ip 4 mk",5C:"xZ Nx nS y2 iu 9X ip 4 mk",6m:"y4 2c 5I"},a.VI={5h:"ID đơn đặt hàng",8u:"Tên người đứng hóa đơn",8i:"ob toán bằng thư điện tử",8p:"ob toán điện duại di động",7K:"Mô tả 8y toán",8d:"Trả xT",5u:"Ob lòng chọn một kênh",5D:"THỰC HIỆN",5s:"GẦN",8v:"il",83:"Thẻ mới",6W:"Vâng",No:"Không",7B:"Số thẻ",7Z:"6f",7E:"Ngày hết hạn",89:"MM/9D",6S:"Quốc xY",7R:"Quốc xY tìm kiếm",7f:"tên ngân hàng",7H:"Ngân hàng tìm kiếm",84:"Sử dụng điểm 4k (8K = 3H điểm 4k)",7G:"Thẻ # 8V 43",8a:"(Số 10 chữ số cuối cùng)",7V:"Lỗi tìm kiếm",7S:"Hoàn xXện trạng thái 8y toán.",7u:"pW chờ.",86:"Chế độ hộp cát",6y:"Dịch vụ",8f:"ID io dịch",88:"Số tiền phải trả",6q:"chú thích",8k:"Lưu ảnh vào xXết bị",6J:"Mtẩn bị...",6e:"Tải...",6l:"Thông Ns 8y toán không hợp lệ",7z:"Tên hóa đơn không hợp lệ",6C:"aP 8y toán không hợp lệ",5P:"Điện duại di động 8y toán không hợp lệ",8s:"Mô tả 8y toán không hợp lệ",8t:"Số thẻ tín dụng không hợp lệ",8q:"Số thẻ tín dụng không hợp lệ (8G)",8w:"Số 8X không hợp lệ",7O:"Ngày hết hạn không hợp lệ",7F:"Số 4w không hợp lệ",7C:"Nq 4w không hợp lệ",7N:"Số thẻ aa không hợp lệ",1E:"lỗi",8Z:"Lỗi mạng - Chế độ bd",7X:"d2 bị ngắt kết nối, io dịch này cần có 6w",7Q:"Kiểm ij thẻ N7 nợ đã bị bỏ xT.",6U:"Nhắc nhở",7D:"Chế độ cát là ON",8l:"Tùy chọn 5J",8e:"Sử dụng các tùy chọn dưới đây để cấu hình kết quả:

pW dy lòng được thông báo rằng tất cả các kết quả io dịch được 4G đ9z dl mô phỏng, không có quá trình trực Neến sẽ diễn ra.",6n:"Bị làm giả",6j:"Lỗi io tiếp, dy lòng kiểm ij kết nối 6w, tên người dùng hoặc mật khẩu",6k:"Nc cập đã bị từ chối, dy lòng kiểm ij id của người bán, tên ứng dụng hoặc mã xác P9",6p:"Không tìm thấy kênh, dy lòng kiểm ij giá trị tiền tệ",6v:"3E không tìm thấy",6X:"3D không tìm thấy",6s:"1T không tìm thấy",6I:"2J không tìm thấy",6G:"3h không tìm thấy",5E:"2i không tìm thấy",6L:"3F không tìm thấy",6r:"3g không tìm thấy",6A:"3g giá trị không hợp lệ",6B:"2F không tìm thấy",6x:"4l không tìm thấy giá trị Pq yêu cầu nhận",6u:"Lỗi không được xử lý, dy lòng liên hệ với bộ phận hỗ trợ",6b:"Mã hóa an toàn không thành công",6Q:"ob toán định kỳ không thể tiến hành trên kênh này",6K:"Xác thực 59 nâng od không thàXác nhận số điện duại nâng od không thành côPt công",6t:"Xác nhận số điện duại nâng od không thành công",5N:"Tên 8y toán phải dài hơn 2 ký tự",6h:"Mô tả 8y toán phải dài hơn 4 ký tự",6Z:"aP 8y toán phải dài hơn 4 ký tự",5C:"Số điện duại 8y toán phải dài hơn 4 ký tự",6m:"Số tiền không hợp lệ"},a.TH={5h:"รหัสคำสั่งซื้อ",8u:"ชื่อการเรียกเก็บเงิน",8i:"อีเมลการเรียกเก็บเงิน",8p:"การเรียกเก็บเงินมือถือ",7K:"คำอธิบายการเรียกเก็บเงิน",8d:"จ่ายผ่าน",5u:"โปรดเลือกช่อง",5D:"ดำเนินการต่อไป",5s:"ปิด",8v:"ยกเลิก",83:"บัตรใหม่",6W:"ใช่",No:"ไม่",7B:"หมายเลขบัตร",7Z:"6f",7E:"วันหมดอายุ",89:"MM/9D",6S:"ประเทศ",7R:"ค้นหาประเทศ",7f:"ชื่อธนาคาร",7H:"ค้นหาธนาคาร",84:"ใช้คะแนน 4k (8K = 3H 4k dL)",7G:"การ์ดหมายเลข 8V 43",8a:"(ตัวเลขล่าสุด 10 หลัก)",7V:"ข้อผิดพลาดในการค้นหา",7S:"กำลังสรุปสถานะการชำระเงิน",7u:"โปรดรอ.",86:"โหมด 9r ON",6y:"บริการ",8f:"รหัสธุรกรรม",88:"จำนวนเงินที่ต้องชำระ",6q:"บันทึก",8k:"บันทึกรูปภาพลงในอุปกรณ์",6J:"การจัดเตรียม...",6e:"กำลังโหลด...",6l:"ข้อมูลการชำระเงินไม่ถูกต้อง",7z:"ชื่อการเรียกเก็บเงินไม่ถูกต้อง",6C:"อีเมลเรียกเก็บเงินไม่ถูกต้อง",5P:"การเรียกเก็บเงินมือถือไม่ถูกต้อง",8s:"คำอธิบายการเรียกเก็บเงินไม่ถูกต้อง",8t:"หมายเลขบัตรเครดิตไม่ถูกต้อง",8q:"หมายเลขบัตรเครดิตไม่ถูกต้อง (8G)",8w:"หมายเลข 8X ไม่ถูกต้อง",7O:"วันที่มีค่าไม่ถูกต้อง",7F:"หมายเลข 4w ไม่ถูกต้อง",7C:"OA 4w ไม่ถูกต้อง",7N:"หมายเลขบัตรเดบิตไม่ถูกต้อง",1E:"ความผิดพลาด",8Z:"ข้อผิดพลาดเกี่ยวกับเครือข่าย - โหมด 9r",7X:"อินเทอร์เน็ตถูกตัดการเชื่อมต่อรายการนี้ต้องใช้อินเทอร์เน็ต",7Q:"การตรวจสอบบัตรเดบิตถูกข้ามแล้ว",6U:"การแจ้งเตือน",7D:"โหมด bd เปิดอยู่",8l:"ตัวเลือก 5J",8e:"ใช้ตัวเลือกด้านล่างเพื่อกำหนดค่าผลลัพธ์:

โปรดทราบว่าผลการทำธุรกรรมของ 4G แบบออฟไลน์ทั้งหมดจะไม่มีการดำเนินการออนไลน์",6n:"ดัดแปลง",6j:"ข้อผิดพลาดในการสื่อสารโปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตชื่อผู้ใช้หรือรหัสผ่าน",6k:"การเข้าถึงถูกปฏิเสธโปรดตรวจสอบรหัสร้านค้าชื่อแอปหรือรหัสยืนยัน",6p:"ไม่พบช่องโปรดตรวจสอบสกุลเงิน",6v:"3E ไม่พบ",6X:"3D ไม่พบ",6s:"1T ไม่พบ",6I:"2J ไม่พบ",6G:"3h ไม่พบ",5E:"2i ไม่พบ",6L:"3F ไม่พบ",6r:"3g ไม่พบ",6A:"3g ค่าที่ไม่ถูกต้อง",6B:"2F ไม่พบ",6x:"4l ไม่พบค่าสำหรับใบเสร็จรับเงิน",6u:"เกิดข้อผิดพลาดที่ไม่สามารถจัดการได้โปรดติดต่อฝ่ายสนับสนุน",6b:"การเข้ารหัสลับที่ปลอดภัยล้มเหลว",6Q:"การชำระเงินที่เกิดขึ้นประจำจะไม่สามารถดำเนินการต่อในช่องนี้ได้",6K:"การตรวจสอบอีเมลขั้นสูงล้มเหลว",6t:"การตรวจสอบหมายเลขโทรศัพท์ขั้นสูงล้มเหลว",5N:"ชื่อการเรียกเก็บเงินต้องมีความยาวมากกว่า 2 ตัว",6h:"คำอธิบายการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6Z:"อีเมลสำหรับการเรียกเก็บเงินต้องมีความยาวไม่เกิน 4 ตัว",5C:"หมายเลขโทรศัพท์มือถือการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6m:"จำนวนไม่ถูกต้อง"},a.yq={5h:"ID ng o5",8u:"nG ng o4",8i:"59 o4",8p:"4u aC ng 4Q",7K:"lr ng o4",8d:"OE sa Oo ng",5u:"Oq Tf ng 3S",5D:"o8",5s:"OG",8v:"il",83:"OT 4q",6W:"oo",No:"xU",7B:"OQ ng 4q",7Z:"6f",7E:"7a cc",89:"MM/9D",6S:"xS",7R:"ah xS",7f:"xf ng Yc",7H:"ah nx",84:"xV 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(WH 10-dT na aC)",7V:"cg WK",7S:"Wq 9z xC WA sa ll.",7u:"WX WW na X1.",86:"9r 5X ON",6y:"yV XL",8f:"ID ng xD",88:"XE dN",6q:"XJ",8k:"I-iF 9z XC sa Xs",6J:"การจัดเตรียม...",6e:"Xq...",6l:"Di-5V XV sa ll",7z:"Di-5V nG ng gT",6C:"xU 5V 59 sa gT",5P:"Di-5V 4Q e6",8s:"Di-5V lr sa gT",8t:"Di-5V aC ng 4X 4q",8q:"Di-5V aC ng 4X 4q (8G)",8w:"Di-5V aC 6f",7O:"Di-5V Wp 7a",7F:"Di-5V aC 4w",7C:"Di-5V 4w c7",7N:"Di-5V aC aa 4q",1E:"X5",8Z:"dM 1E - nH-9P 5X",7X:"d2 X0 9z, sa WY na xj ay X6 ng 6w nJ",7Q:"aa 4q nL ay Xk.",6U:"Xc",7D:"nH-9P na WR",8l:"5J 1B",8e:"xV 9z cf WB sa Ww Wr i-i1 9z cf xW:

Wu na 9z WI ng nH-9P na cf xW sa xD ay dl Yd, XF Wn ng g9 ay Us sa Ur.",6n:"Ux",6j:"nE 1E, iz lK 6w nF, g1, o cB",6k:"i2 Uw, iz lK fZ id, nG ng 8W, o xC-Up ib",6p:"Ul 3S na xg, iz lK 9z UQ dN",6v:"3E 7L 9n",6X:"3D 7L 9n",6s:"1T 7L 9n",6I:"2J 7L 9n",6G:"3h 7L 9n",5E:"2i 7L 9n",6L:"3F 7L 9n",6r:"3g 7L 9n",6A:"3g di-5V dN",6B:"2F 7L 9n",6x:"4l dN UD sa Tv Ty ay 7L xg",6u:"ic cg, iz Ud-Uc sa U0",6b:"UW ie VY",6Q:"VX na ll ay 7L W2 W1 sa 3S na xj",6K:"xk aR 59 ng xl",6t:"xk 9z 3B aR lo xl",5N:"xf ng gT ay db na i0 sa 2 dS",6h:"4u lr ay db na i0 sa 4 na cf dS",6Z:"4u 59 ay db na i0 sa 4 na cf dS",5C:"4u aC ng 4Q ay db na i0 sa 4 na cf dS",6m:"Di-5V dN"},a.MY={5h:"အမိန့်အိုင်ဒီ",8u:"ငွေတောင်းခံနာမကိုအမှီ",8i:"ငွေတောင်းခံအီးမေးလျ",8p:"ငွေတောင်းခံမိုဘိုင်း",7K:"ငွေတောင်းခံဖော်ပြချက်",8d:"တဆင့်ပေးဆောင်",5u:"တစ်ဦးရုပ်သံလိုင်းကို hS ပေးပါ",5D:"ဆက်လက်ဆောင်ရွက်",5s:"lw",8v:"ပယ်ဖျက်",83:"နယူးကဒ်",6W:"ဟုတ်ကဲ့",No:"အဘယ်သူမျှမ",7B:"ကတ်နံပါတ်",7Z:"6f",7E:"jA နေ့စွဲ",89:"MM/9D",6S:"ပြည်",7R:"ရှာရန်တိုင်းပြည်",7f:"ဘဏ်အမည်",7H:"ရှာရန်ဘဏ်",84:"4k ရမှတ် (8K = 3H ကျော် 4k အမှတ်) ကိုသုံးပါ",7G:"ကဒ် # 8V 43",8a:"(နောက်ဆုံး 10-ဂဏန်းနံပါတ်)",7V:"ရှာရန်အမှား",7S:"ငွေပေးချေမှု 1Z ကိုအပြီးသတ်နေသည်။",7u:"ကျေးဇူးပြုပြီးခဏစောင့်ပါ။",86:"bd 5X ကို ON",6y:"န်ဆောင်မှုများ",8f:"ငွေသွင်းငွေထုတ် ID ကို",88:"ပေးဆောင်ရမည့်ငွေပမာဏကို",6q:"မှတ်စု",8k:"ကိရိယာ 1W ကို lz",6J:"ပြင်ဆင်နေ...",6e:"6e...",6l:"မှားနေသောငွေပေးချေမှုသတင်းအချက်အလက်များ",7z:"မှားနေသောငွေတောင်းခံနာမကိုအမှီ",6C:"မှားနေသောငွေတောင်းခံအီးမေးလျ",5P:"မှားနေသောငွေတောင်းခံမိုဘိုင်း",8s:"မှားနေသောငွေတောင်းခံဖော်ပြချက်",8t:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က",8q:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က (8G)",8w:"မှားနေသော 8X အရေအတွက်ကို",7O:"မှားနေသော Wf နေ့စွဲ",7F:"မှားနေသော 4w အရေအတွက်ကို",7C:"မှားနေသော 4w c7 ကို",7N:"မှားနေသောမြီစားကတ်နံပါတ်",1E:"အမှား",8Z:"dM မှအမှား - 4G 5X ကို",7X:"အင်တာနက်ကိုအဆက်ပြတ်, ဒီအရောင်းအဝယ်အတွက်အင်တာနက်ရရှိနိုင်မှုလိုအပ်ပြီး",7Q:"i6 4q ကိုစစ်ဆေးခြင်းကိုကျော်သွားခဲ့တာဖြစ်ပါတယ်။",6U:"သတိပေးချက်",7D:"9P 5X ကို ON ဖြစ်ပါသည်",8l:"4G 1B များ",8e:"ရလဒ် i1 ဖို့အောက်က W8 4G ရွေးချယ်စရာ:

အားလုံး 4G ငွေပေးငွေယူရလဒ်များကိုအော့ဖ်လိုင်း lb နေကြသည်မရှိအွန်လိုင်းဖြစ်စဉ်ကိုရာအရပျယူလိမ့်မည်ဟုအကြောင်းကြားလိမ့်ပေးပါ။",6n:"နှောင့်အယှက်",6j:"ဆက်သွယ်ရေးမှားယွင်းနေသည်, အင်တာနက်ကွန်နက်ရှင်, အသုံးပြုသူအမည်, ဒါမှမဟုတ် cB ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6k:"i2 ကို, ငြင်းပယ်ကုန်သည်အိုင်ဒီ, 8W ကိုအမည်, သို့မဟုတ်စိစစ်အတည်ပြု ib ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6p:"ရုပ်သံလိုင်းတစ်ခုမှမတွေ့, ငွေကြေးတန်ဖိုးကိုစစ်ဆေးကျေးဇူးပြုပြီး",6v:"3E မတွေ့ပါ",6X:"3D မတွေ့ပါ",6s:"1T မတွေ့ပါ",6I:"2J မတွေ့ပါ",6G:"3h မတွေ့ပါ",5E:"2i မတွေ့ပါ",6L:"3F မတွေ့ပါ",6r:"3g မတွေ့ပါ",6A:"3g မမှန်ကန်တဲ့တန်ဖိုးကို",6B:"2F မတွေ့ပါ",6x:"4l မတွေ့ရှိလက်ခံရရှိတောင်းဆိုချက်အတွက်တန်ဖိုးကို",6u:"ic အမှား, ထောက်ခံမှုဆက်သွယ်နိုင်ပါသည်",6b:"လုံခြုံသော ie ကိုပျက်ကွက်",6Q:"ငွေပေးချေမှုထပ်တလဲလဲဤချန်နယ်ပေါ်တွင်ဆက်လက်ဆောင်ရွက်မနိုင်",6K:"အဆင့်မြင့်အီးမေးလ် ct ကိုမအောင်မြင်ခဲ့",6t:"W9 ဖုန်းနံပါတ် ct ကိုမအောင်မြင်ခဲ့",5N:"ငွေတောင်းခံနာမကိုအမှီ 2 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6h:"ငွေတောင်းခံဖော်ပြချက် 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6Z:"ငွေတောင်းခံအီးမေးလ်က 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",5C:"မိုဘိုင်းနံပါတ်ငွေတောင်းခံလွှာပေါ်ရှိ 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6m:"မှားနေသောငွေပမာဏ"},a.KM={5h:"លេខ​សម្គាល់​លំដាប់",8u:"ឈ្មោះវិក័យប័ត្រ",8i:"អ៊ីម៉ែលវិក័យប័ត្រ",8p:"ទូរស័ព្ទដៃវិក័យប័ត្រ",7K:"ការរៀបរាប់វិក័យប័ត្រ",8d:"បង់តាមរយៈការ",5u:"សូមជ្រើសឆានែល",5D:"បន្តដំណើរការ",5s:"ជិតស្និទ្ធ",8v:"បដិសេធ",83:"កាតថ្មី",6W:"បាទ",No:"គ្មាន",7B:"លេខ​កាត",7Z:"6f",7E:"កាលបរិច្ឆេទ 7a",89:"MM/9D",6S:"ប្រទេស",7R:"ប្រទេសស្វែងរក",7f:"ឈ្មោះ​របស់​ធនាគារ",7H:"ធនាគារស្វែងរក",84:"ពិន្ទុការប្រើ 4k (8K = 3H 4k ពិន្ទុ)",7G:"កាត # 8V 43",8a:"(ចំនួន 10 ខ្ទង់ចុងក្រោយ)",7V:"កំហុសស្វែងរក",7S:"បញ្ចប់ស្ថានភាពបង់ប្រាក់។",7u:"សូមរង់ចាំ។",86:"លើរបៀប 9P",6y:"សេវាកម្ម",8f:"លេខសម្គាល់ប្រតិបត្តិការ",88:"ចំនួនទឹកប្រាក់ដែលត្រូវបង់",6q:"ចំណាំ",8k:"រក្សាទុករូបភាពទៅកាន់ឧបករណ៍",6J:"ការរៀបចំ...",6e:"កំពុងផ្ទុក...",6l:"ពបង់ប្រាក់គ្មានសុពលភាព",7z:"ឈ្មោះវិក្កយបត្រមិនត្រឹមត្រូវ",6C:"អ៊ីម៉ែលវិក័យប័ត្រមិនត្រឹមត្រូវ",5P:"វិក័យប័ត្រមិនត្រឹមត្រូវចល័ត",8s:"ការរៀបរាប់វិក័យប័ត្រមិនត្រឹមត្រូវ",8t:"លេខកាតឥណទានមិនត្រឹមត្រូវ",8q:"លេខកាតឥណទានមិនត្រឹមត្រូវ (8G)",8w:"ចំនួន 6f មិនត្រឹមត្រូវ",7O:"កាលបរិច្ឆេទ 7a មិនត្រឹមត្រូវ",7F:"ចំនួន 4w មិនត្រឹមត្រូវ",7C:"ម្ជុល 4w មិនត្រឹមត្រូវ",7N:"លេខកាតឥណពន្ធមិនត្រឹមត្រូវ",1E:"កំហុសក្នុងការ",8Z:"កំហុសក្នុងការបណ្តាញ - របៀបសេនបក់",7X:"អ៊ីនធឺណិតបានផ្តាច់, ប្រតិបត្តិការនេះតម្រូវឱ្យមានភាពអាចរកបានអ៊ិនធឺណិ",7Q:"ការត្រួតពិនិត្យកាតឥណពន្ធត្រូវបានរំលង។",6U:"ការ​រំលឹក",7D:"របៀប 9P ត្រូវបានបើក",8l:"ជម្រើសសេនបក់",8e:"ប្រើជម្រើសខាងក្រោមដើម្បីកំណត់រចនាសម្ព័ន្ធលទ្ធផលនេះ:

សូមជំរាបជូនថាលទ្ធផលនៃការប្រតិបត្តិការទាំងអស់ត្រូវបានក្លែងធ្វើសេនបក់ក្រៅបណ្តាញ, មិនមានដំណើរការលើបណ្តាញនឹងយកកន្លែង។",6n:"បន្លំ",6j:"កំហុសក្នុងការប្រាស្រ័យទាក់ទង, សូមពិនិត្យមើលការតភ្ជាប់អ៊ីធឺណិត, ឈ្មោះអ្នកប្រើឬពាក្យសម្ងាត់",6k:"ការចូលដំណើរការត្រូវបានបដិសេធ, សូមពិនិត្យមើលលេខសម្គាល់អ្នកជំនួញ, ឈ្មោះកម្មវិធីឬកូនសោផ្ទៀងផ្ទាត់",6p:"រកមិនឃើញឆានែល, សូមពិនិត្យមើលតម្លៃរូបិយប័ណ្ណ",6v:"3E រក​មិន​ឃើញ",6X:"3D រក​មិន​ឃើញ",6s:"1T រក​មិន​ឃើញ",6I:"2J រក​មិន​ឃើញ",6G:"3h រក​មិន​ឃើញ",5E:"2i រក​មិន​ឃើញ",6L:"3F រក​មិន​ឃើញ",6r:"3g រក​មិន​ឃើញ",6A:"3g តម្លៃមិនត្រឹមត្រូវ",6B:"2F រក​មិន​ឃើញ",6x:"4l រកមិនឃើញតម្លៃសម្រាប់ការស្នើរសុំវិក័យប័ត្រ",6u:"កំហុសដែលមិនបានដោះស្រាយសូមទាក់ទងបានការគាំទ្រ",6b:"ការអ៊ិនគ្រីបបានបរាជ័យកិច្ចធានា",6Q:"កើតឡើងការទូទាត់មិនអាចបន្តនៅលើឆានែលនេះ",6K:"សុពលភាពអ៊ីមែលកម្រិតខ្ពស់បរាជ័យ",6t:"សុពលភាពលេខទូរស័ព្ទកម្រិតខ្ពស់បរាជ័យ",5N:"ឈ្មោះវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 2",6h:"ការរៀបរាប់វិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",6Z:"អ៊ីម៉ែលវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",5C:"វិក័យប័ត្រចំនួនទូរស័ព្ទចល័តត្រូវតែមានតួអក្សរច្រើនជាង 4",6m:"ចំនួនទឹកប្រាក់មិនត្រឹមត្រូវ"},a.ID={5h:"Id VH",8u:"bA Vb",8i:"59 9F",8p:"x8 9F",7K:"yE 9F",8d:"Ve Vf",5u:"xr Vh dh",5D:"V9",5s:"V2",8v:"V3",83:"aV V4",6W:"Mm Ec",No:"lJ",7B:"lZ aV",7Z:"6f",7E:"Eb Ee",89:"MM/9D",6S:"i8",7R:"i8 xe",7f:"fX a8",7H:"a8 xe",84:"Eg lR 4k (8K = 3H 4k dL)",7G:"lZ aV 8V 43",8a:"(Dh lZ 10-dT)",7V:"Dg Df",7S:"Dj 1Z dn.",7u:"xy x9.",86:"Dk 4G ON",6y:"Dn",8f:"ID dk",88:"yB Dm",6q:"D5",8k:"D6 D9 ke Db",6J:"Do...",6e:"DC...",6l:"DA dn 2c 2L",7z:"bA 9F fY 2c 2L",6C:"59 9F 2c 2L",5P:"DD x8 2c 2L",8s:"EI 9F 2c 2L",8t:"d9 aV d4 2c 2L",8q:"d9 aV d4 2c 2L (8G)",8w:"d9 8X 2c 2L",7O:"Fe 7a 2c 5I",7F:"d9 4w 2c 2L",7C:"oN 4w 2c 2L",7N:"d9 aV i6 2c 2L",1E:"m6",8Z:"m6 Fi - Fg 4G",7X:"d2 D1, dk gp F8 F7 6w",7Q:"Cz aV i6 Ao Am.",6U:"yZ",7D:"5X 9P xd ON",8l:"xm bd",8e:"lR AH di A6 g3 xo i7:

xy C3 Cn Bf i7 dk bd Cb dl Ac, 2c xu xA g9 zV A7.",6n:"Ad",6j:"m6 xw, m0 lW Kz 6w, g1, 3X cB",6k:"xq xp, xr lW fZ id, fX xs, lB JY JA",6p:"lJ xu dh fY 8o, m0 lW g2 y5 Jq",6v:"3E 2c 8o",6X:"3D 2c 8o",6s:"1T 2c 8o",6I:"2J 2c 8o",6G:"3h 2c 8o",5E:"2i 2c 8o",6L:"3F 2c 8o",6r:"3g 2c 8o",6A:"3g 2c 2L",6B:"2F 2c 8o",6x:"4l g3 y6 JU JV 2c 8o",6u:"JG, m0 yG JF",6b:"JL JK cy",6Q:"JJ dn 2c db LO yK dh gp",6K:"yF 59 lc cy",6t:"yF yA lc cy",5N:"bA 9F gH 9X gR 2 gN",6h:"yE 9F gH 9X gR 4 gN",6Z:"59 9F gH 9X gR 4 gN",5C:"Lz yA gH 9X gR 4 gN",6m:"yB 2c 2L"},a.rn={5h:"订单编号",8u:"帐单名称",8i:"帐单电子邮件",8p:"帐单手机号码",7K:"帐单说明",8d:"付款",5u:"请选择一个频道",5D:"继续",5s:"关",8v:"取消",83:"新卡",6W:"是",No:"没有",7B:"卡号",7Z:"6f",7E:"过期日期",89:"MM/9D",6S:"国家",7R:"搜索国家",7f:"银行名",7H:"搜索银行",84:"使用4k积分(8K = 3H 4k积分)",7G:"卡 # 8V 43",8a:"(最后10位数字)",7V:"搜索错误",7S:"完成付款状态。",7u:"请稍候。",86:"沙箱模式开启",6y:"服务",8f:"交易ID",88:"应付金额",6q:"注意",8k:"将图像保存到设备",6J:"准备...",6e:"载入中...",6l:"付款信息无效",7z:"帐单名称无效",6C:"帐单电子邮件无效",5P:"帐单手机无效",8s:"帐单说明无效",8t:"无效的信用卡号码",8q:"无效的信用卡号码 (8G)",8w:"8X号码无效",7O:"7a日期无效",7F:"4w编号无效",7C:"4w引脚无效",7N:"借记卡号码无效",1E:"错误",8Z:"网络错误 - 沙盒模式",7X:"互联网断开连接,此事务需要互联网",7Q:"借记卡检查已被跳过。",6U:"提醒",7D:"沙箱模式为开",8l:"5J选项",8e:"使用以下选项配置结果:

请注意,所有沙盒交易结果都离线模拟,不会发生在线流程。",6n:"篡改",6j:"通信错误,请检查互联网连接,用户名或密码",6k:"访问被拒绝,请检查商家ID,应用名称或验证密钥",6p:"找不到频道,请检查货币价值",6v:"3E 未找到",6X:"3D 未找到",6s:"1T 未找到",6I:"2J 未找到",6G:"3h 未找到",5E:"2i 未找到",6L:"3F 未找到",6r:"3g 未找到",6A:"3g 无效值",6B:"2F 未找到",6x:"4l 没有找到收据请求的值",6u:"未处理的错误,请联系支持",6b:"安全加密失败",6Q:"此频道无法重复付款",6K:"高级邮件验证失败",6t:"高级电话号码验证失败",5N:"帐单名称必须超过2个字符",6h:"帐单说明必须超过4个字元",6Z:"帐单电子邮件必须超过4个字符",5C:"帐单手机号码必须超过4个字符",6m:"金额无效"},a.4E={},a.4E.EN={AF:"jc",AX:"Åyi 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 2Q jT",AR:"jR",AM:"k6",AW:"dr",AC:"kA 5a",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BQ:"L8, yg L7, 2Q L6",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 2q",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d’jw",HR:"pp",CU:"p2",CW:"L0çao",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"KO",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MA:"yL",MZ:"yD",MM:"jp [KK]",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",QO:"kJ pR",PK:"kj",PW:"fu",PS:"lm ja",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"KQ",PN:"d8 2q",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"KS",RW:"kl",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"São KUé 2Q PríL9",SA:"jP yJ",SN:"kU",RS:"bq",CS:"bq 2Q a5",SC:"kN",SL:"mA mu",SG:"yI",SX:"yg Ll",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q a7 6E d0 2q",KR:"6E 9U",SS:"6E fb",ES:"Lc",LK:"kR k8",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj da fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",UM:"U.S. pH kJ 2q",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",US:"bx yd",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q df",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MS={AF:"jc",9B:"kg f7",AL:"k9",DZ:"Lb",AS:"pO ag",US:"l7 Le",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 3X jT",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",TD:"Lh",CV:"pY je",KY:"hj 2q",EA:"dP 3X dG",CN:"7Y",CX:"kG 5a",CL:"xh",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG",CD:"bG - kc",CK:"dF 2q",CI:"Côte d’jw",HR:"pp",CU:"p2",DK:"jy",DG:"dw dv",DM:"jq",EC:"oq",SV:"El k4",AE:"Hi cL Hh",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",FK:"j2 2q",FO:"dO 2q",PT:"Hg",FJ:"jX",PH:"y3",FI:"oQ",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl S.A.R., 7Y",HU:"Hj",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"Hn",JM:"zm",JP:"Hm",DE:"za",JE:"dE",DJ:"Hl",JO:"q0",CM:"zr",CA:"zs",KZ:"pG",KH:"Hf",KE:"l9",AX:"3R Åyi",IC:"3R ds",MH:"3R kp",SB:"3R kq",EU:"H6 HE",CY:"HD",KI:"ks",CR:"ze z1",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LB:"HC",LU:"HF",MO:"pS bk 7Y",MK:"pU",MG:"zv",MA:"HG",MW:"kx",MY:"bW",MV:"HJ",ML:"kK",MT:"kF",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",MP:"q3 dJ 2q",NO:"ps",QO:"pR HH",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",FR:"mU",PE:"kB",PN:"d8",PL:"lt",PR:"fs km",AC:"b7 kA",CP:"b7 fy",QA:"ku",CF:"aQ kg rv",CZ:"aQ oi",DO:"aQ ol",RE:"Rékf",RO:"ls",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 3X l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 3X mv",KR:"f7 9U",SN:"kU",ES:"HB",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"HA Ht",SG:"sV",SK:"l4",SI:"l1",SO:"kS",GS:"6E 9w 2Q a7 6E d0 2q",LK:"kR k8",SD:"fb",SR:"Hs",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TJ:"Hr",TW:"j8",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",GB:"bx lO",UM:"bx yd pH kJ 2q",UY:"iM",KP:"nb 9U",UZ:"iS",VU:"iT",VA:"lN",VE:"j0",VN:"j1",WF:"dd 2Q df",9x:"qp",GR:"r9",9u:"iV",9i:"iW"},a.4E.VI={SA:"A-rập Xê-út",AR:"Ác-Hz-ti-na",AM:"Ác-mê-ni-a",EG:"Ai Cập",AZ:"Ai-déc-H4-H3",IE:"Ai-q2",IS:"Ai-xơ-q2",AL:"An-ba-ni",DZ:"An-giê-ri",AG:"An-ti-gu-a và Ba-bu-đa",AD:"gb",AI:"d7",AT:"Áo",AF:"Áp-ga-ni-b9",AW:"dr",AO:"Ăng-gô-la",IN:"Ấn Độ",PL:"Ba bF",BS:"Ba-ha-ma",BH:"Ba-G6",BB:"Bác-ba-đốt",KP:"Bắc ytều Tiên",GL:"Băng Đảo",BD:"Băng-la-đét",BM:"dR",BY:"Bê-la-rút",BZ:"Bê-li-xê",BJ:"Bê-G5",BE:"Bỉ",PT:"Bồ Đào yj",BO:"Bô-li-vi-a",BA:"Bô-G8-a Héc-xê-gô-vi-na",BW:"Bốt-G9-na",CI:"Bờ Biển Ngà",BR:"Gd-Gc",BN:"Gq-nây",BI:"Bu-kC-đi",BT:"Bu-yc (dQ)",BG:"GV-ga-ri",BF:"Buốc-ki-na GZ-xô",CM:"Ca-mơ-kC",CA:"Ca-na-đa",QA:"Ca-ta",UM:"Các đảo nhỏ xa HO tâm a3ộc Mỹ",AE:"Các Tiểu Vương quốc A-rập Thống nhất",KH:"IK",CV:"Cáp-ve",EA:"dP và dG",CL:"IJ-lê",CO:"Cô-lôm-bi-a",KM:"Cô-mô",KW:"Cô-oét",CD:"Cộng hoà dân chủ Côngô",DO:"Cộng hoà Đô-mi-ni-ca",CZ:"Cộng hòa Séc",CF:"Cộng hòa gz gD",CG:"Công-gô",CR:"Cốt-IV Ri-ca",HR:"Crô-a-ti-a",CU:"Cu Ba",KG:"Cư-rơ-gư-b9",9u:"Dăm-bi-a",DG:"dw dv",9i:"Iy-ba-bu-ê",DM:"jq",TW:"Đài Iw",DK:"Đan Mạch",AC:"Đảo kA",BV:"Đảo fx (Na Uy)",CP:"Đảo fy",CX:"Đảo Giáng Iz",GU:"Đảo Gu-am",HM:"Đảo fD và Quần đảo fE",IM:"Đảo bp",NF:"Đảo dK",AS:"Đảo IB a3ộc Mỹ",VG:"Đảo 8A, a3ộc oj",HK:"Đặc y8 hành chính Hồng Kông a3ộc y7 gz pT",MO:"Đặc y8 hành chính IZ a3ộc y7 gz pT",TL:"Đông Ti-mo",DE:"Đức",EE:"E-xtô-ni-a",SV:"En-yb-va-đo",EC:"Ê-cu-a-đo",ER:"Ê-ri-tơ-rê-a",ET:"Ê-ti-ô-pi-a",GA:"Ga-bông",GM:"Găm-bi-a",GH:"J0-na",GN:"g5-nê",GW:"g5-nê Bít-J3",GQ:"g5-nê Xích-đạo",DJ:"Gi-bu-ti",GI:"dz",JO:"Gióc-đa-ni",GT:"Iv-tê-ma-la",GD:"Grê-na-đa",GE:"Iu-di-a",GP:"dD",GG:"dC",GY:"I4-a-na",NL:"Hà bF",HT:"Ha-i-ti",JM:"Ha-I3-ca",KR:"Hàn Quốc",US:"pT Kỳ",HN:"Hôn-đu-rát",HU:"I2-ga-ri",GR:"Hy Lạp",IR:"I-I6",IQ:"I-rắc",IL:"I-I9-en",JE:"dE",KZ:"Ka-dắc-b9",KE:"Kê-ni-a",KI:"Ki-ri-ba-ti",PS:"Lãnh thổ HV",LA:"Lào",LV:"Lát-vi-a",LS:"Lê-xô-thô",LB:"Li-băng",LR:"Li-bê-ri-a",LY:"Li-bi",LT:"Li-tu-a-ni-a",LI:"HZ-HY-xtên",EU:"Liên Ib Châu Âu",LU:"Lúc-xăm-Ip",MG:"Ma-đa-gát-Io",MW:"Ma-la-uy",MY:"Ma-In-xi-a",ML:"Ma-li",MA:"Ma-rốc",MK:"Ma-xê-đô-ni-a",MV:"bp-đi-vơ",MT:"bp-ta",MX:"Mê-hi-cô",MM:"Mi-an-ma",FM:"Mi-crô-nê-xi-a",ME:"a5",MS:"f1",MZ:"Mô-dăm-bích",MC:"Mô-na-cô",MR:"Mô-ri-ta-ni",MU:"Mô-ri-xơ",MD:"Môn-đô-va",MN:"Mông Cổ",NO:"Na Uy",AQ:"aD Cực",ID:"aD Dương",9B:"aD gD",NA:"aD-mi-bi-a",NR:"fv",NC:"7A kt",NP:"Nê-I1",RU:"I7",JP:"Nhật Bản",NI:"Ni-ca-ra-I8",NE:"Ni-giê",NG:"Ni-giê-ri-a",NZ:"y9 Di-lân",NU:"fw",OM:"Ô-J8",PK:"Pa-ki-b9",PA:"Pa-na-ma",PG:"Pa-pu-a y9 g5-nê",PY:"Pa-ra-ys",PW:"fu",PE:"Pê-ru",FR:"Pháp",FI:"Phần bF",FJ:"gD-gi",PH:"gD-Ge-c7",PF:"j6 a3ộc Pháp",PR:"fs km",AX:"Quần đảo n9",MP:"Quần Đảo Bắc dJ",IC:"Quần đảo ds",KY:"Quần Đảo hj",CC:"Quần đảo dx",CK:"Quần Đảo dF",FK:"Quần Đảo j2",FO:"Quần Đảo dO",MH:"Quần đảo Mác-yb",GS:"Quần đảo aD 9w và aD d0",PN:"Quần đảo d8",TC:"Quần Đảo Gm và dm",VI:"Quần đảo 8A, Mỹ",SB:"Quần đảo Xô-lô-mông",GF:"Lk a3ộc Pháp",RW:"Ru-an-đa",RO:"Ru-ma-ni",SH:"3s fz",PM:"3s fp và fo",TD:"Sát",CS:"Séc-L5",CY:"Síp",SJ:"d1 và d6 dq",TZ:"M8-da-ni-a",TJ:"Tát-gi-ki-b9",AN:"Tây Ấn Hà bF",ES:"Tây KJ yj",EH:"Tây fB",TH:"Thái bF",TR:"Thổ Nhĩ Kỳ",IO:"ykộc địa oj tại Ấn Độ Dương",TF:"ykộc Địa aD của Pháp",SE:"Thụy Điển",CH:"Thụy Sĩ",TK:"fk",TG:"Tô-gô",TO:"Tông-ga",TT:"yt-ni-đát và Tô-ba-gô",TA:"fj da fg",CN:"gz Quốc",TV:"Tu-va-lu",TM:"Tuốc-mê-ni-b9",TN:"Ku-ni-di",UA:"U-Kq-na",UZ:"U-dơ-bê-ki-b9",UG:"U-yw-đa",UY:"U-ru-ys",AU:"Úc",VU:"Va-nu-a-tu",VA:"Va-ti-căng",VE:"Vê-nê-zu-ê-la",VN:"Việt aD",QO:"Vùng xa xôi a3ộc Châu Đại Dương",GB:"Vương quốc oj",WF:"dd và df",WS:"Xa-B2",LC:"gS Lu-xi",SM:"gS Ma-ri-nô",VC:"gS F5-F4 và Grê-na-Fc",KN:"gS-kít và Nê-vi",ST:"DB Tô-mê và Ef-xi-pê",SC:"Xây-Vr",RS:"Xéc-bi",SN:"Xê-nê-yw",SL:"Xi-ê-ra Lê-ôn",SY:"Xi-ri",SG:"pW-ga-po",SK:"Xlô-va-ki-a",SI:"Xlô-U2-ni-a",SZ:"U9-di-q2",SO:"Xô-ma-li",LK:"Tp bF-ca",SD:"Xu-đăng",SR:"Xu-ri-N2",IT:"Ý",9x:"Y-ê-S3"},a.4E.TH={GR:"กรีซ",GL:"กรีนแลนด์",GU:"กวม",GP:"กวาเดอลูป",KH:"กัมพูชา",GT:"กัวเตมาลา",QA:"กาตาร์",GH:"กานา",GA:"กาบอง",GY:"กายอานา",GN:"กินี",GW:"กินี-บิสเซา",GD:"เกรเนดา",KR:"เกาหลีใต้",KP:"เกาหลีเหนือ",CX:"เกาะคริสต์มาส",CP:"เกาะคลิปเปอร์ตัน",GS:"เกาะเซาท์จอร์เจียและหมู่เกาะเซาท์แซนด์วิช",NF:"เกาะนอร์ฟอล์ก",BV:"เกาะบูเวต",IM:"เกาะแมน",AC:"เกาะแอสเซนชัน",HM:"เกาะเฮิร์ดและหมู่เกาะแมกดอนัลด์",GG:"เกิร์นซีย์",GM:"แกมเบีย",CD:"คองโก-กินชาซา",CG:"คองโก-บราซซาวิล",KM:"คอโมโรส",CR:"คอสตาริกา",KZ:"คาซัคสถาน",KI:"คิริบาส",CU:"คิวบา",KG:"คีร์กีซสถาน",KW:"คูเวต",KE:"เคนยา",CV:"เคปเวิร์ด",CA:"แคนาดา",CM:"แคเมอรูน",HR:"โครเอเชีย",CO:"โคลอมเบีย",GE:"จอร์เจีย",JO:"จอร์แดน",JM:"จาเมกา",DJ:"จิบูตี",CN:"จีน",JE:"เจอร์ซีย์",TD:"ชาด",CL:"ชิลี",SM:"ซานมารีโน",WS:"ซามัว",SA:"ซาอุดีอาระเบีย",EH:"ซาฮาราตะวันตก",9i:"ซิมบับเว",SY:"ซีเรีย",EA:"ซีโอตาและเมลิลลา",SD:"ซูดาน",SR:"ซูรินาเม",SC:"เซเชลส์",KN:"เซนต์คิตส์และเนวิส",BL:"เซนต์บาร์เธเลมี",MF:"เซนต์มาติน",LC:"เซนต์ลูเซีย",VC:"เซนต์วินเซนต์และเกรนาดีนส์",SH:"เซนต์เฮเลนา",SN:"เซเนกัล",RS:"เซอร์เบีย",CS:"เซอร์เบียและมอนเตเนโกร",ST:"เซาตูเมและปรินซิปี",SL:"เซียร์ราลีโอน",PM:"แซงปีแยร์และมีเกอลง",9u:"แซมเบีย",SO:"โซมาเลีย",CY:"ไซปรัส",JP:"ญี่ปุ่น",DG:"ดิเอโกการ์เซีย",DK:"เดนมาร์ก",DM:"โดมินิกา",TT:"ตรินิแดดและโตเบโก",TO:"ตองกา",TL:"ติมอร์ตะวันออก",TR:"ตุรกี",TN:"ตูนิเซีย",TV:"ตูวาลู",TM:"เติร์กเมนิสถาน",TK:"โตเกเลา",TG:"โตโก",TW:"ไต้หวัน",TA:"ทริสตัน เดอ คูนา",TJ:"ทาจิกิสถาน",TZ:"แทนซาเนีย",TH:"ไทย",NO:"นอร์เวย์",NA:"นามิเบีย",NR:"นาอูรู",NI:"นิการากัว",NC:"นิวแคลิโดเนีย",NZ:"นิวซีแลนด์",NU:"นีอูเอ",NL:"เนเธอร์แลนด์",AN:"เนเธอร์แลนด์แอนทิลลิส",NP:"เนปาล",NG:"ไนจีเรีย",NE:"ไนเจอร์",BR:"บราซิล",IO:"บริติชอินเดียนโอเชียนเทร์ริทอรี",BN:"บรูไน",BW:"บอตสวานา",BA:"บอสเนียและเฮอร์เซโกวีนา",BD:"บังกลาเทศ",BG:"บัลแกเรีย",BB:"บาร์เบโดส",BH:"บาห์เรน",BS:"บาฮามาส",BI:"บุรุนดี",BF:"บูร์กินาฟาโซ",BJ:"เบนิน",BE:"เบลเยียม",BY:"เบลารุส",BZ:"เบลีซ",BM:"เบอร์มิวดา",BO:"โบลิเวีย",PK:"ปากีสถาน",PA:"ปานามา",PG:"ปาปัวนิวกินี",PY:"ปารากวัย",PS:"ปาเลสไตน์",PW:"ปาเลา",PE:"เปรู",PR:"เปอร์โตริโก",PT:"โปรตุเกส",PL:"โปแลนด์",FR:"ฝรั่งเศส",PN:"พิตแคร์น",FJ:"ฟิจิ",FI:"ฟินแลนด์",PH:"ฟิลิปปินส์",GF:"เฟรนช์เกียนา",TF:"เฟรนช์เซาเทิร์นเทร์ริทอรีส์",PF:"เฟรนช์โปลินีเซีย",BT:"ภูฏาน",MN:"มองโกเลีย",MS:"มอนต์เซอร์รัต",ME:"มอนเตเนโกร",MU:"มอริเชียส",MR:"มอริเตเนีย",MD:"มอลโดวา",MT:"มอลตา",MV:"มัลดีฟส์",MO:"มาเก๊า เขตปกครองพิเศษประเทศจีน",MK:"มาซิโดเนีย",MG:"มาดากัสการ์",c8:"มายอต",MQ:"มาร์ตินีก",MW:"มาลาวี",ML:"มาลี",MY:"มาเลเซีย",MX:"เม็กซิโก",MM:"เมียนม่าร์ [พม่า]",MZ:"โมซัมบิก",MC:"โมนาโก",MA:"โมร็อกโก",FM:"ไมโครนีเซีย",GI:"ยิบรอลตาร์",UG:"ยูกันดา",UA:"ยูเครน",9x:"เยเมน",DE:"เยอรมนี",RW:"รวันดา",RU:"รัสเซีย",RE:"เรอูนียง",RO:"โรมาเนีย",LU:"ลักเซมเบิร์ก",LV:"ลัตเวีย",LA:"ลาว",LI:"ลิกเตนสไตน์",LT:"ลิทัวเนีย",LY:"ลิเบีย",LS:"เลโซโท",LB:"เลบานอน",LR:"ไลบีเรีย",VA:"วาติกัน",VU:"วานูอาตู",WF:"วาลลิสและฟุตูนา",VE:"เวเนซุเอลา",VN:"เวียดนาม",LK:"ศรีลังกา",ES:"สเปน",SJ:"สฟาลบาร์และยานไมเอน",SK:"สโลวะเกีย",SI:"สโลวีเนีย",SZ:"สวาซิแลนด์",CH:"สวิตเซอร์แลนด์",SE:"สวีเดน",EU:"สหภาพยุโรป",US:"สหรัฐอเมริกา",AE:"สหรัฐอาหรับเอมิเรตส์",GB:"สหราชอาณาจักร",CZ:"สาธารณรัฐเช็ก",DO:"สาธารณรัฐโดมินิกัน",CF:"สาธารณรัฐแอฟริกากลาง",SG:"สิงคโปร์",IC:"หมู่เกาะคานารี",CK:"หมู่เกาะคุก",KY:"หมู่เกาะเคย์แมน",CC:"หมู่เกาะโคโคส",SB:"หมู่เกาะโซโลมอน",TC:"หมู่เกาะเติกส์และหมู่เกาะเคคอส",MP:"หมู่เกาะนอร์เทิร์นมาเรียนา",VG:"หมู่เกาะบริติชเวอร์จิน",FK:"หมู่เกาะฟอล์กแลนด์",FO:"หมู่เกาะแฟโร",MH:"หมู่เกาะมาร์แชลล์",VI:"หมู่เกาะยูเอสเวอร์จิน",UM:"หมู่เกาะสหรัฐไมเนอร์เอาต์ไลอิง",AX:"หมู่เกาะโอลันด์",AS:"อเมริกันซามัว",AU:"ออสเตรเลีย",AT:"ออสเตรีย",AD:"อันดอร์รา",AF:"อัฟกานิสถาน",AZ:"อาเซอร์ไบจาน",AR:"อาร์เจนตินา",AM:"อาร์เมเนีย",AW:"อารูบา",GQ:"อิเควทอเรียลกินี",IT:"อิตาลี",IN:"อินเดีย",ID:"อินโดนีเซีย",IQ:"อิรัก",IL:"อิสราเอล",IR:"อิหร่าน",EG:"อียิปต์",UZ:"อุซเบกิสถาน",UY:"อุรุกวัย",EC:"เอกวาดอร์",ET:"เอธิโอเปีย",ER:"เอริเทรีย",SV:"เอลซัลวาดอร์",EE:"เอสโตเนีย",QO:"เอาต์ไลอิงโอเชียเนีย",AI:"แองกวิลลา",AO:"แองโกลา",AQ:"แอนตาร์กติกา",AG:"แอนติกาและบาร์บูดา",9B:"แอฟริกาใต้",DZ:"แอลจีเรีย",AL:"แอลเบเนีย",OM:"โอมาน",IS:"ไอซ์แลนด์",IE:"ไอร์แลนด์",CI:"ไอวอรี่โคสต์",HK:"ฮ่องกง เขตปกครองพิเศษประเทศจีน",HN:"ฮอนดูรัส",HU:"ฮังการี",HT:"เฮติ"},a.4E.yq={AC:"Sa RQ",AF:"jc",AX:"n9 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AQ:"RN",AG:"iU 2Q jT",AO:"iY",AI:"d7",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 5a",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d\'jw",HR:"pp",CU:"p2",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",ES:"L2",US:"yU yM",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"M3",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",QO:"Mc Mk ng pR",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",UM:"yV pH kJ 5a ng yU yM",FM:"py",MD:"l5",MC:"pv",ME:"a5",MS:"f1",MN:"l0",MA:"yL",MZ:"yD",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"LH",PN:"d8",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"Lx LJ",RW:"kl",BL:"3s lhélf",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 2Q mv",SA:"jP yJ",SN:"kU",RS:"bq",SC:"kN",SL:"mA mu",SG:"yI",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q me 6E d0 2q",KR:"6E 9U",LK:"kR k8",SH:"St. fz",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq 2q",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj de fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q a7 df 2q",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MY={CA:"ကနေဒါ",KZ:"ကာဇက်စတန်",QA:"ကာတာ",KW:"ကူဝိတ်",KY:"ကေမန် ကျွန်းစု",CR:"ကော့စ်တာရီကာ",CC:"ကိုကိုး ကျွန်းစု",CO:"ကိုလံဘီယာ",KE:"ကင်ညာ",CM:"ကင်မရွန်း",KH:"ကမ္ဘောဒီးယား",CU:"ကျူးဘား",CK:"ကွတ် ကျွန်းစု",HR:"ခရိုအေးရှား",CX:"ခရစ်စမတ် ကျွန်း",CL:"ချီလီ",CZ:"ချက် ပြည်ထောင်စု",TD:"ချဒ်",GR:"ဂရိ",GL:"ဂရင်းလန်း",GH:"ဂါနာ",GN:"ဂီရာနာ",GU:"ဂူအမ်",GM:"ဂန်ဘီရာ",JP:"ဂျပန်",JM:"ဂျမေနီကာ",JE:"ဂျာစီ",DE:"ဂျာမဏီ",GI:"ဂျီဘရော်လ်တာ",GE:"ဂျော်ဂျီယာ",JO:"ဂျော်ဒန်",GT:"ဂွာတီမာလာ",ES:"စပိန်",SK:"စလိုဗေးကီးယား",SI:"စလိုဗေးနီးယား",SG:"စင်္ကာပူ",MF:"စိန့်မာတင်",RS:"ဆားဘီးယား",SN:"ဆီနီဂေါ",SY:"ဆီးရီးယား",SD:"ဆူဒန်",SA:"ဆော်ဒီအာရေးဗီးယား",SB:"ဆော်လမွန်ကျွန်းစု",SO:"ဆိုမာလီယာ",CY:"ဆိုက်ပရက်စ်",SE:"ဆွီဒင်",CH:"ဆွစ်ဇလန်",9i:"ဇင်ဘာဘွေ",9u:"ဇမ်ဘီယာ",CN:"တရုတ်",MO:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ မကာအို",HK:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ ဟောင်ကောင်",TJ:"တာဂျီကစ္စတန်",TN:"တူနီးရှား",TR:"တူရကီ",KR:"တောင်ကိုရီးယား",9B:"တောင်အာဖရိက",TZ:"တန်ဇန်နီးယား",TO:"တွန်ဂါ",TW:"ထိုင်ဝမ်",TH:"ထိုင်း",DM:"ဒိုမီနီကာ",DO:"ဒိုမီနီကန်",DK:"ဒိန်းမတ်",NC:"နယူး ကယ်လီဒိုနီးယား",NZ:"နယူးဇီလန်",NI:"နီကာရာဂွာ",NP:"နီပေါ",NO:"နော်ဝေ",NE:"နိုင်ဂျာ",NG:"နိုင်ဂျီးရီးယား",NA:"နမ်မီးဘီးယား",NL:"နယ်သာလန်",PA:"ပနားမား",PK:"ပါကစ္စတန်",PG:"ပါပူရာနယူးဂီနီ",PY:"ပါရာဂွေး",PS:"ပါလက်စတိုင်း ပိုင်နက်",PE:"ပီရူး",PT:"ပေါ်တူဂီ",PR:"ပေါ်တူရီကို",PL:"ပိုလန်",FR:"ပြင်သစ်",GF:"ပြင်သစ် ဂီယာနာ",TF:"ပြင်သစ် တောင်ပိုင်း ပိုင်နက်များ",PF:"ပြင်သစ် ပေါ်လီနေးရှား",FO:"ဖာရိုး ကျွန်းစုများ",PH:"ဖိလစ်ပိုင်",FJ:"ဖီဂျီ",FK:"ဖောက်ကလန် ကျွန်းစု",FI:"ဖင်လန်",VA:"ဗာတီကန်",VN:"ဗီယက်နမ်",VE:"ဗင်နီဇွဲလား",VG:"ဗြိတိသျှ ဗာဂျင်း ကျွန်းစု",IO:"ဗြိတိသျှ အိန္ဒြိယ သမုဒ္ဒရာ ပိုင်နက်",BR:"ဘရာဇီး",BN:"ဘရူနိုင်း",BS:"ဘဟားမား",BM:"ဘာမူဒါ",BH:"ဘာရိန်း",BY:"ဘီလာရုစ်",BG:"ဘူဂေးရီးယား",BT:"ဘူတန်",BZ:"ဘေလီဇ်",BA:"ဘော့စနီးယား နှင့် ဟာဇီဂိုဘီးနား",BW:"ဘော့စ်ဝါနာ",BO:"ဘိုလီးဘီးယား",BD:"ဘင်္ဂလားဒေ့ရှ်",BE:"ဘယ်လ်ဂျီယမ်",MG:"မဒဂတ်စကာ",MY:"မလေးရှား",MK:"မာစီဒိုးနီးယား",MH:"မာရှယ် ကျွန်းစု",MW:"မာလာဝီ",ML:"မာလီ",MA:"မော်ရိုကို",MV:"မော်လဒိုက်",MZ:"မိုဇန်ဘစ်",MC:"မိုနကို",MX:"မက္ကဆီကို",KP:"မြောက်ကိုရီးယား",MM:"မြန်မာ",MN:"မွန်ဂိုးလီးယား",ME:"မွန်တီနိဂရိုး",9x:"ယီမင်",UA:"ယူကရိန်း",UG:"ယူဂန္ဒာ",GB:"ယူနိုက်တက်ကင်းဒမ်း",US:"ယူနိုက်တက်စတိတ်",UM:"ယူနိုက်တက်စတိတ် အပြင်ထွက် နေသည့် သေးငယ်သောကျွန်းများ",AE:"ယူအေအီး",VI:"ယူအက်စ် ဗာဂျင်း ကျွန်းစု",RW:"ရဝန်ဒါ",RU:"ရုရှ",RO:"ရိုမေးနီးယား",LA:"လာအို",LU:"လူဇင်ဘတ်",LB:"လက်ဘနွန်",LR:"လိုင်ဘေးရီးယား",LT:"လစ်သူယေးနီးယား",LV:"လတ်ဗီးယား",LK:"သီရိလင်္ကာ",HT:"ဟေတီ",HU:"ဟန်ဂေရီ",HN:"ဟွန်ဒူးရပ်စ်",AZ:"အဇာဘိုင်ဂျန်",EH:"အနောက်ပိုင်း ဆာဟာရ",AS:"အမေရိကန် စမိုအ",TL:"အရှေ့တီမော",CF:"အလယ်ပိုင်း အာဖရိက ပြည်ထောင်စု",AR:"အာဂျင်တီးနား",AF:"အာဖဂန်နစ္စတန်",AM:"အာမေနီးယား",GQ:"အီကွေတာ ဂီရာနာ",EC:"အီကွေဒေါ",EG:"အီဂျစ်",IT:"အီတလီ",IQ:"အီရတ်",IR:"အီရန်",ET:"အီသီယိုးပီးယား",UZ:"ဥဘက်ကစ္စတန်",UY:"ဥရုဂွေး",EU:"ဥရောပသမဂ္ဂ",AT:"ဩစတြီးယား",AU:"ဩစတြေးလျှား",OM:"အိုမန်",EE:"အက်စတိုးနီးယား",IS:"အိုက်စလန်",AO:"အင်ဂိုလာ",ID:"အင်ဒိုနီးရှား",CI:"အိုင်ဗရီကိုစ့်",IE:"အိုင်ယာလန်",IL:"အစ္စရေး",AI:"အန်ကွီလာ",AQ:"အန္တာတိက",IN:"အိန္ဒိယ",DZ:"အယ်လ်ဂျီးရီးယား",SV:"အယ်လ်ဆာဗေးဒိုး"},a.4E.KM={KH:"កម្ពុជា",CA:"កាណាដា",QA:"កាតារ",CV:"កាបវែរ",CM:"កាមេរូន",KZ:"កាហ្សាក់ស្តាង់់",CG:"កុងហ្គោ",CI:"កូដឌីវ័រ",CR:"កូស្តារីកា",CO:"កូឡុំប៊ី",KE:"កេនយ៉ា",KM:"កុំម៉ូរ៉ូស",GR:"ក្រិច",HR:"ក្រូអាស៊ី",KI:"គិរិបាទី",CU:"គុយបា",KW:"គុយវ៉ែត",KG:"គៀរហ្គីស្តង់",CN:"ចិន",TD:"ឆាដ",JP:"ជប៉ុន",CL:"ឈីលី",DK:"ដាណឺម៉ាក",DM:"ដូមីនីកា",NA:"ណាមីប៊ី",TZ:"តង់ហ្សានី",TJ:"តាដហ្ស៉ីគីស្តង់",TO:"តុងហ្គា",TG:"តូហ្គូ",TW:"តៃវ៉ាន់",TH:"ថៃ",TL:"ទីម័រខាងកើត",TN:"ទុយនេស៊ី",TM:"ទួគមេនីស្តង់",TR:"ទួរគី",TT:"ទ្រីនីដាដនឹងតូបាហ្គោ",NO:"ន័រវែស",NI:"នីការ៉ាហ្គ័រ",NE:"នីហ្សេរ",NG:"នីហ្សេរីយ៉ា",NZ:"នូវែលហ្សេឡង់",NP:"នេប៉ាល់",BD:"បង់ក្លាដេស្ហ",PK:"ប៉ាគីស្ថាន",PA:"ប៉ាណាម៉ា",PG:"ប៉ាពូអានូវែលហ្គីណេ",BB:"បារបាដូស",PY:"ប៉ារ៉ាហ្គាយ",BH:"បារ៉ែន",FR:"បារាំង",PS:"ប៉ាលេស្ទីន",BS:"បាហាម៉ា",BW:"បុតស្វាណា",BG:"ប៊ុលហ្គារី",BT:"ប៊ូតាន",BF:"ប៊ូរគីណាហ្វាសូ",BI:"ប៊ូរុនឌី",BO:"បូលីវី",PL:"ប៉ូលូញ",BA:"បូស្ន៉ី",BJ:"បេណាំង",PE:"ប៉េរូ",BZ:"បេលីហ្ស",BY:"បេឡារុស្ស",BE:"បែលហ្ស៉ិក",BN:"ប៊្រុយណេ",BR:"ប្រេស៊ីល",PR:"ព័រតូរីកូ",PT:"ព័រទុយហ្កាល់",MG:"ម៉ាដាហ្កាស្ការ",MA:"ម៉ារ៉ុក",MT:"ម៉ាល់តា",ML:"ម៉ាលី",MY:"ម៉ាលេស៉ី",MK:"ម៉ាសេដន",FM:"មិក្រូនេស៊ី",MX:"ម៉ិចសិក",MM:"មីយ៉ាន់ម៉ា",MN:"ម៉ុងហ្គោលី",MC:"ម៉ូណាកូ",MR:"ម៉ូរីតានី",MU:"ម៉ូរីទុស",MZ:"ម៉ូហ្សាំប៊ិក",9x:"យេមែន",RW:"រវ៉ាន់ដា",RO:"រូម៉ានី",RU:"រូស្ស៊ី",LI:"លិចទេនស្តែន",LT:"លីទុយអានី",LB:"លីបង់",LY:"លីប៊ី",LR:"លីបេរីយ៉ា",LU:"លុចហ្សំបួរ",LS:"លើសូតូ",VA:"វ៉ាទីកង់",VN:"វៀតណាម",VE:"វេនេហ្ស៊ុយឡា",US:"សហរដ្ឋអាមេរិក",KR:"សាធារណរដ្ឋកូរ៉េ",CZ:"សាធារណរដ្ឋឆេក",DO:"សាធារណរដ្ឋដូមីនីកែន",KP:"សាធារណរដ្ឋប្រជាធិបតេយ្យប្រជាមានិតកូរ៉េ",MD:"សាធារណរដ្ឋម៉ុលដាវី",CF:"សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល",WS:"សាមូអា",EH:"សាហារ៉ាខាងលិច",SG:"សិង្ហបុរី",CY:"ស៉ីពរ៍",SY:"ស៊ីរី",SC:"សីសែល",SE:"ស៊ុយអែដ",SD:"ស៊ូដង់",SO:"សូម៉ាលី",SR:"សូរីណាម",SZ:"សូហ្ស៉ីឡង់",SN:"សេនេហ្កាល់",SL:"សេរ៉ាឡេអូន",LK:"ស្រីលង្កា",SK:"ស្លូវ៉ាគី",SI:"ស្លូវេនី",CH:"ស្វីស",HK:"ហុងកុង",HU:"ហុងគ្រី",HN:"ហុងឌួរ៉ាស់",NL:"ហូល្លង់",HT:"ហៃទី",GH:"ហ្កាណា",GT:"ហ្គាតេម៉ាឡា",GA:"ហ្គាបុង",GN:"ហ្គីណេ",GW:"ហ្គីណេប៊ីសូ",GQ:"ហ្គីណេអេក្វាទ័រ",GY:"ហ្គីយ៉ាណា",GM:"ហ្គាំប៊ី",PH:"ហ្វ៉ីលីពីន",FJ:"ហ្វ៉ីហ្ស៉ី",FI:"ហ្វាំងឡង់",JO:"ហ៊្សកដានី",GE:"ហ្សកហ្ស៉ី",JM:"ហ្សាម៉ាអ៉ិគ",DJ:"ហ្ស៉ីបូទី",9i:"ហ្ស៊ីមបាបវ៉េ",9u:"ហ្សាំប៊ី",LV:"ឡាតវីយ៉ា",LA:"ឡាវ",AO:"អង់ហ្គោឡា",AD:"អានដូរ៉ា",AM:"អារមេនី",SA:"អារ៉ាប៊ីសាអ៊ូឌីត",AL:"អាល់បានី",DZ:"អាល់ហ្សេរី",DE:"អាល្លឺម៉ង់",AF:"អាហ្វហ្គានីស្ថាន",9B:"អាហ្វ្រិកខាងត្បូង",AR:"អាហ្សង់ទីន",AZ:"អាហ៊្សែរបែហ្សង់",IN:"ឥណ្ឌា",ID:"ឥណ្ឌូនេស៊ី",IT:"អ៊ីតាលី",IR:"អ៊ីរ៉ង់",IQ:"អ៊ីរ៉ាក់",IL:"អ៊ីស្រាអែល",IS:"អ៉ីស្លង់",UA:"អ៊ុយក្រែន",UY:"អ៊ុយរុយហ្គាយ",AT:"អូទ្រីស",OM:"អូម៉ង់",AU:"អូស្ត្រាលី",UG:"អ៊ូហ្កង់ដា",UZ:"អ៊ូហ្សបេគីស្តង់",IE:"អៀរឡង់",EC:"អេក្វាឌ័រ",ET:"អេត្យូពី",AE:"អេមីរ៉ែទអារ៉ាប់រួម",ER:"អេរីទ្រា",EE:"អេស្តូនី",ES:"អេស្ប៉ាញ",EG:"អេហ្ស៉ីប",SV:"អែលសាល់វ៉ាឌ័រ"},a.4E.ID={AF:"jc",9B:"kg f7",AL:"k9",DZ:"lG",US:"l7 zF",AD:"F3",AO:"iY",AI:"d7",AQ:"Ff",AG:"iU 3X jT",AN:"DN lv",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"W7",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"Wl",BE:"Wm",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BR:"Wg",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",EA:"dP 3X dG",TD:"le",CL:"xh",CN:"Xj",CI:"XK d\'jw",DK:"jy",DG:"dw dv",DM:"rx",EC:"OZ",SV:"El k4",ER:"k7",EE:"k5",ET:"jY",FJ:"jX",PH:"y3",FI:"NB",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GD:"jV",GL:"Qr",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GQ:"5A QU",GW:"5A-jh",GY:"dA",GF:"dA mU",HT:"jg",HN:"jk",HK:"dB jl bk 7Y",HU:"R2",IN:"jf",ID:"cl",GB:"mE QZ",IQ:"QY",IR:"j7",IE:"C7",IS:"R0",IM:"j9 of bp",IL:"jd",IT:"NX",JM:"zm",JP:"My",DE:"za",JE:"dE",DJ:"WJ",NC:"VP mz",KH:"Al",CM:"zr",CA:"zs",KZ:"B6",KE:"l9",AX:"3R n9",IC:"3R ds",CC:"3R dx",CK:"3R dF",FO:"3R dO",KY:"3R Cf",UM:"3R Bb BK l7 zF",FK:"3R zY",MP:"3R dJ nb",MH:"3R kp",NF:"3R dK",PN:"3R d8",SB:"3R kq",GS:"3R 6E d0 3X 6E 9w",SJ:"3R d1 3X d6 dq",TC:"3R kM 3X dm",VI:"3R U.S. 8A",VG:"3R 8A mE",WF:"3R dd 3X df",KG:"KB",KI:"ks",CO:"Kp",KM:"Jy",CD:"zc - kc",CG:"zc - aQ",KR:"9U f7",KP:"9U nb",CR:"ze z1",HR:"Lw",CU:"LD",KW:"kv",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"LE",LI:"ky",LT:"M0",LU:"M1",MG:"zv",MO:"M2 bk 7Y",MK:"M9",MV:"Lv",MW:"kx",MY:"bW",ML:"kK",MT:"kF",MA:"Vu",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"Qx",MD:"l5",MC:"QB",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NE:"kP",NG:"kb",NI:"JQ",NU:"fw",NO:"KF",PG:"rX ka rX",OM:"kd",QO:"Jc IY",PS:"He Lp",PK:"kj",PW:"fu",PA:"kw",PY:"kz",FR:"mU",PE:"kB",PL:"M4",PF:"Mb sC",PT:"Mh",PR:"fs Mf",AC:"b7 kA",BV:"b7 fx",CX:"b7 kG",CP:"b7 fy",HM:"b7 fD 3X 3R fE",QA:"ku",CF:"aQ kg rv",CZ:"aQ LW",DO:"aQ rx",RE:"Rékf",RO:"JX",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s KA",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 3X fo",VC:"3s l2 3X l8",WS:"ag",AS:"ag l7",SM:"l6 kZ",ST:"mP mw 3X mv",NZ:"Eh mz",SN:"kU",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"mA mu",SG:"sV",CY:"Uv",SK:"l4",SI:"l1",SO:"kS",ES:"N6",LK:"kR k8",SD:"fb",SR:"ml",SZ:"jb",SE:"RG",CH:"Qm",SY:"j5",TW:"j8",TJ:"mN",CV:"QX je",TZ:"jn",TF:"R3 QV f7 sC",TH:"ji",TL:"jj j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"Rb",TV:"iJ",UG:"iK",UA:"Qe",AE:"qG Qd cL",EU:"qG Qh",UY:"iM",UZ:"iS",VU:"iT",VA:"Qc",VE:"j0",VN:"j1",IO:"Q4 mE di Q2 Q6",9x:"qp",JO:"Qz",GR:"r9",9u:"iV",9i:"iW"},a.4E.rn={AL:"阿尔巴尼亚",DZ:"阿尔及利亚",AF:"阿富汗",AR:"阿根廷",AE:"阿拉伯联合酋长国",AW:"阿鲁巴",OM:"阿曼",AZ:"阿塞拜疆",AC:"阿森松岛",EG:"埃及",ET:"埃塞俄比亚",IE:"爱尔兰",EE:"爱沙尼亚",AD:"安道尔",AO:"安哥拉",AI:"安圭拉",AG:"安提瓜和巴布达",AT:"奥地利",AX:"奥兰群岛",AU:"澳大利亚",BB:"巴巴多斯",PG:"巴布亚新几内亚",BS:"巴哈马",PK:"巴基斯坦",PY:"巴拉圭",PS:"巴勒斯坦领土",BH:"巴林",PA:"巴拿马",BR:"巴西",BY:"白俄罗斯",BM:"百慕大",BG:"保加利亚",MP:"北马里亚纳群岛",BJ:"贝宁",BE:"比利时",IS:"冰岛",PR:"波多黎各",PL:"波兰",BA:"波斯尼亚和黑塞哥维那",BO:"玻利维亚",BZ:"伯利兹",BW:"博茨瓦纳",BT:"不丹",BF:"布基纳法索",BI:"布隆迪",BV:"布维特岛",KP:"朝鲜",GQ:"赤道几内亚",QO:"大洋洲边远群岛",DK:"丹麦",DE:"德国",DG:"迪戈加西亚岛",TL:"东帝汶",TG:"多哥",DM:"多米尼加",DO:"多米尼加共和国",RU:"俄罗斯",EC:"厄瓜多尔",ER:"厄立特里亚",FR:"法国",FO:"法罗群岛",PF:"法属波利尼西亚",GF:"法属圭亚那",TF:"法属南部领土",VA:"梵蒂冈",PH:"菲律宾",FJ:"斐济",FI:"芬兰",CV:"佛得角",FK:"福克兰群岛",GM:"冈比亚",CG:"刚果(布)",CD:"刚果(金)",CO:"哥伦比亚",CR:"哥斯达黎加",GG:"格恩西岛",GD:"格林纳达",GL:"格陵兰",GE:"格鲁吉亚",CU:"古巴",GP:"瓜德罗普岛",GU:"关岛",GY:"圭亚那",KZ:"哈萨克斯坦",HT:"海地",KR:"韩国",NL:"荷兰",AN:"荷属安的列斯群岛",HM:"赫德与麦克唐纳群岛",ME:"黑山共和国",HN:"洪都拉斯",KI:"基里巴斯",DJ:"吉布提",KG:"吉尔吉斯斯坦",GN:"几内亚",GW:"几内亚比绍",CA:"加拿大",GH:"加纳",IC:"加纳利群岛",GA:"加蓬",KH:"柬埔寨",CZ:"捷克共和国",9i:"津巴布韦",CM:"喀麦隆",QA:"卡塔尔",KY:"开曼群岛",CC:"科科斯群岛",KM:"科摩罗",CI:"科特迪瓦",KW:"科威特",CP:"克利珀顿岛",HR:"克罗地亚",KE:"肯尼亚",CK:"库克群岛",LV:"拉脱维亚",LS:"莱索托",LA:"老挝人民民主共和国",LB:"黎巴嫩",LT:"立陶宛",LR:"利比里亚",LY:"利比亚",LI:"列支敦士登",RE:"留尼汪",LU:"卢森堡",RW:"卢旺达",RO:"罗马尼亚",MG:"马达加斯加",MV:"马尔代夫",MT:"马耳他",MW:"马拉维",MY:"马来西亚",ML:"马里",MK:"马其顿",MH:"马绍尔群岛",MQ:"马提尼克群岛",c8:"马约特",IM:"曼岛",MU:"毛里求斯",MR:"毛里塔尼亚",US:"美国",UM:"美国边远小岛",AS:"美属萨摩亚",VI:"美属维京群岛",MN:"蒙古",MS:"蒙塞拉特群岛",BD:"孟加拉国",PE:"秘鲁",FM:"密克罗尼西亚联邦",MM:"缅甸",MD:"摩尔多瓦",MA:"摩洛哥",MC:"摩纳哥",MZ:"莫桑比克",MX:"墨西哥",NA:"纳米比亚",9B:"南非",AQ:"南极洲",GS:"南乔治亚岛和南桑威齐群岛",NR:"瑙鲁",NI:"尼加拉瓜",NP:"尼泊尔",NE:"尼日尔",NG:"尼日利亚",NU:"纽埃",NO:"挪威",NF:"诺福克岛",EU:"欧盟",PW:"帕劳",PN:"皮特凯恩群岛",PT:"葡萄牙",JP:"日本",SE:"瑞典",CH:"瑞士",SV:"萨尔瓦多",WS:"萨摩亚",RS:"塞尔维亚",CS:"塞尔维亚和黑山",SL:"塞拉利昂",SN:"塞内加尔",CY:"塞浦路斯",SC:"塞舌尔群岛",SA:"沙特阿拉伯",BL:"圣巴泰勒米",CX:"圣诞岛",ST:"圣多美和普林西比",SH:"圣赫勒拿",KN:"圣基茨和尼维斯",LC:"圣卢西亚",MF:"圣马丁",SM:"圣马力诺",PM:"圣皮埃尔和密克隆",VC:"圣文森特和格林纳丁斯",LK:"斯里兰卡",SK:"斯洛伐克",SI:"斯洛文尼亚",SJ:"斯瓦尔巴特和扬马延",SZ:"斯威士兰",SD:"苏丹",SR:"苏里南",SB:"所罗门群岛",SO:"索马里",TJ:"塔吉克斯坦",TW:"台湾",TH:"泰国",TZ:"坦桑尼亚",TO:"汤加",TC:"特克斯和凯科斯群岛",TA:"特里斯坦-达库尼亚群岛",TT:"特立尼达和多巴哥",TN:"突尼斯",TV:"图瓦卢",TR:"土耳其",TM:"土库曼斯坦",TK:"托克劳",WF:"瓦利斯和富图纳",VU:"瓦努阿图",GT:"危地马拉",VE:"委内瑞拉",BN:"文莱",UG:"乌干达",UA:"乌克兰",UY:"乌拉圭",UZ:"乌兹别克斯坦",GR:"希腊",ES:"西班牙",EH:"西撒哈拉",SG:"新加坡",NC:"新喀里多尼亚",NZ:"新西兰",HU:"匈牙利",EA:"休达及梅利利亚",SY:"叙利亚",JM:"牙买加",AM:"亚美尼亚",9x:"也门",IQ:"伊拉克",IR:"伊朗",IL:"以色列",IT:"意大利",IN:"印度",ID:"印度尼西亚",GB:"英国",VG:"英属维京群岛",IO:"英属印度洋领地",JO:"约旦",VN:"越南",9u:"赞比亚",JE:"泽西岛",TD:"乍得",GI:"直布罗陀",CL:"智利",CF:"中非共和国",CN:"中国",MO:"中国澳门特别行政区",HK:"中国香港特别行政区"},a}),2k.4i("5j").kC(["$LN",1a(a){"2r 2g";a.8j("3m/a6.2T",\'<1h 1f="3k-fO">

{{7J.a1}}

<1h 1f="3k-2A">
{{7J.2Z}}
<1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uE.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o !== \\\'MY\\\'"> <1X 1S="1w" ng-2j="1c.7h" 1f="2h-3b" 4x="{{1N.7f}}"> <1r 1f="fa fa-5K-4T-o fa-lg 2N-jW" ng-2O="1c.7h = \\\'\\\'"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o === \\\'MY\\\'"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7H}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A" ng-3T="1c.6o === \\\'MY\\\'"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.1C }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uu.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.cv }} ****** {{ 1H.cx }} <1h 1f="1G-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.kT }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uw.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.3W }} <1h 1f="1G-bs-1o-1k-1z"> <7g 1f="3S-iL" ng-3a="{{ 1H.4v }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'"> <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uz.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7R}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H[1] }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/qe.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7V}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/7r.2T",\'<1h 1f="1w-4j tX-4j">

{{1N.7S}}

{{1N.7u}}

<1h 1f="1w-4j tX-4j" ng-if="1c.4Z">

{{1N.86}}

\'),a.8j("3m/KL.2T",\'

4C X-KV

<2h 1f="2h-Lf"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">5c <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.5c"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3h <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3h"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3E <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3E"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3I <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3I"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3g <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3g"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">1T <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.1T"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3t <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3t"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3r <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3r"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2J <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2J"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3D <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3D"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2i <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2i"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">eP <1h 1f="3d-sm-8"> <1X 1S="tO" ng-2j="1c.eP"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2b <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2b"> <1h 1f="2h-1A"> <1h 1f="3d-sm-Jh-2 3d-sm-10"> <2G ng-2O="wo()">jL \'),a.8j("3m/9p.2T",\'<1h 1f="1o-1A"> <1h 1f="1o-1A-1H 3h"> <1r 1f="1y-1z">{{1N.5h}} <1r 1f="1o-1k 1V-1G">{{1c.3h}} <1h 1f="1o-1A-1H 3F 1w-4j"> <1r 1f="1y-1z 1V-1y">{{1c.3F}} <1r 1f="qY-1w">{{1c.bv}} <1h 1f="1o-1A-1H 3I"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3I" 4x="{{1N.8u}}" ng-ce="!1c.4o || 1c.jI"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jI">&6z; <1h 1f="1o-1A-1H 3t"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3t" 4x="{{1N.8i}}" ng-ce="!1c.4o || 1c.jH"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jH">&6z; <1h 1f="1o-1A-1H 3r"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3r" 4x="{{1N.8p}}" ng-ce="!1c.4o || 1c.jE"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jE">&6z; <1h 1f="1o-1A-1H 5c"> <1X 1f="1o-1k e6" 1S="1w" ng-2j="1c.5c" 4x="{{1N.7K}}" ng-ce="!1c.4o || 1c.jF"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jF">&6z; <1r 1f="1y-1z">{{1N.8d}} <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H">&6z; <1r 1f="1o-1k 1V-1G">{{1c.au}} <1h 1f="Hv-2h" ng-3T="1c.2b===\\\'4X\\\'||1c.2b===\\\'aA\\\'||1c.2b===\\\'Hw\\\'"> <1h 1f="1m-4X-4q-2h" ng-3T="1c.6a.1i>0"> <1r 1f="1m-4q-1z">{{1N.83}} <1h 1f="1o-1A-1H" ng-2O="wW()"> <1r 1f="1y-1z">{{1N.7B}} <1r 1f="1o-1k 1V-1G">&6z; <1X id="vv" 1f="1o-1k 1V-1G 4X-4q-1X" 1S="9t" ng-2j="1c.6d" 4x="jJ jJ jJ jJ" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7E}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1X id="vs" 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.5t" 4x="{{1N.89}}" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7Z}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1c.5G" 4x="vA"> <1r 1f="1y-1z">{{1N.6S}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.ci}} <1h 1f="1o-1A-1H 7h" ng-2O="t7()"> <1r 1f="1y-1z">{{1N.7f}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.7h}} <1h 1f="4X-r6"> <1r>{{1c.w1}} <1h 1f="pD-2h" ng-3T="1c.2b===\\\'cq\\\'"> <1h 1f="1o-1A-1H pD-oF-1z"> <1r 1f="1y-1z">{{1N.84}} <1h 1f="1o-1A-1H 1w-4j pD-oF"> <1r 1f="qY-1w">{{1c.oK}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7G}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 4q-3B-1X" 1S="9t" ng-2j="1c.8U" 4x="{{1N.8a}}"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">oN <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.bt" 4x="(c7)"> <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="qR()" 1f="6g-2G" ng-HP="r3()">&6z;{{1N.5D}} <1h 1f="fN"> <1h 1f="1w-4j bm-r6-8E"> <7g ng-3a="2R/rq.3C" 1f="rq"> <1h 1f="mp-pl"> <1r>V{{1c.cR}} \'),a.8j("3m/6O.2T",\'<1h 1f="1o-1A" id="6O"> <1h 1f="1o-1A-1H 1w-4j"> <7g id="6O-iL" 1f="6O-iL" ng-3a="{{ p3 }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'" ng-5i="!iQ"> <1h ng-5i="iQ">

{{t6}}

<1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.6y}} <1r 1f="1o-1k 1V-1G">4C {{2I.3S}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.8f}} <1r 1f="1o-1k 1V-1G" ng-if="!2I.a9">{{2I.5p}} <1r 1f="1o-1k 1V-1G" ng-if="2I.a9">{{2I.a9}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.5p" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="!2I.a9"> <2k-5g ng-2j="8H.a9" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="2I.a9"> <1h 1f="1o-1A-1H" ng-3T="2I.jo.1i > 0"> <1r 1f="1y-1z">{{2I.jo}} <1r 1f="1o-1k 1V-1G">{{2I.cP}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.cP" bc-1B="bc" bc-1f="5g" bc-1S="7g"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.88}} <1r 1f="1o-1k 1V-1G">{{2I.jm}}{{2I.oT}} <1h 1f="1o-1A-1H" ng-3T="2I.ee.1i > 0"> <1r 1f="1y-1z">{{1N.6q}} <1h 1f="1o-1A">
  • {{ 1H }}
  • <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="sl()" 1f="6g-2G">{{1N.8k}} \'),a.8j("3m/pe.2T",\'<1h 1f="3k-fO">

    {{sL}}

    <1h 1f="3k-2A">

    <1h 1f="1o-1A-1H 1o-1A-1H-4G"> <1r>3e <1h 1f="3N-1A 3N-1A-4G" ng-5i="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'bX\\\'" ng-5i="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">bX <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'11\\\'">11 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'22\\\'" ng-3T="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">22 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1s\\\'">1s <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1E\\\'">1E <1h 1f="3N-1A 3N-1A-4G" ng-3T="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'kk\\\'">kk <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'9k\\\'">9k <1r>1E: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.1E}} <1r>bK: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.bK}} <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>9m <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.9m" 4x="9m"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.5p" 4x="5p"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 52 <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fH" 4x="52"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 7o <1X 1f="1o-1k 1V-1G" 1S="1w" ng-2j="1l.fS" 4x="7o"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-3T="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fm" 4x="fm"> <1h 1f="3k-b4" 2M="1w-VV: 4j"> <2G 1f="44-2G" 1S="2G" ng-2O="q4()" 2M="1n:30%; 6H-3q:#OY">{{1N.8v}} <2G 1f="44-2G" 1S="2G" ng-2O="6g()" 2M="1n:40%; 7w-1y:Qt">{{1N.5D}} \')}]);',62,3734,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|this|sdkData|var|return|class|prototype|div|length|default|value|data|new|width|list|typeof|isInternalDebugging|span|null|toString|Object|height|text|void|left|label|group|options|name|throw|Error|__esModule|right|item|for|document|call|push|mp_language|localizable|255|node|top|Math|type|mp_merchant_ID|case|pull|image|input|CryptoJS|status|||||||||||not|mp_channel|tidak||TypeError|encode|strict|form|mp_amount|model|angular|canvas|been|exports|String|else|Islands|use|setPrototypeOf|window|hasn|fontSize|substring|parent|defineProperty|css|body|replace|break|renderer|filter|mp_verification_key|button|parseInt|C5ResultData|mp_app_name|then|valid|style|search|click|sdkConstants|and|images|catch|html|svg|ctx|BERHAD|must|instanceof|errorDesc|||||||||||src|control|try|col|status_code|commErrorHandler|mp_country|mp_order_ID|object|substr|modal|console|views|create|result|controller|color|mp_bill_mobile|Saint|mp_bill_email|Invalid|BANK|new_credit_card|setAttribute|Cannot|createElement|MPdomain|number|png|mp_password|mp_username|mp_currency|maskname|100|mp_bill_name|mp_request_type|Promise|clip|position|btn|args|forEach|undefined|Kepulauan|channel|show|indexOf|128|title|dan|found|super|||||close|||||constructor|Super|__proto__|configurable|enumerable|either|expression|writable|ImageUnavailable|module|center|BCARD|mp_transaction_id|current_token|currency|mp_editing_enabled|called|card|initialised|ReferenceError|match|Billing|logo_url|BCard|placeholder|resolve|mp_encrypt_credentials|AES|MYR|MOLPay|none|country|switch|sandboxed|documentElement|html2canvas|getContext|appendChild|utils|mp_secured_verified|SandboxedResultData|animation|templateUrl|mobile|log|MALAYSIA|circle|seed|encodings|php|credit|open|mp_sandbox_mode|||amount|displayValue|textAlign|trim|fromCharCode|||email|Island|element|mp_bill_description|available_channel|proxy|max|barcode|OrderID|hide|molpayXsdkApp|token|map|round|API|line|txn_ID|xCF|size|Close|mp_credit_card_expiry|PleaseSelectAChannel|method|Utf8|repeat|borders|enc|Guinea|decrypt|BillingMobileMustBeMoreThan4Characters|Proceed|AmountNotFound|currentActiveModal|mp_credit_card_cvv|JSON|sah|SandBoxed|times|preloadCount|font|BillingNameMustBeMoreThan2Characters|scope|InvalidBillingMobile|D7ResultData|concat|split|SHA256|callNativeWebview|wastong|parseFloat|mode|index|start|||||||rootScope|105|||available_token|SecuredEncryptionFailed|nodeType|mp_credit_card_no_display|Loading|CVV|proceed|BillingDescriptionMustBeMoreThan4Characters|ownerDocument|CommunicationError|AccessDeniedMidAppnameVerificationkey|InvalidPaymentInformation|InvalidAmount|Tampered|mp_credit_card_country|NoChannelFoundCheckCurrencyValue|Note|CountryNotFound|MerchantIdNotFound|AdvancedPhoneValidationFailed|UnhandledErrorContactSupport|UsernameNotFound|internet|TransactionIdForReceiptRequestNotFound|Services|nbsp|InvalidCountryCode|VerificationKeyNotFound|InvalidBillingEmail|support|South|CurrentMsgType|OrderIdNotFound|background|AppNameNotFound|Preparing|AdvancedEmailValidationFailed|CurrencyNotFound|textMargin|mp_ga_category|receipt|dismiss|RecurringPaymentCantProceedOnThisChannel|apply|Country|nodeName|Reminder|path|Yes|PasswordNotFound|250|BillingEmailMustBeMoreThan4Characters||||colorStops||||preloadItems|url||exp|min|HttpPost|xC8|checksum|BankName|img|mp_credit_card_bank|MD5|display|test|101|important|auto|chksum|_renderProperties|bottom|finalizingpayment|marginTop|contentWindow|PleaseWait|onerror|margin|stop|pInstruction|InvalidBillingName|New|CardNumber|InvalidBCardPin|SandboxModeIsOn|ExpDate|InvalidBCardNumber|BCardPrefix|SearchBank|content|alertdata|BillingDescription|hindi|render|InvalidDebitCardNumber|InvalidExpDate|cssInt|DebitCardCheckingHasBeenSkipped|SearchCountry|FinalizingPaymentStatus|base64|before|SearchError|Nombor|InternetDisconnectedThisRequiresInternet|China|Cvv||href||NewCard|UseBCard||SandboxedModeOn||PayableAmount|MMYY|BCardNumberPlaceHolder|errors|promise|PayThrough|SandBoxedUseOptions|TransactionId|GaTrackEvent|205|BillingEmail|put|SaveImageToDevice|SandBoxedOptions|errormsg|onload|ditemukan|BillingMobile|InvalidCreditCardNumberLuhn|stack|InvalidBillingDescription|InvalidCreditCardNumber|BillingName|Cancel|InvalidCvvNumber|ditemui|thanh|stringify|Virgin|mod|mp_credit_card_no|_options|container|toLowerCase|LUHN|receiptData|240|marginLeft|RM1|join|nodecontainer|than|mp_filter|isRecurring|more|getElementById|245|139|bcard_no|6298|app|cvv|contexts|NetworkErrorSandboxedMode||opacity||MerchantID|||||||toUpperCase|characters|msgType|www|Image|subdivide|overflow|Node|ZW|drawImage|failed|format|app_code|mahanap|rectangle|paymentinfo|backgroundClip|Sandboxed|TxnData|tel|ZM|hasOwnProperty|Georgia|YE|defaultView|ang||ZA|French|YY|slice|penagihan|hasTransform|mp_channel_editing|testMerchantCredentialsCallback|allowTaint|MobileNewApiUrl|watch|_|please|230|sandbox|Receipt|SHA1|211|shift|Korea|marginRight|rgba|lebih|AlertModalCtrl|radio|origin|errorTitle|bounds|thu|reasons|Montenegro|alertmodal|the|Bank|payTxnID|Debit||parse|splice|InternalUsed|block|Samoa|Search|in_app_mode|removeChild|translate|preloadStarted||||238|opt|string|||mp_channel_title||Payment|Number||renderQueue|credit3|guardHeight|numero|Nam|device_info|expdate|Date|epay|uib|primary|message|Please|ISLAMIC|floor|uibModalInstance|Email|Republik|Advanced|parseBounds|check|Card|kartu|nextA|api|hidden|arguments|220|01010|x00|setTimeout|footer|getEncoding|x7F|Pulau|112|xtan||nextB||Sandbox||Array|cdomain|month||year|SAR|domain_mode|molpay|marginBottom|textPosition|Man|Serbia||aligned|bcard_pin||mp_amount_display|firstChild|United|CODE128|nativeWebTransactionResults|Nama|169|British|PasswordHash|Payload|Lan|Congo|ApiC5|isStarting|B4ResultData|reason|Republic|Checksum|cash|chevron|RecordType|Token|PAN|mp_bin_lock|location|json|Type|Malaysia|00|RecurringApiUrl|DirectApiUrl|bin_checked|||||multi|application|pin|YT|javascriptEnabled||CanvasRenderer|date||readonly|mga|error||mp_credit_card_country_title|end|payment|Indonesia|bcOptions|nodes||transform|pointbcard||binaryRepresentation|validation||bin|setFillStyle|bin4|gagal|loading|setVariable|password|offsetTop|nextC|x20|charCodeAt|define|offsetWidth|offsetHeight|mp_advanced_email_validation_enabled|isArray|Arab|computedStyles|async|rgb|pcode|now|sdk_version|imageTimeout|encrypt|transactionRequest|buttonClicked|mp_advanced_phone_validation_enabled|fontOptions|zIndex|removeContainer|Sandwich|Svalbard|Internet|GetAvailableChannelByIdUrl|kredit|T1Url|Jan|Anguilla|Pitcairn|Nomor||dapat|Netherlands|Wallis||Futuna|Territory|saluran||GetBankListUrl|transaksi|offline|Caicos|pembayaran|||Mayen|Aruba|Canary||tho|Garcia|Diego|Cocos|vui|Gibraltar|Guyana|Hong|Guernsey|Guadeloupe|Jersey|Cook|Melilla|B4ResultUrl|Recurring|Mariana|Norfolk|Points|Network|halaga|Faroe|Ceuta|Bhutan|Bermuda|character|digit|toFixed|ucs2|createTextNode|barcodePadding|require|children|when|link|fill|darken|bottomRightInner|bottomLeftInner|billing|topRightInner|toggle|border||normal||createRange|notes|backgroundImages|transformData|CIMB|issuer_bank|bank_country|styles||visible||toDataURL|bin_checking_in_progress|ELEMENT_NODE|UPC|lineColor|curveTo|inline|topLeftInner|rect|210|_encodings|with|x5F|fabric|xml|206|200|decode64|getBoundingClientRect|offsetBounds|amd|loaded|224|getBounds|ceil|mod10|topLeftOuter|mp_debug_mode|isPseudoElement|bottomLeftOuter|bottomRightOuter|topRightOuter|getAttribute|className|isTransparent|tainted|matrix|get||Montserrat|listgroup|marginless|randomIntFromInterval|updateSdkData|authData|Selatan|merchant_id|Basic||Sudan|Currency|SubMerchant|mp_express_mode|mp_installmonth|Cunha|ReturnURL|Signature|Tristan|Tokelau|mp_tcctype|tranID||Miquelon|Pierre|verifyChecksum|global|Puerto|Status|Palau|Nauru|Niue|Bouvet|Clipperton|Helena|Amount|Sahara|mp_preferred_token|Heard|McDonald|CustDesc|mp_cash_waittime|tampered_amount|CustContact|ReferenceNo|TxnType|144|view|row|header|bind|https|TxnChannel|tampered_chksum|TxnAmount|CustEmail|TxnCurrency|CustName|nama|yang|merchant|127|username|nilai|untuk|reject|Ghi|ready|xhr|crossOrigin|online||Andorra|some|logging|1023|fontWeight|fontFamily|cssList||lineargradientcontainer|transformMatrix|svgcontainer|143|self|222|ini|248|clone|cloneTo|moz||renderImage|computedStyle|punycode|TEXT_NODE|Trung|fixed|INPUT|isElementVisible|Phi|backgroundColor|transition|taintCtx|harus|asyncRenderer|backgroundRepeatShape|153|padding|192|karakter|gradient|160|TYPES|dari|Xan|pagsingil|Use|http|transaction|results|onrendered|timeout|device|RHB|||||Name|Mobile|Description|isDeploy||addCustomCSS|controllerAs|searchString|0px|kad|percubaan|description||Cayman|nativeWebCloseAllWindows|advancedPhoneValidate|advancedEmailValidate|wrapper_version||BANKING|factory|mp_is_escrow|uibModal|token_status|l_version|replaceAll|merchantID|mp_allowed_channels|innerHTML|RequestData|D7ARequeryRetryIntervalInMs|ApiD7|encodeURIComponent|BCARD_PIN|com|module_id|generate|mp_ga_enabled|CC_PAN|CC_CVV2|BCARD_NO|CC_TOKEN|CC_YEAR|CC_MONTH|getMaximumHeightOfEncodings|getTotalWidthOfEncodings|calculatePair|CODE39|select|guardedEncoding|flatEncoding|CODE128A|CODE128B|EAN8|EAN13|CODE128C|higit|configure|Access|209|204|218|debit|hasil|Negara|lastChar|structure|key|Unhandled||encryption||EAN5|EAN2|fillRect|tra|InvalidInputException|CANCEL|pharmacode||giao|daripada|Ralat|sila||calculateEncodingAttributes|mesti|isNaN|GenericBarcode|MSI|ITF|mangyaring|ITF14|MSI10|MSI11|codabar|MSI1110|save|MSI1010|gradientcontainer|error_message|Tuvalu|Uganda|logo|Uruguay|Tunisia|Tobago|Tonga|receiptLogoCanShow|Trinidad|Uzbekistan|Vanuatu|Antigua|Zambia|Zimbabwe|Guam|Angola|Guatemala|Venezuela|Vietnam|Falkland|Togo|Leste|Syria|Polynesia|Iran|Taiwan|Isle|Territories|Swaziland|Afghanistan|Israel|Verde|India|Haiti|Bissau|Thailand|Timor|Honduras|Kong|cur|Tanzania|pcode_lbl|Myanmar|Dominica|Bosnia||Herzegovina|Botswana|Brunei|Ivoire|Bolivia|Denmark|Benin|Exp|Bulgaria|Burkina|billinginfo|mp_bill_mobile_edit_disabled|mp_bill_description_edit_disabled|Burundi|mp_bill_email_edit_disabled|mp_bill_name_edit_disabled|xxxx|Faso|Pay|Belize|Barbados|Gambia|Saudi|Gabon|Argentina|Ghana|Barbuda|bar|Grenada|icon|Fiji|Ethiopia|Austria|Azerbaijan|Bahrain|Bangladesh|Australia|Salvador|Estonia|Armenia|Eritrea|Lanka|Albania|Papua|Nigeria|Kinshasa|Oman||union|Afrika|||Pakistan|accepted|Rwanda|Rico|Martinique||Marshall|Solomon|Kitts|Kiribati|Caledonia|Qatar|Kuwait|Panama|Malawi|Liechtenstein|Paraguay|Ascension|Peru|run|Liberia|Lesotho|Malta|Christmas|Laos|Latvia|Outlying|Mali|Nevis|Turks|Seychelles|Mauritius|Niger|Mauritania|Sri|Somalia|debit_credit|Senegal|Lucia|Namibia|Mayotte|Nepal|Marino|Mongolia|Slovenia|Vincent|Martin|Slovakia|Moldova|San|Amerika|Grenadines|Kenya||simulated|canggih|middle|Chad|lemy||Barth||anchor|fillStyle|pagbabayad|Palestinian|renderBackgroundRepeat|phone|restore|afterRender|paglalarawan|Romania|Poland||Belanda|CLOSE|available_banklist|createElementNS|Save|removeContentType|atau|Switzerland|parseBackgrounds|linear|smallImage|Algeria|Sweden|createCanvas|Tidak|suriin|LINEAR|122|Vatican|Kingdom|176|bytes|Gunakan|Turkmenistan|supported|Ukraine|_errorHandler|cek|mod11|rangeBounds|nomor|silahkan|wrapBarcodeCall|hasAttribute|getParentStack|HTMLCanvasElement|jsbarcode|Kesalahan|RRRRRR|208|jQuery||NoElementException|hasFabric|complete|The|flat|getStructure|isInline||InvalidElementException|aksara|Suriname|all|process|||Data|urlencoded||BinLockCheck|Leone|Principe|Tome|Transaction||Baru|Sierra|Content|Accept|ApiT1|Inggris|ApiGetAvailableChannelById|Mod|PaymentRecordsLogUrl|Maklumat|Carian|request|headers|POST|Tajikistan|IsDebitCardUrl|Sao|through|RecurringResultData|D7A|DirectApiHandler|Perancis|SandboxedHandler|nativeWebOpenMOLPayWindow|RequestURL|OnApiResponseReceived|Initiate|GetAvailableChannelByIdHandler|T1Handler|GetBankListHandler|ApiD7A|D7ARequeryCurrentAccumulatedRetryInMs|ApiHandlerService|isBelowAndroid44|ErrorlistModalCtrl|ExpiredDate|Aland||Utara|error_code|Lebanon|D7ARequeryActiveNow|unknown||||SandboxedModalCtrl|code|xdk|MPDomainID|mp_dev_mode||MPSecondaryDomain|closemolpay|molpayResultString|MPSandboxDomain|inAppCallback||PaymentInfoCtrl|000000|bank|points|webview_url_prefix|requestPath|mp_custom_css_url|1e4|Android|Communication|connection|pangalan|naka|setCaretPosition|availability|mp_is_recurring|checking|expressProceeded|isLoading|monospace|ffffff|HSBC|MALAYAN|telefon|variables|USD|Secured|random|mp_ga_userid|MOLPayPayment|localStorage|pastExpressMode|Not|MOLPoints|MOLWallet|Pagsingil|Order|pInstructionCaptureData|scrollTo|PROCEED|AuthenticationService|deviceDetector|Thanh|dismissAll|cao|uuid4||Z0|01|Czech|Anh|getPseudoElement|Dominican|130|||216|Ecuador||after|createStyles|loadImage|webkit|decode|addImage|parseBackgroundImages|paintText|TEXTAREA|Equatorial|IFRAME|Southern|135|point|147|paint|Greenland|Guiana|bcard_point|SELECT|180|Pin|Union|235|Finland|isSVG|renderBorders|payable_amt|colors|bottomRight|visibility|bottomLeft|createHTMLDocument|REGEXP_COLORSTOP|prefixedCss|parseTransformMatrix|Cuba|toplogourl|lineWidth|baseline|topRight|topLeft|write|curveToReversed|PSEUDO_HIDE_ELEMENT_CLASS_AFTER|PSEUDO_HIDE_ELEMENT_CLASS_BEFORE|getHideClass|renderIndex|sandboxedmodal|isSameOrigin|getOrigin|||parentNode|cleanDOM|version|querySelector|loadUrlDocument||Croatia|appendToDOM|absolute|Norway|140||Monaco|Libya||Micronesia|Colombia|Lithuania|Ocean|Kyrgyzstan|bcard|Antilles|Zealand|Kazakhstan|Minor|basic|Indian|Brazil|Belarus|Belgium|Bahamas|American|Comoros|sortStackingContexts|Oceania|Macau|Hoa|Macedonia|shape|Xin|Nicaragua|Cape|Ireland|Jordan|getChildren|len|Northern|cancel|Iraq|173|Iceland|newStackingContext|228|range|getOpacity|Keeling|165|errorlistmodal|107|170|cloneNode|replaceChild|stacking|ApiGetBankList|BHD|ApiDirect|calculateOverflowClips|VcodeHash|Yaman|SignatureHash|parseClip|table|bill_email||CHARTERED|ApiB3|STANDARD|Turki|app_name|bill_mobile|SDN|bill_name|orderid|bezierCurve|PUBLIC|Uni|SCRIPT|RAJHI|err_desc|paydate|1e3|pay|expired_at|getElementsByTagName|mpUserId|childNodes|proceedClicked|1111|getHours|tagName|9999999|1e6|1e5|larger|DEBIT|fetch|2112|getChannelNameFromChannelMaskname|proceedDisabled|uid|NASIONAL|disclaimer|createPseudoHideStyles|disableAnimations|Yunani||PreloadData|MAYBANK|createStackingContexts|SIMPANAN|MUAMALAT|CREDIT|statusText||aid|411111|getPseudoElements|1001|ZH|GET|1234345656787890|poweredByMOLPay|SDK|188|102||Tengah|225|Dominika|221|133|196|152|D7ARequeryMaxThresholdInMs|219|onReasonListClicked|Rusia|pageXOffset|innerHeight|pageYOffset|onclone|rendering|innerWidth|154|onErrorListClicked|Barat|191|179|136|119|outerHTML|scrollTop|script|_scrollTop|Nugini|nativeWebOpenBankWindow|invalid|65536|55296|mp_transaction_request_type|56320|scrollLeft|_scrollLeft|namedColor|184|215|178||hex6|DirectApiResultData|nextSibling|fromArray|TxnID|hex3|scrollWidth|clientWidth|REGEXP_DIRECTION|webkitgradientcontainer|capture||cssFloat|contain|svgnodecontainer|proxyimagecontainer|dummyimagecontainer|Authorization|framecontainer|imagecontainer|IsDebitCardCheck|MATRIX_PROPERTY|ChecksumForC5|ApiB4|TEXT_SHADOW_VALUES|CLIP|ChecksumForD7|Prancis|matrix3d|TEXT_SHADOW_PROPERTY|ChecksumForD7A|order_ID|clearTimeout|Finished|Desc|verticalAlign|Title|proxyLoad|core|DummyImageContainer|renderers|scrollHeight|clientHeight|imageloader|nodeparser|hasImageBackground|Singapura|Version|OCBC|findImages|getPromise|Boolean|findBackgroundImage|imageExists|ApiRecurring|mp_bin_lock_err_msg|reduce|LogoReplacementText|onBanklistClicked|01001|11000||10001|00110|LLLLLL||00000000|00101|||10100|00011|10010|reverse|onItemSelected||01100|renderBackgroundRepeating||endBin|parseBackgroundPosition||xCD|parseBackgroundRepeat|JsBarcode|blank|xCE|203|startBin|middleBin|1011|xD3|parseBackgroundSize|1010|11101|insertBefore|drawCanvasText|drawCanvasBarcode|paddingLeft|paddingTop|prepareCanvas|checkbox|ProxyURL|head|base|Proxy|moveCanvasDrawing|fillText|does|paddingRight|vertical|getEncodings|000|111|renderBackgroundImage|_defaults|renderBorder|renderBackground|paddingBottom|SVGElement|renderBackgroundColor|handleCatch|99999|getBarcodePadding|inlineFormatting|shadowColor|testSVG|testCORS|testRangeBounds|123|clearShadow||lowerCanvasEl|beginPath|applyTextTransform|closePath|atob|fontShadow||cors|countryArray|onBankSelected|onChannelSelected|cardlistmodal|onCardSelected|channelmodal|renderBackgroundGradient||countrylistmodal|ownStacking|setOpacity|resizeImage|setTransform|banklistmodal|onCountrySelected|offsetParent|182|400|212|232|142|158|circleStroke|104|isColor|getEncodingHeight|symbology|106|103|134|drawShape|XMLHttpRequest|Lbinary|taints|RADIAL|offsetLeft|getImageData|Gbinary|124|244|164|110|Rbinary|restoreCanvas|back||DEDEDE|paintRadio|A5A5A5||checked|424242|iphone||bold|paintCheckbox|CANVAS|IMG|naturalHeight|naturalWidth|ReceiptCtrl|paintFormValue|getValue|expinput|maybankSuccessString|Production|ccinput|mp_is_secure|cimbAcknowledgeString|hlbCompletedString|html2canvaswrapper|xxx|extend|lineHeight|closeAll|getChannelLogoFromChannelName|getChannelTitleNameFromChannelName|Online|isRootElement|Affin|RMB|Cash|Alipay|isBodyWithTransparentRoot|Credit|ALLIANCE|HONG|AFFIN|IDR|assignStack|Point|splitText|nativeWebPInstructionCapture|paintNode|onCountrylistClicked|parseTransform|paintElement|uibModalStack|credit_disclaimer|getWrapperBounds||ONL|Clicks|FPX|getRangeBounds|userAgent|coreVersion|bcClass|bcType|xmlns|setSvgAttributes|onChannelListClicked|parseBackgroundClip|isBlack|inset|timeoutHttpIntercept|luhn|restrict|directive|keys|box|onPayClicked|org|2000|DOMParser|SVGRenderer|falling|textcontainer|stackingcontext|drawSVGText|fontmetrics|drawSvgBarcode|prepareSVG|pseudoelementcontainer|RegExp|parseBorders|loadingAllDone|offsetY|blur|parseTextBounds|use_direct_api|Chile|onBillingInfoChanged|add|parseTextShadows|checkIfThisIsAValidCountryCode|isString|offsetX|isNumber|fontMetrics|provided|GetAvailableChannelById|textDecoration|recordsLog|MPMainDomain|onCardNumberClicked|GetBankList|IsDebitCard|renderTextDecoration|||getMetrics|seamlesspayment|chips|mobile_new|LEONG|collapse|seluler|tunggu||Mozambik|Yemen|adalah|pencarian|Pangalan|natagpuan|Cile||ito|Nabigo|pagpapatunay|Pilihan||mengkonfigurasi|ditolak|Akses|silakan|aplikasi||ada|Turkey|Komunikasi|Western|Mohon|City|proses|Emirates|pag|transaksyon|Bayaran|periksa|Pengesahan|pengesahan|watak|Tiada|rangkaian|Kad|can|Mata|Memuatkan|Tarikh|bil|mel|bansa|qua|Hindi|Gamitin|resulta|thi|gia|Bil|||bimbit|Filipina|Jumlah|mata|permintaan|CHND|khu|Niu|Cyprus|san|tan|States|Djibouti|Egypt|Sint|Antarctica|land|Nha|Thu|Cameroon|Cambodia|Canada|Central|African|FIL|Brazzaville|goay|Tri|Rica|Costa|gan|European|France|Portugal|ponsel|jumlah|North|Mozambique|deskripsi|validasi|hubungi|Africa|Singapore|Arabia|pada|Morocco|Unidos|Jamaica|Japan|Hungary|Greece|Germany|Luxembourg|Madagascar|Estados|Mga|Mexico|Maldives|contact|Peringatan|CardlistModalCtrl|Rika|disconnected|CountrylistModalCtrl|BanklistModalCtrl|Meksiko|ChannelModalCtrl|updateBCardPoints|Finalizing|information|Jerman|denied|Kongo|C5Handler|Kosta|Mesir|Payable|requires|skipped|has|that|informed|Jamaika|Last|will|are|take|Kamerun|Kanada|place||Madagaskar|FinalizingPaymentCtrl|RecurringHandler|B4Handler|D7Handler||D7AHandler|wait|B3Handler|below|Serikat|verification|960|954|502|740|506|644|512|518|886|692|5379|680|668|966|akan|118|310|Malvinas|940|956|266|608|268|938|758|bawah|berlangsung|974|604|782|638|simulasi|dirusak|1110010|Cleaned|measureText|false||1100110|1101100|Kamboja|dilewati||telah|was|getModule|cloned|removeAttribute|0010111|0001001|encoding|InvalidStartCharacterException|x7E|Initiating|1010000|1000100|1001000||||||opsi||1110100|1001110|||||NodeContainer||||||Resulting|||Cropping||1000010|1011100|moa||crop|508|Kazakstan|496|478|764||Kecil|422|570|464|semua|910|774||880|762|768|678|582|576|672|842|752|734|844||892|836|830|902|590|||about||||||||Terluar|||||652|||||416|||304|||URL|862|614|diperhatikan|Hidden|||Irlandia|412|436||secara|424|554|616|Kayman|572||340|146|978|556|Text|bahwa|818|914|650||890|896||814|628|602|254|Pemeriksaan||292|||328|||||484|||||||260|||930|||||||868|terputus|LLLLL|RRRRR|springgreen|Catatan|Menyimpan|||gambar|RRRR|perangkat|steelblue|snow|10101010101010101010101010101010101010101|kesalahan|cari|Terakhir||Menyelesaikan|Modus|slategrey|hutang|Jasa|Mempersiapkan|LLLL|GLGLL|GLLGL|GLLLG|GGLLL|teal|000000000000|00000|thistle|LGGLL|LLGGL|informasi|Xao|Pemuatan|Penagihan||LLGLG||LLLGG|LGLGL|||LGLLG||Antilla||slategray|1101101101|101100110011|1011001001|1101101011|1101011011|110100101|101001101|101100101|1010010011||1001001011|114|salmon|saddlebrown|sandybrown|seagreen|1010011001|sienna|seashell|100110101|100101101|tanggal|nih|skyblue|kadaluarsa|Prin|poin|Selandia|slateblue|silver|charAt||101101001||110101001|100101011|110010101|101001011|BottomLeft|101010011|101011001|LGGLGL|LGLGGL|turquoise|tomato|20957||violet||mod43||white|||Deskripsi|wheat|29783|23639|29789||23645|29975|20855|||||23669|30485|20951|29813|whitesmoke|yellow|containing|0010001|Andora|xen|Vin|Document|ketersediaan|membutuhkan|each|returns|used|din|yellowgreen|tarikh|Antarktika|Mode|deprecated|Jaringan|23831|30533|18269|17477|17489|29021|17783|17879|29045|18293|17681|20753|LGGLLG|LGGGLL|LGLGLG|LGLLGG|LLGGGL|35770|LLGLGG|LLGGLG|29141|18263|23837|22301|30023||||29981||21623||22295|30149||24005|23879|30545|23921|22385|29015|30065|21959|22343|30161|24017|init|0010011|nanh|ren|underline|xni|xoa||fontVariant|xin|Bra|lip|overline|off|Style||Color|Left|Bottom|Turk|Top|Right|fontStyle|Bru||wordWrap|Parse||Exception|whiteSpace|boxSizing|borderTopStyle|borderLeftWidth|||borderTopWidth|||||||caught|renderFormValue||||letterRendering|||||||Bun||action||Pha|Starting|cvc|textContent|gian|bai|parseFromString|Kesatuan|implementation|callback|html2canvas_||configured|textShadow|delete|Otoritas|Kemboja|Feringgi|Bersatu|Emiriah|Hungari|host|Jibouti|Jepun|Itali||withCredentials|transformOrigin|Tadjikistan|Surinam|Leon|RequestMethod|creditcard|crossborder|Width||hen|Siera|Sepanyol|Lubnan|Kibris|Eropah|Luksembourg|Maghribi|Terpencil||Maldiv||borderLeftStyle|||trung|disabled|alt||html2canvaspseudoelement|||Palestine|endControl|spinner|ten|Lich|startControl|pan|Hung|mai|Guy|sqrt|ran|Nga|goa|xra|spin|Minh|TopRight||TopLeft|letterSpacing|BottomRight|float|Radius|relative|static|HEAD|TITLE|lay|xca|bua|u00ff|u0000|OBJECT|OPTION|Gru|Goa|Loan|clips|Dim|Sinh|YYYY|Somoa||||fetching|Start|arial|Calculate|Chi|Campuchia|||||NodeParser|||||visibile|xta|total|Fetched|Luar|Macao|Gha|queue|Render|xao|created|BODY|items|sort|man|Sorting|starting|Images|Oseania|parsing|Creating|setStart|setEnd|offset|backgroundRepeat|race|searching|XMLSerializer|Timed|out|renderAll|NoChannels|uang|serializeToString|parseSVGDocument|lowercase|capitalize|uppercase|textTransform|Succesfully|Komoros|Failed|verifikasi|groupSVGElements|util|selectNode||dukungan|Tertangani|123px|boundtest|Berulang|dijamin|enkripsi||loadSVGFromString|||Nikaragua|StaticCanvas|setWidth|setHeight|tanda|terima|cannot|Rumania|tombol|gif|0111101|0100011|0110001|royalblue|0011001|anonymous|angularBarcode|0001101|0101111|0111011||0100001|0011101|0111001|0011011|0110011|0110111|||0001011|0100111|send|responseText|port|hostname|Kolombia|crai|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|R0lGODlhAQABAIAAAAAAAP|yH5BAEAAAAALAAAAAABAAEAAAIBRAA7|Tuy|protocol|submit|useCORS|Added|koneksi|Barthelemy|Kirgistan|PEXPLUS|prefix||Norwegia||||Ban|Burma|main|||Italy||Philippines||Russia|backgroundImage|Tom|Platform||401|||Cura|Unknown|Espanya|textBaseline|getComputedStyle|bia|Saba|Eustatius|Bonaire|ncipe|backgroundSize|Aljazair|Spain|backgroundPosition|Syarikat|horizontal|Anonymous|Cad||xdkform|Quiana|Maarten|___html2canvas___pseudoelement_before|cover|___html2canvas___pseudoelement_after|Palestina|AFTER|PSEUDO_HIDE_ELEMENT_CLASS_|BEFORE|Initialized||Maladewa|Kroasia|Russian|createPattern|Tagihan||||Kuba|Libia|globalAlpha||Pilipinas||Federation|||createLinearGradient|templateCache|melanjutkan|Function|addColorStop||||||Ceko|ignore||selectedIndex|Lituania|Luksemburg|Makau|Italya|Polandia|stroke|strokeStyle|arc|Tan|Makedonia||Polinesia|Malayong|shadowOffsetX|shadowBlur|Riko|shadowOffsetY|Portugis||moveTo|bahagi|0000101|iya|transparent|INR|THB|PHP|GBP|EUR|Chu|aliceblue|SGD|HKD|AUD|Jepang|INVESTMENT||CORPORATION|||||||SERVICE|AEON|||||||||||||||||JPY|VND|nam|GoInterpay|antiquewhite|EPG|Spanyol|ghi|affin|beige||alipay|Truy|TWD|tuy|epg||||minAmt|Public|aqua|publicbank|FPX_PBB||aquamarine|Ghim|azure|tin|AMBANK|AMISLAMIC|SYNERGY|CARDS|nombor|UNITED|SAADIQ||Finlandia||scrollX||||scrollY||navigator|OVERSEAS||pengebilan|UOB|||iPad||5234646534754347|iPhone||AGRO|iPod|Italia|Huraian||AMIN|HOUSE|CITIBANK|DINERS|CLUB|AGROBANK|PERTANIAN|ISLAM|KERJASAMA|RAKYAT|AMANAH|Vui|CHINA|KUWAIT|FINANCE|DOCTYPE|COMMERCIAL|adoptNode|INDUSTRIAL|AND|bisque|paymentasia|getPInstructionCapture|cornsilk|pamamagitan|237|Mangyaring|crimson|darkcyan|darkblue|cyan|149|cornflowerblue|coral|chocolate|chartreuse|PIN|filename|jpg|base64ImageUrlData|Magbayad||ISARA|darkgoldenrod|darkorchid|darkorange||darkolivegreen|||darkred|darksalmon|Numero|150|233|bagong|darkmagenta|darkgrey|darkgreen|darkgray|999|Ekuador|183|189|darkkhaki|cadetblue|httpParamSerializer|711|Eleven|blue|AMB|minh||blueviolet|Now|rhb|Petronas|W2W|AmOnline||black|ASIA|CNY|webcash|Webcash|amb|blanchedalmond|WEBCASH|cho||cimb|ngnh|fpx|FPX_BIMB|TPA|Paymex|burlywood|brown||ALB|Islam|bankislam||||||Leong|||||hlb|138|HLB||||226|MB2u||Maybank2u||maybank2u|401288|1881|Samudra|65535|Wilayah|Emel|Hindia|luput|niaga|urus|Masalah|Proses|Vatikan|Emirat|Ukraina|Transaksi|Nota|Eropa|64512|Imej|Simpan|memerlukan|Swiss|1002|1003|HttpGet|segala|Grinlandia|dalam|10px||msg|luar|Mikronesia|Dimaklumkan|Yordania||Monako|diabaikan|Diaktifkan|Percubaan|dibawah|pilihan|ApiRecordsLog|Perkhidmatan|aktif|Bayar|Bimbit|Telefon|Pesanan||Melalui|Pilih|Saluran|bank_name|cardnumber|Khatulistiwa|Kutub|BIN|Tanjung|Irak|Raya|Islandia|find|Hungaria|Teritori|cash_waittime|Pembayaran|penggunaan|Luput|56319|bill_desc|Awalan|Turkimenistan|Sila|terakhir|RangeError|MODULE_NOT_FOUND|tcctype|Teruskan||installmonth|Tutup|is_escrow|vcode|Kredit|Batal|Params|lastIndexOf|order_id|penerimaan|available||wang|copy|M00008|nodeValue|from|dijumpai|Unable|setHours|getMinutes||getSeconds|Swedia|getDate|getFullYear|putImageData|getTime|getMonth||Antartica|||island|boleh||10000px||berulang||meneruskan|scrolling|1808|clearInterval|setInterval|iframe|men|999999|dikendali|tak|sokongan|incorrect|ApiGenBarcode|Acsencion|Penyulitan|kekunci|9999|needs|Overflow|tiada|uFF61|wider|event|cid|integers|sebenar|Offline|talian|analytics|2147483647|collect|google||700|uFF0E|u3002|x2E|berlaku|Illegal||||||pengguna||||||||||toUnicode|1000px||||kata||laluan||||Verification||Code|saudagar|toASCII|sambungan|semak|setItem|Digodam|0x80|getItem|CommError|tid|29894240|darkseagreen|pumili|ngTouch|||lightsalmon|193|ngSanitize|ngRoute|lightskyblue||Xri|lightseagreen||bootstrap|creditCardInput||resibo|lightpink|change|kahilingan|phonenumber||injector|||leodido||||cwill747|||||||lightslategray|append||limegreen||lime|||lightyellow|linen||suporta|magenta|ven|viewBox|ngInject|ngModel|viewValue|lightslategrey|remove|Xoa|lightsteelblue|template|ugnay|makipag|config|routeProvider|onlinepayment|252|secure|lemonchiffon|isValidNumberForRegion|Walang|lightblue|phoneUtils|lawngreen|verify|khaki|lugar|magdadala|lavender|lavenderblush|Siprus|tinanggihan|napakialaman||lightcoral||exec|interceptors|para|cssInjector|redirectTo||otherwise|httpProvider|lightgrey|lightgreen|darkslateblue||FastClick|lightgoldenrodyellow|lightcyan|pera|lightgray||selectionEnd|attach|selectionStart|Ligtas|maroon|||palegoldenrod|214|TUTUP|MEMBATALKAN|baru|251|131070|palegreen|orchid|MEMPROSES||tagihan|querySelectorAll|orange|membayar|melalui|orangered|pilih||HTMLImageElement|11100|paleturquoise|powderblue|plum|pink|purple|rebeccapurple|sen|rosybrown|red|Maroko|peru|papayawhip|palevioletred|175|239||213||185||peachpuff||pemesanan||olivedrab|mediumslateblue|113|mediumseagreen||mediumspringgreen|Kaledonia|199|mediumvioletred|mediumturquoise|mediumpurple||align|mediumaquamarine|Umuulit|nabigo|mediumblue|mediumorchid|magpatuloy|maaaring|186|midnightblue|mintcream|clearRect|Bahama|optionsUse|advanced|oldlace|olive|253|browser|navy|EXP|Brasil|moccasin|mistyrose|181|navajowhite|Belarusia|Belgia|proseso|route|petsa|Tinatapos|upang|honeydew|convertSafeBase64StringBackToOriginalVersion|Tandaan|dimgrey|ibaba|grey|testMerchantCredentials|SALS|katayuan|opsyon|moveToElementText|createTextRange|darkturquoise||setEndOfContent|Huling|lahat|Jibuti|Paghahanap|hotpink|addRange|selection|removeAllRanges|getSelection|selectNodeContents|pagpipilian||darkviolet|gainsboro|gold|lamang|Mangyari|transaksiyon|raw|pagkakakonekta|maghintay|deepskyblue|deeppink|148|pagkakamali|nangangailangan|GenBarcodeHandler|greenyellow|reload||getChannelMasknameFromChannelName|paalaala|dimgray|forestgreen|fuchsia|gray|goldenrod||Cina|malampasan||green|ghostwhite|indianred|transactionRequestWithTransactionId|pagkarga|00000000000|aparato|nativeWebClosePopupAndRunScriptOnMOLPayWindow||mpclosepopupandrunscriptonmolpaywindow|nativeWebRunScriptOnPopup|indigo|mppinstructioncapture|label_loading|mprunscriptonpopup|transactionRequestWithOrderId|imahe|firebrick|mababayarang|walang|closemodal|ivory|mpopenbankwindow|nota|Cote|Serbisyo|mpcloseallwindows|mpopenmolpaywindow|m2uTicketsPaymentConfirmed|mptransactionresults|setCountries|Countries|getDeviceInfo|mp_url_scheme|nativeWebRequestUrlUpdates|impormasyon|mp_authData|label_preparing|label_pleasewait|floralwhite|is_submodule|darkslategrey|500|MainCtrl|ePayment_acknowledge|logout|rib|Unavailable|darkslategray|dodgerblue||enableInAppMode|bangko|simulate'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js b/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js index 8ec1b0b..6bc6e9e 100644 --- a/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/android/platform_www/cordova_plugins.js @@ -51,12 +51,12 @@ module.exports.metadata = // TOP OF METADATA { "cordova-plugin-android-permissions": "0.10.0", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-plugin-whitelist": "1.3.2", "cordova-plugin-x-toast": "2.6.0", "cordova-save-image-gallery": "0.0.26", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" }; // BOTTOM OF METADATA }); \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/index.html index e06c9e0..c10252a 100644 --- a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/index.html +++ b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/index.html @@ -1 +1 @@ -

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file +

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js new file mode 100644 index 0000000..f2c601e --- /dev/null +++ b/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('!1a(a){if("3i"==1p 2n&&"3Q"!=1p 4i)4i.2n=a();2p if("1a"==1p cG&&cG.eI)cG([],a);2p{1d b;"3Q"!=1p 2t?b=2t:"3Q"!=1p fr?b=fr:"3Q"!=1p gn&&(b=gn),b.4I=a()}}(1a(){1d a;1e 1a b(a,c,d){1a e(g,h){if(!c[g]){if(!a[g]){1d i="1a"==1p dY&&dY;if(!h&&i)1e i(g,!0);if(f)1e f(g,!0);1d j=1m 1E("3y R1 4i \'"+g+"\'");1D j.nk="Rf",j}1d k=c[g]={2n:{}};a[g][0].1K(k.2n,1a(b){1d c=a[g][1][b];1e e(c?c:b)},k,k.2n,b,a,c,d)}1e c[g].2n}1I(1d f="1a"==1p dY&&dY,g=0;ge;)b=a.cF(e++),b>=s1&&R8>=b&&f>e?(c=a.cF(e++),s3==(Qi&c)?d.1L(((ge&b)<<10)+(ge&c)+s0):(d.1L(b),e--)):d.1L(b);1e d}1a j(a){1e g(a,1a(a){1d b="";1e a>Q3&&(a-=s0,b+=L(a>>>10&ge|s1),a=s3|ge&a),b+=L(a)}).8L("")}1a k(a){1e 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}1a l(a,b){1e a+22+75*(26>a)-((0!=b)<<5)}1a m(a,b,c){1d d=0;1I(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);1e K(d+(J+1)*a/(a+A))}1a n(a){1d b,c,d,e,g,h,i,l,n,o,p=[],q=a.1i,r=0,s=D,t=C;1I(c=a.Rq(E),0>c&&(c=0),d=0;c>d;++d)a.cF(d)>=3V&&f("2a-pI"),p.1L(a.cF(d));1I(e=c>0?c+1:0;q>e;){1I(g=r,h=1,i=x;e>=q&&f("rZ-1X"),l=k(a.cF(e++)),(l>=x||l>K((w-r)/h))&&f("9g"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("9g"),h*=o;b=p.1i+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("9g"),s+=K(r/b),r%=b,p.ad(r++,0,s)}1e j(p)}1a o(a){1d b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];1I(a=i(a),q=a.1i,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],3V>p&&u.1L(L(p));1I(d=e=u.1i,e&&u.1L(E);q>d;){1I(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);1I(r=d+1,j-b>K((w-c)/r)&&f("9g"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("9g"),p==b){1I(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.1L(L(l(o+t%s,0))),k=K(t/s);u.1L(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}1e u.8L("")}1a p(a){1e h(a,1a(a){1e F.7k(a)?n(a.9E(4).8F()):a})}1a q(a){1e h(a,1a(a){1e G.7k(a)?"xn--"+o(a):a})}1d r="3i"==1p d&&d,s="3i"==1p c&&c&&c.2n==r&&c,t="3i"==1p b&&b;(t.fr===t||t.2t===t)&&(e=t);1d u,v,w=Sq,x=36,y=1,z=26,A=38,B=Su,C=72,D=3V,E="-",F=/^xn--/,G=/[^ -~]/,H=/\\Sx|\\Sw|\\Sv|\\Sh/g,I={9g:"Sf: 1X Se Si Sl to mn","2a-pI":"Sz 1X >= T9 (2a a pI nk oF)","rZ-1X":"3u 1X"},J=x-y,K=1R.aN,L=2o.56;if(u={pl:"1.2.4",dV:{ow:i,2f:j},ow:n,2f:o,T4:q,SP:p},"1a"==1p a&&"3i"==1p a.eI&&a.eI)a("gx",1a(){1e u});2p if(r&&!r.6c)if(s)s.2n=u;2p 1I(v in u)u.9v(v)&&(r[v]=u[v]);2p e.gx=u}(1b)}).1K(1b,"3Q"!=1p fr?fr:"3Q"!=1p gn?gn:"3Q"!=1p 2t?2t:{})},{}],2:[1a(a,b,c){1a d(a,b,c){!a.9y||b===a.9y.rG&&c===a.9y.rI||a.9y.o7(b,c)}1a e(a,b){3c{b&&(b.1n=a.1n,b.1v=a.1v,b.4J("2d").RJ(a.4J("2d").v1(0,0,a.1n,a.1v),0,0))}2S(c){h("RB to Rw 2l 7I Rz",a,c)}}1a f(a,b){1I(1d c=3===a.6c?1J.dW(a.Ry):a.qh(!1),d=a.bw;d;)(b===!0||1!==d.6c||"qH"!==d.6T)&&c.4K(f(d,b)),d=d.sd;1e 1===a.6c&&(c.rW=a.rU,c.s5=a.s4,"vl"===a.6T?e(a,c):("oA"===a.6T||"oL"===a.6T)&&(c.1k=a.1k)),c}1a g(a){if(1===a.6c){a.rU=a.rW,a.s4=a.s5;1I(1d b=a.bw;b;)g(b),b=b.sd}}1d h=a("./4R");b.2n=1a(a,b,c,e,h,i,j){1d k=f(a.4H,h.c9),l=b.3z("S2");1e l.eV="4I-8E",l.2M.oW="aY",l.2M.3M="gA",l.2M.1y="-RT",l.2M.1Q="he",l.2M.e9="0",l.1n=c,l.1v=e,l.RY="no",b.2A.4K(l),1m 3K(1a(b){1d c=l.7t.1J;l.7t.8n=l.8n=1a(){1d a=S1(1a(){c.2A.qQ.1i>0&&(g(c.4H),S0(a),"fM"===h.1S&&(l.7t.o7(i,j),!/(NQ|NT|NW)/g.7k(NJ.w8)||l.7t.NH===j&&l.7t.ND===i||(c.4H.2M.1Q=-j+"px",c.4H.2M.1y=-i+"px",c.4H.2M.3M="pr")),b(l))},50)},c.4Y(),c.p8("<2T>"),d(a,i,j),c.qi(c.Oh(k),c.4H),c.44()})}},{"./4R":13}],3:[1a(a,b,c){1a d(a){1b.r=0,1b.g=0,1b.b=0,1b.a=1s;1b.se(a)||1b.s6(a)||1b.cO(a)||1b.9W(a)||1b.sb(a)||1b.sg(a)}d.1g.e3=1a(a){1d b=1-a;1e 1m d([1R.5m(1b.r*b),1R.5m(1b.g*b),1R.5m(1b.b*b),1b.a])},d.1g.eW=1a(){1e 0===1b.a},d.1g.wg=1a(){1e 0===1b.r&&0===1b.g&&0===1b.b},d.1g.se=1a(a){1e bf.cK(a)&&(1b.r=1R.7b(a[0],1O),1b.g=1R.7b(a[1],1O),1b.b=1R.7b(a[2],1O),a.1i>3&&(1b.a=a[3])),bf.cK(a)};1d e=/^#([a-f0-9]{3})$/i;d.1g.sg=1a(a){1d b=1s;1e 1s!==(b=a.4t(e))&&(1b.r=2H(b[1][0]+b[1][0],16),1b.g=2H(b[1][1]+b[1][1],16),1b.b=2H(b[1][2]+b[1][2],16)),1s!==b};1d f=/^#([a-f0-9]{6})$/i;d.1g.sb=1a(a){1d b=1s;1e 1s!==(b=a.4t(f))&&(1b.r=2H(b[1].2w(0,2),16),1b.g=2H(b[1].2w(2,4),16),1b.b=2H(b[1].2w(4,6),16)),1s!==b};1d g=/^cO\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;d.1g.cO=1a(a){1d b=1s;1e 1s!==(b=a.4t(g))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3])),1s!==b};1d h=/^9W\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d?\\.?\\d+)\\s*\\)$/;d.1g.9W=1a(a){1d b=1s;1e 1s!==(b=a.4t(h))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3]),1b.a=ax(b[4])),1s!==b},d.1g.1t=1a(){1e 1s!==1b.a&&1!==1b.a?"9W("+[1b.r,1b.g,1b.b,1b.a].8L(",")+")":"cO("+[1b.r,1b.g,1b.b].8L(",")+")"},d.1g.s6=1a(a){a=a.8F();1d b=i[a];if(b)1b.r=b[0],1b.g=b[1],1b.b=b[2];2p if("Mn"===a)1e 1b.r=1b.g=1b.b=1b.a=0,!0;1e!!b},d.1g.uP=!0;1d i={Mu:[8I,gq,1O],N4:[6Y,oP,s8],Nl:[0,1O,1O],Np:[g0,1O,uJ],Nr:[8I,1O,1O],N9:[8S,8S,b0],Ok:[1O,q9,rA],Pi:[0,0,0],Po:[1O,oP,8h],P7:[0,0,1O],Pb:[PP,43,PU],Pz:[qd,42,42],Py:[go,s7,oE],P3:[95,uM,gP],Oz:[g0,1O,0],Oy:[ex,67,30],Ox:[1O,g0,80],Ow:[3H,Ov,Op],On:[1O,gq,b0],Or:[b0,20,60],Ou:[0,1O,1O],Ot:[0,0,8T],Os:[0,8T,8T],OH:[s7,uU,11],OX:[bB,bB,bB],OW:[0,3H,0],OV:[bB,bB,bB],P2:[P1,P0,qf],OU:[8T,0,8T],OL:[85,qf,47],OJ:[1O,pt,0],OI:[gK,50,i4],OO:[8T,0,0],OP:[OS,OR,lM],Te:[gm,rs,gm],UL:[72,61,8T],Y8:[47,79,79],Y1:[47,79,79],WE:[0,eD,i3],WT:[X4,0,9S],X3:[1O,20,oG],X2:[0,rP,1O],Xd:[67,67,67],Wv:[67,67,67],Y9:[30,fL,1O],XD:[s9,34,34],XZ:[1O,6Y,8I],Xe:[34,8T,34],Xf:[1O,0,1O],WU:[b0,b0,b0],Xn:[gq,gq,1O],WV:[1O,s8,0],Xh:[i5,qd,32],Xg:[3V,3V,3V],Xm:[0,3V,0],X8:[q6,1O,47],Wx:[3V,3V,3V],Ws:[8I,1O,8I],WL:[1O,67,oM],Xo:[8h,92,92],Xx:[75,0,om],XH:[1O,1O,8I],Uq:[8I,9O,pt],Ut:[9O,9O,6Y],Uu:[1O,8I,8S],Uo:[v3,Uh,0],Uj:[1O,6Y,8h],Um:[q6,op,9O],Uz:[8I,3V,3V],UP:[eK,1O,1O],UO:[6Y,6Y,ex],UR:[9S,9S,9S],UK:[fL,ap,fL],UJ:[9S,9S,9S],Tw:[1O,uH,Tk],Tj:[1O,gP,lM],Tq:[32,s9,qg],Tn:[oE,eD,6Y],TP:[rS,rR,gK],U7:[rS,rR,gK],Ua:[lP,rA,go],TX:[1O,1O,eK],TU:[0,1O,0],TS:[50,8h,50],TY:[6Y,8I,9O],U1:[1O,0,1O],UX:[3V,0,0],VW:[rt,8h,qg],VZ:[0,0,8h],W0:[W3,85,9S],VT:[oG,b8,rD],VM:[60,rQ,VL],VK:[ug,uO,ap],VO:[0,6Y,rM],VS:[72,i3,i4],VR:[VQ,21,rz],W4:[25,25,b8],W5:[8S,1O,6Y],Wi:[1O,q9,rw],Wh:[1O,q9,Wj],Wk:[1O,go,q6],We:[0,0,3V],Wa:[Wc,8S,9O],Wb:[3V,3V,0],VJ:[qf,uL,35],Vd:[1O,qd,0],Vg:[1O,69,0],V8:[i5,b8,V1],V0:[ap,uK,qg],V7:[rB,V5,rB],Vl:[Vy,ap,ap],Vx:[rD,b8,oG],Vw:[1O,Vz,VB],VF:[1O,i5,VD],Vv:[8h,rz,63],Vo:[1O,gM,tA],Vn:[ry,gP,ry],Vm:[lP,eK,9O],Vp:[3V,0,3V],Vq:[rt,51,gK],Vt:[1O,0,0],Vs:[rs,gm,gm],K3:[65,67,rw],E3:[8T,69,19],E2:[6Y,3V,E1],E4:[v4,v5,96],E5:[46,8T,87],E8:[1O,8S,ap],E7:[gP,82,45],Ej:[gM,gM,gM],Ed:[oE,eD,oP],Ei:[uS,90,8h],DP:[b8,3V,fL],Dl:[b8,3V,fL],Dd:[1O,6Y,6Y],D4:[0,1O,g0],Dc:[70,om,oM],yc:[ex,oM,pt],Du:[0,3V,3V],Dx:[op,rP,op],Ey:[1O,99,71],Ex:[64,eK,m8],EB:[ap,om,ap],EJ:[8S,go,rQ],EF:[1O,1O,1O],EZ:[8S,8S,8S],F0:[1O,1O,0],Fd:[rM,8h,50]};b.2n=d},{}],4:[1a(b,c,d){1a e(a,b){1d c=x++;if(b=b||{},b.gd&&(r.1B.gd=!0,r.1B.5Z=aG.cQ()),b.cN="3Q"==1p b.cN?!0:b.cN,b.9J="3Q"==1p b.9J?!1:b.9J,b.cZ="3Q"==1p b.cZ?!0:b.cZ,b.c9="3Q"==1p b.c9?!1:b.c9,b.cS="3Q"==1p b.cS?nC:b.cS,b.2D="1a"==1p b.2D?b.2D:n,b.2g=!!b.2g,"ar"==1p a){if("ar"!=1p b.5e)1e 3K.g4("tS 2X be Fb e0 rK 78");1d d=1s!=b.1n?b.1n:2t.rL,e=1s!=b.1v?b.1v:2t.rH;1e u(l(a),b.5e,1J,d,e,b).2K(1a(a){1e g(a.7t.1J.4H,a,b,d,e)})}1d h=(1x 0===a?[1J.4H]:a.1i?a:[a])[0];1e h.3x(w+c,c),f(h.6i,b,h.6i.9y.rL,h.6i.9y.rH,c).2K(1a(a){1e"1a"==1p b.gY&&(r("1B.gY is Fh, 4I Fa a 3K F1 a7 2l"),b.gY(a)),a})}1a f(a,b,c,d,e){1e t(a,a,c,d,b,a.9y.rG,a.9y.rI).2K(1a(f){r("F6 Ar");1d h=w+e,i="["+h+"=\'"+e+"\']";a.pm(i).As(h);1d j=f.7t,k=j.1J.pm(i),l="1a"==1p b.rJ?3K.4y(b.rJ(j.1J)):3K.4y(!0);1e l.2K(1a(){1e g(k,f,b,c,d)})})}1a g(a,b,c,d,e){1d f=b.7t,g=1m m(f.1J),l=1m o(c,g),n=v(a),q="fM"===c.1S?d:j(f.1J),s="fM"===c.1S?e:k(f.1J),t=1m c.2D(q,s,l,c,1J),u=1m p(a,t,g,l,c);1e u.g6.2K(1a(){r("sI rK");1d d;1e d="fM"===c.1S?i(t.2l,{1n:t.2l.1n,1v:t.2l.1v,1Q:0,1y:0,x:0,y:0}):a===f.1J.2A||a===f.1J.4H||1s!=c.2l?t.2l:i(t.2l,{1n:1s!=c.1n?c.1n:n.1n,1v:1s!=c.1v?c.1v:n.1v,1Q:n.1Q,1y:n.1y,x:0,y:0}),h(b,c),d})}1a h(a,b){b.cZ&&(a.pj.aj(a),r("Af up 8E"))}1a i(a,b){1d c=1J.3z("2l"),d=1R.7b(a.1n-1,1R.5f(0,b.1y)),e=1R.7b(a.1n,1R.5f(1,b.1y+b.1n)),f=1R.7b(a.1v-1,1R.5f(0,b.1Q)),g=1R.7b(a.1v,1R.5f(1,b.1Q+b.1v));c.1n=b.1n,c.1v=b.1v;1d h=e-d,i=g-f;1e r("AY 2l at:","1y:",b.1y,"1Q:",b.1Q,"1n:",h,"1v:",i),r("AV B4 ez 1n",b.1n,"2Q 1v",b.1v,"ez x",d,"2Q y",f),c.4J("2d").9j(a,d,f,h,i,b.x,b.y,h,i),c}1a j(a){1e 1R.5f(1R.5f(a.2A.sh,a.4H.sh),1R.5f(a.2A.cH,a.4H.cH),1R.5f(a.2A.si,a.4H.si))}1a k(a){1e 1R.5f(1R.5f(a.2A.sQ,a.4H.sQ),1R.5f(a.2A.cI,a.4H.cI),1R.5f(a.2A.sR,a.4H.sR))}1a l(a){1d b=1J.3z("a");1e b.81=a,b.81=b.81,b}1d m=b("./6D"),n=b("./sP/2l"),o=b("./sS"),p=b("./sT"),q=b("./8M"),r=b("./4R"),s=b("./4L"),t=b("./gr"),u=b("./5e").pn,v=s.eL,w="1l-4I-1P",x=0;e.cb=n,e.AP=q,e.4R=r,e.4L=s;1d y="3Q"==1p 1J||"1a"!=1p 1u.3n||"1a"!=1p 1J.3z("2l").4J?1a(){1e 3K.g4("No 2l 6D")}:e;c.2n=y,"1a"==1p a&&a.eI&&a("4I",[],1a(){1e y})},{"./gr":2,"./sS":11,"./4R":13,"./8M":14,"./sT":15,"./5e":16,"./sP/2l":20,"./6D":22,"./4L":26}],5:[1a(a,b,c){1a d(a){if(1b.3a=a,e("sO 1I",a),!1b.8c||!1b.1W){e("Ay sO"),d.1g.1W=1m 9e;1d b=1b.1W;d.1g.8c=1m 3K(1a(a,c){b.8n=a,b.7v=c,b.3a=f(),b.md===!0&&a(b)})}}1d e=a("./4R"),f=a("./4L").lF;b.2n=d},{"./4R":13,"./4L":26}],6:[1a(a,b,c){1a d(a,b){1d c,d,f=1J.3z("1h"),g=1J.3z("7g"),h=1J.3z("1r"),i="C4 Cm";f.2M.oW="aY",f.2M.gg=a,f.2M.2v=b,f.2M.7w=0,f.2M.gL=0,1J.2A.4K(f),g.3a=e(),g.1n=1,g.1v=1,g.2M.7w=0,g.2M.gL=0,g.2M.sK="p5",h.2M.gg=a,h.2M.2v=b,h.2M.7w=0,h.2M.gL=0,h.4K(1J.dW(i)),f.4K(h),f.4K(g),c=g.cC-h.cC+1,f.aj(h),f.4K(1J.dW(i)),f.2M.vC="eb",g.2M.sK="3Z",d=g.cC-f.cC+1,1J.2A.aj(f),1b.p5=c,1b.p4=1,1b.ld=d}1d e=a("./4L").lF;b.2n=d},{"./4L":26}],7:[1a(a,b,c){1a d(){1b.1l={}}1d e=a("./5M");d.1g.x2=1a(a,b){1e 1x 0===1b.1l[a+"-"+b]&&(1b.1l[a+"-"+b]=1m e(a,b)),1b.1l[a+"-"+b]},b.2n=d},{"./5M":6}],8:[1a(a,b,c){1a d(b,c,d){1b.1W=1s,1b.3a=b;1d e=1b,g=f(b);1b.8c=(c?1m 3K(1a(a){"BC:ty"===b.7t.1J.C0||1s==b.7t.1J.4H?b.7t.8n=b.8n=1a(){a(b)}:a(b)}):1b.sM(d.5e,g,d)).2K(1a(b){1d c=a("./sN");1e c(b.7t.1J.4H,{1S:"fM",1n:b.1n,1v:b.1v,5e:d.5e,c9:d.c9,cZ:d.cZ,9J:d.9J,cS:d.cS/2})}).2K(1a(a){1e e.1W=a})}1d e=a("./4L"),f=e.eL,g=a("./5e").pn;d.1g.sM=1a(a,b,c){1d d=1b.3a;1e g(d.3a,a,d.6i,b.1n,b.1v,c)},b.2n=d},{"./sN":4,"./5e":16,"./4L":26}],9:[1a(a,b,c){1a d(a){1b.3a=a.1k,1b.73=[],1b.1S=1s,1b.x0=.5,1b.y0=.5,1b.x1=.5,1b.y1=.5,1b.8c=3K.4y(!0)}d.gQ={lL:1,uZ:2},d.oZ=/^\\s*(9W?\\(\\s*\\d{1,3},\\s*\\d{1,3},\\s*\\d{1,3}(?:,\\s*[0-9\\.]+)?\\s*\\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\\s+(\\d{1,3}(?:\\.\\d+)?)(%|px)?)?(?:\\s|$)/i,b.2n=d},{}],10:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1m 9e;1d c=1b;1b.eX=1s,1b.8c=1m 3K(1a(d,e){c.1W.8n=d,c.1W.7v=e,b&&(c.1W.g8="K5"),c.1W.3a=a,c.1W.md===!0&&d(c.1W)})}b.2n=d},{}],11:[1a(a,b,c){1a d(a,b){1b.e1=1s,1b.1B=a,1b.6D=b,1b.a0=1b.pg(2t.bT.81)}1d e=a("./4R"),f=a("./su"),g=a("./sr"),h=a("./sq"),i=a("./st"),j=a("./gl"),k=a("./sp"),l=a("./gj"),m=a("./sk"),n=a("./4L").fP;d.1g.sY=1a(a){1d b=[];1e a.t5(1a(a,b){4F(b.1P.6T){1U"vm":1e a.5R([{3O:[b.1P.3a],5v:"78"}]);1U"2U":1U"oC":1e a.5R([{3O:[b.1P],5v:b.1P.6T}])}1e a},[]).3P(1b.ox(b,1b.ou),1b),b},d.1g.t1=1a(a,b){1e b.oy().2E(1b.sU).3P(1b.ox(a,1b.ou),1b),a},d.1g.ox=1a(a,b){1e 1a(c){c.3O.3P(1a(d){1b.t2(a,d)||(a.ad(0,0,b.1K(1b,c)),e("Ky 1W #"+a.1i,"ar"==1p d?d.2w(0,3H):d))},1b)}},d.1g.sU=1a(a){1e"4D"!==a.5v},d.1g.ou=1a(a){if("78"===a.5v){1d b=a.3O[0];1e!1b.oR(b)||1b.6D.2U||1b.1B.9J?b.4t(/1l:1W\\/.*;7T,/i)?1m f(b.2B(/78\\([\'"]{0,}|[\'"]{0,}\\)$/gi,""),!1):1b.pf(b)||1b.1B.9J===!0||1b.oR(b)?1m f(b,!1):1b.6D.uq&&!1b.1B.9J&&1b.1B.Kx?1m f(b,!0):1b.1B.5e?1m h(b,1b.1B.5e):1m g(b):1m j(b)}1e"lE-gO"===a.5v?1m l(a):"gO"===a.5v?1m m(a):"2U"===a.5v?1m k(a.3O[0],1b.6D.2U):"oC"===a.5v?1m i(a.3O[0],1b.pf(a.3O[0].3a),1b.1B):1m g(a)},d.1g.oR=1a(a){1e"2U"===a.2w(a.1i-3).8F()||j.1g.mh(a)},d.1g.t2=1a(a,b){1e a.gc(1a(a){1e a.3a===b})},d.1g.pf=1a(a){1e 1b.pg(a)===1b.a0},d.1g.pg=1a(a){1d b=1b.e1||(1b.e1=1J.3z("a"));1e b.81=a,b.81=b.81,b.Kv+b.Ko+b.Kn},d.1g.sZ=1a(a){1e 1b.gZ(a,1b.1B.cS)["2S"](1a(){1d b=1m g(a.3a);1e b.8c.2K(1a(b){a.1W=b})})},d.1g.eZ=1a(a){1d b=1s;1e 1b.2R.gc(1a(c){1e(b=c).3a===a})?b:1s},d.1g.r0=1a(a){1e 1b.2R=a.t5(n(1b.t1,1b),1b.sY(a)),1b.2R.3P(1a(a,b){a.8c.2K(1a(){e("Jx eJ 1W #"+(b+1),a)},1a(c){e("Jz cz 1W #"+(b+1),a,c)})}),1b.g6=3K.mm(1b.2R.5l(1b.sZ,1b)),e("sI Jk 2R"),1b},d.1g.gZ=1a(a,b){1d c,d=3K.Jj([a.8c,1m 3K(1a(d,f){c=b3(1a(){e("Jm Jn cz 1W",a),f(a)},b)})]).2K(1a(a){1e sH(c),a});1e d["2S"](1a(){sH(c)}),d},b.2n=d},{"./sr":5,"./st":8,"./su":10,"./gj":12,"./4R":13,"./sq":17,"./gl":23,"./sp":24,"./4L":26,"./sk":27}],12:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S=e.gQ.lL;1d b=d.sj.7k(a.3O[0])||!e.oZ.7k(a.3O[0]);b?a.3O[0].5S(/\\s+/).tm().3P(1a(a,b){4F(a){1U"1y":1b.x0=0,1b.x1=1;2C;1U"1Q":1b.y0=0,1b.y1=1;2C;1U"1G":1b.x0=1,1b.x1=0;2C;1U"7q":1b.y0=1,1b.y1=0;2C;1U"to":1d c=1b.y0,d=1b.x0;1b.y0=1b.y1,1b.x0=1b.x1,1b.x1=d,1b.y1=c;2C;1U"4j":2C;1j:1d e=.oh*5W(a,10);if(iv(e))2C;0===b?(1b.y0=e,1b.y1=1-1b.y0):(1b.x0=e,1b.x1=1-1b.x0)}},1b):(1b.y0=0,1b.y1=1),1b.73=a.3O.9E(b?1:0).5l(1a(a){1d b=a.4t(e.oZ),c=+b[2],d=0===c?"%":b[3];1e{3q:1m f(b[1]),7x:"%"===d?c/3H:1s}}),1s===1b.73[0].7x&&(1b.73[0].7x=0),1s===1b.73[1b.73.1i-1].7x&&(1b.73[1b.73.1i-1].7x=1),1b.73.3P(1a(a,b){1s===a.7x&&1b.73.9E(b).gc(1a(c,d){1e 1s!==c.7x?(a.7x=(c.7x-1b.73[b-1].7x)/(d+1)+1b.73[b-1].7x,!0):!1},1b)},1b)}1d e=a("./iH"),f=a("./3q");d.1g=1u.3n(e.1g),d.sj=/^\\s*(?:to|1y|1G|1Q|7q|4j|\\d{1,3}(?:\\.\\d+)?%?)(?:\\s|$)/i,b.2n=d},{"./3q":3,"./iH":9}],13:[1a(a,b,c){1d d=1a(){d.1B.gd&&2t.3l&&2t.3l.4R&&LP.1g.fP.1K(2t.3l.4R,2t.3l).6R(2t.3l,[aG.cQ()-d.1B.5Z+"ms","4I:"].5R([].9E.1K(aZ,0)))};d.1B={gd:!1},b.2n=d},{}],14:[1a(a,b,c){1a d(a,b){1b.1P=a,1b.2x=b,1b.8r=1s,1b.a2=1s,1b.5y=1s,1b.3L=[],1b.9q=[],1b.eH=1s,1b.em=1s,1b.cM=1s,1b.oU={},1b.ek={},1b.ef=1s,1b.eg=1s,1b.gk=1s,1b.eQ=!1,1b.91=1s}1a e(a){1d b=a.1B[a.LZ||0];1e b?b.1w||"":""}1a f(a){if(a&&"eY"===a[1])1e a[2].5S(",").5l(1a(a){1e 5W(a.55())});if(a&&"sD"===a[1]){1d b=a[2].5S(",").5l(1a(a){1e 5W(a.55())});1e[b[0],b[1],b[4],b[5],b[12],b[13]]}}1a g(a){1e-1!==a.1t().3U("%")}1a h(a){1e a.2B("px","")}1a i(a){1e 5W(a)}1d j=a("./3q"),k=a("./4L"),l=k.eL,m=k.lD,n=k.eH;d.1g.gs=1a(a){a.em=1b.em,a.5y=1b.5y,a.a2=1b.a2,a.3L=1b.3L,a.9q=1b.9q,a.cM=1b.cM,a.ek=1b.ek,a.ef=1b.ef,a.91=1b.91},d.1g.qb=1a(){1e 1s===1b.91?1b.91=1b.sn("91"):1b.91},d.1g.vS=1a(a){1b.8r=a,a.dZ.1L(1b)},d.1g.gC=1a(){1e 1b.1P.6c===9h.gy?1b.2x.em:"4D"!==1b.2z("7j")&&"aY"!==1b.2z("oW")&&!1b.1P.m2("1l-4I-LX")&&("gB"!==1b.1P.6T||"aY"!==1b.1P.eU("1S"))},d.1g.2z=1a(a){1e 1b.cM||(1b.cM=1b.eQ?1b.2x.gw(1b.7U?":7U":":os"):1b.gw(1s)),1b.ek[a]||(1b.ek[a]=1b.cM[a])},d.1g.p0=1a(a){1d b=["ov","gt","ms","o"],c=1b.2z(a);1e 1x 0===c&&b.gc(1a(b){1e c=1b.2z(b+a.3j(0,1).9a()+a.3j(1)),1x 0!==c},1b),1x 0===c?1s:c},d.1g.gw=1a(a){1e 1b.1P.6i.9y.L4(1b.1P,a)},d.1g.7P=1a(a){1d b=2H(1b.2z(a),10);1e iv(b)?0:b},d.1g.3q=1a(a){1e 1b.oU[a]||(1b.oU[a]=1m j(1b.2z(a)))},d.1g.sn=1a(a){1d b=5W(1b.2z(a));1e iv(b)?0:b},d.1g.gf=1a(){1d a=1b.2z("gf");4F(2H(a,10)){1U KX:a="vj";2C;1U uI:a="eb"}1e a},d.1g.qr=1a(){1d a=1b.2z("3L").4t(1b.sA);1e a?{1Q:2H(a[1],10),1G:2H(a[2],10),7q:2H(a[3],10),1y:2H(a[4],10)}:1s},d.1g.oy=1a(){1e 1b.ef||(1b.ef=m(1b.2z("KT")))},d.1g.gh=1a(a,b){1d c=(1b.2z(a)||"").5S(",");1e c=c[b||0]||c[0]||"7n",c=c.55().5S(" "),1===c.1i&&(c=[c[0],g(c[0])?"7n":c[0]]),c},d.1g.tF=1a(a,b,c){1d d,e,f=1b.gh("La",c);if(g(f[0]))d=a.1n*5W(f[0])/3H;2p{if(/so|Ln/.7k(f[0])){1d h=a.1n/a.1v,i=b.1n/b.1v;1e i>h^"so"===f[0]?{1n:a.1v*i,1v:a.1v}:{1n:a.1n,1v:a.1n/i}}d=2H(f[0],10)}1e e="7n"===f[0]&&"7n"===f[1]?b.1v:"7n"===f[1]?d/b.1n*b.1v:g(f[1])?a.1v*5W(f[1])/3H:2H(f[1],10),"7n"===f[0]&&(d=e/b.1v*b.1n),{1n:d,1v:e}},d.1g.tt=1a(a,b,c,d){1d e,f,h=1b.gh("Ld",c);1e e=g(h[0])?(a.1n-(d||b).1n)*(5W(h[0])/3H):2H(h[0],10),f="7n"===h[1]?e/b.1n*b.1v:g(h[1])?(a.1v-(d||b).1v)*5W(h[1])/3H:2H(h[1],10),"7n"===h[0]&&(e=f/b.1v*b.1n),{1y:e,1Q:f}},d.1g.tw=1a(a){1e 1b.gh("Ji",a)[0]},d.1g.wL=1a(){1d a=1b.2z("Hc"),b=[];if(a&&"4D"!==a)1I(1d c=a.4t(1b.sE),d=0;c&&d0?(1b.pd=0,1b.gI(1b.az,a)):a():(1b.az.3P(1b.oH,1b),a())},1b))},1b))}1a e(a){1e a.2x&&a.2x.3L.1i}1a f(a){1e a.2B(/(\\-[a-z])/g,1a(a){1e a.9a().2B("-","")})}1a g(){}1a h(a,b,c,d){1e a.5l(1a(e,f){if(e.1n>0){1d g=b.1y,h=b.1Q,i=b.1n,j=b.1v-a[2].1n;4F(f){1U 0:j=a[0].1n,e.3O=l({c1:[g,h],c2:[g+i,h],c3:[g+i-a[1].1n,h+j],c4:[g+a[3].1n,h+j]},d[0],d[1],c.eO,c.ev,c.eT,c.e7);2C;1U 1:g=b.1y+b.1n-a[1].1n,i=a[1].1n,e.3O=l({c1:[g+i,h],c2:[g+i,h+j+a[2].1n],c3:[g,h+j],c4:[g,h+a[0].1n]},d[1],d[2],c.eT,c.e7,c.eS,c.e4);2C;1U 2:h=h+b.1v-a[2].1n,j=a[2].1n,e.3O=l({c1:[g+i,h+j],c2:[g,h+j],c3:[g+a[3].1n,h],c4:[g+i-a[3].1n,h]},d[2],d[3],c.eS,c.e4,c.eR,c.e5);2C;1U 3:i=a[3].1n,e.3O=l({c1:[g,h+j+a[2].1n],c2:[g,h],c3:[g+i,h+a[0].1n],c4:[g+i,h+j]},d[3],d[0],c.eR,c.e5,c.eO,c.ev)}}1e e})}1a i(a,b,c,d){1d e=4*((1R.I5(2)-1)/3),f=c*e,g=d*e,h=a+c,i=b+d;1e{p7:k({x:a,y:i},{x:a,y:i-g},{x:h-f,y:b},{x:h,y:b}),p6:k({x:a,y:b},{x:a+f,y:b},{x:h,y:i-g},{x:h,y:i}),oV:k({x:h,y:b},{x:h,y:b+g},{x:a+f,y:i},{x:a,y:i}),oX:k({x:h,y:i},{x:h-f,y:i},{x:a,y:b+g},{x:a,y:b})}}1a j(a,b,c){1d d=a.1y,e=a.1Q,f=a.1n,g=a.1v,h=b[0][0]f+c[3].1n?0:k-c[3].1n,l-c[0].1n).p6.9f(.5),eS:i(d+s,e+r,m,n).oV.9f(.5),e4:i(d+1R.7b(s,f-c[3].1n),e+1R.7b(r,g+c[0].1n),1R.5f(0,m-c[1].1n),n-c[2].1n).oV.9f(.5),eR:i(d,e+t,o,p).oX.9f(.5),e5:i(d+c[3].1n,e+t,1R.5f(0,o-c[3].1n),p-c[2].1n).oX.9f(.5)}}1a k(a,b,c,d){1d e=1a(a,b,c){1e{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}};1e{5Z:a,I0:b,HW:c,cj:d,9f:1a(f){1d g=e(a,b,f),h=e(b,c,f),i=e(c,d,f),j=e(g,h,f),l=e(h,i,f),m=e(j,l,f);1e[k(a,g,j,m),k(m,l,i,d)]},et:1a(a){a.1L(["qE",b.x,b.y,c.x,c.y,d.x,d.y])},p9:1a(d){d.1L(["qE",c.x,c.y,b.x,b.y,a.x,a.y])}}}1a l(a,b,c,d,e,f,g){1d h=[];1e b[0]>0||b[1]>0?(h.1L(["5o",d[1].5Z.x,d[1].5Z.y]),d[1].et(h)):h.1L(["5o",a.c1[0],a.c1[1]]),c[0]>0||c[1]>0?(h.1L(["5o",f[0].5Z.x,f[0].5Z.y]),f[0].et(h),h.1L(["5o",g[0].cj.x,g[0].cj.y]),g[0].p9(h)):(h.1L(["5o",a.c2[0],a.c2[1]]),h.1L(["5o",a.c3[0],a.c3[1]])),b[0]>0||b[1]>0?(h.1L(["5o",e[1].cj.x,e[1].cj.y]),e[1].p9(h)):h.1L(["5o",a.c4[0],a.c4[1]]),h}1a m(a,b,c,d,e,f,g){b[0]>0||b[1]>0?(a.1L(["5o",d[0].5Z.x,d[0].5Z.y]),d[0].et(a),d[1].et(a)):a.1L(["5o",f,g]),(c[0]>0||c[1]>0)&&a.1L(["5o",e[0].5Z.x,e[0].5Z.y])}1a n(a){1e a.7P("cY")<0}1a o(a){1e a.7P("cY")>0}1a p(a){1e 0===a.7P("cY")}1a q(a){1e-1!==["eu","eu-af","eu-qs"].3U(a.2z("7j"))}1a r(a){1e a 2Y V}1a s(a){1e a.1P.1l.55().1i>0}1a t(a){1e/^(eb|4D|he)$/.7k(a.2x.2z("If"))}1a u(a){1e["Ie","Ic","Ig","Es"].5l(1a(b){1d c=a.2z("e9"+b+"Ii"),d=c.5S(" ");1e d.1i<=1&&(d[1]=d[0]),d.5l(G)})}1a v(a){1e a.6c===9h.gy||a.6c===9h.eq}1a w(a){1d b=a.2z("3M"),c=-1!==["pr","Ij","gA"].3U(b)?a.2z("cY"):"7n";1e"7n"!==c}1a x(a){1e"Ik"!==a.2z("3M")}1a y(a){1e"4D"!==a.2z("Ih")}1a z(a){1e-1!==["eu-af","eu-qs"].3U(a.2z("7j"))}1a A(a){1d b=1b;1e 1a(){1e!a.6R(b,aZ)}}1a B(a){1e a.1P.6c===9h.eq}1a C(a){1e a.eQ===!0}1a D(a){1e a.1P.6c===9h.gy}1a E(a){1e 1a(b,c){1e b.7P("cY")+a.3U(b)/a.1i-(c.7P("cY")+a.3U(c)/a.1i)}}1a F(a){1e a.qb()<1}1a G(a){1e 2H(a,10)}1a H(a){1e a.1n}1a I(a){1e a.1P.6c!==9h.eq||-1===["qH","Il","Im","Is","BR","It"].3U(a.1P.6T)}1a J(a){1e[].5R.6R([],a)}1a K(a){1d b=a.3j(0,1);1e b===a.3j(a.1i-1)&&b.4t(/\'|"/)?a.3j(1,a.1i-2):a}1a L(a){1I(1d b,c=[],d=0,e=!1;a.1i;)M(a[d])===e?(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)),e=!e,d=0):d++,d>=a.1i&&(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)));1e c}1a M(a){1e-1!==[32,13,10,9,45].3U(a)}1a N(a){1e/[^\\Ir-\\Iq]/.7k(a)}1d O=a("./4R"),P=a("gx"),Q=a("./8M"),R=a("./wu"),S=a("./wA"),T=a("./wx"),U=a("./3q"),V=a("./wv"),W=a("./4L"),X=W.fP,Y=W.eL,Z=W.lD,$=W.eH;d.1g.qn=1a(){1b.cn.3P(1a(a){if(B(a)){C(a)&&a.pq(),a.5y=1b.wC(a);1d b="aY"===a.2z("9g")?[a.5y.3L]:[],c=a.qr();c&&-1!==["pr","gA"].3U(a.2z("3M"))&&b.1L([["ew",a.a2.1y+c.1y,a.a2.1Q+c.1Q,c.1G-c.1y,c.7q-c.1Q]]),a.3L=e(a)?a.2x.3L.5R(b):b,a.9q="aY"!==a.2z("9g")?a.3L.5R([a.5y.3L]):a.3L,C(a)&&a.pk()}2p D(a)&&(a.3L=e(a)?a.2x.3L:[]);C(a)||(a.a2=1s)},1b)},d.1g.gI=1a(a,b,c){c=c||aG.cQ(),1b.oH(a[1b.pd++]),a.1i===1b.pd?b():c+20>aG.cQ()?1b.gI(a,b,c):b3(X(1a(){1b.gI(a,b)},1b),0)},d.1g.r7=1a(a){1b.ot(a,"."+S.1g.pb+\':7U { 7I: "" !7m; 7j: 4D !7m; }.\'+S.1g.pa+\':os { 7I: "" !7m; 7j: 4D !7m; }\')},d.1g.r8=1a(a){1b.ot(a,"* { -ov-4O: 4D !7m; -gt-4O: 4D !7m; -o-4O: 4D !7m; 4O: 4D !7m; -ov-gF: 4D !7m; -gt-gF: 4D !7m; -o-gF: 4D !7m; gF: 4D !7m;}")},d.1g.ot=1a(a,b){1d c=a.3z("2M");c.hy=b,a.2A.4K(c)},d.1g.rl=1a(a){1d b=[[a]];if(a.1P.6c===9h.eq){1d c=1b.ok(a,":7U"),d=1b.ok(a,":os");c&&b.1L(c),d&&b.1L(d)}1e J(b)},d.1g.ok=1a(a,b){1d c=a.gw(b);if(!c||!c.7I||"4D"===c.7I||"-gt-HQ-7I"===c.7I||"4D"===c.7j)1e 1s;1I(1d d=K(c.7I),e="78"===d.3j(0,3),g=1J.3z(e?"7g":"HS"),h=1m S(g,a,b),i=c.1i-1;i>=0;i--){1d j=f(c.1H(i));g.2M[j]=c[j]}if(g.eV=S.1g.pb+" "+S.1g.pa,e)1e g.3a=Z(d)[0].3O[0],[h];1d k=1J.dW(d);1e g.4K(k),[h,1m R(k,h)]},d.1g.q1=1a(a){1e J([].2E.1K(a.1P.qQ,v).5l(1a(b){1d c=[b.6c===9h.gy?1m R(b,a):1m Q(b,a)].2E(I);1e b.6c===9h.eq&&c.1i&&"oA"!==b.qU?c[0].gC()?c.5R(1b.q1(c[0])):[]:c},1b))},d.1g.q8=1a(a,b){1d c=1m V(b,a.qb(),a.1P,a.2x);a.gs(c);1d d=b?c.m3(1b):c.2x.8r;d.8Y.1L(c),a.8r=c},d.1g.rd=1a(){1b.cn.3P(1a(a){B(a)&&(1b.vH(a)||F(a)||w(a)||1b.vM(a)||a.9G())?1b.q8(a,!0):B(a)&&(x(a)&&p(a)||z(a)||y(a))?1b.q8(a,!1):a.vS(a.2x.8r)},1b)},d.1g.vM=1a(a){1e"J5"===a.1P.6T&&a.2x.3q("gE").eW()},d.1g.vH=1a(a){1e 1s===a.2x},d.1g.pQ=1a(a){a.8Y.J7(E(a.8Y.9E(0))),a.8Y.3P(1b.pQ,1b)},d.1g.wG=1a(a){1e 1a(b,c,d){if("4D"!==a.2x.2z("wT").3j(0,4)||0!==b.55().1i){if(1b.6D.lY&&!a.2x.9G()){1d e=d.9E(0,c).8L("").1i;1e 1b.w7(a.1P,e,b.1i)}if(a.1P&&"ar"==1p a.1P.1l){1d f=a.1P.vU(b.1i),g=1b.w2(a.1P,a.2x.9G());1e a.1P=f,g}}2p(!1b.6D.lY||a.2x.9G())&&(a.1P=a.1P.vU(b.1i));1e{}}},d.1g.w2=1a(a,b){1d c=a.6i.3z("vz"),d=a.pj,e=a.qh(!0);c.4K(a.qh(!0)),d.qi(c,a);1d f=b?$(c):Y(c);1e d.qi(e,c),f},d.1g.w7=1a(a,b,c){1d d=1b.qa||(1b.qa=a.6i.ed());1e d.Jf(a,b),d.Jg(a,b+c),d.eG()},d.1g.ac=1a(a){1d b=a.8Y.2E(n),c=a.dZ.2E(B),d=c.2E(A(y)),e=d.2E(A(x)).2E(A(q)),f=c.2E(A(x)).2E(y),h=d.2E(A(x)).2E(q),i=a.8Y.5R(d.2E(x)).2E(p),j=a.dZ.2E(D).2E(s),k=a.8Y.2E(o);b.5R(e).5R(f).5R(h).5R(i).5R(j).5R(k).3P(1a(a){1b.az.1L(a),r(a)&&(1b.ac(a),1b.az.1L(1m g))},1b)},d.1g.oH=1a(a){3c{a 2Y g?1b.2D.2V.lp():D(a)?(C(a.2x)&&a.2x.pq(),1b.oz(a),C(a.2x)&&a.2x.pk()):1b.vW(a)}2S(b){if(O(b),1b.1B.2g)1D b}},d.1g.vW=1a(a){r(a)&&(1b.2D.uB(a.91),1b.2D.2V.iF(),a.9G()&&1b.2D.uD(a.vY())),"gB"===a.1P.6T&&"tO"===a.1P.1S?1b.vk(a):"gB"===a.1P.6T&&"9Z"===a.1P.1S?1b.vc(a):1b.vZ(a)},d.1g.vZ=1a(a){1d b=a.aS();1b.2D.3L(a.9q,1a(){1b.2D.u4(a,b,a.5y.5y.5l(H))},1b),1b.2D.3L(a.3L,1a(){1b.2D.oS(a.5y.5y)},1b),1b.2D.3L(a.9q,1a(){4F(a.1P.6T){1U"2U":1U"oC":1d c=1b.2R.eZ(a.1P);c?1b.2D.gv(a,b,a.5y,c):O("1E cz <"+a.1P.6T+">",a.1P);2C;1U"vm":1d d=1b.2R.eZ(a.1P.3a);d?1b.2D.gv(a,b,a.5y,d):O("1E cz <7g>",a.1P.3a);2C;1U"vl":1b.2D.gv(a,b,a.5y,{1W:a.1P});2C;1U"oL":1U"gB":1U"oA":1b.vq(a)}},1b)},d.1g.vk=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v),d={1n:c-1,1v:c-1,1Q:b.1Q,1y:b.1y},e=[3,3],f=[e,e,e,e],g=[1,1,1,1].5l(1a(a){1e{3q:1m U("#vd"),1n:a}}),i=j(d,f,g);1b.2D.3L(a.9q,1a(){1b.2D.9o(d.1y+1,d.1Q+1,d.1n-2,d.1v-2,1m U("#vb")),1b.2D.oS(h(g,d,i,f)),a.1P.vf&&(1b.2D.5M(1m U("#vg"),"eb","eb","vj",c-3+"px","IH"),1b.2D.1w("✔",d.1y+c/6,d.1Q+c-1))},1b)},d.1g.vc=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v)-2;1b.2D.3L(a.9q,1a(){1b.2D.uN(b.1y+1,b.1Q+1,c,1m U("#vb"),1,1m U("#vd")),a.1P.vf&&1b.2D.4T(1R.eM(b.1y+c/4)+1,1R.eM(b.1Q+c/4)+1,1R.aN(c/2),1m U("#vg"))},1b)},d.1g.vq=1a(a){1d b=a.vr();if(b.1i>0){1d c=a.1P.6i,d=c.3z("vz"),e=["vC","54","gg","gf","2v","3q","tL","tM","tW","u5","1n","1v","HL","Gy","Gz","GC","Gx","Gw","Gs"];e.3P(1a(b){3c{d.2M[b]=a.2z(b)}2S(c){O("4I: Gt: Gv GJ in GK: "+c.aK)}});1d f=a.aS();d.2M.3M="gA",d.2M.1y=f.1y+"px",d.2M.1Q=f.1Q+"px",d.H2=b,c.2A.4K(d),1b.oz(1m R(d.bw,a)),c.2A.aj(d)}},d.1g.oz=1a(a){a.ul();1d b=P.dV.ow(a.1P.1l),c=1b.1B.GO&&!t(a)||N(a.1P.1l)?b.5l(1a(a){1e P.dV.2f([a])}):L(b),d=a.2x.gf(),e=a.2x.2z("2v"),f=a.2x.2z("gg"),g=a.2x.wL();1b.2D.5M(a.2x.3q("3q"),a.2x.2z("Gp"),a.2x.2z("Gb"),d,e,f),g.1i?1b.2D.uo(g[0].3q,g[0].wO,g[0].wE,g[0].wF):1b.2D.uh(),1b.2D.3L(a.2x.3L,1a(){c.5l(1b.wG(a),1b).3P(1a(b,d){b&&(1b.2D.1w(c[d],b.1y,b.7q),1b.wZ(a.2x,b,1b.wQ.x2(f,e)))},1b)},1b)},d.1g.wZ=1a(a,b,c){4F(a.2z("wT").5S(" ")[0]){1U"G7":1b.2D.9o(b.1y,1R.5m(b.1Q+c.p5+c.p4),b.1n,1,a.3q("3q"));2C;1U"Gf":1b.2D.9o(b.1y,1R.5m(b.1Q),b.1n,1,a.3q("3q"));2C;1U"5o-mQ":1b.2D.9o(b.1y,1R.eM(b.1Q+c.ld+c.p4),b.1n,1,a.3q("3q"))}};1d 9M={wh:[["e3",.6],["e3",.1],["e3",.1],["e3",.6]]};d.1g.wC=1a(a){1d b=a.aS(),c=u(a),d=["Gn","Go","Gl","Gk"].5l(1a(b,c){1d d=a.2z("e9"+b+"Gh"),e=a.3q("e9"+b+"Gj");"wh"===d&&e.wg()&&(e=1m U([1O,1O,1O,e.a]));1d f=9M[d]?9M[d][c]:1s;1e{1n:a.7P("e9"+b+"Hx"),3q:f?e[f[0]](f[1]):e,3O:1s}}),e=j(b,c,d);1e{3L:1b.wf(a,e,d,c,b),5y:h(d,b,e,c)}},d.1g.wf=1a(a,b,c,d,e){1d f=a.2z("9q"),g=[];4F(f){1U"7I-wn":1U"gL-wn":m(g,d[0],d[1],b.ev,b.e7,e.1y+c[3].1n,e.1Q+c[0].1n),m(g,d[1],d[2],b.e7,b.e4,e.1y+e.1n-c[1].1n,e.1Q+c[0].1n),m(g,d[2],d[3],b.e4,b.e5,e.1y+e.1n-c[1].1n,e.1Q+e.1v-c[2].1n),m(g,d[3],d[0],b.e5,b.ev,e.1y+c[3].1n,e.1Q+e.1v-c[2].1n);2C;1j:m(g,d[0],d[1],b.eO,b.eT,e.1y,e.1Q),m(g,d[1],d[2],b.eT,b.eS,e.1y+e.1n,e.1Q),m(g,d[2],d[3],b.eS,b.eR,e.1y+e.1n,e.1Q+e.1v),m(g,d[3],d[0],b.eR,b.eO,e.1y,e.1Q+e.1v)}1e g},b.2n=d},{"./3q":3,"./wx":7,"./4R":13,"./8M":14,"./wA":18,"./wv":21,"./wu":25,"./4L":26,gx:1}],16:[1a(a,b,c){1a d(a,b,c){1d d="Hp"in 1m uW;if(!b)1e 3K.g4("No 5e Hb");1d e=g(d),i=h(b,a,e);1e d?k(i):f(c,i,e).2K(1a(a){1e o(a.7I)})}1a e(a,b,c){1d d="g8"in 1m 9e,e=g(d),i=h(b,a,e);1e d?3K.4y(i):f(c,i,e).2K(1a(a){1e"1l:"+a.1S+";7T,"+a.7I})}1a f(a,b,c){1e 1m 3K(1a(d,e){1d f=a.3z("rV"),g=1a(){Hd 2t.4I.5e[c],a.2A.aj(f)};2t.4I.5e[c]=1a(a){g(),d(a)},f.3a=b,f.7v=1a(a){g(),e(a)},a.2A.4K(f)})}1a g(a){1e a?"":"H9"+aG.cQ()+"9M"+ ++p+"9M"+1R.5m(qX*1R.nW())}1a h(a,b,c){1e a+"?78="+hC(b)+(c.1i?"&H8=4I.5e."+c:"")}1a i(a){1e 1a(b){1d c,d=1m wr;3c{c=d.H5(b,"1w/2T")}2S(e){m("wr 2a lT, wt v9 to oY"),c=1J.H7.oY("");3c{c.4Y(),c.p8(b),c.44()}2S(f){m("oY p8 2a lT, wt v9 to 1J.2A.hy"),c.2A.hy=b}}1d g=c.pm("tR");if(!g||!g.81.Hk){1d h=c.3z("tR");h.81=a,c.tQ.tI(h,c.tQ.bw)}1e c}}1a j(a,b,c,e,f,g){1e 1m d(a,b,2t.1J).2K(i(a)).2K(1a(a){1e n(a,c,e,f,g,0,0)})}1d k=a("./g7"),l=a("./4L"),m=a("./4R"),n=a("./gr"),o=l.eF,p=0;c.tS=d,c.tP=e,c.pn=j},{"./gr":2,"./4R":13,"./4L":26,"./g7":28}],17:[1a(a,b,c){1a d(a,b){1d c=1J.3z("a");c.81=a,a=c.81,1b.3a=a,1b.1W=1m 9e;1d d=1b;1b.8c=1m 3K(1a(c,f){d.1W.g8="Lg",d.1W.8n=c,d.1W.7v=f,1m e(a,b,1J).2K(1a(a){d.1W.3a=a})["2S"](f)})}1d e=a("./5e").tP;b.2n=d},{"./5e":16}],18:[1a(a,b,c){1a d(a,b,c){e.1K(1b,a,b),1b.eQ=!0,1b.7U=":7U"===c}1d e=a("./8M");d.1g.gs=1a(a){d.1g.gs.1K(1b,a),a.eQ=!0,a.7U=1b.7U},d.1g=1u.3n(e.1g),d.1g.pq=1a(){1b.7U?1b.2x.1P.tI(1b.1P,1b.2x.1P.bw):1b.2x.1P.4K(1b.1P),1b.2x.1P.eV+=" "+1b.pc()},d.1g.pk=1a(){1b.1P.pj.aj(1b.1P),1b.2x.1P.eV=1b.2x.1P.eV.2B(1b.pc(),"")},d.1g.pc=1a(){1e 1b["Lr"+(1b.7U?"Ls":"Lq")]},d.1g.pb="Lm",d.1g.pa="Lo",b.2n=d},{"./8M":14}],19:[1a(a,b,c){1a d(a,b,c,d,e){1b.1n=a,1b.1v=b,1b.2R=c,1b.1B=d,1b.1J=e}1d e=a("./4R");d.1g.gv=1a(a,b,c,d){1d e=a.7P("tL"),f=a.7P("tM"),g=a.7P("tW"),h=a.7P("u5"),i=c.5y,j=b.1n-(i[1].1n+i[3].1n+e+g),k=b.1v-(i[0].1n+i[2].1n+f+h);1b.9j(d,0,0,d.1W.1n||j,d.1W.1v||k,b.1y+e+i[3].1n,b.1Q+f+i[0].1n,j,k)},d.1g.u4=1a(a,b,c){b.1v>0&&b.1n>0&&(1b.u7(a,b),1b.u1(a,b,c))},d.1g.u7=1a(a,b){1d c=a.3q("gE");c.eW()||1b.9o(b.1y,b.1Q,b.1n,b.1v,c)},d.1g.oS=1a(a){a.3P(1b.u3,1b)},d.1g.u3=1a(a){a.3q.eW()||1s===a.3O||1b.uV(a.3O,a.3q)},d.1g.u1=1a(a,b,c){1d d=a.oy();d.tm().3P(1a(d,f,g){4F(d.5v){1U"78":1d h=1b.2R.eZ(d.3O[0]);h?1b.tq(a,b,h,g.1i-(f+1),c):e("1E cz 6H-1W",d.3O[0]);2C;1U"lE-gO":1U"gO":1d i=1b.2R.eZ(d.1k);i?1b.ux(i,b,c):e("1E cz 6H-1W",d.3O[0]);2C;1U"4D":2C;1j:e("L1 6H-1W 1S",d.3O[0])}},1b)},d.1g.tq=1a(a,b,c,d,e){1d f=a.tF(b,c.1W,d),g=a.tt(b,c.1W,d,f),h=a.tw(d);4F(h){1U"5x-x":1U"5x no-5x":1b.gJ(c,g,f,b,b.1y+e[3],b.1Q+g.1Q+e[0],u9,f.1v,e);2C;1U"5x-y":1U"no-5x 5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+e[0],f.1n,u9,e);2C;1U"no-5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+g.1Q+e[0],f.1n,f.1v,e);2C;1j:1b.ln(c,g,f,{1Q:b.1Q,1y:b.1y},e[3],e[0])}},b.2n=d},{"./4R":13}],20:[1a(a,b,c){1a d(a,b){f.6R(1b,aZ),1b.2l=1b.1B.2l||1b.1J.3z("2l"),1b.1B.2l||(1b.2l.1n=a,1b.2l.1v=b),1b.2V=1b.2l.4J("2d"),1b.gG=1b.1J.3z("2l").4J("2d"),1b.2V.L3="7q",1b.nT={},h("Lt cb ez 5r",a,"x",b)}1a e(a){1e a.1i>0}1d f=a("../2D"),g=a("../gj"),h=a("../4R");d.1g=1u.3n(f.1g),d.1g.cw=1a(a){1e 1b.2V.lk="3i"==1p a&&a.uP?a.1t():a,1b.2V},d.1g.9o=1a(a,b,c,d,e){1b.cw(e).ii(a,b,c,d)},d.1g.4T=1a(a,b,c,d){1b.cw(d),1b.2V.uk(),1b.2V.M7(a+c/2,b+c/2,c/2,0,2*1R.PI,!0),1b.2V.um(),1b.2V.e2()},d.1g.uN=1a(a,b,c,d,e,f){1b.4T(a,b,c,d),1b.2V.M6=f.1t(),1b.2V.M5()},d.1g.uV=1a(a,b){1b.pV(a),1b.cw(b).e2()},d.1g.uY=1a(a){if(1s===a.eX){1b.gG.9j(a.1W,0,0);3c{1b.gG.v1(0,0,1,1),a.eX=!1}2S(b){1b.gG=1J.3z("2l").4J("2d"),a.eX=!0}}1e a.eX},d.1g.9j=1a(a,b,c,d,e,f,g,h,i){(!1b.uY(a)||1b.1B.9J)&&1b.2V.9j(a.1W,b,c,d,e,f,g,h,i)},d.1g.3L=1a(a,b,c){1b.2V.iF(),a.2E(e).3P(1a(a){1b.pV(a).3L()},1b),b.1K(c),1b.2V.lp()},d.1g.pV=1a(a){1e 1b.2V.uk(),a.3P(1a(a,b){"ew"===a[0]?1b.2V.ew.6R(1b.2V,a.9E(1)):1b.2V[0===b?"Mj":a[0]+"To"].6R(1b.2V,a.9E(1))},1b),1b.2V.um(),1b.2V},d.1g.5M=1a(a,b,c,d,e,f){1b.cw(a).5M=[b,c,d,e,f].8L(" ").5S(",")[0]},d.1g.uo=1a(a,b,c,d){1b.cA("uc",a.1t()).cA("Mg",b).cA("Md",c).cA("Me",d)},d.1g.uh=1a(){1b.cA("uc","9W(0,0,0,0)")},d.1g.uB=1a(a){1b.2V.LF=a},d.1g.uD=1a(a){1b.2V.ak(a.a0[0],a.a0[1]),1b.2V.cp.6R(1b.2V,a.eY),1b.2V.ak(-a.a0[0],-a.a0[1])},d.1g.cA=1a(a,b){1e 1b.nT[a]!==b&&(1b.nT[a]=1b.2V[a]=b),1b},d.1g.1w=1a(a,b,c){1b.2V.tU(a,b,c)},d.1g.gJ=1a(a,b,c,d,e,f,g,h,i){1d j=[["5o",1R.5m(e),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(h+f)],["5o",1R.5m(e),1R.5m(h+f)]];1b.3L([j],1a(){1b.ln(a,b,c,d,i[3],i[0])},1b)},d.1g.ln=1a(a,b,c,d,e,f){1d g=1R.5m(d.1y+b.1y+e),h=1R.5m(d.1Q+b.1Q+f);1b.cw(1b.2V.Ly(1b.uC(a,c),"5x")),1b.2V.ak(g,h),1b.2V.e2(),1b.2V.ak(-g,-h)},d.1g.ux=1a(a,b){if(a 2Y g){1d c=1b.2V.LM(b.1y+b.1n*a.x0,b.1Q+b.1v*a.y0,b.1y+b.1n*a.x1,b.1Q+b.1v*a.y1);a.73.3P(1a(a){c.LQ(a.7x,a.3q.1t())}),1b.9o(b.1y,b.1Q,b.1n,b.1v,c)}},d.1g.uC=1a(a,b){1d c=a.1W;if(c.1n===b.1n&&c.1v===b.1v)1e c;1d d,e=1J.3z("2l");1e e.1n=b.1n,e.1v=b.1v,d=e.4J("2d"),d.9j(c,0,0,c.1n,c.1v,0,0,b.1n,b.1v),e},b.2n=d},{"../gj":12,"../4R":13,"../2D":19}],21:[1a(a,b,c){1a d(a,b,c,d){e.1K(1b,c,d),1b.uA=a,1b.8Y=[],1b.dZ=[],1b.91=(1b.2x?1b.2x.8r.91:1)*b}1d e=a("./8M");d.1g=1u.3n(e.1g),d.1g.m3=1a(a){1d b=1b.2x?1b.2x.8r:1s;1e b?b.uA?b:b.m3(a):a.8r},b.2n=d},{"./8M":14}],22:[1a(a,b,c){1a d(a){1b.lY=1b.uf(a),1b.uq=1b.ue(),1b.2U=1b.ud()}d.1g.uf=1a(a){1d b,c,d,e,f=!1;1e a.ed&&(b=a.ed(),b.eG&&(c=a.3z("JI"),c.2M.1v="JH",c.2M.7j="af",a.2A.4K(c),b.JD(c),d=b.eG(),e=d.1v,ug===e&&(f=!0),a.2A.aj(c))),f},d.1g.ue=1a(){1e"3Q"!=1p(1m 9e).g8},d.1g.ud=1a(){1d a=1m 9e,b=1J.3z("2l"),c=b.4J("2d");a.3a="1l:1W/2U+eC,<2U wc=\'gV://9d.w3.wp/wq/2U\'>";3c{c.9j(a,0,0),b.eo()}2S(d){1e!1}1e!0},b.2n=d},{}],23:[1a(a,b,c){1a d(a){1b.3a=a,1b.1W=1s;1d b=1b;1b.8c=1b.mc().2K(1a(){1e b.mh(a)?3K.4y(b.ub(a)):e(a)}).2K(1a(a){1e 1m 3K(1a(c){2t.4I.2U.eB.JN(a,b.lI.1K(b,c))})})}1d e=a("./g7"),f=a("./4L").eF;d.1g.mc=1a(){1e 2t.4I.2U&&2t.4I.2U.eB?3K.4y():3K.g4(1m 1E("4I.2U.js is 2a eJ, JW 7M 2U"))},d.1g.ub=1a(a){1e/^1l:1W\\/2U\\+eC;7T,/.7k(a)?1b.eF(1b.lA(a)):1b.lA(a)},d.1g.lA=1a(a){1e a.2B(/^1l:1W\\/2U\\+eC(;7T)?,/,"")},d.1g.mh=1a(a){1e/^1l:1W\\/2U\\+eC/i.7k(a)},d.1g.lI=1a(a){1d b=1b;1e 1a(c,d){1d e=1m 2t.4I.2U.eB.JR("c");b.1W=e.uj,e.JS(d.1n).JT(d.1v).wK(2t.4I.2U.eB.JC.JB(c,d)).Jo(),a(e.uj)}},d.1g.eF=1a(a){1e"1a"==1p 2t.un?2t.un(a):f(a)},b.2n=d},{"./4L":26,"./g7":28}],24:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1s;1d c=1b;1b.8c=b?1m 3K(1a(b,d){c.1W=1m 9e,c.1W.8n=b,c.1W.7v=d,c.1W.3a="1l:1W/2U+eC,"+(1m Jl).Jr(a),c.1W.md===!0&&b(c.1W)}):1b.mc().2K(1a(){1e 1m 3K(1a(b){2t.4I.2U.eB.Js(a,c.lI.1K(c,b))})})}1d e=a("./gl");d.1g=1u.3n(e.1g),b.2n=d},{"./gl":23}],25:[1a(a,b,c){1a d(a,b){f.1K(1b,a,b)}1a e(a,b,c){1e a.1i>0?b+c.9a():1x 0}1d f=a("./8M");d.1g=1u.3n(f.1g),d.1g.ul=1a(){1b.1P.1l=1b.cp(1b.2x.2z("Jw"))},d.1g.cp=1a(a){1d b=1b.1P.1l;4F(a){1U"Jt":1e b.8F();1U"Ju":1e b.2B(/(^|\\s|:|-|\\(|\\))([a-z])/g,e);1U"Jv":1e b.9a();1j:1e b}},b.2n=d},{"./8M":14}],26:[1a(a,b,c){c.lF=1a(){1e"1l:1W/JZ;7T,Ks///Kt"},c.fP=1a(a,b){1e 1a(){1e a.6R(b,aZ)}},c.eF=1a(a){1d b,c,d,e,f,g,h,i,j="Kr+/",k=a.1i,l="";1I(b=0;k>b;b+=4)c=j.3U(a[b]),d=j.3U(a[b+1]),e=j.3U(a[b+2]),f=j.3U(a[b+3]),g=c<<2|d>>4,h=(15&d)<<4|e>>2,i=(3&e)<<6|f,l+=64===e?2o.56(g):64===f||-1===f?2o.56(g,h):2o.56(g,h,i);1e l},c.eL=1a(a){if(a.eG){1d b=a.eG(),c=1s==a.cH?b.1n:a.cH;1e{1Q:b.1Q,7q:b.7q||b.1Q+b.1v,1G:b.1y+c,1y:b.1y,1n:c,1v:1s==a.cI?b.1v:a.cI}}1e{}},c.eH=1a(a){1d b=a.uG?c.eH(a.uG):{1Q:0,1y:0};1e{1Q:a.cC+b.1Q,7q:a.cC+a.cI+b.1Q,1G:a.v0+b.1y+a.cH,1y:a.v0+b.1y,1n:a.cH,1v:a.cI}},c.lD=1a(a){1d b,c,d,e,f,g,h,i=" \\r\\n ",j=[],k=0,l=0,m=1a(){b&&(\'"\'===c.3j(0,1)&&(c=c.3j(1,c.1i-2)),c&&h.1L(c),"-"===b.3j(0,1)&&(e=b.3U("-",1)+1)>0&&(d=b.3j(0,e),b=b.3j(e)),j.1L({KD:d,5v:b.8F(),1k:f,3O:h,1W:1s})),h=[],b=d=c=f=""};1e h=[],b=d=c=f="",a.5S("").3P(1a(a){if(!(0===k&&i.3U(a)>-1)){4F(a){1U\'"\':g?g===a&&(g=1s):g=a;2C;1U"(":if(g)2C;if(0===k)1e k=1,1x(f+=a);l++;2C;1U")":if(g)2C;if(1===k){if(0===l)1e k=0,f+=a,1x m();l--}2C;1U",":if(g)2C;if(0===k)1e 1x m();if(1===k&&0===l&&!b.4t(/^78$/i))1e h.1L(c),c="",1x(f+=a)}f+=a,0===k?b+=a:c+=a}}),m(),j}},{}],27:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S="lE"===a.3O[0]?e.gQ.lL:e.gQ.uZ}1d e=a("./iH");d.1g=1u.3n(e.1g),b.2n=d},{"./iH":9}],28:[1a(a,b,c){1a d(a){1e 1m 3K(1a(b,c){1d d=1m uW;d.4Y("ro",a),d.8n=1a(){eE===d.1Z?b(d.Km):c(1m 1E(d.rh))},d.7v=1a(){c(1m 1E("dM 1E"))},d.Kl()})}b.2n=d},{}]},{},[4])(4)}),!1a(a,b){"3i"==1p 2n&&"3i"==1p 4i?4i.2n=b():"1a"==1p cG&&cG.eI?cG("2k-5g",[],b):"3i"==1p 2n?2n["2k-5g"]=b():a["2k-5g"]=b()}(1b,1a(){1e 1a(a){1a b(d){if(c[d])1e c[d].2n;1d e=c[d]={2n:{},id:d,eJ:!1};1e a[d].1K(e.2n,e,e.2n,b),e.eJ=!0,e.2n}1d c={};1e b.m=a,b.c=c,b.p="",b(0)}([1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(43),f=d(e);b["1j"]=2k.4i("2k-5g",[]).wl("K6",f["1j"]),a.2n=b["1j"]},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a e(a,b){c(1b,e),1b.1l=a,1b.1w=b.1w||a,1b.1B=b};b["1j"]=d},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(){c(1b,a),1b.tB="7l",1b.ts="7l",1b.tC="b1",1b.uX=["K7","K4","G4","K0","K1","K2","K8","K9","Kg","Kj"],1b.v2=["Kk","Kf","Ke","Kb","Kc","Kd","Ml","F2","Au","At"],1b.v7=["Ae","Aj","Ak","B0","B1","AK","Az","AA","AB","AJ"]}1e a.1g.2f=1a(a,b,c){1d d="";c=c||"";1I(1d e=0;ec;c++)a="0"+a;1e a}1u.2y(b,"1F",{1k:!0});1d i=c(1),j=d(i),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1I(1d a="v6",b=0;b<1b.1l.1i;b++){1d c=2H(1b.1l[b]),d=c.1t(2);d=h(d,4-d.1i);1I(1d e=0;e=eE)d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):3H===d?c=1b.bb(a,b+1):98===d?(a[0]=a[0]>95?a[0]-96:a[0],c=1b.aW(a,b+1)):c=1b.aW(a,b+1);2p{1d e=a[0];d=32>e?e+64:e-32,a.9T(),c=1b.aW(a,b+1)}1d f=1b.b5(d),g=d*b;1e{3o:f+c.3o,7e:g+c.7e}},b.1g.bb=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):7l===d?c=1b.aW(a,b+1):98===d?(a[0]=a[0]<32?a[0]+96:a[0],c=1b.bb(a,b+1)):c=1b.bb(a,b+1)):(d=a[0]-32,a.9T(),c=1b.bb(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b.1g.cD=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),c=3H===d?1b.bb(a,b+1):7l===d?1b.aW(a,b+1):1b.cD(a,b+1)):(d=10*(a[0]-48)+a[1]-48,a.9T(),a.9T(),c=1b.cD(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b}(i["1j"]),k=1a(a){1a b(){e(1b,b);1d c=f(1b,a.1K(1b));1e c.1C="Aw",c.aK="me Av tV 2a 5Z ez a 5Z dS.",c}1e g(b,a),b}(1E);b["1j"]=j},1a(a,b){"2r 2g";1a c(a){1I(1d b=0,c=0;c0?b.2v+b.6M:0)+b.7s+b.bn}1a f(a,b,c){if(c.53&&a>b){if("4j"==c.54)1e 1R.aN((a-b)/2);if("1y"==c.54)1e 0;if("1G"==c.54)1e 1R.aN(a-b)}1e 0}1a g(a,b,c){1I(1d d=0;db&&(b=a[c].1v);1e b}1a j(a,b,c){1d d;d="3Q"==1p c?1J.3z("2l").4J("2d"):c,d.5M=b.cX+" "+b.2v+"px "+b.5M;1d e=d.Ag(a).1n;1e e}1u.2y(b,"1F",{1k:!0}),b.hP=b.it=b.ua=b.uQ=b.hO=1x 0;1d k=c(6),l=d(k);b.hO=i,b.uQ=e,b.ua=f,b.it=g,b.hP=h},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){z.1g[b]=z.1g[b.9a()]=z.1g[b.8F()]=1a(c,d){1d e=1b;1e e.lV.m1(1a(){1d g=l["1j"](e.8D,d);g=t["1j"](g);1d h=a[b],i=f(c,h,g);1e e.ey.1L(i),e})}}1a f(a,b,c){a=""+a;1d d=1m b(a,c);if(!d.2L())1D 1m w.ik(d.49.1C,a);1d e=d.2f();e=n["1j"](e);1I(1d f=0;f=2?2o.56(ex)+k(a):c>d?2o.56(m8)+i(a):2o.56(i3)+j(a),b=b.2B(/[\\tv\\tz]([^])[\\tv\\tz]/,1a(a,b){1e 2o.56(tA)+b})}1a i(a){1d b=a.4t(/^([\\b2-\\eA\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\b2-\\eA\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(8h)+j(a.2w(c[0].1i))}1a j(a){1d b=a.4t(/^([\\cE-\\b6\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\cE-\\b6\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(eD)+i(a.2w(c[0].1i))}1a k(a){1d b=a.4t(/^(\\5q*[0-9]{2}\\5q*)+/)[0],c=b.1i;if(c===a.1i)1e a;a=a.2w(c);1d d=a.4t(/^[\\b2-\\eA\\7d-\\5q]*/)[0].1i,e=a.4t(/^[\\cE-\\b6\\7d-\\5q]*/)[0].1i;1e d>=e?b+2o.56(eD)+i(a):b+2o.56(8h)+j(a)}1u.2y(b,"1F",{1k:!0});1d l=c(4),m=d(l),n=1a(a){1a b(c,d){if(e(1b,b),-1!==c.2N(/^[\\b2-\\b6\\7d-\\tE]+$/))1d g=f(1b,a.1K(1b,h(c),d));2p 1d g=f(1b,a.1K(1b,c,d));1e f(g)}1e g(b,a),b}(m["1j"]);b["1j"]=n},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.hZ=b.hW=b.hV=b.by=1x 0;1d e=c(15),f=d(e),g=c(12),h=d(g),i=c(13),j=d(i),k=c(14),l=d(k);b.by=f["1j"],b.hV=h["1j"],b.hW=j["1j"],b.hZ=l["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1e i(k(a))}1a i(a){1e q[a].1t(2)}1a j(a){1e p[a]}1a k(a){1e p.3U(a)}1a l(a){1I(1d b=0,c=0;cb;b+=2)c+=2H(a[b]);1I(b=1;12>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{12}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e!d.mf&&d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g.i9=d.i9,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{13}$/)&&1b.1l[12]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.mg=1a(){1e["td","FB","FC","Fz","Fy","Fv","Fw","Fx","Ew","Ev"]},b.1g.hT=1a(){1d a=1m j["1j"],b=[],c=1b.mg()[1b.1l[0]],d=1b.1l.3j(1,6),e=1b.1l.3j(7,6);1e 1b.1B.53&&b.1L({1l:"Dv",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),b.1L({1l:a.2f(d,c),1w:1b.1w.3j(1,6),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(e,"m7"),1w:1b.1w.3j(7,6),1B:{2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),1b.1B.i9&&1b.1B.53&&(b.1L({1l:"bX"}),b.1L({1l:"Dw",1w:1b.1B.i9,1B:{2v:1b.2v}})),b},b.1g.hU=1a(){1d a=1m j["1j"],b="",c=1b.mg()[1b.1l[0]];1e b+="7l",b+=a.2f(1b.1l.3j(1,6),c),b+="b1",b+=a.2f(1b.1l.3j(7,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["LL","LG","GL","GG"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{2}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.ia[2H(1b.1l)%4],c="tD";1e c+=a.2f(1b.1l,b,"oh"),{1l:c,1w:1b.1w}},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["Dt","Dq","Dr","Ds","Dy","Dz","DH","DI","DL","DF"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{5}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.7e(),c="tD";1e c+=a.2f(1b.1l,1b.ia[b],"oh"),{1l:c,1w:1b.1w}},b.1g.7e=1a(){1d a=0;1e a+=3*2H(1b.1l[0]),a+=9*2H(1b.1l[1]),a+=3*2H(1b.1l[2]),a+=9*2H(1b.1l[3]),a+=3*2H(1b.1l[4]),a%10},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=0;7>b;b+=2)c+=3*2H(a[b]);1I(b=1;7>b;b+=2)c+=2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){1e e(1b,b),-1!==c.2N(/^[0-9]{7}$/)&&(c+=h(c)),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{8}$/)&&1b.1l[7]==h(1b.1l)},b.1g.2f=1a(){1d a=1m j["1j"],b="",c=1b.1l.3j(0,4),d=1b.1l.3j(4,4);1e b+=a.tB,b+=a.2f(c,"Dp"),b+=a.tC,b+=a.2f(d,"Da"),b+=a.ts,{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=1;11>b;b+=2)c+=2H(a[b]);1I(b=0;11>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{11}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.53=d.53,d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{12}$/)&&1b.1l[11]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.hU=1a(){1d a=1m j["1j"],b="";1e b+="7l",b+=a.2f(1b.1l.3j(0,6),"td"),b+="b1",b+=a.2f(1b.1l.3j(6,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b.1g.hT=1a(){1d a=1m j["1j"],b=[];1e 1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l"+a.2f(1b.1l[0],"L"),1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(1,5),"D2"),1w:1b.1w.3j(1,5),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(6,5),"D3"),1w:1b.1w.3j(6,5),1B:{2v:1b.2v}}),b.1L({1l:a.2f(1b.1l[11],"R")+"7l",1B:{1v:1b.aB}}),1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(11,1),1B:{54:"1G",2v:1b.2v}}),b},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.er=b.ih=b.ig=b.hX=b.hY=1x 0;1d e=c(18),f=d(e),g=c(21),h=d(g),i=c(20),j=d(i),k=c(19),l=d(k),m=c(22),n=d(m);b.hY=f["1j"],b.hX=h["1j"],b.ig=j["1j"],b.ih=l["1j"],b.er=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iw=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1e{1l:"De",1w:1b.1w}},b.1g.2L=1a(){1e!0},b}(i["1j"]);b.iw=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1I(1d b=0,c=0;13>c;c++)b+=2H(a[c])*(3-c%2*2);1e 10*1R.eM(b/10)-b}1u.2y(b,"1F",{1k:!0}),b.iA=1x 0;1d i=c(1),j=d(i),k=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{13}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{14}$/)&&1b.1l[13]==h(1b.1l)},b.1g.2f=1a(){1I(1d a="tG",b=0;14>b;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(j["1j"]);b.iA=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iy=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^([0-9]{2})+$/)},b.1g.2f=1a(){1I(1d a="tG",b=0;b<1b.1l.1i;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(i["1j"]);b.iy=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.eN(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.eN(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.lX(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.lX(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.iE=b.iG=b.iC=b.iB=b.ix=1x 0;1d e=c(3),f=d(e),g=c(27),h=d(g),i=c(29),j=d(i),k=c(28),l=d(k),m=c(30),n=d(m);b.ix=f["1j"],b.iB=h["1j"],b.iC=j["1j"],b.iG=l["1j"],b.iE=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iD=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b),0===c.2N(/^[0-9\\-\\$\\:\\.\\+\\/]+$/)&&(c="A"+c+"A");1d g=f(1b,a.1K(1b,c.9a(),d));1e g.1w=g.1B.1w||g.1w.2B(/[A-D]/g,""),g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[A-D][0-9\\-\\$\\:\\.\\+\\/]+[A-D]$/)},b.1g.2f=1a(){1I(1d a=[],b=1b.tY(),c=0;c<1b.1l.1i;c++)a.1L(b[1b.1l.Ek(c)]),c!==1b.1l.1i-1&&a.1L("0");1e{1w:1b.1w,1l:a.8L("")}},b.1g.tY=1a(){1e{0:"Et",1:"Eu",2:"Er",3:"Eq",4:"Em",5:"Eo",6:"Ep",7:"Ea",8:"E9",9:"DV","-":"DW",$:"DX",":":"DU","/":"DT",".":"DQ","+":"DR",A:"DS",B:"DY",C:"E0",D:"E6"}},b}(i["1j"]);b.iD=j},1a(a,b,c){"2r 2g";1u.2y(b,"1F",{1k:!0});1d d=c(17),e=c(16),f=c(23),g=c(25),h=c(26),i=c(31),j=c(34),k=c(32),l=c(24);b["1j"]={hR:d.hR,by:e.by,hV:e.hV,hW:e.hW,hZ:e.hZ,hY:f.hY,hX:f.hX,ig:f.ig,ih:f.ih,er:f.er,iA:g.iA,iy:h.iy,ix:i.ix,iB:i.iB,iC:i.iC,iG:i.iG,iE:i.iE,im:j.im,iD:k.iD,iw:l.iw}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.im=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.3B=2H(c,10),g}1e g(b,a),b.1g.2f=1a(){1I(1d a=1b.3B,b="";!iv(a)&&0!=a;)a%2===0?(b="Vk"+b,a=(a-2)/2):(b="3H"+b,a=(a-1)/2);1e b=b.9E(0,-2),{1l:b,1w:1b.1w}},b.1g.2L=1a(){1e 1b.3B>=3&&1b.3B<=V6},b}(i["1j"]);b.im=j},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(b){c(1b,a),1b.aX=b}1e a.1g.u8=1a(a){if("ik"!==a.1C)1D a;if(1b.aX.8D.2L===1b.aX.u2.2L)1D a.aK;1b.aX.8D.2L(!1),1b.aX.7M=1a(){}},a.1g.m1=1a(a){3c{1d b=a.6R(1x 0,aZ);1e 1b.aX.8D.2L(!0),b}2S(a){1e 1b.u8(a),1b.aX}},a}();b["1j"]=d},1a(a,b){"2r 2g";1a c(a){1e a.7s=a.7s||a.7w,a.bn=a.bn||a.7w,a.9V=a.9V||a.7w,a.8J=a.8J||a.7w,a}1u.2y(b,"1F",{1k:!0}),b["1j"]=c},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){1d b={};1I(1d c in i["1j"])i["1j"].9v(c)&&(a.m2("m5-"+c.8F())&&(b[c]=a.eU("m5-"+c.8F())),a.m2("1l-"+c.8F())&&(b[c]=a.eU("1l-"+c.8F())));1e b.1k=a.eU("m5-1k")||a.eU("1l-1k"),b=g["1j"](b)}1u.2y(b,"1F",{1k:!0});1d f=c(8),g=d(f),h=c(9),i=d(h);b["1j"]=e},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){if("ar"==1p a)1e f(a);if(bf.cK(a)){1I(1d b=[],c=0;c0?(e=0,c.54="1y"):"1G"==a.54?(e=b.1n-1,c.54="1G"):(e=b.1n/2,c.54="4j"),c.tU(b.1w,e,f)}},a.1g.tT=1a(a){1d b=1b.2l.4J("2d");b.ak(a.1n,0)},a.1g.v8=1a(){1d a=1b.2l.4J("2d");a.lp()},a}();b["1j"]=i},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(40),f=d(e),g=c(42),h=d(g);b["1j"]={cb:f["1j"],ws:h["1j"]}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b,c){1d d=1J.ly(l,"g");1e d.3x("cp","ak("+a+", "+b+")"),c.4K(d),d}1a g(a,b){a.3x("2M","e2:"+b.es+";")}1a h(a,b,c,d,e){1d f=1J.ly(l,"ew");1e f.3x("x",a),f.3x("y",b),f.3x("1n",c),f.3x("1v",d),e.4K(f),f}1u.2y(b,"1F",{1k:!0});1d i=c(6),j=d(i),k=c(10),l="gV://9d.w3.wp/wq/2U",m=1a(){1a a(b,c,d){e(1b,a),1b.2U=b,1b.4V=c,1b.1B=d}1e a.1g.7M=1a(){1d a=1b.1B.8J;1b.wz();1I(1d b=0;b<1b.4V.1i;b++){1d c=1b.4V[b],d=j["1j"](1b.1B,c.1B),e=f(a,d.7s,1b.2U);g(e,d),1b.wy(e,d,c),1b.ww(e,d,c),a+=c.1n}},a.1g.wz=1a(){1I(;1b.2U.bw;)1b.2U.aj(1b.2U.bw);k.it(1b.4V,1b.1B);1d a=k.hP(1b.4V),b=k.hO(1b.4V),c=a+1b.1B.8J+1b.1B.9V;1b.wd(c,b),1b.1B.6H&&h(0,0,c,b,1b.2U).3x("2M","e2:"+1b.1B.6H+";")},a.1g.wy=1a(a,b,c){1d d,e=c.1l;d="1Q"==b.bo?b.2v+b.6M:0;1I(1d f=0,g=0,i=0;i0&&(h(g-b.1n*f,d,b.1n*f,b.1v,a),f=0);f>0&&h(g-b.1n*(f-1),d,b.1n*f,b.1v,a)},a.1g.ww=1a(a,b,c){1d d=1J.ly(l,"1w");if(b.53){1d e,f;d.3x("2M","5M:"+b.cX+" "+b.2v+"px "+b.5M),f="1Q"==b.bo?b.2v-b.6M:b.1v+b.6M+b.2v,"1y"==b.54||c.dX>0?(e=0,d.3x("1w-lj","5Z")):"1G"==b.54?(e=c.1n-1,d.3x("1w-lj","cj")):(e=c.1n/2,d.3x("1w-lj","ld")),d.3x("x",e),d.3x("y",f),d.4K(1J.dW(c.1w)),a.4K(d)}},a.1g.wd=1a(a,b){1d c=1b.2U;c.3x("1n",a+"px"),c.3x("1v",b+"px"),c.3x("x","he"),c.3x("y","he"),c.3x("U3","0 0 "+a+" "+b),c.3x("wc",l),c.3x("pl","1.1"),c.2M.cp="ak(0,0)"},a}();b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(11),f=d(e);b["1j"]=1a(){"U4";1e{2B:!0,wk:"E",dY:"U5",5O:{wb:"@",wa:"@?",cm:"="},Ub:"",e1:1a(a,b,c,d){1d e=1a(){1d b=a.wa||"5g",c="";4F(a.wb){1U"2U":c=\'<2U 1f="\'+b+\'">\';2C;1U"7g":c=\'<7g 1f="\'+b+\'">\';2C;1U"2l":c=\'<2l 1f="\'+b+\'">\';2C;1j:c=\'<7g 1f="\'+b+\'">\'}1e c},g={9l:"by",es:"#nw",1n:2,1v:3H,53:!1,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:10,7s:10,bn:10,8J:10,9V:10,2L:1a(){1e!0}},h=1a(a){1e 1u.wm(g).3P(1a(b){a.9v(b)?a[b]=a[b]||g[b]:a[b]=g[b]}),a},i=1a(a){1d c=2k.5b(e()),g=d.$U6||"",h=f["1j"](c[0],g,a);1e 2k.3P(b.dZ(),1a(a){1e a.U8()}),b.TQ(c),h};i(h(a.9v("cm")&&"3Q"!=1p a.cm?a.cm:g)),a.$9L("cm",1a(a){i(a)},!0),d.$7M=1a(){i(a.cm)}}}},a.2n=b["1j"]}])}),2k.4i("5j",["Tm","Tl","Tg","ab-7T","ng.oa","ui.Ts","Tt","e8-4F","2k-5g","oe","2k.2z.TB","TE.wj","TI.Tz"]).wl("jD",["$66",1a(a){1e{wk:"A",e1:1a(b,c,d){c.on("Tx",1a(){a.wJ()})}}}]).hq("wi",1a(){1e{mK:1a(a){1e a.gZ=nC,a}}}).Ue(["$Uf","$UI",1a(a,b){a.e0("/",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/9p",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/6O",{4P:"3m/6O.2T",3p:"vp",hc:"6O"}).e0("/7r",{4P:"3m/7r.2T",3p:"zw",hc:"7r"}).UH({UF:"/"}),b.UC.1L("wi")}]).kC(["$66","$bT","$gV","7T","o9","oa","$2E","n5","UE","oe","$hs","wj","$w0","1N","$Wo",1a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){1a p(){a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.nr=a.3A+"4C/3o.4W"}UN.UU(1J.2A),a.nI=1a(a,b){a&&b3(1a(){a.UV=b,a.UT=b},0)},2o.1g.hv=1a(a,b,c){1e 1b.2B(1m wB(a.2B(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"gi":"g"),"ar"==1p b?b.2B(/\\$/g,"$$$$"):b)},a.hd=1a(a,b){1d c=1m wB(a,"g"),d=c.UB(b);1e d},a.hm=1a(b){1d c=/^[a-zA-og-9.!#$%&’*+\\/=?^9M`{|}~-]+@[a-zA-og-9-]+(?:\\.[a-zA-og-9-]+)*$/i,d={};1e d.1Z=!0,d.8m=1x 0,b&&d.1Z&&!c.7k(b)&&(d.8m=n[a.1c.1M].6C,d.1Z=!1),d},a.hl=1a(b,c){1d d=/^[^a-z]*$/i,e={};if(e.1Z=!0,e.8m=1x 0,b&&c&&e.1Z)3c{e.1Z=2t.Un.Uk(b,c),e.8m=n[a.1c.1M].5P}2S(f){e.8m=f,""===f&&(e.8m=n[a.1c.1M].5P),e.1Z=!1}1e b&&e.1Z&&!d.7k(b)&&(e.8m=n[a.1c.1M].5P,e.1Z=!1),e},a.h9=!0,a.1q=!1,a.w9="3.12.",a.h9||(a.1q=!0),a.wV="fQ://9d.Ug.hE.my/",a.np="fQ://qM.bm.hE/",a.nm="fQ://Ui.bm.co.id/",a.ns="fQ://9P.bm.hE/",a.3A=a.wV,a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.dH="",a.6F="",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.bJ="",a.rY="XI://",a.mW="XN://",a.hk="XM://",a.Xt="Xv://",a.Xw="XA://",a.bz="XP://",a.vV="Xy://",a.nr=a.3A+"4C/3o.4W",a.vt="XO.do",a.vy="Y6/8W/ec/Y5",a.vx="Y4.do",a.nN=!1,a.bI=!0,a.77=[],a.5L=0,a.nM=!1,a.al=!1,a.wD=!1,a.5F=1x 0,a.rC=nC,a.hA=Y2,a.n4=0,a.ne=!1,a.ai=!1,a.2P=1a(){1d a={};1e a.6j=n.3l.6j,a.6k=n.3l.6k,a.6p=n.3l.6p,a.6v=n.3l.6v,a.6X=n.3l.6X,a.6s=n.3l.6s,a.6I=n.3l.6I,a.6G=n.3l.6G,a.5E=n.3l.5E,a.6L=n.3l.6L,a.6r=n.3l.6r,a.6A=n.3l.6A,a.6B=n.3l.6B,a.6x=n.3l.6x,a.6u=n.3l.6u,a.6b=n.3l.6b,a.6Q=n.3l.6Q,a.6K=n.3l.6K,a.6t=n.3l.6t,a.5N=n.3l.5N,a.6h=n.3l.6h,a.6Z=n.3l.6Z,a.5C=n.3l.5C,a.6m=n.3l.6m,a},a.1c={3E:"",3D:"",1T:"",2J:"",3h:"",2i:"",bv:"",3F:"4B",3g:"MY",2F:"",4z:!0,vw:!1,2b:"",9H:!0,4o:"",3I:"",3t:"",3r:"",5c:"",hr:"0",eP:!1,XT:"",hx:"",4l:"",3J:"",7o:"",hu:"2",XW:"",cR:"",aE:"",hn:"",hF:"bm-4Q-nl-9d",Y0:!1,8C:"",5G:"",5t:"",7h:"",bh:"",bj:"",5k:"",3w:!0,6o:"MY",ci:"bW",6d:"",8U:"",bt:"",oK:"",ht:"1",5d:"",6a:"",4m:"",lx:"",au:"",hH:!0,nX:"",6N:"vu",8O:"0",c0:!1,ep:!1,nB:"",bg:"",bl:"",w1:"",nz:"",bS:"",t4:"",fC:"",fl:"",nK:!1,4Z:!1,4M:!1,fe:!1,cJ:!1,cW:!1,1M:"EN",ff:"",fG:"",jI:!1,jH:!1,jE:!1,jF:!1,wH:!1,nn:!1},!a.h9,a.1c.1M&&(a.1c.1M=2o(a.1c.1M).9a()),a.XX=n[a.1c.1M].6J,a.XY=n[a.1c.1M].7u,a.Xz=n[a.1c.1M].6e,a.$9L("1c.6o",1a(){1d b=n.4E[a.1c.1M],c=[];1I(1d d in b)c.1L([d,b[d]]);1d e=c,f=g("2E")(e,a.1c.6o,!0);f.1i?a.1c.ci=f[0][1]:a.1c.6o=""}),a.$9L("1c.5t",1a(){if(a.1c.5t){1d b=2o(a.1c.5t);b=b.2B(/\\//g,"");1d c="";b.1i>4&&(b=b.2w(0,4)),1===b.1i&&(c=2H(b.2w(0,1)),c>1&&(b="")),2===b.1i&&(c=2H(b.2w(0,2)),c>12&&(b=b.2w(0,1))),b.1i>2&&(b=b.2w(0,2)+"/"+b.2w(2,b.1i)),a.1c.5t=b,a.nI(2k.5b(1J.8R("vs"))[0],b.1i),5===a.1c.5t.1i&&(a.1c.bh=a.1c.5t.2w(0,2),a.1c.bj=a.1c.5t.2w(3,5))}}),a.$9L("1c.3w",1a(){if(a.1c.3w)a.1c.8C="",a.1c.6d="",a.1c.5G="",a.1c.5t="",a.1c.7h="",a.1c.bh="",a.1c.bj="",a.1c.5k="";2p if(a.1c.6a){if(a.1c.6a.1i>0&&!a.1c.4m)if(a.1c.fC){1d b=g("2E")(a.1c.6a,a.1c.fC,!0);if(b.1i){a.1q;1d c=a.1c.6a.3U(b[0]);a.1c.4m=a.1c.6a[c]}2p a.1c.4m=a.1c.6a[0]}2p a.1c.4m=a.1c.6a[0];a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k}}),a.$9L("1c.4m",1a(){!a.1c.3w&&a.1c.4m&&(a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k)}),a.n6=1a(){1e a.hd("nD 4.1",a.1c.aE)||a.hd("nD 4.2",a.1c.aE)||a.hd("nD 4.3",a.1c.aE)?!0:!1},a.6g=1a(){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.5c||b||(c.2Z=n[a.1c.1M].8s,b=!0),a.1c.5c&&a.1c.5c.1i<5&&!b&&(c.2Z=n[a.1c.1M].6h,b=!0),"c5"!==a.1c.2b||b||(c.2Z=n[a.1c.1M].5u,b=!0),"4X"!==a.1c.2b&&"aA"!==a.1c.2b||b||(a.1c.8C&&!(a.1c.8C.1i<16)||b||(c.2Z=n[a.1c.1M].8t,b=!0),l.aT(a.1c.8C)||!a.1c.3w||b||(c.2Z=n[a.1c.1M].8q,b=!0),a.1c.5t&&!(a.1c.5t.1i<5)||b||(c.2Z=n[a.1c.1M].7O,b=!0),a.1c.5G&&!(a.1c.5G.1i<3)||b||(c.2Z=n[a.1c.1M].8w,b=!0),a.1c.7h||(a.1c.7h="o1 wR"),a.1c.bS&&!b&&a.1c.bS.1i>0&&(b=e.mt(a.1c.8C))),"cq"!==a.1c.2b||b||(a.1c.8U&&!(a.1c.8U.1i<10)||b||(c.2Z=n[a.1c.1M].7F,b=!0),a.1c.bt||b||(c.2Z=n[a.1c.1M].7C,b=!0)),b){1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){},1a(){2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1,a.1c.fe=!1,m.oc()})}2p a.1c.nK?e.t3():a.1c.wH?e.qm():e.qw()},a.WG=1a(a){1d b,c;1J.ed?(b=1J.ed(),b.WQ(a),b.x7(!1),c=2t.WP(),c.WO(),c.WM(b)):1J.WN&&(b=1J.2A.WD(),b.WC(a),b.x7(!1),b.hS())},a.$9L("1c.6d",1a(){if(a.1c.6d){1d b=2o(a.1c.6d);if(b=b.2B(/ /g,""),6===b.1i&&a.1c.8O&&"1"===a.1c.8O&&e.sv(b),6===b.1i&&a.1c.bS&&a.1c.bS.1i>0){1d c=e.mt(b);c&&(a.1c.6d="")}b.1i>16&&(b=b.2w(0,16)),a.n6()||(b.1i>4&&b.1i<=8?b=b.2w(0,4)+" "+b.2w(4,b.1i):b.1i>8&&b.1i<=12?b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,b.1i):b.1i>12&&b.1i<16&&(b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,b.1i))),16===b.1i&&(a.1c.8C=b,b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,16)),b&&(a.1c.6d=b,a.nI(2k.5b(1J.8R("vv"))[0],b.1i))}}),a.$9L("1c.5G",1a(){if(a.1c.5G){1d b=2o(a.1c.5G);b.1i>4&&(b=b.2w(0,4)),a.1c.5G=b}}),a.$9L("5L",1a(){a.1c.4Z||(a.1q,a.5L>0?(a.1q,a.nN=!0):0===a.5L&&a.al&&(a.1q,a.nN=!1,a.wD=!0,a.o0()))}),a.o0=1a(){a.1q,a.1c.fe&&!a.nM?(a.nM=!0,a.6g()):a.1c.fe||(a.1q,2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1)},a.wJ=1a(){if(!a.1c.6a&&a.1c.3I&&a.1c.3t&&a.1c.3r){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(b){a.1c.6a=1x 0;1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){m.oc()},1a(){})}2p e.mD()}},a.hb=1a(b){a.1q,i.wK(b)},a.wM=1a(b){1d c=!1,d=n.4E[a.1c.1M],e=[];1I(1d f in d)e.1L([f,d[f]]);1d h=e,i=g("2E")(h,b,!0);1e i.1i&&(c=!0),c},a.Xb=1a(b){a.1q;1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3G),c},a.z7=1a(){1d b=a.1c.2i,c=5W(b);c=3H*c,a.1c.oK=c.dU(0)},a.f5=1a(){if(a.1c.1M&&n[a.1c.1M]||(a.1c.1M="EN"),a.1c.1M=2o(a.1c.1M).9a(),o.X9(),!a.1c.3F)1e 1x h.3f({1E:a.2P().6L});3c{a.1c.3F=2o(a.1c.3F.55())}2S(b){a.1q}if(!a.1c.2i)1e 1x h.3f({1E:a.2P().5E});1d c;if("vR"===a.1c.3F||"RP"===a.1c.3F){if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2),c=g("3B")(a.1c.2i,0),a.1c.bv=2o(c).2B(/,/g,".");2p if(2k.wN(a.1c.2i)){1d i=a.1c.2i.5S(",");if(2===i.1i)c=2o(i[0]).2B(/\\./g,""),c=c+"."+i[1];2p if(1===i.1i)if("."===i[0].2w(i[0].1i-3,i[0].1i-2)){1d k=i[0].2w(0,i[0].1i-3);k=k.2B(/\\./g,"");1d l=i[0].2w(i[0].1i-2);c=k+"."+l}2p c=i[0].2B(/\\./g,"");2p if(i.1i>2)1e 1x h.3f({1E:a.2P().6m});if(c=5W(c).dU(2),a.1c.2i=c,a.1c.bv=g("3B")(a.1c.2i,0),a.1c.bv=2o(a.1c.bv).2B(/,/g,"."),!a.1c.2i)1e 1x h.3f({1E:a.2P().5E})}}2p{if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2);2p if(2k.wN(a.1c.2i)&&(c=5W(a.1c.2i).dU(2),a.1c.2i=c,!a.1c.2i))1e 1x h.3f({1E:a.2P().5E});a.1c.bv=g("3B")(a.1c.2i,2)}if(a.1c.2i){1d m=ax(a.1c.2i);if(0>=m)1e 1x h.3f({1E:a.2P().6m})}if(!a.1c.3E)1e 1x h.3f({1E:a.2P().6v});3c{a.1c.3E=2o(a.1c.3E.55())}2S(b){a.1q}if(!a.1c.3D)1e 1x h.3f({1E:a.2P().6X});3c{a.1c.3D=2o(a.1c.3D.55())}2S(b){a.1q}if(!a.1c.1T)1e 1x h.3f({1E:a.2P().6s});3c{a.1c.1T=2o(a.1c.1T.55())}2S(b){a.1q}if(!a.1c.2J)1e 1x h.3f({1E:a.2P().6I});3c{a.1c.2J=2o(a.1c.2J.55())}2S(b){a.1q}if(!a.1c.3h)1e 1x h.3f({1E:a.2P().6G});3c{a.1c.3h=2o(a.1c.3h.55())}2S(b){a.1q}if(!a.1c.3g)1e 1x h.3f({1E:a.2P().6r});3c{a.1c.3g=2o(a.1c.3g.55())}2S(b){a.1q}if(!a.wM(a.1c.3g))1e 1x h.3f({1E:a.2P().6A});if(!a.1c.2F)1e 1x h.3f({1E:a.2P().6B});3c{a.1c.2F=2o(a.1c.2F.55())}2S(b){a.1q}if((1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d q=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,q).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,q).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,q).1t()}}2S(b){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);if(1x 0===a.1c.hn&&(a.1c.hn="x"),a.1c.cR=a.w9+a.1c.hn,a.1c.aE=f.WZ.w8,a.1c.hu="2",a.1c.ht="1",1x 0===a.1c.hr&&(a.1c.hr="0"),a.1c.vw=!1,a.1c.cJ||(a.1c.cJ=!1),a.1c.cW||(a.1c.cW=!1),a.1c.8O||(a.1c.8O="0"),1x 0===a.1c.hH&&(a.1c.hH=!0),a.1c.hF||(a.1c.hF="bm-4Q-nl-9d"),a.1c.9H||(a.1c.9H=!1),a.1c.2b?"c5"===a.1c.2b&&(a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u):(a.1c.2b="c5",a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u),a.1c.4o||(a.1c.4o=!1),a.1c.3I&&a.1c.3t&&a.1c.3r&&a.1c.5c&&a.1c.3I||(a.1c.4o=!0),a.1c.3t){3c{a.1c.3t=2o(a.1c.3t.55())}2S(b){a.1q}if(a.1c.cJ&&!a.1c.4o){1d r=a.hm(a.1c.3t);if(!r.1Z)1e 1x h.3f({1E:a.2P().6K})}if(a.1c.3t.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6Z})}if(a.1c.3r){3c{a.1c.3r=2o(a.1c.3r.55())}2S(b){a.1q}if(a.1c.cW&&!a.1c.4o){1d r=a.hl(a.1c.3r,a.1c.3g);if(!r.1Z)1e 1x h.3f({1E:a.2P().6t})}if(a.1c.3r.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5C})}if(a.1c.5c){3c{a.1c.5c=2o(a.1c.5c.55())}2S(b){a.1q}if(a.1c.5c.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6h})}if(a.1c.3I){3c{a.1c.3I=2o(a.1c.3I.55())}2S(b){a.1q}if(a.1c.3I.1i<3&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5N})}1e a.1c.eP||(a.1c.eP=!1),a.1c.6o="MY",a.1c.ci="bW",a.1c.3w=!0,a.1c.4M=!1,a.1c.fl||(a.1c.fl="Wz"),a.1c.nK&&(a.1c.hx=["4X","aA"]),1x 0!==a.1c.4Z&&a.1c.4Z?a.1c.4Z&&(a.1c.6N="9r"):(a.1c.4Z=!1,a.1c.6N="vu"),"9Q"!==a.1c.3J||a.1c.4l?(a.1c.ff||(a.1c.ff=2o(2H(a.1c.ff))),a.1c.fG||(a.1c.fG=2o(2H(a.1c.fG))),a.1c.nB&&b3(1a(){a.$6R(a.hb(a.1c.nB))},0),(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl",XR.XQ(n.4E.ID)),p()),a.1c.nn&&(a.3A=a.ns,p()),1x(a.1c.3J&&"ft"===a.1c.3J?a.cU():e.rb())):1x h.3f({1E:a.2P().6x})},a.XS=1a(){1e a.1c.aE},a.vE=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].4v),c},a.vF=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3W+" "+d[0].1C),c},a.r2=1a(b){1d c="",d=g("2E")(a.1c.5d,{3G:b},!0);1e d.1i&&(c=d[0].1C),c},a.f4=1a(a,b){1e 1R.aN(1R.nW()*(b-a+1)+a)},a.fq=1a(b){1d c=!1;if(b&&b.9c&&b.5p&&b.52&&b.3e){1d d=a.1c.1T,e=a.1c.2F;if(a.1c.4z){1d f=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();e=1Y.4A.5B(a.1c.2F.1t(),f).1t(1Y.5z.5w)}1d g=d+b.9c+b.5p+b.52+b.3e+e,h=1Y.7i(g).1t();h===b.7o.1t()&&(c=!0)}1e c},2t.Yb=1a(){a.ai=!0},2t.f5=1a(b,c){a.1c={},c&&(a.nt=c),a.1q;3c{a.1c=5H.ac(b)}2S(d){a.1c=2k.vB(a.1c,b)}a.1q,a.f5()},2t.XU=1a(b){1d c=b.nA;3c{c=5H.ac(b).nA}2S(d){c=b.nA}a.1q;1d f="";c.3U(a.nr)>-1?(a.1q,a.dH=c,e.sy(),f=a.hk,a.5U(f)):(c.3U(a.vt)>-1||c.3U(a.vx)>-1||c.3U(a.vy)>-1)&&(a.1q,a.n3(),f=a.hk,a.5U(f))},a.vD=1a(){1d b=a.hk;a.5U(b)},a.nq=1a(){a.5F?a.5F.44("XG"):(a.hB(),a.vD())},2t.nq=1a(){a.nq()},a.cU=1a(){"9Q"===a.1c.3J&&a.1c.4l&&""!==a.1c.4l?a.bH():a.1c.4l&&""!==a.1c.4l?a.bH():a.hB()},2t.cU=1a(){a.cU()},2t.XB=1a(b){b&&(a.1c.3h=b),a.cU()},2t.Xp=1a(b){b&&(a.1c.4l=b),a.cU()},2t.Wt=1a(a){1d b=2o(a),c=f.h0;1e a&&"vh"===c&&(b=b.2B(/\\-/g,"+"),b=b.2B(/\\9M/g,"=")),b},2t.hb=1a(b){a.hb(b)},2t.Wy=1a(b,c){a.1c={},a.1q,c&&(a.9I=c);3c{a.1c=5H.ac(b)}2S(f){a.1c=2k.vB(a.1c,b)}if(a.1q,(1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d g=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,g).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,g).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,g).1t()}}2S(f){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl"),p()),a.1c.nn&&(a.3A=a.ns,p()),e.mF()},a.5U=1a(b){1d c=b,d=f.h0;a.1q,a.1q,a.nt?(a.nt(b),a.1q):("vh"===d&&(c=b.2B(/\\+/g,"-"),c=c.2B(/\\=/g,"9M")),a.1c.nz&&(c=a.1c.nz+c,a.1q),2t.bT=c)},a.wo=1a(){a.f5(),b.6V("/9p").2B()},a.h9||a.f5()}]),2k.4i("5j").3p("Y3",1a(){}),2k.4i("5j").3p("nv",["$5O","$66","$bT","$hs","o9","1N",1a(a,b,c,d,e,f){a.1N=f[b.1c.1M],a.r3=1a(){1d a=!1;1e b.1c.8O&&b.1c.3w&&"1"===2o(b.1c.8O)&&(b.1c.c0||(a=!0)),a},a.wW=1a(){if(!b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uu.2T",3p:"z0",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.we=1a(){if(b.1c.9H){1d c=d.4Y({4O:!0,4P:"3m/uw.2T",3p:"z6",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.vX=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uz.2T",3p:"z3",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.t7=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uE.2T",3p:"z4",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.qR=1a(){b.6g()}}]),2k.4i("5j").3p("vp",["$5O","$66","7T","1N",1a(a,b,c,d){1a e(a){1d b="Y7";if(a){1d c="Xr";b=c+a,b=b.2w(b.1i-c.1i)}1e b}1a f(a){1d c=1m 9e;c.8n=1a(){1d c=1J.3z("2l");c.1n=1b.vo,c.1v=1b.vn,c.4J("2d").9j(1b,0,0);3c{a(c.eo("1W/3C"))}2S(d){b.1q,a(1s)}},c.7v=1a(){b.1q,a(1s)},c.3a="2R/4h.3C"}1a g(a,c){1d d=1m 9e;d.8n=1a(){1d a=1J.3z("2l");a.1n=1b.vo,a.1v=1b.vn,a.4J("2d").9j(1b,0,0);3c{c(a.eo("1W/3C"))}2S(d){b.1q,f(c)}},d.7v=1a(){b.1q,f(c)},d.3a=a}a.1N=d[b.1c.1M],2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),b.bI=!1,a.bc={9l:"er",es:"#nw",1n:2,1v:60,53:!0,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:0,7s:1x 0,bn:1x 0,8J:1x 0,9V:1x 0,2L:1a(a){}},a.p3=b.vE(b.2I.3S),a.iQ=!0,a.t6=b.vF(b.2I.3S).1t(),a.8H=5H.ac(5H.8z(b.2I)),a.8H.a9=e(a.8H.a9),a.8H.5p=e(a.8H.5p),a.8H.cP=e(a.8H.cP),2t.Om=1a(){1e b.o6},a.sl=1a(){g(a.p3,1a(d){d?1J.8R("6O-iL").3a=d:a.iQ=!1,a.$6R(),2t.o7(0,0);3c{b3(1a(){4I(1J.8R("6O"),{gY:1a(a){b.o6=a.eo().2B(/^1l:1W\\/(3C|OC);7T,/,"");1d d={OD:b.o6,OB:b.1c.3h+".3C"},e=c.2f(5H.8z(d,1s,"")),f=b.vV+e;b.1q,b.5U(f)}})},50)}2S(e){b.1q}})}}]),2k.4i("5j").hq("o9",["7T","$gV","$66","$gZ","oa","n5","$bT","oe","$hs","$2E","$P4","$w0","1N",1a(a,b,c,d,e,f,g,h,i,j,k,l,m){1d n={};1e n.5J=1a(a,b){l.oc(),c.al||(c.5L=3,c.al=!0,c.1q),c.1q;1d d=1s;if(a===c.d3.1t())d=[{1C:"PB-Px",3W:"vN aU","1j":1,1Z:1,4n:["4B"],3G:"4X",3M:"1",4v:"2R/4h.3C"},{1C:"w6-Pw",3W:"w6","1j":1,1Z:1,4n:["4B"],3G:"Pu",3M:"2",4v:"2R/4h.3C"},{1C:"Pv",3W:"a8 PC","1j":1,1Z:2,4n:["RM","4B"],3G:"PD",3M:"2",4v:"2R/4h.3C"},{1C:"PV",3W:"PX","1j":1,1Z:1,4n:["4B"],3G:"PZ",3M:"3",4v:"2R/4h.3C"},{1C:"PQ-w4",3W:"dB PJ vG","1j":1,1Z:1,4n:["4B"],3G:"PO",3M:"4",4v:"2R/4h.3C"},{1C:"eh-w5",3W:"eh w5","1j":1,1Z:1,4n:["4B"],3G:"Ps",3M:"5",4v:"2R/4h.3C"},{1C:"h1-w4",3W:"h1 Pc","1j":1,1Z:1,4n:["4B"],3G:"Pd",3M:"6",4v:"2R/4h.3C"},{1C:"vK-aH",3W:"Pe","1j":0,1Z:2,4n:["4B"],3G:"aH",3M:"7",4v:"2R/4h.3C"},{1C:"vT-4w",3W:"vT 4w","1j":0,1Z:2,4n:["4B"],3G:"cq",3M:"8",4v:"2R/4h.3C"},{1C:"vK-P5",3W:"7-P6","1j":0,1Z:1,4n:["4B"],3G:"bN",3M:"9",4v:"2R/4h.3C"},{1C:"P8-Pf",3W:"Pg","1j":1,1Z:1,4n:["4B"],3G:"Pn",3M:"13",4v:"2R/4h.3C"},{1C:"Pp",3W:"Pm","1j":1,1Z:1,4n:["4B"],3G:"Pl",3M:"16",4v:"2R/4h.3C"},{1C:"PM-Pj",3W:"oO jL","1j":1,1Z:1,4n:["4B","RM","vJ","Pk","nU"],3G:"Ol",3M:"18",4v:"2R/4h.3C"},{1C:"vL",3W:"vL","1j":1,1Z:1,4n:["4B","RM","nU","Nd","vJ"],3G:"Nb",3M:"19",4v:"2R/4h.3C"},{1C:"vI-N5",3W:"vI vG","1j":1,1Z:1,4n:["4B"],3G:"N8-Nf",3M:"22",Nj:2,4v:"2R/4h.3C"},{1C:"o3",3W:"o3","1j":0,1Z:1,4n:["4B"],3G:"o3",3M:"38",4v:"2R/4h.3C"},{1C:"o2",3W:"o2","1j":0,1Z:1,4n:["4B"],3G:"o2",3M:"50",4v:"2R/4h.3C"},{1C:"Nn",3W:"Nk a8","1j":1,1Z:2,4n:["RM","4B"],3G:"Nm",3M:"57",4v:"2R/4h.3C"},{1C:"N3",3W:"vN aU","1j":0,1Z:1,4n:["nU","Mv","Ms","Mr","vR","Mo","Mp","Mq","Mw","Mx","N0","N1","4B"],3G:"aA",3M:"58",4v:"2R/4h.3C"}],f.n0(d),c.5L--;2p if(a===c.dj.1t())d=[{1C:"MJ rg MI (M) 2W"},{1C:"vQ 3v 2W"},{1C:"vQ aM 3v 2W"},{1C:"AL qI hp & Mz MB (4S) 2W"},{1C:"vO 3v 4S 2W"},{1C:"vO aM 3v 4S 2W"},{1C:"Nt (M) 2W"},{1C:"Nu 3v 2W"},{1C:"3v O7 4S 2W"},{1C:"3v O8 O9 4S 2W"},{1C:"3v rf 4S 2W"},{1C:"3v O6 4S 2W (O5)"},{1C:"3v re r5"},{1C:"eh 3v 2W"},{1C:"eh aM 3v 2W"},{1C:"O2 2W"},{1C:"O3 O4 (4S) qB ql"},{1C:"nQ Oa 4S 2W"},{1C:"nQ 3v 4S 2W"},{1C:"vP x6 3v 2W"},{1C:"vP x6 aM 3v 2W"},{1C:"Oi Oj Og 3v OF Oc (4S) 2W"},{1C:"Od Oe O1"},{1C:"nR hp 2W"},{1C:"rc aM 2W"},{1C:"sX AL-O0 3v 2W"},{1C:"sX 3v (4S) 2W"},{1C:"qF 3v 2W"},{1C:"qF aM 3v 2W"},{1C:"h1 3v 2W"},{1C:"h1 aM 3v 2W"},{1C:"qx qv 3v 4S 2W"},{1C:"qx qv Nz 2W"},{1C:"Nv Nw qB. ql."},{1C:"Ny NK 3v (4S) 2W"},{1C:"rc"},{1C:"nQ 4S"},{1C:"3v re r5"},{1C:"NV 3v 4S"},{1C:"3v rf"},{1C:"AL qI 3v 4S"},{1C:"NN 4S"}],f.n2(d),c.5L--;2p if(a===c.d5.1t())d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"},{5k:"NS",cv:"Q0",cx:"Q1",aF:"RZ",ei:"eh 3v 2W",ej:"MY",kT:"rg"}],"1"===c.1c.8O&&(d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"}]),f.n1(d),c.5L--;2p if(a===c.bY.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d j=["bM S8"],d={};d.8P=!0,d.1Z="kk",d.qD=c.1c.3h.1t(),d.fm=c.f4(qW,qV),d.bK="";1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e j}}});k.3o.2K(1a(a){},1a(a){d.3e=1x 0,d.1E=1x 0,d.4M=1x 0,a.cV&&"6g"===a.cV.1t()?f.mV(d):g.6V("/9p").2B()})}2p if(a===c.9K.1t()||a===c.bZ.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d d={},n=[];d.52=c.1c.2i.1t(),d.9m=c.f4(qX,S4),d.5p=c.f4(qW,qV),d.7y="0",n=["C6","D8"],d.9c=n[1R.aN(1R.nW()*n.1i)];1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e 1s}}});k.3o.2K(1a(a){},1a(a){if("1s"===d.3e)d.1E=1x 0,d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.nc="Rx",d.iI="mx 2a 3Y";2p if("1E"===d.3e)d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.9c=1x 0;2p{if(d.1E=1x 0,d.qK=aG.cQ(),d.Rr=c.1c.3h.1t(),d.qJ="o1 Rt on 9r 5X",d.3S=c.r2(c.1c.2b.1t()),"aH"===c.1c.2b||"bN"===c.1c.2b){d.7y=1,d.9m="",d.jm=c.1c.3F.1t();1d b=1m aG;b.RC(b.qT()+48),d.qN=b.RK(),d.3J="9Q";1d e=b.RL()+1;e.1t().1i<10&&(e="0"+e.1t());1d h=b.RI()+"-"+e+"-"+b.RH()+" "+b.qT()+":"+b.RD()+":"+b.RF();d.ee=["** aL qM 7U "+h],d.oT=c.1c.2i.1t(),d.cP=c.f4(qL,Sd),d.jo="T0 T2"}2p d.qK=1x 0,d.qJ=1x 0;"aH"!==c.1c.2b&&"bN"!==c.1c.2b||"22"===d.3e||(d.9m=1x 0,d.jm=1x 0,d.qN=1x 0,d.ee=1x 0,d.oT=1x 0,d.cP=1x 0,d.jo=1x 0)}1d i=c.1c.1T,j=c.1c.2F;if(c.1c.4z){1d k=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();j=1Y.4A.5B(c.1c.2F.1t(),k).1t(1Y.5z.5w)}1d l=i+d.9c+d.5p+d.52+d.3e+j;d.7o=1Y.7i(l).1t(),a.cV&&"6g"===a.cV.1t()?(("1s"===d.3e||"1E"===d.3e)&&(d.7o=1x 0),d.fS&&(d.7o=d.fS,d.fS=1x 0),g.6V("/7r").2B(),f.mV(d)):g.6V("/9p").2B()})}if(c.al&&0===c.5L){1d o={};o.a1=m[c.1c.1M].6U,o.2Z=m[c.1c.1M].7D;1d k=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e o}}});k.3o.2K(1a(){},1a(){});1d p=2k.5b(1J.qO("2A")).2z("1v");p&&""!==p.1t()||2k.5b(1J.qO("2A")).2z({1v:"SQ"}),c.1c.fe||2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),c.bI=!1,c.al=!1,c.1q,c.o0()}},c.8g=1a(a,d,e){if(c.1c.hH){c.1q;1d f="v=1",g="&Tc=UA-Td-7",i=c.1c.nX;2t.nZ&&!i?(i=2t.nZ.Ta("qP"),i?c.1q:(i=h.hG().1t(),2t.nZ.T7("qP",i),c.1q)):i||(i=h.hG().1t(),c.1c.nX=i,c.1q);1d j="&Sk="+i,k="&r4=4D";c.1c.1T&&(k="&r4="+c.1c.1T.1t());1d l="&t=Sj",m="&dp=nY",n="&dt=nY",o="&cd=nY",p="&an="+c.1c.hF.1t(),q="&rj=bm-4Q-nl-9d";c.1c.2J&&(q="&rj="+c.1c.2J.1t());1d r="&av="+c.1c.cR.1t(),s="&ec="+a.1t(),t="&ea="+d.1t(),u="&el="+e.1t(),v="fQ://9d.Ss-Sp.hE/Sr?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5v:"mM",78:v};b(w).2K(1a(a){c.1q},1a(a){c.1q})}},n.7i=1a(a){1e 1Y.7i(a).1t()},n.9R=1a(a){1e 1Y.9R(a).1t()},n.bE=1a(a,b){1e"bM="+a+"&Rp="+5H.8z(b,1s,"")},n.7c=1a(d,e){c.1q,c.1q;1d g=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();g="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i={5v:"mM",78:d,mL:{mC:"c6/bU",ss:g,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:e};c.al||(c.al=!0),c.77.1L(i),c.5L=c.77.1i,c.1q,b(i).2K(1a(a){if(c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,a.1l.1Z)c.1q,"ko"===a.1l.1Z?f.3f({1E:a.1l.Qv}):f.mY(d,a.1l.3o);2p if("OK"===a.rh){if(c.1q,a.1l.1Z===!1)4F(a.1l.3o.nk){1U rm:1U Qn:c.1q,f.3f({1E:c.2P().6k}),c.9I&&c.9I(!1,c.2P().6k);2C;1U Qo:c.1c.3w=!0}d===c.9K||d===c.dH||d===c.bY?f.mY(d,a.1l):d===c.bZ&&f.mT(a.1l)}2p c.1q},1a(){c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q,f.3f({1E:c.2P().6j}),c.9I&&c.9I(!1,c.2P().6j)})},n.Qp=1a(a){1d d={5v:"ro",78:a,mL:{mC:"c6/bU","mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU"}};c.77.1L(d),c.5L=c.77.1i,c.1q,b(d).2K(1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i},1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q})},n.bD=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}c.1q;1d d=n.7i(a).1t(),e=c.1c.1T+c.1c.2J+d;c.1q;1d f=n.9R(e).1t();1e c.1q,f},n.qo=1a(a){1d b=c.1c.2F;if(c.1c.4z){1d d=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();b=1Y.4A.5B(c.1c.2F.1t(),d).1t(1Y.5z.5w)}1d e=c.1c.2i,f=c.1c.1T,g=c.1c.3h,h=b,i=a,j=n.7i(e+f+g+h+i).1t();1e j},n.qq=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h=1s;3c{h=n.7i(d+e+f+g).1t()}2S(i){}1e h},n.sx=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.4l,g=a,h="C5",i=n.7i(e+h+f+d+g).1t();1e i},n.sB=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="D7",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},n.sF=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="mS",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},c.QH=1a(a){1d b=c.mH,d=c.1c.1T+a+c.1c.aE,e=d+n.bD();c.1q;1d f=n.9R(e).1t();c.1q;1d g={hw:c.1c.1T,aK:a+c.1c.aE},h=n.bE(f,g);c.1q,n.7c(b,h)},n.mF=1a(){1d a=c.d3,b=c.1c.1T+c.1c.3F,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T,4n:c.1c.3F},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.qk=1a(){1d a=c.dj,b=c.1c.1T,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.mD=1a(){1d a="T1",b=c.1c.8O,d=c.d5,e=hC("+"),f=2o(c.1c.3r).hv("+",e),g=c.1c.1T+c.1c.3I+c.1c.3t+c.1c.3r+c.1c.2J+a+b,h=g;c.1q;1d i=n.9R(h).1t(),j=i+n.bD();c.1q;1d k={f8:c.1c.1T,qC:c.1c.3I,qt:c.1c.3t,qA:f,qz:c.1c.2J,9c:a,2E:b},l=n.bE(j,k);c.1q,c.1c.4Z?n.5J(d,l):n.7c(d,l)},n.rb=1a(){n.mF(),n.qk(),(c.1c.3I&&c.1c.3t&&c.1c.3r||c.1c.4Z)&&n.mD()},n.qm=1a(){1d b=c.bZ,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();f="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i,j={93:"&93="+c.1c.1T,fJ:"&fJ="+c.1c.3h,fK:"&fK="+c.1c.fl,fR:"&fR="+c.1c.2b,fV:"&fV="+c.1c.3F,fT:"&fT="+c.1c.2i,fW:"&fW="+c.1c.3I,fU:"&fU="+c.1c.3t,fI:"&fI="+e,fF:"&fF="+c.1c.5c,fi:"&fi="+n.qq(),fh:"&fh=4Q://"},k={hI:"",hJ:"",hN:"",hM:"",hL:"",hK:"",hD:""};"4X"===c.1c.2b||"aA"===c.1c.2b?(k.hJ="&hJ="+c.1c.5G,k.hN="&hN="+c.1c.bh,k.hM="&hM="+c.1c.bj,!c.1c.3w&&c.1c.5k?k.hL="&hL="+c.1c.5k:k.hI="&hI="+c.1c.8C,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hI+k.hJ+k.hN+k.hM+k.hL):"cq"===c.1c.2b?(k.hK="&hK="+c.1c.8U,k.hD="&hD="+c.1c.bt,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hK+k.hD):i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh,c.ai&&(i.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,i):(g.6V("/7r").2B(),n.7c(b,i))},n.qw=1a(){c.6F="B3";1d a=c.6F,b=c.9K,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f={52:c.1c.2i,qz:c.1c.2J,R9:c.1c.5c,qt:c.1c.3t,qA:e,qC:c.1c.3I,3S:c.1c.2b,jm:c.1c.3F,hu:c.1c.hu,f8:c.1c.1T,9c:a,qD:c.1c.3h,ht:c.1c.ht,4E:c.1c.3g,Rm:n.qo(a),8U:c.1c.8U,2E:c.1c.8O,Rl:c.1c.hr,Rg:c.1c.fl,Rj:c.1c.ff,R4:c.1c.fG};"4X"===c.1c.2b||"aA"===c.1c.2b?(f.8X=c.1c.5G,f.bh=c.1c.bh,f.bj=c.1c.bj,f.QS=c.1c.7h,!c.1c.3w&&c.1c.5k?f.5k=c.1c.5k:f.QT=c.1c.8C):"cq"===c.1c.2b&&(f.8U=c.1c.8U,f.bt=c.1c.bt),c.ai&&(f.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,f):(g.6V("/7r").2B(),n.7c(b,f))},n.sy=1a(){1d a=c.dH,b="";c.1q,n.7c(a,b)},c.bH=1a(){c.6F="C5";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,5p:c.1c.4l,52:c.1c.2i,7o:n.sx(),9c:a};c.1q,g.6V("/7r").2B(),n.7c(b,d)},c.hB=1a(){c.6F="D7";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sB(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},c.n3=1a(){c.6F="mS";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sF(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},n.sv=1a(d){1d e=d;if(c.1q,e){c.1c.c0=!1,c.1c.ep=!0;1d f=c.mO,g=c.1c.1T+e,h=g+n.bD();c.1q;1d j=n.9R(h).1t();c.1q;1d k={hw:c.1c.1T,QW:e},l=n.bE(j,k);c.1q;1d o=c.1c.f6;if(c.1c.4z){1d p=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();o="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),p).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),p).1t(1Y.5z.5w))}1d q={5v:"mM",78:f,mL:{mC:"c6/bU",ss:o,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:l};b(q).2K(1a(a){if(c.1c.ep=!1,a.1l.1Z&&(c.1q,t0(a.1l.1Z)&&(c.1c.c0=t0(a.1l.3o.1Z),!c.1c.c0))){1d b={};b.a1=m[c.1c.1M].6l,b.2Z=m[c.1c.1M].7N;1d d=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e b}}});d.3o.2K(1a(){},1a(){c.1c.6d=""})}},1a(){if(c.1c.ep=!1,c.1c.4Z){1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7Q;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.c0=!0})}2p{1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7X;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.6d=""})}})}},n.mt=1a(a){1d b=!1,d=a;if(c.1q,d){d.1i>5&&(d=a.2w(0,6),c.1q),c.1q;1d e=j("2E")(c.1c.bS,d,!0);if(c.1q,0===e.1i){1d f={};f.a1=m[c.1c.1M].6l,f.2Z=c.1c.t4;1d g=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e f}}});1e g.3o.2K(1a(){},1a(){c.1c.3w&&(c.1c.6d="")}),b=!0}}1e b},n.t3=1a(){if(c.1q,"4X"===c.1c.2b||"aA"===c.1c.2b){1d a=c.bY,b={93:c.1c.1T,fd:"",5h:c.1c.3h,fc:c.1c.3F,fA:c.1c.2i,"4u h6":c.1c.3I,"4u aP":c.1c.3t,"4u h7":c.1c.3r,"4u h8":c.1c.5c},d="",e=c.1c.2F;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();e=1Y.4A.5B(c.1c.2F.1t(),h).1t(1Y.5z.5w)}1d i="";!c.1c.3w&&c.1c.5k?(b.bP="T",b["bQ / bR"]=c.1c.5k,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b.bM):(b.bP="P",b["bQ / bR"]=c.1c.8C,b.n8=c.1c.bh+c.1c.bj,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.n8+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.n8+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b["4u h6"]+"|"+b["4u aP"]+"|"+b["4u h7"]+"|"+b["4u h8"]+"|"+b.bM),c.1q,g.6V("/7r").2B();1d j=k([d]);c.1c.4Z?n.5J(a,j):n.7c(a,j)}2p f.3f({1E:c.2P().6Q})},n}]),2k.4i("5j").hq("n5",["$66","7T","$bT","$2E","1N",1a(a,b,c,d,e){1d f={};1e f.n0=1a(b){if(b){a.1c.5d=b,a.9I&&a.1c.5d.1i>0&&a.9I(!0,5H.8z(a.1c.5d));1d c="";if(a.n6()){1d g=["4X","aA"];c=d("2E")(a.1c.5d,1a(a){1e-1===g.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}1d h=!0;if(h){1d i=["KC"];c=d("2E")(a.1c.5d,1a(a){1e-1===i.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}a.1c.hx&&(a.1q,c=d("2E")(a.1c.5d,1a(b){1e-1!==a.1c.hx.3U(b.3G)}),c.1i&&(a.1q,a.1c.5d=c)),0===a.1c.5d.1i?(a.1q,f.3f({1E:a.2P().6p}),a.9I&&a.9I(!1,a.2P().6p),a.8g(a.1c.6N,"mZ-Jp","11")):a.8g(a.1c.6N,"mZ-"+a.1c.2b.1t(),"bX"),"c5"!==a.1c.2b?(c=d("2E")(a.1c.5d,{3G:a.1c.2b},!0),c.1i?a.1c.au=c[0].3W:(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u,a.1c.9H=!0)):(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u),("9Q"===a.1c.3J||a.1c.4l)&&a.bH()}a.1q},f.n1=1a(b){a.1c.fC&&"1m"===a.1c.fC||b&&(a.1c.6a=b,a.1c.6a.1i>0?a.1c.3w=!1:a.1c.3w=!0),a.1q},f.n2=1a(b){b&&(a.1c.lx=b),a.1q},f.zD=1a(c){if(a.1q,c&&c.1i>0){1d d=b.2f(c);a.1q;1d e=a.mW+d;a.5U(e),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"bX")}2p{a.1q;3c{1d g=1s;3c{g=5H.ac(c)}2S(h){g=c}if(a.1q,g.nc&&g.iI&&g.iI.1i>0){1d i=g.nc+", "+g.iI;f.3f({1E:i}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}2S(h){f.3f({1E:a.2P().6u}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}},f.zy=1a(b){a.bJ=b,a.1q,a.bJ&&""!==a.bJ&&(a.1c.4l=a.bJ.fm,a.1c.7o=a.bJ.7o,a.bH())},f.zd=1a(d){a.2I=d,a.fq(d)&&(a.1c.4M=!0),a.2I.4M=a.1c.4M,a.2I.7y&&1===a.2I.7y&&(a.2I.3J="9Q"),a.1c.3J&&(a.2I.3J=a.1c.3J,"9Q"===a.2I.3J&&a.2I&&a.2I.3e&&"11"===a.2I.3e&&(a.1q,a.2I.3J="")),a.1q;1d e=b.2f(5H.8z(a.2I,1s,""));a.1q;1d f=a.bz+e;a.5U(f),("9Q"===a.1c.3J||1===a.2I.7y)&&a.2I&&a.2I.3e&&"11"!==a.2I.3e&&(a.1q,c.6V("/6O").2B());1d g=a.2I.3e;g||(g="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),g.1t())},f.zz=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));a.1q;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())},f.zB=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));if(a.1q,"22"!==a.5Q.3e||a.5Q.7y&&1===a.5Q.7y){a.ne=!1;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())}2p a.n40&&(d.bK=b.a4[0])}),b.q4=1a(){c.6P({cV:"q4"})},b.6g=1a(){c.6P({cV:"6g"})}}]),2k.4i("5j").3p("n7",["$66","$5O","$aO","8b","1N",1a(a,b,c,d,e){b.1N=e[a.1c.1M],b.8b=d,b.tn=1a(a){c.6P(a)},b.44=1a(){c.6P()}}]),2k.4i("5j").hq("1N",1a(){1d a={};1e a.3l={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.EN={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.MS={5h:"ID QN",8u:"bA",8i:"aP",8p:"QM QL",7K:"mI xZ",8d:"QK QP",5u:"QQ QR R5",5D:"Rh",5s:"Rk",8v:"Ro",83:"xL Rn mz",6W:"Ya",No:"lJ",7B:"7W xL",7Z:"6f",7E:"xP R7",89:"BB/TT",6S:"i8",7R:"mJ i8",7f:"bA a8",7H:"mJ a8",84:"xN R6 4k (8K = 3H 4k xN)",7G:"7W Ra 4w 8V 43",8a:"(7W 10-dT Rd)",7V:"iq mJ",7S:"xO 1Z dn",7u:"Rc x9",86:"mG hg (QJ)",6y:"QI",8f:"7W Qf",88:"y4 xE",6q:"Qg",8k:"Qk Qj",6J:"xO...",6e:"Qb...",6l:"mI dn 2c 5I",7z:"bA 2c 5I",6C:"Q5 2c 5I",5P:"7W nS y2 2c 5I",8s:"mI 2c 5I",8t:"7W hf d4 2c 5I",8q:"7W hf d4 2c 5I (8G)",8w:"7W 6f 2c 5I",7O:"xP Q7 2c 5I",7F:"7W 4k 2c 5I",7C:"oN 4k 2c 5I",7N:"7W hf aa fY 2c 5I",1E:"iq",8Z:"Qa xK - 8B hg",7X:"xJ 6w, Q9 Q8 gp Ql xK 6w",7Q:"xG hf i6/d4 QC",6U:"yZ",7D:"mG hg -QD",8l:"xm mG QE",8e:"lR QG QF g3 xo i7:

    Qy Qq i7 dk 8B hg xd Qs 5X Qw So (Sn), Sg xA dk Sm fY Sy.",6n:"T8",6j:"xw iq, ir T6 T5 6w, fX SF lB SU SW",6k:"xq xp, ir xF id T3, fX xs, lB Sc xH",6p:"xJ dh 8x, ir xF g2 y5 Rv",6v:"3E 2c 8x",6X:"3D 2c 8x",6s:"1T 2c 8x",6I:"2J 2c 8x",6G:"3h 2c 8x",5E:"2i 2c 8x",6L:"3F 2c 8x",6r:"3g 2c 8x",6A:"3g g2 2c 5I",6B:"2F 2c 8x",6x:"4l g2 g3 y6 Rs 2c RA",6u:"iq S6 S5, ir yG S7",6b:"Sb nV cy",6Q:"xE RV 2c RR RX yK dh gp",6K:"xG e-xR aR cy",6t:"7W xH nS lc cy",5N:"bA xQ iu 9X ip 2 xI-xI",6h:"NY xQ iu 9X ip 4 mk",6Z:"E-xR NM iu 9X ip 4 mk",5C:"xZ Nx nS y2 iu 9X ip 4 mk",6m:"y4 2c 5I"},a.VI={5h:"ID đơn đặt hàng",8u:"Tên người đứng hóa đơn",8i:"ob toán bằng thư điện tử",8p:"ob toán điện duại di động",7K:"Mô tả 8y toán",8d:"Trả xT",5u:"Ob lòng chọn một kênh",5D:"THỰC HIỆN",5s:"GẦN",8v:"il",83:"Thẻ mới",6W:"Vâng",No:"Không",7B:"Số thẻ",7Z:"6f",7E:"Ngày hết hạn",89:"MM/9D",6S:"Quốc xY",7R:"Quốc xY tìm kiếm",7f:"tên ngân hàng",7H:"Ngân hàng tìm kiếm",84:"Sử dụng điểm 4k (8K = 3H điểm 4k)",7G:"Thẻ # 8V 43",8a:"(Số 10 chữ số cuối cùng)",7V:"Lỗi tìm kiếm",7S:"Hoàn xXện trạng thái 8y toán.",7u:"pW chờ.",86:"Chế độ hộp cát",6y:"Dịch vụ",8f:"ID io dịch",88:"Số tiền phải trả",6q:"chú thích",8k:"Lưu ảnh vào xXết bị",6J:"Mtẩn bị...",6e:"Tải...",6l:"Thông Ns 8y toán không hợp lệ",7z:"Tên hóa đơn không hợp lệ",6C:"aP 8y toán không hợp lệ",5P:"Điện duại di động 8y toán không hợp lệ",8s:"Mô tả 8y toán không hợp lệ",8t:"Số thẻ tín dụng không hợp lệ",8q:"Số thẻ tín dụng không hợp lệ (8G)",8w:"Số 8X không hợp lệ",7O:"Ngày hết hạn không hợp lệ",7F:"Số 4w không hợp lệ",7C:"Nq 4w không hợp lệ",7N:"Số thẻ aa không hợp lệ",1E:"lỗi",8Z:"Lỗi mạng - Chế độ bd",7X:"d2 bị ngắt kết nối, io dịch này cần có 6w",7Q:"Kiểm ij thẻ N7 nợ đã bị bỏ xT.",6U:"Nhắc nhở",7D:"Chế độ cát là ON",8l:"Tùy chọn 5J",8e:"Sử dụng các tùy chọn dưới đây để cấu hình kết quả:

    pW dy lòng được thông báo rằng tất cả các kết quả io dịch được 4G đ9z dl mô phỏng, không có quá trình trực Neến sẽ diễn ra.",6n:"Bị làm giả",6j:"Lỗi io tiếp, dy lòng kiểm ij kết nối 6w, tên người dùng hoặc mật khẩu",6k:"Nc cập đã bị từ chối, dy lòng kiểm ij id của người bán, tên ứng dụng hoặc mã xác P9",6p:"Không tìm thấy kênh, dy lòng kiểm ij giá trị tiền tệ",6v:"3E không tìm thấy",6X:"3D không tìm thấy",6s:"1T không tìm thấy",6I:"2J không tìm thấy",6G:"3h không tìm thấy",5E:"2i không tìm thấy",6L:"3F không tìm thấy",6r:"3g không tìm thấy",6A:"3g giá trị không hợp lệ",6B:"2F không tìm thấy",6x:"4l không tìm thấy giá trị Pq yêu cầu nhận",6u:"Lỗi không được xử lý, dy lòng liên hệ với bộ phận hỗ trợ",6b:"Mã hóa an toàn không thành công",6Q:"ob toán định kỳ không thể tiến hành trên kênh này",6K:"Xác thực 59 nâng od không thàXác nhận số điện duại nâng od không thành côPt công",6t:"Xác nhận số điện duại nâng od không thành công",5N:"Tên 8y toán phải dài hơn 2 ký tự",6h:"Mô tả 8y toán phải dài hơn 4 ký tự",6Z:"aP 8y toán phải dài hơn 4 ký tự",5C:"Số điện duại 8y toán phải dài hơn 4 ký tự",6m:"Số tiền không hợp lệ"},a.TH={5h:"รหัสคำสั่งซื้อ",8u:"ชื่อการเรียกเก็บเงิน",8i:"อีเมลการเรียกเก็บเงิน",8p:"การเรียกเก็บเงินมือถือ",7K:"คำอธิบายการเรียกเก็บเงิน",8d:"จ่ายผ่าน",5u:"โปรดเลือกช่อง",5D:"ดำเนินการต่อไป",5s:"ปิด",8v:"ยกเลิก",83:"บัตรใหม่",6W:"ใช่",No:"ไม่",7B:"หมายเลขบัตร",7Z:"6f",7E:"วันหมดอายุ",89:"MM/9D",6S:"ประเทศ",7R:"ค้นหาประเทศ",7f:"ชื่อธนาคาร",7H:"ค้นหาธนาคาร",84:"ใช้คะแนน 4k (8K = 3H 4k dL)",7G:"การ์ดหมายเลข 8V 43",8a:"(ตัวเลขล่าสุด 10 หลัก)",7V:"ข้อผิดพลาดในการค้นหา",7S:"กำลังสรุปสถานะการชำระเงิน",7u:"โปรดรอ.",86:"โหมด 9r ON",6y:"บริการ",8f:"รหัสธุรกรรม",88:"จำนวนเงินที่ต้องชำระ",6q:"บันทึก",8k:"บันทึกรูปภาพลงในอุปกรณ์",6J:"การจัดเตรียม...",6e:"กำลังโหลด...",6l:"ข้อมูลการชำระเงินไม่ถูกต้อง",7z:"ชื่อการเรียกเก็บเงินไม่ถูกต้อง",6C:"อีเมลเรียกเก็บเงินไม่ถูกต้อง",5P:"การเรียกเก็บเงินมือถือไม่ถูกต้อง",8s:"คำอธิบายการเรียกเก็บเงินไม่ถูกต้อง",8t:"หมายเลขบัตรเครดิตไม่ถูกต้อง",8q:"หมายเลขบัตรเครดิตไม่ถูกต้อง (8G)",8w:"หมายเลข 8X ไม่ถูกต้อง",7O:"วันที่มีค่าไม่ถูกต้อง",7F:"หมายเลข 4w ไม่ถูกต้อง",7C:"OA 4w ไม่ถูกต้อง",7N:"หมายเลขบัตรเดบิตไม่ถูกต้อง",1E:"ความผิดพลาด",8Z:"ข้อผิดพลาดเกี่ยวกับเครือข่าย - โหมด 9r",7X:"อินเทอร์เน็ตถูกตัดการเชื่อมต่อรายการนี้ต้องใช้อินเทอร์เน็ต",7Q:"การตรวจสอบบัตรเดบิตถูกข้ามแล้ว",6U:"การแจ้งเตือน",7D:"โหมด bd เปิดอยู่",8l:"ตัวเลือก 5J",8e:"ใช้ตัวเลือกด้านล่างเพื่อกำหนดค่าผลลัพธ์:

    โปรดทราบว่าผลการทำธุรกรรมของ 4G แบบออฟไลน์ทั้งหมดจะไม่มีการดำเนินการออนไลน์",6n:"ดัดแปลง",6j:"ข้อผิดพลาดในการสื่อสารโปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตชื่อผู้ใช้หรือรหัสผ่าน",6k:"การเข้าถึงถูกปฏิเสธโปรดตรวจสอบรหัสร้านค้าชื่อแอปหรือรหัสยืนยัน",6p:"ไม่พบช่องโปรดตรวจสอบสกุลเงิน",6v:"3E ไม่พบ",6X:"3D ไม่พบ",6s:"1T ไม่พบ",6I:"2J ไม่พบ",6G:"3h ไม่พบ",5E:"2i ไม่พบ",6L:"3F ไม่พบ",6r:"3g ไม่พบ",6A:"3g ค่าที่ไม่ถูกต้อง",6B:"2F ไม่พบ",6x:"4l ไม่พบค่าสำหรับใบเสร็จรับเงิน",6u:"เกิดข้อผิดพลาดที่ไม่สามารถจัดการได้โปรดติดต่อฝ่ายสนับสนุน",6b:"การเข้ารหัสลับที่ปลอดภัยล้มเหลว",6Q:"การชำระเงินที่เกิดขึ้นประจำจะไม่สามารถดำเนินการต่อในช่องนี้ได้",6K:"การตรวจสอบอีเมลขั้นสูงล้มเหลว",6t:"การตรวจสอบหมายเลขโทรศัพท์ขั้นสูงล้มเหลว",5N:"ชื่อการเรียกเก็บเงินต้องมีความยาวมากกว่า 2 ตัว",6h:"คำอธิบายการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6Z:"อีเมลสำหรับการเรียกเก็บเงินต้องมีความยาวไม่เกิน 4 ตัว",5C:"หมายเลขโทรศัพท์มือถือการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6m:"จำนวนไม่ถูกต้อง"},a.yq={5h:"ID ng o5",8u:"nG ng o4",8i:"59 o4",8p:"4u aC ng 4Q",7K:"lr ng o4",8d:"OE sa Oo ng",5u:"Oq Tf ng 3S",5D:"o8",5s:"OG",8v:"il",83:"OT 4q",6W:"oo",No:"xU",7B:"OQ ng 4q",7Z:"6f",7E:"7a cc",89:"MM/9D",6S:"xS",7R:"ah xS",7f:"xf ng Yc",7H:"ah nx",84:"xV 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(WH 10-dT na aC)",7V:"cg WK",7S:"Wq 9z xC WA sa ll.",7u:"WX WW na X1.",86:"9r 5X ON",6y:"yV XL",8f:"ID ng xD",88:"XE dN",6q:"XJ",8k:"I-iF 9z XC sa Xs",6J:"การจัดเตรียม...",6e:"Xq...",6l:"Di-5V XV sa ll",7z:"Di-5V nG ng gT",6C:"xU 5V 59 sa gT",5P:"Di-5V 4Q e6",8s:"Di-5V lr sa gT",8t:"Di-5V aC ng 4X 4q",8q:"Di-5V aC ng 4X 4q (8G)",8w:"Di-5V aC 6f",7O:"Di-5V Wp 7a",7F:"Di-5V aC 4w",7C:"Di-5V 4w c7",7N:"Di-5V aC aa 4q",1E:"X5",8Z:"dM 1E - nH-9P 5X",7X:"d2 X0 9z, sa WY na xj ay X6 ng 6w nJ",7Q:"aa 4q nL ay Xk.",6U:"Xc",7D:"nH-9P na WR",8l:"5J 1B",8e:"xV 9z cf WB sa Ww Wr i-i1 9z cf xW:

    Wu na 9z WI ng nH-9P na cf xW sa xD ay dl Yd, XF Wn ng g9 ay Us sa Ur.",6n:"Ux",6j:"nE 1E, iz lK 6w nF, g1, o cB",6k:"i2 Uw, iz lK fZ id, nG ng 8W, o xC-Up ib",6p:"Ul 3S na xg, iz lK 9z UQ dN",6v:"3E 7L 9n",6X:"3D 7L 9n",6s:"1T 7L 9n",6I:"2J 7L 9n",6G:"3h 7L 9n",5E:"2i 7L 9n",6L:"3F 7L 9n",6r:"3g 7L 9n",6A:"3g di-5V dN",6B:"2F 7L 9n",6x:"4l dN UD sa Tv Ty ay 7L xg",6u:"ic cg, iz Ud-Uc sa U0",6b:"UW ie VY",6Q:"VX na ll ay 7L W2 W1 sa 3S na xj",6K:"xk aR 59 ng xl",6t:"xk 9z 3B aR lo xl",5N:"xf ng gT ay db na i0 sa 2 dS",6h:"4u lr ay db na i0 sa 4 na cf dS",6Z:"4u 59 ay db na i0 sa 4 na cf dS",5C:"4u aC ng 4Q ay db na i0 sa 4 na cf dS",6m:"Di-5V dN"},a.MY={5h:"အမိန့်အိုင်ဒီ",8u:"ငွေတောင်းခံနာမကိုအမှီ",8i:"ငွေတောင်းခံအီးမေးလျ",8p:"ငွေတောင်းခံမိုဘိုင်း",7K:"ငွေတောင်းခံဖော်ပြချက်",8d:"တဆင့်ပေးဆောင်",5u:"တစ်ဦးရုပ်သံလိုင်းကို hS ပေးပါ",5D:"ဆက်လက်ဆောင်ရွက်",5s:"lw",8v:"ပယ်ဖျက်",83:"နယူးကဒ်",6W:"ဟုတ်ကဲ့",No:"အဘယ်သူမျှမ",7B:"ကတ်နံပါတ်",7Z:"6f",7E:"jA နေ့စွဲ",89:"MM/9D",6S:"ပြည်",7R:"ရှာရန်တိုင်းပြည်",7f:"ဘဏ်အမည်",7H:"ရှာရန်ဘဏ်",84:"4k ရမှတ် (8K = 3H ကျော် 4k အမှတ်) ကိုသုံးပါ",7G:"ကဒ် # 8V 43",8a:"(နောက်ဆုံး 10-ဂဏန်းနံပါတ်)",7V:"ရှာရန်အမှား",7S:"ငွေပေးချေမှု 1Z ကိုအပြီးသတ်နေသည်။",7u:"ကျေးဇူးပြုပြီးခဏစောင့်ပါ။",86:"bd 5X ကို ON",6y:"န်ဆောင်မှုများ",8f:"ငွေသွင်းငွေထုတ် ID ကို",88:"ပေးဆောင်ရမည့်ငွေပမာဏကို",6q:"မှတ်စု",8k:"ကိရိယာ 1W ကို lz",6J:"ပြင်ဆင်နေ...",6e:"6e...",6l:"မှားနေသောငွေပေးချေမှုသတင်းအချက်အလက်များ",7z:"မှားနေသောငွေတောင်းခံနာမကိုအမှီ",6C:"မှားနေသောငွေတောင်းခံအီးမေးလျ",5P:"မှားနေသောငွေတောင်းခံမိုဘိုင်း",8s:"မှားနေသောငွေတောင်းခံဖော်ပြချက်",8t:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က",8q:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က (8G)",8w:"မှားနေသော 8X အရေအတွက်ကို",7O:"မှားနေသော Wf နေ့စွဲ",7F:"မှားနေသော 4w အရေအတွက်ကို",7C:"မှားနေသော 4w c7 ကို",7N:"မှားနေသောမြီစားကတ်နံပါတ်",1E:"အမှား",8Z:"dM မှအမှား - 4G 5X ကို",7X:"အင်တာနက်ကိုအဆက်ပြတ်, ဒီအရောင်းအဝယ်အတွက်အင်တာနက်ရရှိနိုင်မှုလိုအပ်ပြီး",7Q:"i6 4q ကိုစစ်ဆေးခြင်းကိုကျော်သွားခဲ့တာဖြစ်ပါတယ်။",6U:"သတိပေးချက်",7D:"9P 5X ကို ON ဖြစ်ပါသည်",8l:"4G 1B များ",8e:"ရလဒ် i1 ဖို့အောက်က W8 4G ရွေးချယ်စရာ:

    အားလုံး 4G ငွေပေးငွေယူရလဒ်များကိုအော့ဖ်လိုင်း lb နေကြသည်မရှိအွန်လိုင်းဖြစ်စဉ်ကိုရာအရပျယူလိမ့်မည်ဟုအကြောင်းကြားလိမ့်ပေးပါ။",6n:"နှောင့်အယှက်",6j:"ဆက်သွယ်ရေးမှားယွင်းနေသည်, အင်တာနက်ကွန်နက်ရှင်, အသုံးပြုသူအမည်, ဒါမှမဟုတ် cB ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6k:"i2 ကို, ငြင်းပယ်ကုန်သည်အိုင်ဒီ, 8W ကိုအမည်, သို့မဟုတ်စိစစ်အတည်ပြု ib ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6p:"ရုပ်သံလိုင်းတစ်ခုမှမတွေ့, ငွေကြေးတန်ဖိုးကိုစစ်ဆေးကျေးဇူးပြုပြီး",6v:"3E မတွေ့ပါ",6X:"3D မတွေ့ပါ",6s:"1T မတွေ့ပါ",6I:"2J မတွေ့ပါ",6G:"3h မတွေ့ပါ",5E:"2i မတွေ့ပါ",6L:"3F မတွေ့ပါ",6r:"3g မတွေ့ပါ",6A:"3g မမှန်ကန်တဲ့တန်ဖိုးကို",6B:"2F မတွေ့ပါ",6x:"4l မတွေ့ရှိလက်ခံရရှိတောင်းဆိုချက်အတွက်တန်ဖိုးကို",6u:"ic အမှား, ထောက်ခံမှုဆက်သွယ်နိုင်ပါသည်",6b:"လုံခြုံသော ie ကိုပျက်ကွက်",6Q:"ငွေပေးချေမှုထပ်တလဲလဲဤချန်နယ်ပေါ်တွင်ဆက်လက်ဆောင်ရွက်မနိုင်",6K:"အဆင့်မြင့်အီးမေးလ် ct ကိုမအောင်မြင်ခဲ့",6t:"W9 ဖုန်းနံပါတ် ct ကိုမအောင်မြင်ခဲ့",5N:"ငွေတောင်းခံနာမကိုအမှီ 2 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6h:"ငွေတောင်းခံဖော်ပြချက် 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6Z:"ငွေတောင်းခံအီးမေးလ်က 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",5C:"မိုဘိုင်းနံပါတ်ငွေတောင်းခံလွှာပေါ်ရှိ 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6m:"မှားနေသောငွေပမာဏ"},a.KM={5h:"លេខ​សម្គាល់​លំដាប់",8u:"ឈ្មោះវិក័យប័ត្រ",8i:"អ៊ីម៉ែលវិក័យប័ត្រ",8p:"ទូរស័ព្ទដៃវិក័យប័ត្រ",7K:"ការរៀបរាប់វិក័យប័ត្រ",8d:"បង់តាមរយៈការ",5u:"សូមជ្រើសឆានែល",5D:"បន្តដំណើរការ",5s:"ជិតស្និទ្ធ",8v:"បដិសេធ",83:"កាតថ្មី",6W:"បាទ",No:"គ្មាន",7B:"លេខ​កាត",7Z:"6f",7E:"កាលបរិច្ឆេទ 7a",89:"MM/9D",6S:"ប្រទេស",7R:"ប្រទេសស្វែងរក",7f:"ឈ្មោះ​របស់​ធនាគារ",7H:"ធនាគារស្វែងរក",84:"ពិន្ទុការប្រើ 4k (8K = 3H 4k ពិន្ទុ)",7G:"កាត # 8V 43",8a:"(ចំនួន 10 ខ្ទង់ចុងក្រោយ)",7V:"កំហុសស្វែងរក",7S:"បញ្ចប់ស្ថានភាពបង់ប្រាក់។",7u:"សូមរង់ចាំ។",86:"លើរបៀប 9P",6y:"សេវាកម្ម",8f:"លេខសម្គាល់ប្រតិបត្តិការ",88:"ចំនួនទឹកប្រាក់ដែលត្រូវបង់",6q:"ចំណាំ",8k:"រក្សាទុករូបភាពទៅកាន់ឧបករណ៍",6J:"ការរៀបចំ...",6e:"កំពុងផ្ទុក...",6l:"ពបង់ប្រាក់គ្មានសុពលភាព",7z:"ឈ្មោះវិក្កយបត្រមិនត្រឹមត្រូវ",6C:"អ៊ីម៉ែលវិក័យប័ត្រមិនត្រឹមត្រូវ",5P:"វិក័យប័ត្រមិនត្រឹមត្រូវចល័ត",8s:"ការរៀបរាប់វិក័យប័ត្រមិនត្រឹមត្រូវ",8t:"លេខកាតឥណទានមិនត្រឹមត្រូវ",8q:"លេខកាតឥណទានមិនត្រឹមត្រូវ (8G)",8w:"ចំនួន 6f មិនត្រឹមត្រូវ",7O:"កាលបរិច្ឆេទ 7a មិនត្រឹមត្រូវ",7F:"ចំនួន 4w មិនត្រឹមត្រូវ",7C:"ម្ជុល 4w មិនត្រឹមត្រូវ",7N:"លេខកាតឥណពន្ធមិនត្រឹមត្រូវ",1E:"កំហុសក្នុងការ",8Z:"កំហុសក្នុងការបណ្តាញ - របៀបសេនបក់",7X:"អ៊ីនធឺណិតបានផ្តាច់, ប្រតិបត្តិការនេះតម្រូវឱ្យមានភាពអាចរកបានអ៊ិនធឺណិ",7Q:"ការត្រួតពិនិត្យកាតឥណពន្ធត្រូវបានរំលង។",6U:"ការ​រំលឹក",7D:"របៀប 9P ត្រូវបានបើក",8l:"ជម្រើសសេនបក់",8e:"ប្រើជម្រើសខាងក្រោមដើម្បីកំណត់រចនាសម្ព័ន្ធលទ្ធផលនេះ:

    សូមជំរាបជូនថាលទ្ធផលនៃការប្រតិបត្តិការទាំងអស់ត្រូវបានក្លែងធ្វើសេនបក់ក្រៅបណ្តាញ, មិនមានដំណើរការលើបណ្តាញនឹងយកកន្លែង។",6n:"បន្លំ",6j:"កំហុសក្នុងការប្រាស្រ័យទាក់ទង, សូមពិនិត្យមើលការតភ្ជាប់អ៊ីធឺណិត, ឈ្មោះអ្នកប្រើឬពាក្យសម្ងាត់",6k:"ការចូលដំណើរការត្រូវបានបដិសេធ, សូមពិនិត្យមើលលេខសម្គាល់អ្នកជំនួញ, ឈ្មោះកម្មវិធីឬកូនសោផ្ទៀងផ្ទាត់",6p:"រកមិនឃើញឆានែល, សូមពិនិត្យមើលតម្លៃរូបិយប័ណ្ណ",6v:"3E រក​មិន​ឃើញ",6X:"3D រក​មិន​ឃើញ",6s:"1T រក​មិន​ឃើញ",6I:"2J រក​មិន​ឃើញ",6G:"3h រក​មិន​ឃើញ",5E:"2i រក​មិន​ឃើញ",6L:"3F រក​មិន​ឃើញ",6r:"3g រក​មិន​ឃើញ",6A:"3g តម្លៃមិនត្រឹមត្រូវ",6B:"2F រក​មិន​ឃើញ",6x:"4l រកមិនឃើញតម្លៃសម្រាប់ការស្នើរសុំវិក័យប័ត្រ",6u:"កំហុសដែលមិនបានដោះស្រាយសូមទាក់ទងបានការគាំទ្រ",6b:"ការអ៊ិនគ្រីបបានបរាជ័យកិច្ចធានា",6Q:"កើតឡើងការទូទាត់មិនអាចបន្តនៅលើឆានែលនេះ",6K:"សុពលភាពអ៊ីមែលកម្រិតខ្ពស់បរាជ័យ",6t:"សុពលភាពលេខទូរស័ព្ទកម្រិតខ្ពស់បរាជ័យ",5N:"ឈ្មោះវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 2",6h:"ការរៀបរាប់វិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",6Z:"អ៊ីម៉ែលវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",5C:"វិក័យប័ត្រចំនួនទូរស័ព្ទចល័តត្រូវតែមានតួអក្សរច្រើនជាង 4",6m:"ចំនួនទឹកប្រាក់មិនត្រឹមត្រូវ"},a.ID={5h:"Id VH",8u:"bA Vb",8i:"59 9F",8p:"x8 9F",7K:"yE 9F",8d:"Ve Vf",5u:"xr Vh dh",5D:"V9",5s:"V2",8v:"V3",83:"aV V4",6W:"Mm Ec",No:"lJ",7B:"lZ aV",7Z:"6f",7E:"Eb Ee",89:"MM/9D",6S:"i8",7R:"i8 xe",7f:"fX a8",7H:"a8 xe",84:"Eg lR 4k (8K = 3H 4k dL)",7G:"lZ aV 8V 43",8a:"(Dh lZ 10-dT)",7V:"Dg Df",7S:"Dj 1Z dn.",7u:"xy x9.",86:"Dk 4G ON",6y:"Dn",8f:"ID dk",88:"yB Dm",6q:"D5",8k:"D6 D9 ke Db",6J:"Do...",6e:"DC...",6l:"DA dn 2c 2L",7z:"bA 9F fY 2c 2L",6C:"59 9F 2c 2L",5P:"DD x8 2c 2L",8s:"EI 9F 2c 2L",8t:"d9 aV d4 2c 2L",8q:"d9 aV d4 2c 2L (8G)",8w:"d9 8X 2c 2L",7O:"Fe 7a 2c 5I",7F:"d9 4w 2c 2L",7C:"oN 4w 2c 2L",7N:"d9 aV i6 2c 2L",1E:"m6",8Z:"m6 Fi - Fg 4G",7X:"d2 D1, dk gp F8 F7 6w",7Q:"Cz aV i6 Ao Am.",6U:"yZ",7D:"5X 9P xd ON",8l:"xm bd",8e:"lR AH di A6 g3 xo i7:

    xy C3 Cn Bf i7 dk bd Cb dl Ac, 2c xu xA g9 zV A7.",6n:"Ad",6j:"m6 xw, m0 lW Kz 6w, g1, 3X cB",6k:"xq xp, xr lW fZ id, fX xs, lB JY JA",6p:"lJ xu dh fY 8o, m0 lW g2 y5 Jq",6v:"3E 2c 8o",6X:"3D 2c 8o",6s:"1T 2c 8o",6I:"2J 2c 8o",6G:"3h 2c 8o",5E:"2i 2c 8o",6L:"3F 2c 8o",6r:"3g 2c 8o",6A:"3g 2c 2L",6B:"2F 2c 8o",6x:"4l g3 y6 JU JV 2c 8o",6u:"JG, m0 yG JF",6b:"JL JK cy",6Q:"JJ dn 2c db LO yK dh gp",6K:"yF 59 lc cy",6t:"yF yA lc cy",5N:"bA 9F gH 9X gR 2 gN",6h:"yE 9F gH 9X gR 4 gN",6Z:"59 9F gH 9X gR 4 gN",5C:"Lz yA gH 9X gR 4 gN",6m:"yB 2c 2L"},a.rn={5h:"订单编号",8u:"帐单名称",8i:"帐单电子邮件",8p:"帐单手机号码",7K:"帐单说明",8d:"付款",5u:"请选择一个频道",5D:"继续",5s:"关",8v:"取消",83:"新卡",6W:"是",No:"没有",7B:"卡号",7Z:"6f",7E:"过期日期",89:"MM/9D",6S:"国家",7R:"搜索国家",7f:"银行名",7H:"搜索银行",84:"使用4k积分(8K = 3H 4k积分)",7G:"卡 # 8V 43",8a:"(最后10位数字)",7V:"搜索错误",7S:"完成付款状态。",7u:"请稍候。",86:"沙箱模式开启",6y:"服务",8f:"交易ID",88:"应付金额",6q:"注意",8k:"将图像保存到设备",6J:"准备...",6e:"载入中...",6l:"付款信息无效",7z:"帐单名称无效",6C:"帐单电子邮件无效",5P:"帐单手机无效",8s:"帐单说明无效",8t:"无效的信用卡号码",8q:"无效的信用卡号码 (8G)",8w:"8X号码无效",7O:"7a日期无效",7F:"4w编号无效",7C:"4w引脚无效",7N:"借记卡号码无效",1E:"错误",8Z:"网络错误 - 沙盒模式",7X:"互联网断开连接,此事务需要互联网",7Q:"借记卡检查已被跳过。",6U:"提醒",7D:"沙箱模式为开",8l:"5J选项",8e:"使用以下选项配置结果:

    请注意,所有沙盒交易结果都离线模拟,不会发生在线流程。",6n:"篡改",6j:"通信错误,请检查互联网连接,用户名或密码",6k:"访问被拒绝,请检查商家ID,应用名称或验证密钥",6p:"找不到频道,请检查货币价值",6v:"3E 未找到",6X:"3D 未找到",6s:"1T 未找到",6I:"2J 未找到",6G:"3h 未找到",5E:"2i 未找到",6L:"3F 未找到",6r:"3g 未找到",6A:"3g 无效值",6B:"2F 未找到",6x:"4l 没有找到收据请求的值",6u:"未处理的错误,请联系支持",6b:"安全加密失败",6Q:"此频道无法重复付款",6K:"高级邮件验证失败",6t:"高级电话号码验证失败",5N:"帐单名称必须超过2个字符",6h:"帐单说明必须超过4个字元",6Z:"帐单电子邮件必须超过4个字符",5C:"帐单手机号码必须超过4个字符",6m:"金额无效"},a.4E={},a.4E.EN={AF:"jc",AX:"Åyi 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 2Q jT",AR:"jR",AM:"k6",AW:"dr",AC:"kA 5a",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BQ:"L8, yg L7, 2Q L6",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 2q",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d’jw",HR:"pp",CU:"p2",CW:"L0çao",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"KO",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MA:"yL",MZ:"yD",MM:"jp [KK]",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",QO:"kJ pR",PK:"kj",PW:"fu",PS:"lm ja",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"KQ",PN:"d8 2q",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"KS",RW:"kl",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"São KUé 2Q PríL9",SA:"jP yJ",SN:"kU",RS:"bq",CS:"bq 2Q a5",SC:"kN",SL:"mA mu",SG:"yI",SX:"yg Ll",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q a7 6E d0 2q",KR:"6E 9U",SS:"6E fb",ES:"Lc",LK:"kR k8",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj da fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",UM:"U.S. pH kJ 2q",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",US:"bx yd",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q df",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MS={AF:"jc",9B:"kg f7",AL:"k9",DZ:"Lb",AS:"pO ag",US:"l7 Le",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 3X jT",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",TD:"Lh",CV:"pY je",KY:"hj 2q",EA:"dP 3X dG",CN:"7Y",CX:"kG 5a",CL:"xh",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG",CD:"bG - kc",CK:"dF 2q",CI:"Côte d’jw",HR:"pp",CU:"p2",DK:"jy",DG:"dw dv",DM:"jq",EC:"oq",SV:"El k4",AE:"Hi cL Hh",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",FK:"j2 2q",FO:"dO 2q",PT:"Hg",FJ:"jX",PH:"y3",FI:"oQ",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl S.A.R., 7Y",HU:"Hj",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"Hn",JM:"zm",JP:"Hm",DE:"za",JE:"dE",DJ:"Hl",JO:"q0",CM:"zr",CA:"zs",KZ:"pG",KH:"Hf",KE:"l9",AX:"3R Åyi",IC:"3R ds",MH:"3R kp",SB:"3R kq",EU:"H6 HE",CY:"HD",KI:"ks",CR:"ze z1",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LB:"HC",LU:"HF",MO:"pS bk 7Y",MK:"pU",MG:"zv",MA:"HG",MW:"kx",MY:"bW",MV:"HJ",ML:"kK",MT:"kF",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",MP:"q3 dJ 2q",NO:"ps",QO:"pR HH",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",FR:"mU",PE:"kB",PN:"d8",PL:"lt",PR:"fs km",AC:"b7 kA",CP:"b7 fy",QA:"ku",CF:"aQ kg rv",CZ:"aQ oi",DO:"aQ ol",RE:"Rékf",RO:"ls",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 3X l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 3X mv",KR:"f7 9U",SN:"kU",ES:"HB",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"HA Ht",SG:"sV",SK:"l4",SI:"l1",SO:"kS",GS:"6E 9w 2Q a7 6E d0 2q",LK:"kR k8",SD:"fb",SR:"Hs",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TJ:"Hr",TW:"j8",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",GB:"bx lO",UM:"bx yd pH kJ 2q",UY:"iM",KP:"nb 9U",UZ:"iS",VU:"iT",VA:"lN",VE:"j0",VN:"j1",WF:"dd 2Q df",9x:"qp",GR:"r9",9u:"iV",9i:"iW"},a.4E.VI={SA:"A-rập Xê-út",AR:"Ác-Hz-ti-na",AM:"Ác-mê-ni-a",EG:"Ai Cập",AZ:"Ai-déc-H4-H3",IE:"Ai-q2",IS:"Ai-xơ-q2",AL:"An-ba-ni",DZ:"An-giê-ri",AG:"An-ti-gu-a và Ba-bu-đa",AD:"gb",AI:"d7",AT:"Áo",AF:"Áp-ga-ni-b9",AW:"dr",AO:"Ăng-gô-la",IN:"Ấn Độ",PL:"Ba bF",BS:"Ba-ha-ma",BH:"Ba-G6",BB:"Bác-ba-đốt",KP:"Bắc ytều Tiên",GL:"Băng Đảo",BD:"Băng-la-đét",BM:"dR",BY:"Bê-la-rút",BZ:"Bê-li-xê",BJ:"Bê-G5",BE:"Bỉ",PT:"Bồ Đào yj",BO:"Bô-li-vi-a",BA:"Bô-G8-a Héc-xê-gô-vi-na",BW:"Bốt-G9-na",CI:"Bờ Biển Ngà",BR:"Gd-Gc",BN:"Gq-nây",BI:"Bu-kC-đi",BT:"Bu-yc (dQ)",BG:"GV-ga-ri",BF:"Buốc-ki-na GZ-xô",CM:"Ca-mơ-kC",CA:"Ca-na-đa",QA:"Ca-ta",UM:"Các đảo nhỏ xa HO tâm a3ộc Mỹ",AE:"Các Tiểu Vương quốc A-rập Thống nhất",KH:"IK",CV:"Cáp-ve",EA:"dP và dG",CL:"IJ-lê",CO:"Cô-lôm-bi-a",KM:"Cô-mô",KW:"Cô-oét",CD:"Cộng hoà dân chủ Côngô",DO:"Cộng hoà Đô-mi-ni-ca",CZ:"Cộng hòa Séc",CF:"Cộng hòa gz gD",CG:"Công-gô",CR:"Cốt-IV Ri-ca",HR:"Crô-a-ti-a",CU:"Cu Ba",KG:"Cư-rơ-gư-b9",9u:"Dăm-bi-a",DG:"dw dv",9i:"Iy-ba-bu-ê",DM:"jq",TW:"Đài Iw",DK:"Đan Mạch",AC:"Đảo kA",BV:"Đảo fx (Na Uy)",CP:"Đảo fy",CX:"Đảo Giáng Iz",GU:"Đảo Gu-am",HM:"Đảo fD và Quần đảo fE",IM:"Đảo bp",NF:"Đảo dK",AS:"Đảo IB a3ộc Mỹ",VG:"Đảo 8A, a3ộc oj",HK:"Đặc y8 hành chính Hồng Kông a3ộc y7 gz pT",MO:"Đặc y8 hành chính IZ a3ộc y7 gz pT",TL:"Đông Ti-mo",DE:"Đức",EE:"E-xtô-ni-a",SV:"En-yb-va-đo",EC:"Ê-cu-a-đo",ER:"Ê-ri-tơ-rê-a",ET:"Ê-ti-ô-pi-a",GA:"Ga-bông",GM:"Găm-bi-a",GH:"J0-na",GN:"g5-nê",GW:"g5-nê Bít-J3",GQ:"g5-nê Xích-đạo",DJ:"Gi-bu-ti",GI:"dz",JO:"Gióc-đa-ni",GT:"Iv-tê-ma-la",GD:"Grê-na-đa",GE:"Iu-di-a",GP:"dD",GG:"dC",GY:"I4-a-na",NL:"Hà bF",HT:"Ha-i-ti",JM:"Ha-I3-ca",KR:"Hàn Quốc",US:"pT Kỳ",HN:"Hôn-đu-rát",HU:"I2-ga-ri",GR:"Hy Lạp",IR:"I-I6",IQ:"I-rắc",IL:"I-I9-en",JE:"dE",KZ:"Ka-dắc-b9",KE:"Kê-ni-a",KI:"Ki-ri-ba-ti",PS:"Lãnh thổ HV",LA:"Lào",LV:"Lát-vi-a",LS:"Lê-xô-thô",LB:"Li-băng",LR:"Li-bê-ri-a",LY:"Li-bi",LT:"Li-tu-a-ni-a",LI:"HZ-HY-xtên",EU:"Liên Ib Châu Âu",LU:"Lúc-xăm-Ip",MG:"Ma-đa-gát-Io",MW:"Ma-la-uy",MY:"Ma-In-xi-a",ML:"Ma-li",MA:"Ma-rốc",MK:"Ma-xê-đô-ni-a",MV:"bp-đi-vơ",MT:"bp-ta",MX:"Mê-hi-cô",MM:"Mi-an-ma",FM:"Mi-crô-nê-xi-a",ME:"a5",MS:"f1",MZ:"Mô-dăm-bích",MC:"Mô-na-cô",MR:"Mô-ri-ta-ni",MU:"Mô-ri-xơ",MD:"Môn-đô-va",MN:"Mông Cổ",NO:"Na Uy",AQ:"aD Cực",ID:"aD Dương",9B:"aD gD",NA:"aD-mi-bi-a",NR:"fv",NC:"7A kt",NP:"Nê-I1",RU:"I7",JP:"Nhật Bản",NI:"Ni-ca-ra-I8",NE:"Ni-giê",NG:"Ni-giê-ri-a",NZ:"y9 Di-lân",NU:"fw",OM:"Ô-J8",PK:"Pa-ki-b9",PA:"Pa-na-ma",PG:"Pa-pu-a y9 g5-nê",PY:"Pa-ra-ys",PW:"fu",PE:"Pê-ru",FR:"Pháp",FI:"Phần bF",FJ:"gD-gi",PH:"gD-Ge-c7",PF:"j6 a3ộc Pháp",PR:"fs km",AX:"Quần đảo n9",MP:"Quần Đảo Bắc dJ",IC:"Quần đảo ds",KY:"Quần Đảo hj",CC:"Quần đảo dx",CK:"Quần Đảo dF",FK:"Quần Đảo j2",FO:"Quần Đảo dO",MH:"Quần đảo Mác-yb",GS:"Quần đảo aD 9w và aD d0",PN:"Quần đảo d8",TC:"Quần Đảo Gm và dm",VI:"Quần đảo 8A, Mỹ",SB:"Quần đảo Xô-lô-mông",GF:"Lk a3ộc Pháp",RW:"Ru-an-đa",RO:"Ru-ma-ni",SH:"3s fz",PM:"3s fp và fo",TD:"Sát",CS:"Séc-L5",CY:"Síp",SJ:"d1 và d6 dq",TZ:"M8-da-ni-a",TJ:"Tát-gi-ki-b9",AN:"Tây Ấn Hà bF",ES:"Tây KJ yj",EH:"Tây fB",TH:"Thái bF",TR:"Thổ Nhĩ Kỳ",IO:"ykộc địa oj tại Ấn Độ Dương",TF:"ykộc Địa aD của Pháp",SE:"Thụy Điển",CH:"Thụy Sĩ",TK:"fk",TG:"Tô-gô",TO:"Tông-ga",TT:"yt-ni-đát và Tô-ba-gô",TA:"fj da fg",CN:"gz Quốc",TV:"Tu-va-lu",TM:"Tuốc-mê-ni-b9",TN:"Ku-ni-di",UA:"U-Kq-na",UZ:"U-dơ-bê-ki-b9",UG:"U-yw-đa",UY:"U-ru-ys",AU:"Úc",VU:"Va-nu-a-tu",VA:"Va-ti-căng",VE:"Vê-nê-zu-ê-la",VN:"Việt aD",QO:"Vùng xa xôi a3ộc Châu Đại Dương",GB:"Vương quốc oj",WF:"dd và df",WS:"Xa-B2",LC:"gS Lu-xi",SM:"gS Ma-ri-nô",VC:"gS F5-F4 và Grê-na-Fc",KN:"gS-kít và Nê-vi",ST:"DB Tô-mê và Ef-xi-pê",SC:"Xây-Vr",RS:"Xéc-bi",SN:"Xê-nê-yw",SL:"Xi-ê-ra Lê-ôn",SY:"Xi-ri",SG:"pW-ga-po",SK:"Xlô-va-ki-a",SI:"Xlô-U2-ni-a",SZ:"U9-di-q2",SO:"Xô-ma-li",LK:"Tp bF-ca",SD:"Xu-đăng",SR:"Xu-ri-N2",IT:"Ý",9x:"Y-ê-S3"},a.4E.TH={GR:"กรีซ",GL:"กรีนแลนด์",GU:"กวม",GP:"กวาเดอลูป",KH:"กัมพูชา",GT:"กัวเตมาลา",QA:"กาตาร์",GH:"กานา",GA:"กาบอง",GY:"กายอานา",GN:"กินี",GW:"กินี-บิสเซา",GD:"เกรเนดา",KR:"เกาหลีใต้",KP:"เกาหลีเหนือ",CX:"เกาะคริสต์มาส",CP:"เกาะคลิปเปอร์ตัน",GS:"เกาะเซาท์จอร์เจียและหมู่เกาะเซาท์แซนด์วิช",NF:"เกาะนอร์ฟอล์ก",BV:"เกาะบูเวต",IM:"เกาะแมน",AC:"เกาะแอสเซนชัน",HM:"เกาะเฮิร์ดและหมู่เกาะแมกดอนัลด์",GG:"เกิร์นซีย์",GM:"แกมเบีย",CD:"คองโก-กินชาซา",CG:"คองโก-บราซซาวิล",KM:"คอโมโรส",CR:"คอสตาริกา",KZ:"คาซัคสถาน",KI:"คิริบาส",CU:"คิวบา",KG:"คีร์กีซสถาน",KW:"คูเวต",KE:"เคนยา",CV:"เคปเวิร์ด",CA:"แคนาดา",CM:"แคเมอรูน",HR:"โครเอเชีย",CO:"โคลอมเบีย",GE:"จอร์เจีย",JO:"จอร์แดน",JM:"จาเมกา",DJ:"จิบูตี",CN:"จีน",JE:"เจอร์ซีย์",TD:"ชาด",CL:"ชิลี",SM:"ซานมารีโน",WS:"ซามัว",SA:"ซาอุดีอาระเบีย",EH:"ซาฮาราตะวันตก",9i:"ซิมบับเว",SY:"ซีเรีย",EA:"ซีโอตาและเมลิลลา",SD:"ซูดาน",SR:"ซูรินาเม",SC:"เซเชลส์",KN:"เซนต์คิตส์และเนวิส",BL:"เซนต์บาร์เธเลมี",MF:"เซนต์มาติน",LC:"เซนต์ลูเซีย",VC:"เซนต์วินเซนต์และเกรนาดีนส์",SH:"เซนต์เฮเลนา",SN:"เซเนกัล",RS:"เซอร์เบีย",CS:"เซอร์เบียและมอนเตเนโกร",ST:"เซาตูเมและปรินซิปี",SL:"เซียร์ราลีโอน",PM:"แซงปีแยร์และมีเกอลง",9u:"แซมเบีย",SO:"โซมาเลีย",CY:"ไซปรัส",JP:"ญี่ปุ่น",DG:"ดิเอโกการ์เซีย",DK:"เดนมาร์ก",DM:"โดมินิกา",TT:"ตรินิแดดและโตเบโก",TO:"ตองกา",TL:"ติมอร์ตะวันออก",TR:"ตุรกี",TN:"ตูนิเซีย",TV:"ตูวาลู",TM:"เติร์กเมนิสถาน",TK:"โตเกเลา",TG:"โตโก",TW:"ไต้หวัน",TA:"ทริสตัน เดอ คูนา",TJ:"ทาจิกิสถาน",TZ:"แทนซาเนีย",TH:"ไทย",NO:"นอร์เวย์",NA:"นามิเบีย",NR:"นาอูรู",NI:"นิการากัว",NC:"นิวแคลิโดเนีย",NZ:"นิวซีแลนด์",NU:"นีอูเอ",NL:"เนเธอร์แลนด์",AN:"เนเธอร์แลนด์แอนทิลลิส",NP:"เนปาล",NG:"ไนจีเรีย",NE:"ไนเจอร์",BR:"บราซิล",IO:"บริติชอินเดียนโอเชียนเทร์ริทอรี",BN:"บรูไน",BW:"บอตสวานา",BA:"บอสเนียและเฮอร์เซโกวีนา",BD:"บังกลาเทศ",BG:"บัลแกเรีย",BB:"บาร์เบโดส",BH:"บาห์เรน",BS:"บาฮามาส",BI:"บุรุนดี",BF:"บูร์กินาฟาโซ",BJ:"เบนิน",BE:"เบลเยียม",BY:"เบลารุส",BZ:"เบลีซ",BM:"เบอร์มิวดา",BO:"โบลิเวีย",PK:"ปากีสถาน",PA:"ปานามา",PG:"ปาปัวนิวกินี",PY:"ปารากวัย",PS:"ปาเลสไตน์",PW:"ปาเลา",PE:"เปรู",PR:"เปอร์โตริโก",PT:"โปรตุเกส",PL:"โปแลนด์",FR:"ฝรั่งเศส",PN:"พิตแคร์น",FJ:"ฟิจิ",FI:"ฟินแลนด์",PH:"ฟิลิปปินส์",GF:"เฟรนช์เกียนา",TF:"เฟรนช์เซาเทิร์นเทร์ริทอรีส์",PF:"เฟรนช์โปลินีเซีย",BT:"ภูฏาน",MN:"มองโกเลีย",MS:"มอนต์เซอร์รัต",ME:"มอนเตเนโกร",MU:"มอริเชียส",MR:"มอริเตเนีย",MD:"มอลโดวา",MT:"มอลตา",MV:"มัลดีฟส์",MO:"มาเก๊า เขตปกครองพิเศษประเทศจีน",MK:"มาซิโดเนีย",MG:"มาดากัสการ์",c8:"มายอต",MQ:"มาร์ตินีก",MW:"มาลาวี",ML:"มาลี",MY:"มาเลเซีย",MX:"เม็กซิโก",MM:"เมียนม่าร์ [พม่า]",MZ:"โมซัมบิก",MC:"โมนาโก",MA:"โมร็อกโก",FM:"ไมโครนีเซีย",GI:"ยิบรอลตาร์",UG:"ยูกันดา",UA:"ยูเครน",9x:"เยเมน",DE:"เยอรมนี",RW:"รวันดา",RU:"รัสเซีย",RE:"เรอูนียง",RO:"โรมาเนีย",LU:"ลักเซมเบิร์ก",LV:"ลัตเวีย",LA:"ลาว",LI:"ลิกเตนสไตน์",LT:"ลิทัวเนีย",LY:"ลิเบีย",LS:"เลโซโท",LB:"เลบานอน",LR:"ไลบีเรีย",VA:"วาติกัน",VU:"วานูอาตู",WF:"วาลลิสและฟุตูนา",VE:"เวเนซุเอลา",VN:"เวียดนาม",LK:"ศรีลังกา",ES:"สเปน",SJ:"สฟาลบาร์และยานไมเอน",SK:"สโลวะเกีย",SI:"สโลวีเนีย",SZ:"สวาซิแลนด์",CH:"สวิตเซอร์แลนด์",SE:"สวีเดน",EU:"สหภาพยุโรป",US:"สหรัฐอเมริกา",AE:"สหรัฐอาหรับเอมิเรตส์",GB:"สหราชอาณาจักร",CZ:"สาธารณรัฐเช็ก",DO:"สาธารณรัฐโดมินิกัน",CF:"สาธารณรัฐแอฟริกากลาง",SG:"สิงคโปร์",IC:"หมู่เกาะคานารี",CK:"หมู่เกาะคุก",KY:"หมู่เกาะเคย์แมน",CC:"หมู่เกาะโคโคส",SB:"หมู่เกาะโซโลมอน",TC:"หมู่เกาะเติกส์และหมู่เกาะเคคอส",MP:"หมู่เกาะนอร์เทิร์นมาเรียนา",VG:"หมู่เกาะบริติชเวอร์จิน",FK:"หมู่เกาะฟอล์กแลนด์",FO:"หมู่เกาะแฟโร",MH:"หมู่เกาะมาร์แชลล์",VI:"หมู่เกาะยูเอสเวอร์จิน",UM:"หมู่เกาะสหรัฐไมเนอร์เอาต์ไลอิง",AX:"หมู่เกาะโอลันด์",AS:"อเมริกันซามัว",AU:"ออสเตรเลีย",AT:"ออสเตรีย",AD:"อันดอร์รา",AF:"อัฟกานิสถาน",AZ:"อาเซอร์ไบจาน",AR:"อาร์เจนตินา",AM:"อาร์เมเนีย",AW:"อารูบา",GQ:"อิเควทอเรียลกินี",IT:"อิตาลี",IN:"อินเดีย",ID:"อินโดนีเซีย",IQ:"อิรัก",IL:"อิสราเอล",IR:"อิหร่าน",EG:"อียิปต์",UZ:"อุซเบกิสถาน",UY:"อุรุกวัย",EC:"เอกวาดอร์",ET:"เอธิโอเปีย",ER:"เอริเทรีย",SV:"เอลซัลวาดอร์",EE:"เอสโตเนีย",QO:"เอาต์ไลอิงโอเชียเนีย",AI:"แองกวิลลา",AO:"แองโกลา",AQ:"แอนตาร์กติกา",AG:"แอนติกาและบาร์บูดา",9B:"แอฟริกาใต้",DZ:"แอลจีเรีย",AL:"แอลเบเนีย",OM:"โอมาน",IS:"ไอซ์แลนด์",IE:"ไอร์แลนด์",CI:"ไอวอรี่โคสต์",HK:"ฮ่องกง เขตปกครองพิเศษประเทศจีน",HN:"ฮอนดูรัส",HU:"ฮังการี",HT:"เฮติ"},a.4E.yq={AC:"Sa RQ",AF:"jc",AX:"n9 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AQ:"RN",AG:"iU 2Q jT",AO:"iY",AI:"d7",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 5a",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d\'jw",HR:"pp",CU:"p2",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",ES:"L2",US:"yU yM",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"M3",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",QO:"Mc Mk ng pR",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",UM:"yV pH kJ 5a ng yU yM",FM:"py",MD:"l5",MC:"pv",ME:"a5",MS:"f1",MN:"l0",MA:"yL",MZ:"yD",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"LH",PN:"d8",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"Lx LJ",RW:"kl",BL:"3s lhélf",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 2Q mv",SA:"jP yJ",SN:"kU",RS:"bq",SC:"kN",SL:"mA mu",SG:"yI",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q me 6E d0 2q",KR:"6E 9U",LK:"kR k8",SH:"St. fz",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq 2q",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj de fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q a7 df 2q",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MY={CA:"ကနေဒါ",KZ:"ကာဇက်စတန်",QA:"ကာတာ",KW:"ကူဝိတ်",KY:"ကေမန် ကျွန်းစု",CR:"ကော့စ်တာရီကာ",CC:"ကိုကိုး ကျွန်းစု",CO:"ကိုလံဘီယာ",KE:"ကင်ညာ",CM:"ကင်မရွန်း",KH:"ကမ္ဘောဒီးယား",CU:"ကျူးဘား",CK:"ကွတ် ကျွန်းစု",HR:"ခရိုအေးရှား",CX:"ခရစ်စမတ် ကျွန်း",CL:"ချီလီ",CZ:"ချက် ပြည်ထောင်စု",TD:"ချဒ်",GR:"ဂရိ",GL:"ဂရင်းလန်း",GH:"ဂါနာ",GN:"ဂီရာနာ",GU:"ဂူအမ်",GM:"ဂန်ဘီရာ",JP:"ဂျပန်",JM:"ဂျမေနီကာ",JE:"ဂျာစီ",DE:"ဂျာမဏီ",GI:"ဂျီဘရော်လ်တာ",GE:"ဂျော်ဂျီယာ",JO:"ဂျော်ဒန်",GT:"ဂွာတီမာလာ",ES:"စပိန်",SK:"စလိုဗေးကီးယား",SI:"စလိုဗေးနီးယား",SG:"စင်္ကာပူ",MF:"စိန့်မာတင်",RS:"ဆားဘီးယား",SN:"ဆီနီဂေါ",SY:"ဆီးရီးယား",SD:"ဆူဒန်",SA:"ဆော်ဒီအာရေးဗီးယား",SB:"ဆော်လမွန်ကျွန်းစု",SO:"ဆိုမာလီယာ",CY:"ဆိုက်ပရက်စ်",SE:"ဆွီဒင်",CH:"ဆွစ်ဇလန်",9i:"ဇင်ဘာဘွေ",9u:"ဇမ်ဘီယာ",CN:"တရုတ်",MO:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ မကာအို",HK:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ ဟောင်ကောင်",TJ:"တာဂျီကစ္စတန်",TN:"တူနီးရှား",TR:"တူရကီ",KR:"တောင်ကိုရီးယား",9B:"တောင်အာဖရိက",TZ:"တန်ဇန်နီးယား",TO:"တွန်ဂါ",TW:"ထိုင်ဝမ်",TH:"ထိုင်း",DM:"ဒိုမီနီကာ",DO:"ဒိုမီနီကန်",DK:"ဒိန်းမတ်",NC:"နယူး ကယ်လီဒိုနီးယား",NZ:"နယူးဇီလန်",NI:"နီကာရာဂွာ",NP:"နီပေါ",NO:"နော်ဝေ",NE:"နိုင်ဂျာ",NG:"နိုင်ဂျီးရီးယား",NA:"နမ်မီးဘီးယား",NL:"နယ်သာလန်",PA:"ပနားမား",PK:"ပါကစ္စတန်",PG:"ပါပူရာနယူးဂီနီ",PY:"ပါရာဂွေး",PS:"ပါလက်စတိုင်း ပိုင်နက်",PE:"ပီရူး",PT:"ပေါ်တူဂီ",PR:"ပေါ်တူရီကို",PL:"ပိုလန်",FR:"ပြင်သစ်",GF:"ပြင်သစ် ဂီယာနာ",TF:"ပြင်သစ် တောင်ပိုင်း ပိုင်နက်များ",PF:"ပြင်သစ် ပေါ်လီနေးရှား",FO:"ဖာရိုး ကျွန်းစုများ",PH:"ဖိလစ်ပိုင်",FJ:"ဖီဂျီ",FK:"ဖောက်ကလန် ကျွန်းစု",FI:"ဖင်လန်",VA:"ဗာတီကန်",VN:"ဗီယက်နမ်",VE:"ဗင်နီဇွဲလား",VG:"ဗြိတိသျှ ဗာဂျင်း ကျွန်းစု",IO:"ဗြိတိသျှ အိန္ဒြိယ သမုဒ္ဒရာ ပိုင်နက်",BR:"ဘရာဇီး",BN:"ဘရူနိုင်း",BS:"ဘဟားမား",BM:"ဘာမူဒါ",BH:"ဘာရိန်း",BY:"ဘီလာရုစ်",BG:"ဘူဂေးရီးယား",BT:"ဘူတန်",BZ:"ဘေလီဇ်",BA:"ဘော့စနီးယား နှင့် ဟာဇီဂိုဘီးနား",BW:"ဘော့စ်ဝါနာ",BO:"ဘိုလီးဘီးယား",BD:"ဘင်္ဂလားဒေ့ရှ်",BE:"ဘယ်လ်ဂျီယမ်",MG:"မဒဂတ်စကာ",MY:"မလေးရှား",MK:"မာစီဒိုးနီးယား",MH:"မာရှယ် ကျွန်းစု",MW:"မာလာဝီ",ML:"မာလီ",MA:"မော်ရိုကို",MV:"မော်လဒိုက်",MZ:"မိုဇန်ဘစ်",MC:"မိုနကို",MX:"မက္ကဆီကို",KP:"မြောက်ကိုရီးယား",MM:"မြန်မာ",MN:"မွန်ဂိုးလီးယား",ME:"မွန်တီနိဂရိုး",9x:"ယီမင်",UA:"ယူကရိန်း",UG:"ယူဂန္ဒာ",GB:"ယူနိုက်တက်ကင်းဒမ်း",US:"ယူနိုက်တက်စတိတ်",UM:"ယူနိုက်တက်စတိတ် အပြင်ထွက် နေသည့် သေးငယ်သောကျွန်းများ",AE:"ယူအေအီး",VI:"ယူအက်စ် ဗာဂျင်း ကျွန်းစု",RW:"ရဝန်ဒါ",RU:"ရုရှ",RO:"ရိုမေးနီးယား",LA:"လာအို",LU:"လူဇင်ဘတ်",LB:"လက်ဘနွန်",LR:"လိုင်ဘေးရီးယား",LT:"လစ်သူယေးနီးယား",LV:"လတ်ဗီးယား",LK:"သီရိလင်္ကာ",HT:"ဟေတီ",HU:"ဟန်ဂေရီ",HN:"ဟွန်ဒူးရပ်စ်",AZ:"အဇာဘိုင်ဂျန်",EH:"အနောက်ပိုင်း ဆာဟာရ",AS:"အမေရိကန် စမိုအ",TL:"အရှေ့တီမော",CF:"အလယ်ပိုင်း အာဖရိက ပြည်ထောင်စု",AR:"အာဂျင်တီးနား",AF:"အာဖဂန်နစ္စတန်",AM:"အာမေနီးယား",GQ:"အီကွေတာ ဂီရာနာ",EC:"အီကွေဒေါ",EG:"အီဂျစ်",IT:"အီတလီ",IQ:"အီရတ်",IR:"အီရန်",ET:"အီသီယိုးပီးယား",UZ:"ဥဘက်ကစ္စတန်",UY:"ဥရုဂွေး",EU:"ဥရောပသမဂ္ဂ",AT:"ဩစတြီးယား",AU:"ဩစတြေးလျှား",OM:"အိုမန်",EE:"အက်စတိုးနီးယား",IS:"အိုက်စလန်",AO:"အင်ဂိုလာ",ID:"အင်ဒိုနီးရှား",CI:"အိုင်ဗရီကိုစ့်",IE:"အိုင်ယာလန်",IL:"အစ္စရေး",AI:"အန်ကွီလာ",AQ:"အန္တာတိက",IN:"အိန္ဒိယ",DZ:"အယ်လ်ဂျီးရီးယား",SV:"အယ်လ်ဆာဗေးဒိုး"},a.4E.KM={KH:"កម្ពុជា",CA:"កាណាដា",QA:"កាតារ",CV:"កាបវែរ",CM:"កាមេរូន",KZ:"កាហ្សាក់ស្តាង់់",CG:"កុងហ្គោ",CI:"កូដឌីវ័រ",CR:"កូស្តារីកា",CO:"កូឡុំប៊ី",KE:"កេនយ៉ា",KM:"កុំម៉ូរ៉ូស",GR:"ក្រិច",HR:"ក្រូអាស៊ី",KI:"គិរិបាទី",CU:"គុយបា",KW:"គុយវ៉ែត",KG:"គៀរហ្គីស្តង់",CN:"ចិន",TD:"ឆាដ",JP:"ជប៉ុន",CL:"ឈីលី",DK:"ដាណឺម៉ាក",DM:"ដូមីនីកា",NA:"ណាមីប៊ី",TZ:"តង់ហ្សានី",TJ:"តាដហ្ស៉ីគីស្តង់",TO:"តុងហ្គា",TG:"តូហ្គូ",TW:"តៃវ៉ាន់",TH:"ថៃ",TL:"ទីម័រខាងកើត",TN:"ទុយនេស៊ី",TM:"ទួគមេនីស្តង់",TR:"ទួរគី",TT:"ទ្រីនីដាដនឹងតូបាហ្គោ",NO:"ន័រវែស",NI:"នីការ៉ាហ្គ័រ",NE:"នីហ្សេរ",NG:"នីហ្សេរីយ៉ា",NZ:"នូវែលហ្សេឡង់",NP:"នេប៉ាល់",BD:"បង់ក្លាដេស្ហ",PK:"ប៉ាគីស្ថាន",PA:"ប៉ាណាម៉ា",PG:"ប៉ាពូអានូវែលហ្គីណេ",BB:"បារបាដូស",PY:"ប៉ារ៉ាហ្គាយ",BH:"បារ៉ែន",FR:"បារាំង",PS:"ប៉ាលេស្ទីន",BS:"បាហាម៉ា",BW:"បុតស្វាណា",BG:"ប៊ុលហ្គារី",BT:"ប៊ូតាន",BF:"ប៊ូរគីណាហ្វាសូ",BI:"ប៊ូរុនឌី",BO:"បូលីវី",PL:"ប៉ូលូញ",BA:"បូស្ន៉ី",BJ:"បេណាំង",PE:"ប៉េរូ",BZ:"បេលីហ្ស",BY:"បេឡារុស្ស",BE:"បែលហ្ស៉ិក",BN:"ប៊្រុយណេ",BR:"ប្រេស៊ីល",PR:"ព័រតូរីកូ",PT:"ព័រទុយហ្កាល់",MG:"ម៉ាដាហ្កាស្ការ",MA:"ម៉ារ៉ុក",MT:"ម៉ាល់តា",ML:"ម៉ាលី",MY:"ម៉ាលេស៉ី",MK:"ម៉ាសេដន",FM:"មិក្រូនេស៊ី",MX:"ម៉ិចសិក",MM:"មីយ៉ាន់ម៉ា",MN:"ម៉ុងហ្គោលី",MC:"ម៉ូណាកូ",MR:"ម៉ូរីតានី",MU:"ម៉ូរីទុស",MZ:"ម៉ូហ្សាំប៊ិក",9x:"យេមែន",RW:"រវ៉ាន់ដា",RO:"រូម៉ានី",RU:"រូស្ស៊ី",LI:"លិចទេនស្តែន",LT:"លីទុយអានី",LB:"លីបង់",LY:"លីប៊ី",LR:"លីបេរីយ៉ា",LU:"លុចហ្សំបួរ",LS:"លើសូតូ",VA:"វ៉ាទីកង់",VN:"វៀតណាម",VE:"វេនេហ្ស៊ុយឡា",US:"សហរដ្ឋអាមេរិក",KR:"សាធារណរដ្ឋកូរ៉េ",CZ:"សាធារណរដ្ឋឆេក",DO:"សាធារណរដ្ឋដូមីនីកែន",KP:"សាធារណរដ្ឋប្រជាធិបតេយ្យប្រជាមានិតកូរ៉េ",MD:"សាធារណរដ្ឋម៉ុលដាវី",CF:"សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល",WS:"សាមូអា",EH:"សាហារ៉ាខាងលិច",SG:"សិង្ហបុរី",CY:"ស៉ីពរ៍",SY:"ស៊ីរី",SC:"សីសែល",SE:"ស៊ុយអែដ",SD:"ស៊ូដង់",SO:"សូម៉ាលី",SR:"សូរីណាម",SZ:"សូហ្ស៉ីឡង់",SN:"សេនេហ្កាល់",SL:"សេរ៉ាឡេអូន",LK:"ស្រីលង្កា",SK:"ស្លូវ៉ាគី",SI:"ស្លូវេនី",CH:"ស្វីស",HK:"ហុងកុង",HU:"ហុងគ្រី",HN:"ហុងឌួរ៉ាស់",NL:"ហូល្លង់",HT:"ហៃទី",GH:"ហ្កាណា",GT:"ហ្គាតេម៉ាឡា",GA:"ហ្គាបុង",GN:"ហ្គីណេ",GW:"ហ្គីណេប៊ីសូ",GQ:"ហ្គីណេអេក្វាទ័រ",GY:"ហ្គីយ៉ាណា",GM:"ហ្គាំប៊ី",PH:"ហ្វ៉ីលីពីន",FJ:"ហ្វ៉ីហ្ស៉ី",FI:"ហ្វាំងឡង់",JO:"ហ៊្សកដានី",GE:"ហ្សកហ្ស៉ី",JM:"ហ្សាម៉ាអ៉ិគ",DJ:"ហ្ស៉ីបូទី",9i:"ហ្ស៊ីមបាបវ៉េ",9u:"ហ្សាំប៊ី",LV:"ឡាតវីយ៉ា",LA:"ឡាវ",AO:"អង់ហ្គោឡា",AD:"អានដូរ៉ា",AM:"អារមេនី",SA:"អារ៉ាប៊ីសាអ៊ូឌីត",AL:"អាល់បានី",DZ:"អាល់ហ្សេរី",DE:"អាល្លឺម៉ង់",AF:"អាហ្វហ្គានីស្ថាន",9B:"អាហ្វ្រិកខាងត្បូង",AR:"អាហ្សង់ទីន",AZ:"អាហ៊្សែរបែហ្សង់",IN:"ឥណ្ឌា",ID:"ឥណ្ឌូនេស៊ី",IT:"អ៊ីតាលី",IR:"អ៊ីរ៉ង់",IQ:"អ៊ីរ៉ាក់",IL:"អ៊ីស្រាអែល",IS:"អ៉ីស្លង់",UA:"អ៊ុយក្រែន",UY:"អ៊ុយរុយហ្គាយ",AT:"អូទ្រីស",OM:"អូម៉ង់",AU:"អូស្ត្រាលី",UG:"អ៊ូហ្កង់ដា",UZ:"អ៊ូហ្សបេគីស្តង់",IE:"អៀរឡង់",EC:"អេក្វាឌ័រ",ET:"អេត្យូពី",AE:"អេមីរ៉ែទអារ៉ាប់រួម",ER:"អេរីទ្រា",EE:"អេស្តូនី",ES:"អេស្ប៉ាញ",EG:"អេហ្ស៉ីប",SV:"អែលសាល់វ៉ាឌ័រ"},a.4E.ID={AF:"jc",9B:"kg f7",AL:"k9",DZ:"lG",US:"l7 zF",AD:"F3",AO:"iY",AI:"d7",AQ:"Ff",AG:"iU 3X jT",AN:"DN lv",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"W7",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"Wl",BE:"Wm",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BR:"Wg",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",EA:"dP 3X dG",TD:"le",CL:"xh",CN:"Xj",CI:"XK d\'jw",DK:"jy",DG:"dw dv",DM:"rx",EC:"OZ",SV:"El k4",ER:"k7",EE:"k5",ET:"jY",FJ:"jX",PH:"y3",FI:"NB",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GD:"jV",GL:"Qr",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GQ:"5A QU",GW:"5A-jh",GY:"dA",GF:"dA mU",HT:"jg",HN:"jk",HK:"dB jl bk 7Y",HU:"R2",IN:"jf",ID:"cl",GB:"mE QZ",IQ:"QY",IR:"j7",IE:"C7",IS:"R0",IM:"j9 of bp",IL:"jd",IT:"NX",JM:"zm",JP:"My",DE:"za",JE:"dE",DJ:"WJ",NC:"VP mz",KH:"Al",CM:"zr",CA:"zs",KZ:"B6",KE:"l9",AX:"3R n9",IC:"3R ds",CC:"3R dx",CK:"3R dF",FO:"3R dO",KY:"3R Cf",UM:"3R Bb BK l7 zF",FK:"3R zY",MP:"3R dJ nb",MH:"3R kp",NF:"3R dK",PN:"3R d8",SB:"3R kq",GS:"3R 6E d0 3X 6E 9w",SJ:"3R d1 3X d6 dq",TC:"3R kM 3X dm",VI:"3R U.S. 8A",VG:"3R 8A mE",WF:"3R dd 3X df",KG:"KB",KI:"ks",CO:"Kp",KM:"Jy",CD:"zc - kc",CG:"zc - aQ",KR:"9U f7",KP:"9U nb",CR:"ze z1",HR:"Lw",CU:"LD",KW:"kv",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"LE",LI:"ky",LT:"M0",LU:"M1",MG:"zv",MO:"M2 bk 7Y",MK:"M9",MV:"Lv",MW:"kx",MY:"bW",ML:"kK",MT:"kF",MA:"Vu",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"Qx",MD:"l5",MC:"QB",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NE:"kP",NG:"kb",NI:"JQ",NU:"fw",NO:"KF",PG:"rX ka rX",OM:"kd",QO:"Jc IY",PS:"He Lp",PK:"kj",PW:"fu",PA:"kw",PY:"kz",FR:"mU",PE:"kB",PL:"M4",PF:"Mb sC",PT:"Mh",PR:"fs Mf",AC:"b7 kA",BV:"b7 fx",CX:"b7 kG",CP:"b7 fy",HM:"b7 fD 3X 3R fE",QA:"ku",CF:"aQ kg rv",CZ:"aQ LW",DO:"aQ rx",RE:"Rékf",RO:"JX",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s KA",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 3X fo",VC:"3s l2 3X l8",WS:"ag",AS:"ag l7",SM:"l6 kZ",ST:"mP mw 3X mv",NZ:"Eh mz",SN:"kU",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"mA mu",SG:"sV",CY:"Uv",SK:"l4",SI:"l1",SO:"kS",ES:"N6",LK:"kR k8",SD:"fb",SR:"ml",SZ:"jb",SE:"RG",CH:"Qm",SY:"j5",TW:"j8",TJ:"mN",CV:"QX je",TZ:"jn",TF:"R3 QV f7 sC",TH:"ji",TL:"jj j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"Rb",TV:"iJ",UG:"iK",UA:"Qe",AE:"qG Qd cL",EU:"qG Qh",UY:"iM",UZ:"iS",VU:"iT",VA:"Qc",VE:"j0",VN:"j1",IO:"Q4 mE di Q2 Q6",9x:"qp",JO:"Qz",GR:"r9",9u:"iV",9i:"iW"},a.4E.rn={AL:"阿尔巴尼亚",DZ:"阿尔及利亚",AF:"阿富汗",AR:"阿根廷",AE:"阿拉伯联合酋长国",AW:"阿鲁巴",OM:"阿曼",AZ:"阿塞拜疆",AC:"阿森松岛",EG:"埃及",ET:"埃塞俄比亚",IE:"爱尔兰",EE:"爱沙尼亚",AD:"安道尔",AO:"安哥拉",AI:"安圭拉",AG:"安提瓜和巴布达",AT:"奥地利",AX:"奥兰群岛",AU:"澳大利亚",BB:"巴巴多斯",PG:"巴布亚新几内亚",BS:"巴哈马",PK:"巴基斯坦",PY:"巴拉圭",PS:"巴勒斯坦领土",BH:"巴林",PA:"巴拿马",BR:"巴西",BY:"白俄罗斯",BM:"百慕大",BG:"保加利亚",MP:"北马里亚纳群岛",BJ:"贝宁",BE:"比利时",IS:"冰岛",PR:"波多黎各",PL:"波兰",BA:"波斯尼亚和黑塞哥维那",BO:"玻利维亚",BZ:"伯利兹",BW:"博茨瓦纳",BT:"不丹",BF:"布基纳法索",BI:"布隆迪",BV:"布维特岛",KP:"朝鲜",GQ:"赤道几内亚",QO:"大洋洲边远群岛",DK:"丹麦",DE:"德国",DG:"迪戈加西亚岛",TL:"东帝汶",TG:"多哥",DM:"多米尼加",DO:"多米尼加共和国",RU:"俄罗斯",EC:"厄瓜多尔",ER:"厄立特里亚",FR:"法国",FO:"法罗群岛",PF:"法属波利尼西亚",GF:"法属圭亚那",TF:"法属南部领土",VA:"梵蒂冈",PH:"菲律宾",FJ:"斐济",FI:"芬兰",CV:"佛得角",FK:"福克兰群岛",GM:"冈比亚",CG:"刚果(布)",CD:"刚果(金)",CO:"哥伦比亚",CR:"哥斯达黎加",GG:"格恩西岛",GD:"格林纳达",GL:"格陵兰",GE:"格鲁吉亚",CU:"古巴",GP:"瓜德罗普岛",GU:"关岛",GY:"圭亚那",KZ:"哈萨克斯坦",HT:"海地",KR:"韩国",NL:"荷兰",AN:"荷属安的列斯群岛",HM:"赫德与麦克唐纳群岛",ME:"黑山共和国",HN:"洪都拉斯",KI:"基里巴斯",DJ:"吉布提",KG:"吉尔吉斯斯坦",GN:"几内亚",GW:"几内亚比绍",CA:"加拿大",GH:"加纳",IC:"加纳利群岛",GA:"加蓬",KH:"柬埔寨",CZ:"捷克共和国",9i:"津巴布韦",CM:"喀麦隆",QA:"卡塔尔",KY:"开曼群岛",CC:"科科斯群岛",KM:"科摩罗",CI:"科特迪瓦",KW:"科威特",CP:"克利珀顿岛",HR:"克罗地亚",KE:"肯尼亚",CK:"库克群岛",LV:"拉脱维亚",LS:"莱索托",LA:"老挝人民民主共和国",LB:"黎巴嫩",LT:"立陶宛",LR:"利比里亚",LY:"利比亚",LI:"列支敦士登",RE:"留尼汪",LU:"卢森堡",RW:"卢旺达",RO:"罗马尼亚",MG:"马达加斯加",MV:"马尔代夫",MT:"马耳他",MW:"马拉维",MY:"马来西亚",ML:"马里",MK:"马其顿",MH:"马绍尔群岛",MQ:"马提尼克群岛",c8:"马约特",IM:"曼岛",MU:"毛里求斯",MR:"毛里塔尼亚",US:"美国",UM:"美国边远小岛",AS:"美属萨摩亚",VI:"美属维京群岛",MN:"蒙古",MS:"蒙塞拉特群岛",BD:"孟加拉国",PE:"秘鲁",FM:"密克罗尼西亚联邦",MM:"缅甸",MD:"摩尔多瓦",MA:"摩洛哥",MC:"摩纳哥",MZ:"莫桑比克",MX:"墨西哥",NA:"纳米比亚",9B:"南非",AQ:"南极洲",GS:"南乔治亚岛和南桑威齐群岛",NR:"瑙鲁",NI:"尼加拉瓜",NP:"尼泊尔",NE:"尼日尔",NG:"尼日利亚",NU:"纽埃",NO:"挪威",NF:"诺福克岛",EU:"欧盟",PW:"帕劳",PN:"皮特凯恩群岛",PT:"葡萄牙",JP:"日本",SE:"瑞典",CH:"瑞士",SV:"萨尔瓦多",WS:"萨摩亚",RS:"塞尔维亚",CS:"塞尔维亚和黑山",SL:"塞拉利昂",SN:"塞内加尔",CY:"塞浦路斯",SC:"塞舌尔群岛",SA:"沙特阿拉伯",BL:"圣巴泰勒米",CX:"圣诞岛",ST:"圣多美和普林西比",SH:"圣赫勒拿",KN:"圣基茨和尼维斯",LC:"圣卢西亚",MF:"圣马丁",SM:"圣马力诺",PM:"圣皮埃尔和密克隆",VC:"圣文森特和格林纳丁斯",LK:"斯里兰卡",SK:"斯洛伐克",SI:"斯洛文尼亚",SJ:"斯瓦尔巴特和扬马延",SZ:"斯威士兰",SD:"苏丹",SR:"苏里南",SB:"所罗门群岛",SO:"索马里",TJ:"塔吉克斯坦",TW:"台湾",TH:"泰国",TZ:"坦桑尼亚",TO:"汤加",TC:"特克斯和凯科斯群岛",TA:"特里斯坦-达库尼亚群岛",TT:"特立尼达和多巴哥",TN:"突尼斯",TV:"图瓦卢",TR:"土耳其",TM:"土库曼斯坦",TK:"托克劳",WF:"瓦利斯和富图纳",VU:"瓦努阿图",GT:"危地马拉",VE:"委内瑞拉",BN:"文莱",UG:"乌干达",UA:"乌克兰",UY:"乌拉圭",UZ:"乌兹别克斯坦",GR:"希腊",ES:"西班牙",EH:"西撒哈拉",SG:"新加坡",NC:"新喀里多尼亚",NZ:"新西兰",HU:"匈牙利",EA:"休达及梅利利亚",SY:"叙利亚",JM:"牙买加",AM:"亚美尼亚",9x:"也门",IQ:"伊拉克",IR:"伊朗",IL:"以色列",IT:"意大利",IN:"印度",ID:"印度尼西亚",GB:"英国",VG:"英属维京群岛",IO:"英属印度洋领地",JO:"约旦",VN:"越南",9u:"赞比亚",JE:"泽西岛",TD:"乍得",GI:"直布罗陀",CL:"智利",CF:"中非共和国",CN:"中国",MO:"中国澳门特别行政区",HK:"中国香港特别行政区"},a}),2k.4i("5j").kC(["$LN",1a(a){"2r 2g";a.8j("3m/a6.2T",\'<1h 1f="3k-fO">

    {{7J.a1}}

    <1h 1f="3k-2A">
    {{7J.2Z}}
    <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uE.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o !== \\\'MY\\\'"> <1X 1S="1w" ng-2j="1c.7h" 1f="2h-3b" 4x="{{1N.7f}}"> <1r 1f="fa fa-5K-4T-o fa-lg 2N-jW" ng-2O="1c.7h = \\\'\\\'"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o === \\\'MY\\\'"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7H}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A" ng-3T="1c.6o === \\\'MY\\\'"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.1C }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uu.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.cv }} ****** {{ 1H.cx }} <1h 1f="1G-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.kT }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uw.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.3W }} <1h 1f="1G-bs-1o-1k-1z"> <7g 1f="3S-iL" ng-3a="{{ 1H.4v }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'"> <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uz.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7R}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H[1] }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/qe.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7V}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/7r.2T",\'<1h 1f="1w-4j tX-4j">

    {{1N.7S}}

    {{1N.7u}}

    <1h 1f="1w-4j tX-4j" ng-if="1c.4Z">

    {{1N.86}}

    \'),a.8j("3m/KL.2T",\'

    4C X-KV

    <2h 1f="2h-Lf"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">5c <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.5c"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3h <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3h"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3E <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3E"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3I <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3I"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3g <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3g"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">1T <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.1T"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3t <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3t"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3r <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3r"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2J <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2J"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3D <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3D"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2i <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2i"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">eP <1h 1f="3d-sm-8"> <1X 1S="tO" ng-2j="1c.eP"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2b <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2b"> <1h 1f="2h-1A"> <1h 1f="3d-sm-Jh-2 3d-sm-10"> <2G ng-2O="wo()">jL \'),a.8j("3m/9p.2T",\'<1h 1f="1o-1A"> <1h 1f="1o-1A-1H 3h"> <1r 1f="1y-1z">{{1N.5h}} <1r 1f="1o-1k 1V-1G">{{1c.3h}} <1h 1f="1o-1A-1H 3F 1w-4j"> <1r 1f="1y-1z 1V-1y">{{1c.3F}} <1r 1f="qY-1w">{{1c.bv}} <1h 1f="1o-1A-1H 3I"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3I" 4x="{{1N.8u}}" ng-ce="!1c.4o || 1c.jI"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jI">&6z; <1h 1f="1o-1A-1H 3t"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3t" 4x="{{1N.8i}}" ng-ce="!1c.4o || 1c.jH"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jH">&6z; <1h 1f="1o-1A-1H 3r"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3r" 4x="{{1N.8p}}" ng-ce="!1c.4o || 1c.jE"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jE">&6z; <1h 1f="1o-1A-1H 5c"> <1X 1f="1o-1k e6" 1S="1w" ng-2j="1c.5c" 4x="{{1N.7K}}" ng-ce="!1c.4o || 1c.jF"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jF">&6z; <1r 1f="1y-1z">{{1N.8d}} <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H">&6z; <1r 1f="1o-1k 1V-1G">{{1c.au}} <1h 1f="Hv-2h" ng-3T="1c.2b===\\\'4X\\\'||1c.2b===\\\'aA\\\'||1c.2b===\\\'Hw\\\'"> <1h 1f="1m-4X-4q-2h" ng-3T="1c.6a.1i>0"> <1r 1f="1m-4q-1z">{{1N.83}} <1h 1f="1o-1A-1H" ng-2O="wW()"> <1r 1f="1y-1z">{{1N.7B}} <1r 1f="1o-1k 1V-1G">&6z; <1X id="vv" 1f="1o-1k 1V-1G 4X-4q-1X" 1S="9t" ng-2j="1c.6d" 4x="jJ jJ jJ jJ" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7E}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1X id="vs" 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.5t" 4x="{{1N.89}}" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7Z}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1c.5G" 4x="vA"> <1r 1f="1y-1z">{{1N.6S}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.ci}} <1h 1f="1o-1A-1H 7h" ng-2O="t7()"> <1r 1f="1y-1z">{{1N.7f}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.7h}} <1h 1f="4X-r6"> <1r>{{1c.w1}} <1h 1f="pD-2h" ng-3T="1c.2b===\\\'cq\\\'"> <1h 1f="1o-1A-1H pD-oF-1z"> <1r 1f="1y-1z">{{1N.84}} <1h 1f="1o-1A-1H 1w-4j pD-oF"> <1r 1f="qY-1w">{{1c.oK}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7G}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 4q-3B-1X" 1S="9t" ng-2j="1c.8U" 4x="{{1N.8a}}"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">oN <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.bt" 4x="(c7)"> <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="qR()" 1f="6g-2G" ng-HP="r3()">&6z;{{1N.5D}} <1h 1f="fN"> <1h 1f="1w-4j bm-r6-8E"> <7g ng-3a="2R/rq.3C" 1f="rq"> <1h 1f="mp-pl"> <1r>V{{1c.cR}} \'),a.8j("3m/6O.2T",\'<1h 1f="1o-1A" id="6O"> <1h 1f="1o-1A-1H 1w-4j"> <7g id="6O-iL" 1f="6O-iL" ng-3a="{{ p3 }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'" ng-5i="!iQ"> <1h ng-5i="iQ">

    {{t6}}

    <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.6y}} <1r 1f="1o-1k 1V-1G">4C {{2I.3S}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.8f}} <1r 1f="1o-1k 1V-1G" ng-if="!2I.a9">{{2I.5p}} <1r 1f="1o-1k 1V-1G" ng-if="2I.a9">{{2I.a9}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.5p" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="!2I.a9"> <2k-5g ng-2j="8H.a9" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="2I.a9"> <1h 1f="1o-1A-1H" ng-3T="2I.jo.1i > 0"> <1r 1f="1y-1z">{{2I.jo}} <1r 1f="1o-1k 1V-1G">{{2I.cP}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.cP" bc-1B="bc" bc-1f="5g" bc-1S="7g"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.88}} <1r 1f="1o-1k 1V-1G">{{2I.jm}}{{2I.oT}} <1h 1f="1o-1A-1H" ng-3T="2I.ee.1i > 0"> <1r 1f="1y-1z">{{1N.6q}} <1h 1f="1o-1A">
  • {{ 1H }}
  • <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="sl()" 1f="6g-2G">{{1N.8k}} \'),a.8j("3m/pe.2T",\'<1h 1f="3k-fO">

    {{sL}}

    <1h 1f="3k-2A">

    <1h 1f="1o-1A-1H 1o-1A-1H-4G"> <1r>3e <1h 1f="3N-1A 3N-1A-4G" ng-5i="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'bX\\\'" ng-5i="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">bX <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'11\\\'">11 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'22\\\'" ng-3T="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">22 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1s\\\'">1s <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1E\\\'">1E <1h 1f="3N-1A 3N-1A-4G" ng-3T="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'kk\\\'">kk <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'9k\\\'">9k <1r>1E: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.1E}} <1r>bK: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.bK}} <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>9m <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.9m" 4x="9m"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.5p" 4x="5p"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 52 <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fH" 4x="52"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 7o <1X 1f="1o-1k 1V-1G" 1S="1w" ng-2j="1l.fS" 4x="7o"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-3T="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fm" 4x="fm"> <1h 1f="3k-b4" 2M="1w-VV: 4j"> <2G 1f="44-2G" 1S="2G" ng-2O="q4()" 2M="1n:30%; 6H-3q:#OY">{{1N.8v}} <2G 1f="44-2G" 1S="2G" ng-2O="6g()" 2M="1n:40%; 7w-1y:Qt">{{1N.5D}} \')}]);',62,3734,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|this|sdkData|var|return|class|prototype|div|length|default|value|data|new|width|list|typeof|isInternalDebugging|span|null|toString|Object|height|text|void|left|label|group|options|name|throw|Error|__esModule|right|item|for|document|call|push|mp_language|localizable|255|node|top|Math|type|mp_merchant_ID|case|pull|image|input|CryptoJS|status|||||||||||not|mp_channel|tidak||TypeError|encode|strict|form|mp_amount|model|angular|canvas|been|exports|String|else|Islands|use|setPrototypeOf|window|hasn|fontSize|substring|parent|defineProperty|css|body|replace|break|renderer|filter|mp_verification_key|button|parseInt|C5ResultData|mp_app_name|then|valid|style|search|click|sdkConstants|and|images|catch|html|svg|ctx|BERHAD|must|instanceof|errorDesc|||||||||||src|control|try|col|status_code|commErrorHandler|mp_country|mp_order_ID|object|substr|modal|console|views|create|result|controller|color|mp_bill_mobile|Saint|mp_bill_email|Invalid|BANK|new_credit_card|setAttribute|Cannot|createElement|MPdomain|number|png|mp_password|mp_username|mp_currency|maskname|100|mp_bill_name|mp_request_type|Promise|clip|position|btn|args|forEach|undefined|Kepulauan|channel|show|indexOf|128|title|dan|found|super|||||close|||||constructor|Super|__proto__|configurable|enumerable|either|expression|writable|ImageUnavailable|module|center|BCARD|mp_transaction_id|current_token|currency|mp_editing_enabled|called|card|initialised|ReferenceError|match|Billing|logo_url|BCard|placeholder|resolve|mp_encrypt_credentials|AES|MYR|MOLPay|none|country|switch|sandboxed|documentElement|html2canvas|getContext|appendChild|utils|mp_secured_verified|SandboxedResultData|animation|templateUrl|mobile|log|MALAYSIA|circle|seed|encodings|php|credit|open|mp_sandbox_mode|||amount|displayValue|textAlign|trim|fromCharCode|||email|Island|element|mp_bill_description|available_channel|proxy|max|barcode|OrderID|hide|molpayXsdkApp|token|map|round|API|line|txn_ID|xCF|size|Close|mp_credit_card_expiry|PleaseSelectAChannel|method|Utf8|repeat|borders|enc|Guinea|decrypt|BillingMobileMustBeMoreThan4Characters|Proceed|AmountNotFound|currentActiveModal|mp_credit_card_cvv|JSON|sah|SandBoxed|times|preloadCount|font|BillingNameMustBeMoreThan2Characters|scope|InvalidBillingMobile|D7ResultData|concat|split|SHA256|callNativeWebview|wastong|parseFloat|mode|index|start|||||||rootScope|105|||available_token|SecuredEncryptionFailed|nodeType|mp_credit_card_no_display|Loading|CVV|proceed|BillingDescriptionMustBeMoreThan4Characters|ownerDocument|CommunicationError|AccessDeniedMidAppnameVerificationkey|InvalidPaymentInformation|InvalidAmount|Tampered|mp_credit_card_country|NoChannelFoundCheckCurrencyValue|Note|CountryNotFound|MerchantIdNotFound|AdvancedPhoneValidationFailed|UnhandledErrorContactSupport|UsernameNotFound|internet|TransactionIdForReceiptRequestNotFound|Services|nbsp|InvalidCountryCode|VerificationKeyNotFound|InvalidBillingEmail|support|South|CurrentMsgType|OrderIdNotFound|background|AppNameNotFound|Preparing|AdvancedEmailValidationFailed|CurrencyNotFound|textMargin|mp_ga_category|receipt|dismiss|RecurringPaymentCantProceedOnThisChannel|apply|Country|nodeName|Reminder|path|Yes|PasswordNotFound|250|BillingEmailMustBeMoreThan4Characters||||colorStops||||preloadItems|url||exp|min|HttpPost|xC8|checksum|BankName|img|mp_credit_card_bank|MD5|display|test|101|important|auto|chksum|_renderProperties|bottom|finalizingpayment|marginTop|contentWindow|PleaseWait|onerror|margin|stop|pInstruction|InvalidBillingName|New|CardNumber|InvalidBCardPin|SandboxModeIsOn|ExpDate|InvalidBCardNumber|BCardPrefix|SearchBank|content|alertdata|BillingDescription|hindi|render|InvalidDebitCardNumber|InvalidExpDate|cssInt|DebitCardCheckingHasBeenSkipped|SearchCountry|FinalizingPaymentStatus|base64|before|SearchError|Nombor|InternetDisconnectedThisRequiresInternet|China|Cvv||href||NewCard|UseBCard||SandboxedModeOn||PayableAmount|MMYY|BCardNumberPlaceHolder|errors|promise|PayThrough|SandBoxedUseOptions|TransactionId|GaTrackEvent|205|BillingEmail|put|SaveImageToDevice|SandBoxedOptions|errormsg|onload|ditemukan|BillingMobile|InvalidCreditCardNumberLuhn|stack|InvalidBillingDescription|InvalidCreditCardNumber|BillingName|Cancel|InvalidCvvNumber|ditemui|thanh|stringify|Virgin|mod|mp_credit_card_no|_options|container|toLowerCase|LUHN|receiptData|240|marginLeft|RM1|join|nodecontainer|than|mp_filter|isRecurring|more|getElementById|245|139|bcard_no|6298|app|cvv|contexts|NetworkErrorSandboxedMode||opacity||MerchantID|||||||toUpperCase|characters|msgType|www|Image|subdivide|overflow|Node|ZW|drawImage|failed|format|app_code|mahanap|rectangle|paymentinfo|backgroundClip|Sandboxed|TxnData|tel|ZM|hasOwnProperty|Georgia|YE|defaultView|ang||ZA|French|YY|slice|penagihan|hasTransform|mp_channel_editing|testMerchantCredentialsCallback|allowTaint|MobileNewApiUrl|watch|_|please|230|sandbox|Receipt|SHA1|211|shift|Korea|marginRight|rgba|lebih|AlertModalCtrl|radio|origin|errorTitle|bounds|thu|reasons|Montenegro|alertmodal|the|Bank|payTxnID|Debit||parse|splice|InternalUsed|block|Samoa|Search|in_app_mode|removeChild|translate|preloadStarted||||238|opt|string|||mp_channel_title||Payment|Number||renderQueue|credit3|guardHeight|numero|Nam|device_info|expdate|Date|epay|uib|primary|message|Please|ISLAMIC|floor|uibModalInstance|Email|Republik|Advanced|parseBounds|check|Card|kartu|nextA|api|hidden|arguments|220|01010|x00|setTimeout|footer|getEncoding|x7F|Pulau|112|xtan||nextB||Sandbox||Array|cdomain|month||year|SAR|domain_mode|molpay|marginBottom|textPosition|Man|Serbia||aligned|bcard_pin||mp_amount_display|firstChild|United|CODE128|nativeWebTransactionResults|Nama|169|British|PasswordHash|Payload|Lan|Congo|ApiC5|isStarting|B4ResultData|reason|Republic|Checksum|cash|chevron|RecordType|Token|PAN|mp_bin_lock|location|json|Type|Malaysia|00|RecurringApiUrl|DirectApiUrl|bin_checked|||||multi|application|pin|YT|javascriptEnabled||CanvasRenderer|date||readonly|mga|error||mp_credit_card_country_title|end|payment|Indonesia|bcOptions|nodes||transform|pointbcard||binaryRepresentation|validation||bin|setFillStyle|bin4|gagal|loading|setVariable|password|offsetTop|nextC|x20|charCodeAt|define|offsetWidth|offsetHeight|mp_advanced_email_validation_enabled|isArray|Arab|computedStyles|async|rgb|pcode|now|sdk_version|imageTimeout|encrypt|transactionRequest|buttonClicked|mp_advanced_phone_validation_enabled|fontOptions|zIndex|removeContainer|Sandwich|Svalbard|Internet|GetAvailableChannelByIdUrl|kredit|T1Url|Jan|Anguilla|Pitcairn|Nomor||dapat|Netherlands|Wallis||Futuna|Territory|saluran||GetBankListUrl|transaksi|offline|Caicos|pembayaran|||Mayen|Aruba|Canary||tho|Garcia|Diego|Cocos|vui|Gibraltar|Guyana|Hong|Guernsey|Guadeloupe|Jersey|Cook|Melilla|B4ResultUrl|Recurring|Mariana|Norfolk|Points|Network|halaga|Faroe|Ceuta|Bhutan|Bermuda|character|digit|toFixed|ucs2|createTextNode|barcodePadding|require|children|when|link|fill|darken|bottomRightInner|bottomLeftInner|billing|topRightInner|toggle|border||normal||createRange|notes|backgroundImages|transformData|CIMB|issuer_bank|bank_country|styles||visible||toDataURL|bin_checking_in_progress|ELEMENT_NODE|UPC|lineColor|curveTo|inline|topLeftInner|rect|210|_encodings|with|x5F|fabric|xml|206|200|decode64|getBoundingClientRect|offsetBounds|amd|loaded|224|getBounds|ceil|mod10|topLeftOuter|mp_debug_mode|isPseudoElement|bottomLeftOuter|bottomRightOuter|topRightOuter|getAttribute|className|isTransparent|tainted|matrix|get||Montserrat|listgroup|marginless|randomIntFromInterval|updateSdkData|authData|Selatan|merchant_id|Basic||Sudan|Currency|SubMerchant|mp_express_mode|mp_installmonth|Cunha|ReturnURL|Signature|Tristan|Tokelau|mp_tcctype|tranID||Miquelon|Pierre|verifyChecksum|global|Puerto|Status|Palau|Nauru|Niue|Bouvet|Clipperton|Helena|Amount|Sahara|mp_preferred_token|Heard|McDonald|CustDesc|mp_cash_waittime|tampered_amount|CustContact|ReferenceNo|TxnType|144|view|row|header|bind|https|TxnChannel|tampered_chksum|TxnAmount|CustEmail|TxnCurrency|CustName|nama|yang|merchant|127|username|nilai|untuk|reject|Ghi|ready|xhr|crossOrigin|online||Andorra|some|logging|1023|fontWeight|fontFamily|cssList||lineargradientcontainer|transformMatrix|svgcontainer|143|self|222|ini|248|clone|cloneTo|moz||renderImage|computedStyle|punycode|TEXT_NODE|Trung|fixed|INPUT|isElementVisible|Phi|backgroundColor|transition|taintCtx|harus|asyncRenderer|backgroundRepeatShape|153|padding|192|karakter|gradient|160|TYPES|dari|Xan|pagsingil|Use|http|transaction|results|onrendered|timeout|device|RHB|||||Name|Mobile|Description|isDeploy||addCustomCSS|controllerAs|searchString|0px|kad|percubaan|description||Cayman|nativeWebCloseAllWindows|advancedPhoneValidate|advancedEmailValidate|wrapper_version||BANKING|factory|mp_is_escrow|uibModal|token_status|l_version|replaceAll|merchantID|mp_allowed_channels|innerHTML|RequestData|D7ARequeryRetryIntervalInMs|ApiD7|encodeURIComponent|BCARD_PIN|com|module_id|generate|mp_ga_enabled|CC_PAN|CC_CVV2|BCARD_NO|CC_TOKEN|CC_YEAR|CC_MONTH|getMaximumHeightOfEncodings|getTotalWidthOfEncodings|calculatePair|CODE39|select|guardedEncoding|flatEncoding|CODE128A|CODE128B|EAN8|EAN13|CODE128C|higit|configure|Access|209|204|218|debit|hasil|Negara|lastChar|structure|key|Unhandled||encryption||EAN5|EAN2|fillRect|tra|InvalidInputException|CANCEL|pharmacode||giao|daripada|Ralat|sila||calculateEncodingAttributes|mesti|isNaN|GenericBarcode|MSI|ITF|mangyaring|ITF14|MSI10|MSI11|codabar|MSI1110|save|MSI1010|gradientcontainer|error_message|Tuvalu|Uganda|logo|Uruguay|Tunisia|Tobago|Tonga|receiptLogoCanShow|Trinidad|Uzbekistan|Vanuatu|Antigua|Zambia|Zimbabwe|Guam|Angola|Guatemala|Venezuela|Vietnam|Falkland|Togo|Leste|Syria|Polynesia|Iran|Taiwan|Isle|Territories|Swaziland|Afghanistan|Israel|Verde|India|Haiti|Bissau|Thailand|Timor|Honduras|Kong|cur|Tanzania|pcode_lbl|Myanmar|Dominica|Bosnia||Herzegovina|Botswana|Brunei|Ivoire|Bolivia|Denmark|Benin|Exp|Bulgaria|Burkina|billinginfo|mp_bill_mobile_edit_disabled|mp_bill_description_edit_disabled|Burundi|mp_bill_email_edit_disabled|mp_bill_name_edit_disabled|xxxx|Faso|Pay|Belize|Barbados|Gambia|Saudi|Gabon|Argentina|Ghana|Barbuda|bar|Grenada|icon|Fiji|Ethiopia|Austria|Azerbaijan|Bahrain|Bangladesh|Australia|Salvador|Estonia|Armenia|Eritrea|Lanka|Albania|Papua|Nigeria|Kinshasa|Oman||union|Afrika|||Pakistan|accepted|Rwanda|Rico|Martinique||Marshall|Solomon|Kitts|Kiribati|Caledonia|Qatar|Kuwait|Panama|Malawi|Liechtenstein|Paraguay|Ascension|Peru|run|Liberia|Lesotho|Malta|Christmas|Laos|Latvia|Outlying|Mali|Nevis|Turks|Seychelles|Mauritius|Niger|Mauritania|Sri|Somalia|debit_credit|Senegal|Lucia|Namibia|Mayotte|Nepal|Marino|Mongolia|Slovenia|Vincent|Martin|Slovakia|Moldova|San|Amerika|Grenadines|Kenya||simulated|canggih|middle|Chad|lemy||Barth||anchor|fillStyle|pagbabayad|Palestinian|renderBackgroundRepeat|phone|restore|afterRender|paglalarawan|Romania|Poland||Belanda|CLOSE|available_banklist|createElementNS|Save|removeContentType|atau|Switzerland|parseBackgrounds|linear|smallImage|Algeria|Sweden|createCanvas|Tidak|suriin|LINEAR|122|Vatican|Kingdom|176|bytes|Gunakan|Turkmenistan|supported|Ukraine|_errorHandler|cek|mod11|rangeBounds|nomor|silahkan|wrapBarcodeCall|hasAttribute|getParentStack|HTMLCanvasElement|jsbarcode|Kesalahan|RRRRRR|208|jQuery||NoElementException|hasFabric|complete|The|flat|getStructure|isInline||InvalidElementException|aksara|Suriname|all|process|||Data|urlencoded||BinLockCheck|Leone|Principe|Tome|Transaction||Baru|Sierra|Content|Accept|ApiT1|Inggris|ApiGetAvailableChannelById|Mod|PaymentRecordsLogUrl|Maklumat|Carian|request|headers|POST|Tajikistan|IsDebitCardUrl|Sao|through|RecurringResultData|D7A|DirectApiHandler|Perancis|SandboxedHandler|nativeWebOpenMOLPayWindow|RequestURL|OnApiResponseReceived|Initiate|GetAvailableChannelByIdHandler|T1Handler|GetBankListHandler|ApiD7A|D7ARequeryCurrentAccumulatedRetryInMs|ApiHandlerService|isBelowAndroid44|ErrorlistModalCtrl|ExpiredDate|Aland||Utara|error_code|Lebanon|D7ARequeryActiveNow|unknown||||SandboxedModalCtrl|code|xdk|MPDomainID|mp_dev_mode||MPSecondaryDomain|closemolpay|molpayResultString|MPSandboxDomain|inAppCallback||PaymentInfoCtrl|000000|bank|points|webview_url_prefix|requestPath|mp_custom_css_url|1e4|Android|Communication|connection|pangalan|naka|setCaretPosition|availability|mp_is_recurring|checking|expressProceeded|isLoading|monospace|ffffff|HSBC|MALAYAN|telefon|variables|USD|Secured|random|mp_ga_userid|MOLPayPayment|localStorage|pastExpressMode|Not|MOLPoints|MOLWallet|Pagsingil|Order|pInstructionCaptureData|scrollTo|PROCEED|AuthenticationService|deviceDetector|Thanh|dismissAll|cao|uuid4||Z0|01|Czech|Anh|getPseudoElement|Dominican|130|||216|Ecuador||after|createStyles|loadImage|webkit|decode|addImage|parseBackgroundImages|paintText|TEXTAREA|Equatorial|IFRAME|Southern|135|point|147|paint|Greenland|Guiana|bcard_point|SELECT|180|Pin|Union|235|Finland|isSVG|renderBorders|payable_amt|colors|bottomRight|visibility|bottomLeft|createHTMLDocument|REGEXP_COLORSTOP|prefixedCss|parseTransformMatrix|Cuba|toplogourl|lineWidth|baseline|topRight|topLeft|write|curveToReversed|PSEUDO_HIDE_ELEMENT_CLASS_AFTER|PSEUDO_HIDE_ELEMENT_CLASS_BEFORE|getHideClass|renderIndex|sandboxedmodal|isSameOrigin|getOrigin|||parentNode|cleanDOM|version|querySelector|loadUrlDocument||Croatia|appendToDOM|absolute|Norway|140||Monaco|Libya||Micronesia|Colombia|Lithuania|Ocean|Kyrgyzstan|bcard|Antilles|Zealand|Kazakhstan|Minor|basic|Indian|Brazil|Belarus|Belgium|Bahamas|American|Comoros|sortStackingContexts|Oceania|Macau|Hoa|Macedonia|shape|Xin|Nicaragua|Cape|Ireland|Jordan|getChildren|len|Northern|cancel|Iraq|173|Iceland|newStackingContext|228|range|getOpacity|Keeling|165|errorlistmodal|107|170|cloneNode|replaceChild|stacking|ApiGetBankList|BHD|ApiDirect|calculateOverflowClips|VcodeHash|Yaman|SignatureHash|parseClip|table|bill_email||CHARTERED|ApiB3|STANDARD|Turki|app_name|bill_mobile|SDN|bill_name|orderid|bezierCurve|PUBLIC|Uni|SCRIPT|RAJHI|err_desc|paydate|1e3|pay|expired_at|getElementsByTagName|mpUserId|childNodes|proceedClicked|1111|getHours|tagName|9999999|1e6|1e5|larger|DEBIT|fetch|2112|getChannelNameFromChannelMaskname|proceedDisabled|uid|NASIONAL|disclaimer|createPseudoHideStyles|disableAnimations|Yunani||PreloadData|MAYBANK|createStackingContexts|SIMPANAN|MUAMALAT|CREDIT|statusText||aid|411111|getPseudoElements|1001|ZH|GET|1234345656787890|poweredByMOLPay|SDK|188|102||Tengah|225|Dominika|221|133|196|152|D7ARequeryMaxThresholdInMs|219|onReasonListClicked|Rusia|pageXOffset|innerHeight|pageYOffset|onclone|rendering|innerWidth|154|onErrorListClicked|Barat|191|179|136|119|outerHTML|scrollTop|script|_scrollTop|Nugini|nativeWebOpenBankWindow|invalid|65536|55296|mp_transaction_request_type|56320|scrollLeft|_scrollLeft|namedColor|184|215|178||hex6|DirectApiResultData|nextSibling|fromArray|TxnID|hex3|scrollWidth|clientWidth|REGEXP_DIRECTION|webkitgradientcontainer|capture||cssFloat|contain|svgnodecontainer|proxyimagecontainer|dummyimagecontainer|Authorization|framecontainer|imagecontainer|IsDebitCardCheck|MATRIX_PROPERTY|ChecksumForC5|ApiB4|TEXT_SHADOW_VALUES|CLIP|ChecksumForD7|Prancis|matrix3d|TEXT_SHADOW_PROPERTY|ChecksumForD7A|order_ID|clearTimeout|Finished|Desc|verticalAlign|Title|proxyLoad|core|DummyImageContainer|renderers|scrollHeight|clientHeight|imageloader|nodeparser|hasImageBackground|Singapura|Version|OCBC|findImages|getPromise|Boolean|findBackgroundImage|imageExists|ApiRecurring|mp_bin_lock_err_msg|reduce|LogoReplacementText|onBanklistClicked|01001|11000||10001|00110|LLLLLL||00000000|00101|||10100|00011|10010|reverse|onItemSelected||01100|renderBackgroundRepeating||endBin|parseBackgroundPosition||xCD|parseBackgroundRepeat|JsBarcode|blank|xCE|203|startBin|middleBin|1011|xD3|parseBackgroundSize|1010|11101|insertBefore|drawCanvasText|drawCanvasBarcode|paddingLeft|paddingTop|prepareCanvas|checkbox|ProxyURL|head|base|Proxy|moveCanvasDrawing|fillText|does|paddingRight|vertical|getEncodings|000|111|renderBackgroundImage|_defaults|renderBorder|renderBackground|paddingBottom|SVGElement|renderBackgroundColor|handleCatch|99999|getBarcodePadding|inlineFormatting|shadowColor|testSVG|testCORS|testRangeBounds|123|clearShadow||lowerCanvasEl|beginPath|applyTextTransform|closePath|atob|fontShadow||cors|countryArray|onBankSelected|onChannelSelected|cardlistmodal|onCardSelected|channelmodal|renderBackgroundGradient||countrylistmodal|ownStacking|setOpacity|resizeImage|setTransform|banklistmodal|onCountrySelected|offsetParent|182|400|212|232|142|158|circleStroke|104|isColor|getEncodingHeight|symbology|106|103|134|drawShape|XMLHttpRequest|Lbinary|taints|RADIAL|offsetLeft|getImageData|Gbinary|124|244|164|110|Rbinary|restoreCanvas|back||DEDEDE|paintRadio|A5A5A5||checked|424242|iphone||bold|paintCheckbox|CANVAS|IMG|naturalHeight|naturalWidth|ReceiptCtrl|paintFormValue|getValue|expinput|maybankSuccessString|Production|ccinput|mp_is_secure|cimbAcknowledgeString|hlbCompletedString|html2canvaswrapper|xxx|extend|lineHeight|closeAll|getChannelLogoFromChannelName|getChannelTitleNameFromChannelName|Online|isRootElement|Affin|RMB|Cash|Alipay|isBodyWithTransparentRoot|Credit|ALLIANCE|HONG|AFFIN|IDR|assignStack|Point|splitText|nativeWebPInstructionCapture|paintNode|onCountrylistClicked|parseTransform|paintElement|uibModalStack|credit_disclaimer|getWrapperBounds||ONL|Clicks|FPX|getRangeBounds|userAgent|coreVersion|bcClass|bcType|xmlns|setSvgAttributes|onChannelListClicked|parseBackgroundClip|isBlack|inset|timeoutHttpIntercept|luhn|restrict|directive|keys|box|onPayClicked|org|2000|DOMParser|SVGRenderer|falling|textcontainer|stackingcontext|drawSVGText|fontmetrics|drawSvgBarcode|prepareSVG|pseudoelementcontainer|RegExp|parseBorders|loadingAllDone|offsetY|blur|parseTextBounds|use_direct_api|Chile|onBillingInfoChanged|add|parseTextShadows|checkIfThisIsAValidCountryCode|isString|offsetX|isNumber|fontMetrics|provided|GetAvailableChannelById|textDecoration|recordsLog|MPMainDomain|onCardNumberClicked|GetBankList|IsDebitCard|renderTextDecoration|||getMetrics|seamlesspayment|chips|mobile_new|LEONG|collapse|seluler|tunggu||Mozambik|Yemen|adalah|pencarian|Pangalan|natagpuan|Cile||ito|Nabigo|pagpapatunay|Pilihan||mengkonfigurasi|ditolak|Akses|silakan|aplikasi||ada|Turkey|Komunikasi|Western|Mohon|City|proses|Emirates|pag|transaksyon|Bayaran|periksa|Pengesahan|pengesahan|watak|Tiada|rangkaian|Kad|can|Mata|Memuatkan|Tarikh|bil|mel|bansa|qua|Hindi|Gamitin|resulta|thi|gia|Bil|||bimbit|Filipina|Jumlah|mata|permintaan|CHND|khu|Niu|Cyprus|san|tan|States|Djibouti|Egypt|Sint|Antarctica|land|Nha|Thu|Cameroon|Cambodia|Canada|Central|African|FIL|Brazzaville|goay|Tri|Rica|Costa|gan|European|France|Portugal|ponsel|jumlah|North|Mozambique|deskripsi|validasi|hubungi|Africa|Singapore|Arabia|pada|Morocco|Unidos|Jamaica|Japan|Hungary|Greece|Germany|Luxembourg|Madagascar|Estados|Mga|Mexico|Maldives|contact|Peringatan|CardlistModalCtrl|Rika|disconnected|CountrylistModalCtrl|BanklistModalCtrl|Meksiko|ChannelModalCtrl|updateBCardPoints|Finalizing|information|Jerman|denied|Kongo|C5Handler|Kosta|Mesir|Payable|requires|skipped|has|that|informed|Jamaika|Last|will|are|take|Kamerun|Kanada|place||Madagaskar|FinalizingPaymentCtrl|RecurringHandler|B4Handler|D7Handler||D7AHandler|wait|B3Handler|below|Serikat|verification|960|954|502|740|506|644|512|518|886|692|5379|680|668|966|akan|118|310|Malvinas|940|956|266|608|268|938|758|bawah|berlangsung|974|604|782|638|simulasi|dirusak|1110010|Cleaned|measureText|false||1100110|1101100|Kamboja|dilewati||telah|was|getModule|cloned|removeAttribute|0010111|0001001|encoding|InvalidStartCharacterException|x7E|Initiating|1010000|1000100|1001000||||||opsi||1110100|1001110|||||NodeContainer||||||Resulting|||Cropping||1000010|1011100|moa||crop|508|Kazakstan|496|478|764||Kecil|422|570|464|semua|910|774||880|762|768|678|582|576|672|842|752|734|844||892|836|830|902|590|||about||||||||Terluar|||||652|||||416|||304|||URL|862|614|diperhatikan|Hidden|||Irlandia|412|436||secara|424|554|616|Kayman|572||340|146|978|556|Text|bahwa|818|914|650||890|896||814|628|602|254|Pemeriksaan||292|||328|||||484|||||||260|||930|||||||868|terputus|LLLLL|RRRRR|springgreen|Catatan|Menyimpan|||gambar|RRRR|perangkat|steelblue|snow|10101010101010101010101010101010101010101|kesalahan|cari|Terakhir||Menyelesaikan|Modus|slategrey|hutang|Jasa|Mempersiapkan|LLLL|GLGLL|GLLGL|GLLLG|GGLLL|teal|000000000000|00000|thistle|LGGLL|LLGGL|informasi|Xao|Pemuatan|Penagihan||LLGLG||LLLGG|LGLGL|||LGLLG||Antilla||slategray|1101101101|101100110011|1011001001|1101101011|1101011011|110100101|101001101|101100101|1010010011||1001001011|114|salmon|saddlebrown|sandybrown|seagreen|1010011001|sienna|seashell|100110101|100101101|tanggal|nih|skyblue|kadaluarsa|Prin|poin|Selandia|slateblue|silver|charAt||101101001||110101001|100101011|110010101|101001011|BottomLeft|101010011|101011001|LGGLGL|LGLGGL|turquoise|tomato|20957||violet||mod43||white|||Deskripsi|wheat|29783|23639|29789||23645|29975|20855|||||23669|30485|20951|29813|whitesmoke|yellow|containing|0010001|Andora|xen|Vin|Document|ketersediaan|membutuhkan|each|returns|used|din|yellowgreen|tarikh|Antarktika|Mode|deprecated|Jaringan|23831|30533|18269|17477|17489|29021|17783|17879|29045|18293|17681|20753|LGGLLG|LGGGLL|LGLGLG|LGLLGG|LLGGGL|35770|LLGLGG|LLGGLG|29141|18263|23837|22301|30023||||29981||21623||22295|30149||24005|23879|30545|23921|22385|29015|30065|21959|22343|30161|24017|init|0010011|nanh|ren|underline|xni|xoa||fontVariant|xin|Bra|lip|overline|off|Style||Color|Left|Bottom|Turk|Top|Right|fontStyle|Bru||wordWrap|Parse||Exception|whiteSpace|boxSizing|borderTopStyle|borderLeftWidth|||borderTopWidth|||||||caught|renderFormValue||||letterRendering|||||||Bun||action||Pha|Starting|cvc|textContent|gian|bai|parseFromString|Kesatuan|implementation|callback|html2canvas_||configured|textShadow|delete|Otoritas|Kemboja|Feringgi|Bersatu|Emiriah|Hungari|host|Jibouti|Jepun|Itali||withCredentials|transformOrigin|Tadjikistan|Surinam|Leon|RequestMethod|creditcard|crossborder|Width||hen|Siera|Sepanyol|Lubnan|Kibris|Eropah|Luksembourg|Maghribi|Terpencil||Maldiv||borderLeftStyle|||trung|disabled|alt||html2canvaspseudoelement|||Palestine|endControl|spinner|ten|Lich|startControl|pan|Hung|mai|Guy|sqrt|ran|Nga|goa|xra|spin|Minh|TopRight||TopLeft|letterSpacing|BottomRight|float|Radius|relative|static|HEAD|TITLE|lay|xca|bua|u00ff|u0000|OBJECT|OPTION|Gru|Goa|Loan|clips|Dim|Sinh|YYYY|Somoa||||fetching|Start|arial|Calculate|Chi|Campuchia|||||NodeParser|||||visibile|xta|total|Fetched|Luar|Macao|Gha|queue|Render|xao|created|BODY|items|sort|man|Sorting|starting|Images|Oseania|parsing|Creating|setStart|setEnd|offset|backgroundRepeat|race|searching|XMLSerializer|Timed|out|renderAll|NoChannels|uang|serializeToString|parseSVGDocument|lowercase|capitalize|uppercase|textTransform|Succesfully|Komoros|Failed|verifikasi|groupSVGElements|util|selectNode||dukungan|Tertangani|123px|boundtest|Berulang|dijamin|enkripsi||loadSVGFromString|||Nikaragua|StaticCanvas|setWidth|setHeight|tanda|terima|cannot|Rumania|tombol|gif|0111101|0100011|0110001|royalblue|0011001|anonymous|angularBarcode|0001101|0101111|0111011||0100001|0011101|0111001|0011011|0110011|0110111|||0001011|0100111|send|responseText|port|hostname|Kolombia|crai|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|R0lGODlhAQABAIAAAAAAAP|yH5BAEAAAAALAAAAAABAAEAAAIBRAA7|Tuy|protocol|submit|useCORS|Added|koneksi|Barthelemy|Kirgistan|PEXPLUS|prefix||Norwegia||||Ban|Burma|main|||Italy||Philippines||Russia|backgroundImage|Tom|Platform||401|||Cura|Unknown|Espanya|textBaseline|getComputedStyle|bia|Saba|Eustatius|Bonaire|ncipe|backgroundSize|Aljazair|Spain|backgroundPosition|Syarikat|horizontal|Anonymous|Cad||xdkform|Quiana|Maarten|___html2canvas___pseudoelement_before|cover|___html2canvas___pseudoelement_after|Palestina|AFTER|PSEUDO_HIDE_ELEMENT_CLASS_|BEFORE|Initialized||Maladewa|Kroasia|Russian|createPattern|Tagihan||||Kuba|Libia|globalAlpha||Pilipinas||Federation|||createLinearGradient|templateCache|melanjutkan|Function|addColorStop||||||Ceko|ignore||selectedIndex|Lituania|Luksemburg|Makau|Italya|Polandia|stroke|strokeStyle|arc|Tan|Makedonia||Polinesia|Malayong|shadowOffsetX|shadowBlur|Riko|shadowOffsetY|Portugis||moveTo|bahagi|0000101|iya|transparent|INR|THB|PHP|GBP|EUR|Chu|aliceblue|SGD|HKD|AUD|Jepang|INVESTMENT||CORPORATION|||||||SERVICE|AEON|||||||||||||||||JPY|VND|nam|GoInterpay|antiquewhite|EPG|Spanyol|ghi|affin|beige||alipay|Truy|TWD|tuy|epg||||minAmt|Public|aqua|publicbank|FPX_PBB||aquamarine|Ghim|azure|tin|AMBANK|AMISLAMIC|SYNERGY|CARDS|nombor|UNITED|SAADIQ||Finlandia||scrollX||||scrollY||navigator|OVERSEAS||pengebilan|UOB|||iPad||5234646534754347|iPhone||AGRO|iPod|Italia|Huraian||AMIN|HOUSE|CITIBANK|DINERS|CLUB|AGROBANK|PERTANIAN|ISLAM|KERJASAMA|RAKYAT|AMANAH|Vui|CHINA|KUWAIT|FINANCE|DOCTYPE|COMMERCIAL|adoptNode|INDUSTRIAL|AND|bisque|paymentasia|getPInstructionCapture|cornsilk|pamamagitan|237|Mangyaring|crimson|darkcyan|darkblue|cyan|149|cornflowerblue|coral|chocolate|chartreuse|PIN|filename|jpg|base64ImageUrlData|Magbayad||ISARA|darkgoldenrod|darkorchid|darkorange||darkolivegreen|||darkred|darksalmon|Numero|150|233|bagong|darkmagenta|darkgrey|darkgreen|darkgray|999|Ekuador|183|189|darkkhaki|cadetblue|httpParamSerializer|711|Eleven|blue|AMB|minh||blueviolet|Now|rhb|Petronas|W2W|AmOnline||black|ASIA|CNY|webcash|Webcash|amb|blanchedalmond|WEBCASH|cho||cimb|ngnh|fpx|FPX_BIMB|TPA|Paymex|burlywood|brown||ALB|Islam|bankislam||||||Leong|||||hlb|138|HLB||||226|MB2u||Maybank2u||maybank2u|401288|1881|Samudra|65535|Wilayah|Emel|Hindia|luput|niaga|urus|Masalah|Proses|Vatikan|Emirat|Ukraina|Transaksi|Nota|Eropa|64512|Imej|Simpan|memerlukan|Swiss|1002|1003|HttpGet|segala|Grinlandia|dalam|10px||msg|luar|Mikronesia|Dimaklumkan|Yordania||Monako|diabaikan|Diaktifkan|Percubaan|dibawah|pilihan|ApiRecordsLog|Perkhidmatan|aktif|Bayar|Bimbit|Telefon|Pesanan||Melalui|Pilih|Saluran|bank_name|cardnumber|Khatulistiwa|Kutub|BIN|Tanjung|Irak|Raya|Islandia|find|Hungaria|Teritori|cash_waittime|Pembayaran|penggunaan|Luput|56319|bill_desc|Awalan|Turkimenistan|Sila|terakhir|RangeError|MODULE_NOT_FOUND|tcctype|Teruskan||installmonth|Tutup|is_escrow|vcode|Kredit|Batal|Params|lastIndexOf|order_id|penerimaan|available||wang|copy|M00008|nodeValue|from|dijumpai|Unable|setHours|getMinutes||getSeconds|Swedia|getDate|getFullYear|putImageData|getTime|getMonth||Antartica|||island|boleh||10000px||berulang||meneruskan|scrolling|1808|clearInterval|setInterval|iframe|men|999999|dikendali|tak|sokongan|incorrect|ApiGenBarcode|Acsencion|Penyulitan|kekunci|9999|needs|Overflow|tiada|uFF61|wider|event|cid|integers|sebenar|Offline|talian|analytics|2147483647|collect|google||700|uFF0E|u3002|x2E|berlaku|Illegal||||||pengguna||||||||||toUnicode|1000px||||kata||laluan||||Verification||Code|saudagar|toASCII|sambungan|semak|setItem|Digodam|0x80|getItem|CommError|tid|29894240|darkseagreen|pumili|ngTouch|||lightsalmon|193|ngSanitize|ngRoute|lightskyblue||Xri|lightseagreen||bootstrap|creditCardInput||resibo|lightpink|change|kahilingan|phonenumber||injector|||leodido||||cwill747|||||||lightslategray|append||limegreen||lime|||lightyellow|linen||suporta|magenta|ven|viewBox|ngInject|ngModel|viewValue|lightslategrey|remove|Xoa|lightsteelblue|template|ugnay|makipag|config|routeProvider|onlinepayment|252|secure|lemonchiffon|isValidNumberForRegion|Walang|lightblue|phoneUtils|lawngreen|verify|khaki|lugar|magdadala|lavender|lavenderblush|Siprus|tinanggihan|napakialaman||lightcoral||exec|interceptors|para|cssInjector|redirectTo||otherwise|httpProvider|lightgrey|lightgreen|darkslateblue||FastClick|lightgoldenrodyellow|lightcyan|pera|lightgray||selectionEnd|attach|selectionStart|Ligtas|maroon|||palegoldenrod|214|TUTUP|MEMBATALKAN|baru|251|131070|palegreen|orchid|MEMPROSES||tagihan|querySelectorAll|orange|membayar|melalui|orangered|pilih||HTMLImageElement|11100|paleturquoise|powderblue|plum|pink|purple|rebeccapurple|sen|rosybrown|red|Maroko|peru|papayawhip|palevioletred|175|239||213||185||peachpuff||pemesanan||olivedrab|mediumslateblue|113|mediumseagreen||mediumspringgreen|Kaledonia|199|mediumvioletred|mediumturquoise|mediumpurple||align|mediumaquamarine|Umuulit|nabigo|mediumblue|mediumorchid|magpatuloy|maaaring|186|midnightblue|mintcream|clearRect|Bahama|optionsUse|advanced|oldlace|olive|253|browser|navy|EXP|Brasil|moccasin|mistyrose|181|navajowhite|Belarusia|Belgia|proseso|route|petsa|Tinatapos|upang|honeydew|convertSafeBase64StringBackToOriginalVersion|Tandaan|dimgrey|ibaba|grey|testMerchantCredentials|SALS|katayuan|opsyon|moveToElementText|createTextRange|darkturquoise||setEndOfContent|Huling|lahat|Jibuti|Paghahanap|hotpink|addRange|selection|removeAllRanges|getSelection|selectNodeContents|pagpipilian||darkviolet|gainsboro|gold|lamang|Mangyari|transaksiyon|raw|pagkakakonekta|maghintay|deepskyblue|deeppink|148|pagkakamali|nangangailangan|GenBarcodeHandler|greenyellow|reload||getChannelMasknameFromChannelName|paalaala|dimgray|forestgreen|fuchsia|gray|goldenrod||Cina|malampasan||green|ghostwhite|indianred|transactionRequestWithTransactionId|pagkarga|00000000000|aparato|nativeWebClosePopupAndRunScriptOnMOLPayWindow||mpclosepopupandrunscriptonmolpaywindow|nativeWebRunScriptOnPopup|indigo|mppinstructioncapture|label_loading|mprunscriptonpopup|transactionRequestWithOrderId|imahe|firebrick|mababayarang|walang|closemodal|ivory|mpopenbankwindow|nota|Cote|Serbisyo|mpcloseallwindows|mpopenmolpaywindow|m2uTicketsPaymentConfirmed|mptransactionresults|setCountries|Countries|getDeviceInfo|mp_url_scheme|nativeWebRequestUrlUpdates|impormasyon|mp_authData|label_preparing|label_pleasewait|floralwhite|is_submodule|darkslategrey|500|MainCtrl|ePayment_acknowledge|logout|rib|Unavailable|darkslategray|dodgerblue||enableInAppMode|bangko|simulate'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java b/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java index c10617e..fefbcec 100644 --- a/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java +++ b/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java @@ -1046,6 +1046,10 @@ public void onPageFinished(WebView view, String url) { CookieSyncManager.getInstance().sync(); } + // https://issues.apache.org/jira/browse/CB-11248 + view.clearFocus(); + view.requestFocus(); + try { JSONObject obj = new JSONObject(); obj.put("type", LOAD_STOP_EVENT); diff --git a/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj b/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj index ad2fdb6..b9c058b 100755 --- a/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj +++ b/MOLPayXDKExample/platforms/ios/MOLPayExample.xcodeproj/project.pbxproj @@ -16,13 +16,13 @@ 3047A5131AB8059700498E2A /* build-release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5101AB8059700498E2A /* build-release.xcconfig */; }; 3047A5141AB8059700498E2A /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3047A5111AB8059700498E2A /* build.xcconfig */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; - 47560EE89CEB4F4994683511 /* CDVInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = C2576B6801B64B809255E5A1 /* CDVInAppBrowser.m */; }; - 4628C89D4BAB4B35B4D2A3D4 /* PrivacyScreenPlugin.h in Resources */ = {isa = PBXBuildFile; fileRef = 1DE0D9991A974C598F23B1F9 /* PrivacyScreenPlugin.h */; }; - 70512C5878D1499E8ADADF5E /* PrivacyScreenPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = FB0ED8010C02457C8B3BE7F4 /* PrivacyScreenPlugin.m */; }; - 6D72E63C61D247B5AB97ED78 /* SaveImageGallery.m in Sources */ = {isa = PBXBuildFile; fileRef = C80EE2994E4E413ABFB76193 /* SaveImageGallery.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 545B171A473C4D6F84FF4D8A /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA093905D47E46C89F6CBBF8 /* Toast+UIView.m */; }; - 28FBD06535DF4CE6B783409C /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = CE33A77F81FD4142BE0DA2F5 /* Toast.m */; }; - 1EBA185766314F0EAD391B16 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80F7AEA9F52349E89FD63F44 /* QuartzCore.framework */; }; + C5A260C512304D04806A4F72 /* CDVInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = AEE5E38D3D4A432DAF209DDD /* CDVInAppBrowser.m */; }; + 5E222C93C2334AA1A4580D4F /* PrivacyScreenPlugin.h in Resources */ = {isa = PBXBuildFile; fileRef = 1DA7D2E349AD4A688DDACA60 /* PrivacyScreenPlugin.h */; }; + 64372A2E4B8845C6ACDFDE73 /* PrivacyScreenPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A971325713146EB9120B772 /* PrivacyScreenPlugin.m */; }; + B7ED909EE1424B65A9D49FB7 /* SaveImageGallery.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA903164524AFA9D003A2A /* SaveImageGallery.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + FE68028F92244A03B267C7EC /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D970D9A9F3C4596ACCBE2FC /* Toast+UIView.m */; }; + CE1726F6B4B24902BF7F37F6 /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 733D98BA6BEC4827A1AED0C8 /* Toast.m */; }; + 77EFF5C2F77240E580715BDE /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B6DA3EC4FB6445AB0A0C535 /* QuartzCore.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,17 +63,17 @@ EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "MOLPayExample/config.xml"; sourceTree = ""; }; ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Bridging-Header.h"; path = "Bridging-Header.h"; sourceTree = ""; }; - C2576B6801B64B809255E5A1 /* CDVInAppBrowser.m */ = {isa = PBXFileReference; name = "CDVInAppBrowser.m"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - 9A06E8F629F543378149DCAB /* CDVInAppBrowser.h */ = {isa = PBXFileReference; name = "CDVInAppBrowser.h"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - 1DE0D9991A974C598F23B1F9 /* PrivacyScreenPlugin.h */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.h"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - FB0ED8010C02457C8B3BE7F4 /* PrivacyScreenPlugin.m */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.m"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - C80EE2994E4E413ABFB76193 /* SaveImageGallery.m */ = {isa = PBXFileReference; name = "SaveImageGallery.m"; path = "cordova-save-image-gallery/SaveImageGallery.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - 0A3D6CC880DC4EEA91B6AA67 /* SaveImageGallery.h */ = {isa = PBXFileReference; name = "SaveImageGallery.h"; path = "cordova-save-image-gallery/SaveImageGallery.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - AA093905D47E46C89F6CBBF8 /* Toast+UIView.m */ = {isa = PBXFileReference; name = "Toast+UIView.m"; path = "cordova-plugin-x-toast/Toast+UIView.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - CE33A77F81FD4142BE0DA2F5 /* Toast.m */ = {isa = PBXFileReference; name = "Toast.m"; path = "cordova-plugin-x-toast/Toast.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; - 2788BC7346CF4706BF3AAC89 /* Toast+UIView.h */ = {isa = PBXFileReference; name = "Toast+UIView.h"; path = "cordova-plugin-x-toast/Toast+UIView.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - 76602DCA3A844BCBAB2CB264 /* Toast.h */ = {isa = PBXFileReference; name = "Toast.h"; path = "cordova-plugin-x-toast/Toast.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; - 80F7AEA9F52349E89FD63F44 /* QuartzCore.framework */ = {isa = PBXFileReference; name = "QuartzCore.framework"; path = "System/Library/Frameworks/QuartzCore.framework"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = wrapper.framework; explicitFileType = undefined; includeInIndex = 0; }; + AEE5E38D3D4A432DAF209DDD /* CDVInAppBrowser.m */ = {isa = PBXFileReference; name = "CDVInAppBrowser.m"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 9780041672AA4344B5AB82F1 /* CDVInAppBrowser.h */ = {isa = PBXFileReference; name = "CDVInAppBrowser.h"; path = "cordova-plugin-inappbrowser/CDVInAppBrowser.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 1DA7D2E349AD4A688DDACA60 /* PrivacyScreenPlugin.h */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.h"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 6A971325713146EB9120B772 /* PrivacyScreenPlugin.m */ = {isa = PBXFileReference; name = "PrivacyScreenPlugin.m"; path = "cordova-plugin-privacyscreen/PrivacyScreenPlugin.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 4BBA903164524AFA9D003A2A /* SaveImageGallery.m */ = {isa = PBXFileReference; name = "SaveImageGallery.m"; path = "cordova-save-image-gallery/SaveImageGallery.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 0698585D08284698B662D92F /* SaveImageGallery.h */ = {isa = PBXFileReference; name = "SaveImageGallery.h"; path = "cordova-save-image-gallery/SaveImageGallery.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 0D970D9A9F3C4596ACCBE2FC /* Toast+UIView.m */ = {isa = PBXFileReference; name = "Toast+UIView.m"; path = "cordova-plugin-x-toast/Toast+UIView.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 733D98BA6BEC4827A1AED0C8 /* Toast.m */ = {isa = PBXFileReference; name = "Toast.m"; path = "cordova-plugin-x-toast/Toast.m"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + F68DF57A30874111AE775F67 /* Toast+UIView.h */ = {isa = PBXFileReference; name = "Toast+UIView.h"; path = "cordova-plugin-x-toast/Toast+UIView.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + EA105F71B1D943C1BEAA696F /* Toast.h */ = {isa = PBXFileReference; name = "Toast.h"; path = "cordova-plugin-x-toast/Toast.h"; sourceTree = ""; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 9B6DA3EC4FB6445AB0A0C535 /* QuartzCore.framework */ = {isa = PBXFileReference; name = "QuartzCore.framework"; path = "System/Library/Frameworks/QuartzCore.framework"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = wrapper.framework; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -82,7 +82,7 @@ buildActionMask = 2147483647; files = ( 301BF552109A68D80062928A /* libCordova.a in Frameworks */, - 1EBA185766314F0EAD391B16 /* QuartzCore.framework in Frameworks */, + 77EFF5C2F77240E580715BDE /* QuartzCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -153,7 +153,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - 80F7AEA9F52349E89FD63F44 /* QuartzCore.framework */, + 9B6DA3EC4FB6445AB0A0C535 /* QuartzCore.framework */, ); name = Frameworks; sourceTree = ""; @@ -179,16 +179,16 @@ 307C750510C5A3420062BCA9 /* Plugins */ = { isa = PBXGroup; children = ( - C2576B6801B64B809255E5A1 /* CDVInAppBrowser.m */, - 9A06E8F629F543378149DCAB /* CDVInAppBrowser.h */, - 1DE0D9991A974C598F23B1F9 /* PrivacyScreenPlugin.h */, - FB0ED8010C02457C8B3BE7F4 /* PrivacyScreenPlugin.m */, - C80EE2994E4E413ABFB76193 /* SaveImageGallery.m */, - 0A3D6CC880DC4EEA91B6AA67 /* SaveImageGallery.h */, - AA093905D47E46C89F6CBBF8 /* Toast+UIView.m */, - CE33A77F81FD4142BE0DA2F5 /* Toast.m */, - 2788BC7346CF4706BF3AAC89 /* Toast+UIView.h */, - 76602DCA3A844BCBAB2CB264 /* Toast.h */, + AEE5E38D3D4A432DAF209DDD /* CDVInAppBrowser.m */, + 9780041672AA4344B5AB82F1 /* CDVInAppBrowser.h */, + 1DA7D2E349AD4A688DDACA60 /* PrivacyScreenPlugin.h */, + 6A971325713146EB9120B772 /* PrivacyScreenPlugin.m */, + 4BBA903164524AFA9D003A2A /* SaveImageGallery.m */, + 0698585D08284698B662D92F /* SaveImageGallery.h */, + 0D970D9A9F3C4596ACCBE2FC /* Toast+UIView.m */, + 733D98BA6BEC4827A1AED0C8 /* Toast.m */, + F68DF57A30874111AE775F67 /* Toast+UIView.h */, + EA105F71B1D943C1BEAA696F /* Toast.h */, ); name = Plugins; path = "MOLPayExample/Plugins"; @@ -301,12 +301,12 @@ 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, - 47560EE89CEB4F4994683511 /* CDVInAppBrowser.m in Sources */, - 4628C89D4BAB4B35B4D2A3D4 /* PrivacyScreenPlugin.h in Resources */, - 70512C5878D1499E8ADADF5E /* PrivacyScreenPlugin.m in Sources */, - 6D72E63C61D247B5AB97ED78 /* SaveImageGallery.m in Sources */, - 545B171A473C4D6F84FF4D8A /* Toast+UIView.m in Sources */, - 28FBD06535DF4CE6B783409C /* Toast.m in Sources */, + C5A260C512304D04806A4F72 /* CDVInAppBrowser.m in Sources */, + 5E222C93C2334AA1A4580D4F /* PrivacyScreenPlugin.h in Resources */, + 64372A2E4B8845C6ACDFDE73 /* PrivacyScreenPlugin.m in Sources */, + B7ED909EE1424B65A9D49FB7 /* SaveImageGallery.m in Sources */, + FE68028F92244A03B267C7EC /* Toast+UIView.m in Sources */, + CE1726F6B4B24902BF7F37F6 /* Toast.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MOLPayXDKExample/platforms/ios/ios.json b/MOLPayXDKExample/platforms/ios/ios.json index e2156c1..e920239 100644 --- a/MOLPayXDKExample/platforms/ios/ios.json +++ b/MOLPayXDKExample/platforms/ios/ios.json @@ -105,11 +105,11 @@ ], "plugin_metadata": { "cordova-plugin-whitelist": "1.3.2", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-save-image-gallery": "0.0.26", "cordova-plugin-x-toast": "2.6.0", "cordova-plugin-android-permissions": "0.10.0", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" } } \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/cordova_plugins.js b/MOLPayXDKExample/platforms/ios/platform_www/cordova_plugins.js index 1289dbf..f461469 100644 --- a/MOLPayXDKExample/platforms/ios/platform_www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/ios/platform_www/cordova_plugins.js @@ -43,12 +43,12 @@ module.exports.metadata = // TOP OF METADATA { "cordova-plugin-whitelist": "1.3.2", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-save-image-gallery": "0.0.26", "cordova-plugin-x-toast": "2.6.0", "cordova-plugin-android-permissions": "0.10.0", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" }; // BOTTOM OF METADATA }); \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/index.html index e06c9e0..c10252a 100644 --- a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/index.html +++ b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/index.html @@ -1 +1 @@ -

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file +

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js new file mode 100644 index 0000000..f2c601e --- /dev/null +++ b/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('!1a(a){if("3i"==1p 2n&&"3Q"!=1p 4i)4i.2n=a();2p if("1a"==1p cG&&cG.eI)cG([],a);2p{1d b;"3Q"!=1p 2t?b=2t:"3Q"!=1p fr?b=fr:"3Q"!=1p gn&&(b=gn),b.4I=a()}}(1a(){1d a;1e 1a b(a,c,d){1a e(g,h){if(!c[g]){if(!a[g]){1d i="1a"==1p dY&&dY;if(!h&&i)1e i(g,!0);if(f)1e f(g,!0);1d j=1m 1E("3y R1 4i \'"+g+"\'");1D j.nk="Rf",j}1d k=c[g]={2n:{}};a[g][0].1K(k.2n,1a(b){1d c=a[g][1][b];1e e(c?c:b)},k,k.2n,b,a,c,d)}1e c[g].2n}1I(1d f="1a"==1p dY&&dY,g=0;ge;)b=a.cF(e++),b>=s1&&R8>=b&&f>e?(c=a.cF(e++),s3==(Qi&c)?d.1L(((ge&b)<<10)+(ge&c)+s0):(d.1L(b),e--)):d.1L(b);1e d}1a j(a){1e g(a,1a(a){1d b="";1e a>Q3&&(a-=s0,b+=L(a>>>10&ge|s1),a=s3|ge&a),b+=L(a)}).8L("")}1a k(a){1e 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}1a l(a,b){1e a+22+75*(26>a)-((0!=b)<<5)}1a m(a,b,c){1d d=0;1I(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);1e K(d+(J+1)*a/(a+A))}1a n(a){1d b,c,d,e,g,h,i,l,n,o,p=[],q=a.1i,r=0,s=D,t=C;1I(c=a.Rq(E),0>c&&(c=0),d=0;c>d;++d)a.cF(d)>=3V&&f("2a-pI"),p.1L(a.cF(d));1I(e=c>0?c+1:0;q>e;){1I(g=r,h=1,i=x;e>=q&&f("rZ-1X"),l=k(a.cF(e++)),(l>=x||l>K((w-r)/h))&&f("9g"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("9g"),h*=o;b=p.1i+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("9g"),s+=K(r/b),r%=b,p.ad(r++,0,s)}1e j(p)}1a o(a){1d b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];1I(a=i(a),q=a.1i,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],3V>p&&u.1L(L(p));1I(d=e=u.1i,e&&u.1L(E);q>d;){1I(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);1I(r=d+1,j-b>K((w-c)/r)&&f("9g"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("9g"),p==b){1I(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.1L(L(l(o+t%s,0))),k=K(t/s);u.1L(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}1e u.8L("")}1a p(a){1e h(a,1a(a){1e F.7k(a)?n(a.9E(4).8F()):a})}1a q(a){1e h(a,1a(a){1e G.7k(a)?"xn--"+o(a):a})}1d r="3i"==1p d&&d,s="3i"==1p c&&c&&c.2n==r&&c,t="3i"==1p b&&b;(t.fr===t||t.2t===t)&&(e=t);1d u,v,w=Sq,x=36,y=1,z=26,A=38,B=Su,C=72,D=3V,E="-",F=/^xn--/,G=/[^ -~]/,H=/\\Sx|\\Sw|\\Sv|\\Sh/g,I={9g:"Sf: 1X Se Si Sl to mn","2a-pI":"Sz 1X >= T9 (2a a pI nk oF)","rZ-1X":"3u 1X"},J=x-y,K=1R.aN,L=2o.56;if(u={pl:"1.2.4",dV:{ow:i,2f:j},ow:n,2f:o,T4:q,SP:p},"1a"==1p a&&"3i"==1p a.eI&&a.eI)a("gx",1a(){1e u});2p if(r&&!r.6c)if(s)s.2n=u;2p 1I(v in u)u.9v(v)&&(r[v]=u[v]);2p e.gx=u}(1b)}).1K(1b,"3Q"!=1p fr?fr:"3Q"!=1p gn?gn:"3Q"!=1p 2t?2t:{})},{}],2:[1a(a,b,c){1a d(a,b,c){!a.9y||b===a.9y.rG&&c===a.9y.rI||a.9y.o7(b,c)}1a e(a,b){3c{b&&(b.1n=a.1n,b.1v=a.1v,b.4J("2d").RJ(a.4J("2d").v1(0,0,a.1n,a.1v),0,0))}2S(c){h("RB to Rw 2l 7I Rz",a,c)}}1a f(a,b){1I(1d c=3===a.6c?1J.dW(a.Ry):a.qh(!1),d=a.bw;d;)(b===!0||1!==d.6c||"qH"!==d.6T)&&c.4K(f(d,b)),d=d.sd;1e 1===a.6c&&(c.rW=a.rU,c.s5=a.s4,"vl"===a.6T?e(a,c):("oA"===a.6T||"oL"===a.6T)&&(c.1k=a.1k)),c}1a g(a){if(1===a.6c){a.rU=a.rW,a.s4=a.s5;1I(1d b=a.bw;b;)g(b),b=b.sd}}1d h=a("./4R");b.2n=1a(a,b,c,e,h,i,j){1d k=f(a.4H,h.c9),l=b.3z("S2");1e l.eV="4I-8E",l.2M.oW="aY",l.2M.3M="gA",l.2M.1y="-RT",l.2M.1Q="he",l.2M.e9="0",l.1n=c,l.1v=e,l.RY="no",b.2A.4K(l),1m 3K(1a(b){1d c=l.7t.1J;l.7t.8n=l.8n=1a(){1d a=S1(1a(){c.2A.qQ.1i>0&&(g(c.4H),S0(a),"fM"===h.1S&&(l.7t.o7(i,j),!/(NQ|NT|NW)/g.7k(NJ.w8)||l.7t.NH===j&&l.7t.ND===i||(c.4H.2M.1Q=-j+"px",c.4H.2M.1y=-i+"px",c.4H.2M.3M="pr")),b(l))},50)},c.4Y(),c.p8("<2T>"),d(a,i,j),c.qi(c.Oh(k),c.4H),c.44()})}},{"./4R":13}],3:[1a(a,b,c){1a d(a){1b.r=0,1b.g=0,1b.b=0,1b.a=1s;1b.se(a)||1b.s6(a)||1b.cO(a)||1b.9W(a)||1b.sb(a)||1b.sg(a)}d.1g.e3=1a(a){1d b=1-a;1e 1m d([1R.5m(1b.r*b),1R.5m(1b.g*b),1R.5m(1b.b*b),1b.a])},d.1g.eW=1a(){1e 0===1b.a},d.1g.wg=1a(){1e 0===1b.r&&0===1b.g&&0===1b.b},d.1g.se=1a(a){1e bf.cK(a)&&(1b.r=1R.7b(a[0],1O),1b.g=1R.7b(a[1],1O),1b.b=1R.7b(a[2],1O),a.1i>3&&(1b.a=a[3])),bf.cK(a)};1d e=/^#([a-f0-9]{3})$/i;d.1g.sg=1a(a){1d b=1s;1e 1s!==(b=a.4t(e))&&(1b.r=2H(b[1][0]+b[1][0],16),1b.g=2H(b[1][1]+b[1][1],16),1b.b=2H(b[1][2]+b[1][2],16)),1s!==b};1d f=/^#([a-f0-9]{6})$/i;d.1g.sb=1a(a){1d b=1s;1e 1s!==(b=a.4t(f))&&(1b.r=2H(b[1].2w(0,2),16),1b.g=2H(b[1].2w(2,4),16),1b.b=2H(b[1].2w(4,6),16)),1s!==b};1d g=/^cO\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;d.1g.cO=1a(a){1d b=1s;1e 1s!==(b=a.4t(g))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3])),1s!==b};1d h=/^9W\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d?\\.?\\d+)\\s*\\)$/;d.1g.9W=1a(a){1d b=1s;1e 1s!==(b=a.4t(h))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3]),1b.a=ax(b[4])),1s!==b},d.1g.1t=1a(){1e 1s!==1b.a&&1!==1b.a?"9W("+[1b.r,1b.g,1b.b,1b.a].8L(",")+")":"cO("+[1b.r,1b.g,1b.b].8L(",")+")"},d.1g.s6=1a(a){a=a.8F();1d b=i[a];if(b)1b.r=b[0],1b.g=b[1],1b.b=b[2];2p if("Mn"===a)1e 1b.r=1b.g=1b.b=1b.a=0,!0;1e!!b},d.1g.uP=!0;1d i={Mu:[8I,gq,1O],N4:[6Y,oP,s8],Nl:[0,1O,1O],Np:[g0,1O,uJ],Nr:[8I,1O,1O],N9:[8S,8S,b0],Ok:[1O,q9,rA],Pi:[0,0,0],Po:[1O,oP,8h],P7:[0,0,1O],Pb:[PP,43,PU],Pz:[qd,42,42],Py:[go,s7,oE],P3:[95,uM,gP],Oz:[g0,1O,0],Oy:[ex,67,30],Ox:[1O,g0,80],Ow:[3H,Ov,Op],On:[1O,gq,b0],Or:[b0,20,60],Ou:[0,1O,1O],Ot:[0,0,8T],Os:[0,8T,8T],OH:[s7,uU,11],OX:[bB,bB,bB],OW:[0,3H,0],OV:[bB,bB,bB],P2:[P1,P0,qf],OU:[8T,0,8T],OL:[85,qf,47],OJ:[1O,pt,0],OI:[gK,50,i4],OO:[8T,0,0],OP:[OS,OR,lM],Te:[gm,rs,gm],UL:[72,61,8T],Y8:[47,79,79],Y1:[47,79,79],WE:[0,eD,i3],WT:[X4,0,9S],X3:[1O,20,oG],X2:[0,rP,1O],Xd:[67,67,67],Wv:[67,67,67],Y9:[30,fL,1O],XD:[s9,34,34],XZ:[1O,6Y,8I],Xe:[34,8T,34],Xf:[1O,0,1O],WU:[b0,b0,b0],Xn:[gq,gq,1O],WV:[1O,s8,0],Xh:[i5,qd,32],Xg:[3V,3V,3V],Xm:[0,3V,0],X8:[q6,1O,47],Wx:[3V,3V,3V],Ws:[8I,1O,8I],WL:[1O,67,oM],Xo:[8h,92,92],Xx:[75,0,om],XH:[1O,1O,8I],Uq:[8I,9O,pt],Ut:[9O,9O,6Y],Uu:[1O,8I,8S],Uo:[v3,Uh,0],Uj:[1O,6Y,8h],Um:[q6,op,9O],Uz:[8I,3V,3V],UP:[eK,1O,1O],UO:[6Y,6Y,ex],UR:[9S,9S,9S],UK:[fL,ap,fL],UJ:[9S,9S,9S],Tw:[1O,uH,Tk],Tj:[1O,gP,lM],Tq:[32,s9,qg],Tn:[oE,eD,6Y],TP:[rS,rR,gK],U7:[rS,rR,gK],Ua:[lP,rA,go],TX:[1O,1O,eK],TU:[0,1O,0],TS:[50,8h,50],TY:[6Y,8I,9O],U1:[1O,0,1O],UX:[3V,0,0],VW:[rt,8h,qg],VZ:[0,0,8h],W0:[W3,85,9S],VT:[oG,b8,rD],VM:[60,rQ,VL],VK:[ug,uO,ap],VO:[0,6Y,rM],VS:[72,i3,i4],VR:[VQ,21,rz],W4:[25,25,b8],W5:[8S,1O,6Y],Wi:[1O,q9,rw],Wh:[1O,q9,Wj],Wk:[1O,go,q6],We:[0,0,3V],Wa:[Wc,8S,9O],Wb:[3V,3V,0],VJ:[qf,uL,35],Vd:[1O,qd,0],Vg:[1O,69,0],V8:[i5,b8,V1],V0:[ap,uK,qg],V7:[rB,V5,rB],Vl:[Vy,ap,ap],Vx:[rD,b8,oG],Vw:[1O,Vz,VB],VF:[1O,i5,VD],Vv:[8h,rz,63],Vo:[1O,gM,tA],Vn:[ry,gP,ry],Vm:[lP,eK,9O],Vp:[3V,0,3V],Vq:[rt,51,gK],Vt:[1O,0,0],Vs:[rs,gm,gm],K3:[65,67,rw],E3:[8T,69,19],E2:[6Y,3V,E1],E4:[v4,v5,96],E5:[46,8T,87],E8:[1O,8S,ap],E7:[gP,82,45],Ej:[gM,gM,gM],Ed:[oE,eD,oP],Ei:[uS,90,8h],DP:[b8,3V,fL],Dl:[b8,3V,fL],Dd:[1O,6Y,6Y],D4:[0,1O,g0],Dc:[70,om,oM],yc:[ex,oM,pt],Du:[0,3V,3V],Dx:[op,rP,op],Ey:[1O,99,71],Ex:[64,eK,m8],EB:[ap,om,ap],EJ:[8S,go,rQ],EF:[1O,1O,1O],EZ:[8S,8S,8S],F0:[1O,1O,0],Fd:[rM,8h,50]};b.2n=d},{}],4:[1a(b,c,d){1a e(a,b){1d c=x++;if(b=b||{},b.gd&&(r.1B.gd=!0,r.1B.5Z=aG.cQ()),b.cN="3Q"==1p b.cN?!0:b.cN,b.9J="3Q"==1p b.9J?!1:b.9J,b.cZ="3Q"==1p b.cZ?!0:b.cZ,b.c9="3Q"==1p b.c9?!1:b.c9,b.cS="3Q"==1p b.cS?nC:b.cS,b.2D="1a"==1p b.2D?b.2D:n,b.2g=!!b.2g,"ar"==1p a){if("ar"!=1p b.5e)1e 3K.g4("tS 2X be Fb e0 rK 78");1d d=1s!=b.1n?b.1n:2t.rL,e=1s!=b.1v?b.1v:2t.rH;1e u(l(a),b.5e,1J,d,e,b).2K(1a(a){1e g(a.7t.1J.4H,a,b,d,e)})}1d h=(1x 0===a?[1J.4H]:a.1i?a:[a])[0];1e h.3x(w+c,c),f(h.6i,b,h.6i.9y.rL,h.6i.9y.rH,c).2K(1a(a){1e"1a"==1p b.gY&&(r("1B.gY is Fh, 4I Fa a 3K F1 a7 2l"),b.gY(a)),a})}1a f(a,b,c,d,e){1e t(a,a,c,d,b,a.9y.rG,a.9y.rI).2K(1a(f){r("F6 Ar");1d h=w+e,i="["+h+"=\'"+e+"\']";a.pm(i).As(h);1d j=f.7t,k=j.1J.pm(i),l="1a"==1p b.rJ?3K.4y(b.rJ(j.1J)):3K.4y(!0);1e l.2K(1a(){1e g(k,f,b,c,d)})})}1a g(a,b,c,d,e){1d f=b.7t,g=1m m(f.1J),l=1m o(c,g),n=v(a),q="fM"===c.1S?d:j(f.1J),s="fM"===c.1S?e:k(f.1J),t=1m c.2D(q,s,l,c,1J),u=1m p(a,t,g,l,c);1e u.g6.2K(1a(){r("sI rK");1d d;1e d="fM"===c.1S?i(t.2l,{1n:t.2l.1n,1v:t.2l.1v,1Q:0,1y:0,x:0,y:0}):a===f.1J.2A||a===f.1J.4H||1s!=c.2l?t.2l:i(t.2l,{1n:1s!=c.1n?c.1n:n.1n,1v:1s!=c.1v?c.1v:n.1v,1Q:n.1Q,1y:n.1y,x:0,y:0}),h(b,c),d})}1a h(a,b){b.cZ&&(a.pj.aj(a),r("Af up 8E"))}1a i(a,b){1d c=1J.3z("2l"),d=1R.7b(a.1n-1,1R.5f(0,b.1y)),e=1R.7b(a.1n,1R.5f(1,b.1y+b.1n)),f=1R.7b(a.1v-1,1R.5f(0,b.1Q)),g=1R.7b(a.1v,1R.5f(1,b.1Q+b.1v));c.1n=b.1n,c.1v=b.1v;1d h=e-d,i=g-f;1e r("AY 2l at:","1y:",b.1y,"1Q:",b.1Q,"1n:",h,"1v:",i),r("AV B4 ez 1n",b.1n,"2Q 1v",b.1v,"ez x",d,"2Q y",f),c.4J("2d").9j(a,d,f,h,i,b.x,b.y,h,i),c}1a j(a){1e 1R.5f(1R.5f(a.2A.sh,a.4H.sh),1R.5f(a.2A.cH,a.4H.cH),1R.5f(a.2A.si,a.4H.si))}1a k(a){1e 1R.5f(1R.5f(a.2A.sQ,a.4H.sQ),1R.5f(a.2A.cI,a.4H.cI),1R.5f(a.2A.sR,a.4H.sR))}1a l(a){1d b=1J.3z("a");1e b.81=a,b.81=b.81,b}1d m=b("./6D"),n=b("./sP/2l"),o=b("./sS"),p=b("./sT"),q=b("./8M"),r=b("./4R"),s=b("./4L"),t=b("./gr"),u=b("./5e").pn,v=s.eL,w="1l-4I-1P",x=0;e.cb=n,e.AP=q,e.4R=r,e.4L=s;1d y="3Q"==1p 1J||"1a"!=1p 1u.3n||"1a"!=1p 1J.3z("2l").4J?1a(){1e 3K.g4("No 2l 6D")}:e;c.2n=y,"1a"==1p a&&a.eI&&a("4I",[],1a(){1e y})},{"./gr":2,"./sS":11,"./4R":13,"./8M":14,"./sT":15,"./5e":16,"./sP/2l":20,"./6D":22,"./4L":26}],5:[1a(a,b,c){1a d(a){if(1b.3a=a,e("sO 1I",a),!1b.8c||!1b.1W){e("Ay sO"),d.1g.1W=1m 9e;1d b=1b.1W;d.1g.8c=1m 3K(1a(a,c){b.8n=a,b.7v=c,b.3a=f(),b.md===!0&&a(b)})}}1d e=a("./4R"),f=a("./4L").lF;b.2n=d},{"./4R":13,"./4L":26}],6:[1a(a,b,c){1a d(a,b){1d c,d,f=1J.3z("1h"),g=1J.3z("7g"),h=1J.3z("1r"),i="C4 Cm";f.2M.oW="aY",f.2M.gg=a,f.2M.2v=b,f.2M.7w=0,f.2M.gL=0,1J.2A.4K(f),g.3a=e(),g.1n=1,g.1v=1,g.2M.7w=0,g.2M.gL=0,g.2M.sK="p5",h.2M.gg=a,h.2M.2v=b,h.2M.7w=0,h.2M.gL=0,h.4K(1J.dW(i)),f.4K(h),f.4K(g),c=g.cC-h.cC+1,f.aj(h),f.4K(1J.dW(i)),f.2M.vC="eb",g.2M.sK="3Z",d=g.cC-f.cC+1,1J.2A.aj(f),1b.p5=c,1b.p4=1,1b.ld=d}1d e=a("./4L").lF;b.2n=d},{"./4L":26}],7:[1a(a,b,c){1a d(){1b.1l={}}1d e=a("./5M");d.1g.x2=1a(a,b){1e 1x 0===1b.1l[a+"-"+b]&&(1b.1l[a+"-"+b]=1m e(a,b)),1b.1l[a+"-"+b]},b.2n=d},{"./5M":6}],8:[1a(a,b,c){1a d(b,c,d){1b.1W=1s,1b.3a=b;1d e=1b,g=f(b);1b.8c=(c?1m 3K(1a(a){"BC:ty"===b.7t.1J.C0||1s==b.7t.1J.4H?b.7t.8n=b.8n=1a(){a(b)}:a(b)}):1b.sM(d.5e,g,d)).2K(1a(b){1d c=a("./sN");1e c(b.7t.1J.4H,{1S:"fM",1n:b.1n,1v:b.1v,5e:d.5e,c9:d.c9,cZ:d.cZ,9J:d.9J,cS:d.cS/2})}).2K(1a(a){1e e.1W=a})}1d e=a("./4L"),f=e.eL,g=a("./5e").pn;d.1g.sM=1a(a,b,c){1d d=1b.3a;1e g(d.3a,a,d.6i,b.1n,b.1v,c)},b.2n=d},{"./sN":4,"./5e":16,"./4L":26}],9:[1a(a,b,c){1a d(a){1b.3a=a.1k,1b.73=[],1b.1S=1s,1b.x0=.5,1b.y0=.5,1b.x1=.5,1b.y1=.5,1b.8c=3K.4y(!0)}d.gQ={lL:1,uZ:2},d.oZ=/^\\s*(9W?\\(\\s*\\d{1,3},\\s*\\d{1,3},\\s*\\d{1,3}(?:,\\s*[0-9\\.]+)?\\s*\\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\\s+(\\d{1,3}(?:\\.\\d+)?)(%|px)?)?(?:\\s|$)/i,b.2n=d},{}],10:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1m 9e;1d c=1b;1b.eX=1s,1b.8c=1m 3K(1a(d,e){c.1W.8n=d,c.1W.7v=e,b&&(c.1W.g8="K5"),c.1W.3a=a,c.1W.md===!0&&d(c.1W)})}b.2n=d},{}],11:[1a(a,b,c){1a d(a,b){1b.e1=1s,1b.1B=a,1b.6D=b,1b.a0=1b.pg(2t.bT.81)}1d e=a("./4R"),f=a("./su"),g=a("./sr"),h=a("./sq"),i=a("./st"),j=a("./gl"),k=a("./sp"),l=a("./gj"),m=a("./sk"),n=a("./4L").fP;d.1g.sY=1a(a){1d b=[];1e a.t5(1a(a,b){4F(b.1P.6T){1U"vm":1e a.5R([{3O:[b.1P.3a],5v:"78"}]);1U"2U":1U"oC":1e a.5R([{3O:[b.1P],5v:b.1P.6T}])}1e a},[]).3P(1b.ox(b,1b.ou),1b),b},d.1g.t1=1a(a,b){1e b.oy().2E(1b.sU).3P(1b.ox(a,1b.ou),1b),a},d.1g.ox=1a(a,b){1e 1a(c){c.3O.3P(1a(d){1b.t2(a,d)||(a.ad(0,0,b.1K(1b,c)),e("Ky 1W #"+a.1i,"ar"==1p d?d.2w(0,3H):d))},1b)}},d.1g.sU=1a(a){1e"4D"!==a.5v},d.1g.ou=1a(a){if("78"===a.5v){1d b=a.3O[0];1e!1b.oR(b)||1b.6D.2U||1b.1B.9J?b.4t(/1l:1W\\/.*;7T,/i)?1m f(b.2B(/78\\([\'"]{0,}|[\'"]{0,}\\)$/gi,""),!1):1b.pf(b)||1b.1B.9J===!0||1b.oR(b)?1m f(b,!1):1b.6D.uq&&!1b.1B.9J&&1b.1B.Kx?1m f(b,!0):1b.1B.5e?1m h(b,1b.1B.5e):1m g(b):1m j(b)}1e"lE-gO"===a.5v?1m l(a):"gO"===a.5v?1m m(a):"2U"===a.5v?1m k(a.3O[0],1b.6D.2U):"oC"===a.5v?1m i(a.3O[0],1b.pf(a.3O[0].3a),1b.1B):1m g(a)},d.1g.oR=1a(a){1e"2U"===a.2w(a.1i-3).8F()||j.1g.mh(a)},d.1g.t2=1a(a,b){1e a.gc(1a(a){1e a.3a===b})},d.1g.pf=1a(a){1e 1b.pg(a)===1b.a0},d.1g.pg=1a(a){1d b=1b.e1||(1b.e1=1J.3z("a"));1e b.81=a,b.81=b.81,b.Kv+b.Ko+b.Kn},d.1g.sZ=1a(a){1e 1b.gZ(a,1b.1B.cS)["2S"](1a(){1d b=1m g(a.3a);1e b.8c.2K(1a(b){a.1W=b})})},d.1g.eZ=1a(a){1d b=1s;1e 1b.2R.gc(1a(c){1e(b=c).3a===a})?b:1s},d.1g.r0=1a(a){1e 1b.2R=a.t5(n(1b.t1,1b),1b.sY(a)),1b.2R.3P(1a(a,b){a.8c.2K(1a(){e("Jx eJ 1W #"+(b+1),a)},1a(c){e("Jz cz 1W #"+(b+1),a,c)})}),1b.g6=3K.mm(1b.2R.5l(1b.sZ,1b)),e("sI Jk 2R"),1b},d.1g.gZ=1a(a,b){1d c,d=3K.Jj([a.8c,1m 3K(1a(d,f){c=b3(1a(){e("Jm Jn cz 1W",a),f(a)},b)})]).2K(1a(a){1e sH(c),a});1e d["2S"](1a(){sH(c)}),d},b.2n=d},{"./sr":5,"./st":8,"./su":10,"./gj":12,"./4R":13,"./sq":17,"./gl":23,"./sp":24,"./4L":26,"./sk":27}],12:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S=e.gQ.lL;1d b=d.sj.7k(a.3O[0])||!e.oZ.7k(a.3O[0]);b?a.3O[0].5S(/\\s+/).tm().3P(1a(a,b){4F(a){1U"1y":1b.x0=0,1b.x1=1;2C;1U"1Q":1b.y0=0,1b.y1=1;2C;1U"1G":1b.x0=1,1b.x1=0;2C;1U"7q":1b.y0=1,1b.y1=0;2C;1U"to":1d c=1b.y0,d=1b.x0;1b.y0=1b.y1,1b.x0=1b.x1,1b.x1=d,1b.y1=c;2C;1U"4j":2C;1j:1d e=.oh*5W(a,10);if(iv(e))2C;0===b?(1b.y0=e,1b.y1=1-1b.y0):(1b.x0=e,1b.x1=1-1b.x0)}},1b):(1b.y0=0,1b.y1=1),1b.73=a.3O.9E(b?1:0).5l(1a(a){1d b=a.4t(e.oZ),c=+b[2],d=0===c?"%":b[3];1e{3q:1m f(b[1]),7x:"%"===d?c/3H:1s}}),1s===1b.73[0].7x&&(1b.73[0].7x=0),1s===1b.73[1b.73.1i-1].7x&&(1b.73[1b.73.1i-1].7x=1),1b.73.3P(1a(a,b){1s===a.7x&&1b.73.9E(b).gc(1a(c,d){1e 1s!==c.7x?(a.7x=(c.7x-1b.73[b-1].7x)/(d+1)+1b.73[b-1].7x,!0):!1},1b)},1b)}1d e=a("./iH"),f=a("./3q");d.1g=1u.3n(e.1g),d.sj=/^\\s*(?:to|1y|1G|1Q|7q|4j|\\d{1,3}(?:\\.\\d+)?%?)(?:\\s|$)/i,b.2n=d},{"./3q":3,"./iH":9}],13:[1a(a,b,c){1d d=1a(){d.1B.gd&&2t.3l&&2t.3l.4R&&LP.1g.fP.1K(2t.3l.4R,2t.3l).6R(2t.3l,[aG.cQ()-d.1B.5Z+"ms","4I:"].5R([].9E.1K(aZ,0)))};d.1B={gd:!1},b.2n=d},{}],14:[1a(a,b,c){1a d(a,b){1b.1P=a,1b.2x=b,1b.8r=1s,1b.a2=1s,1b.5y=1s,1b.3L=[],1b.9q=[],1b.eH=1s,1b.em=1s,1b.cM=1s,1b.oU={},1b.ek={},1b.ef=1s,1b.eg=1s,1b.gk=1s,1b.eQ=!1,1b.91=1s}1a e(a){1d b=a.1B[a.LZ||0];1e b?b.1w||"":""}1a f(a){if(a&&"eY"===a[1])1e a[2].5S(",").5l(1a(a){1e 5W(a.55())});if(a&&"sD"===a[1]){1d b=a[2].5S(",").5l(1a(a){1e 5W(a.55())});1e[b[0],b[1],b[4],b[5],b[12],b[13]]}}1a g(a){1e-1!==a.1t().3U("%")}1a h(a){1e a.2B("px","")}1a i(a){1e 5W(a)}1d j=a("./3q"),k=a("./4L"),l=k.eL,m=k.lD,n=k.eH;d.1g.gs=1a(a){a.em=1b.em,a.5y=1b.5y,a.a2=1b.a2,a.3L=1b.3L,a.9q=1b.9q,a.cM=1b.cM,a.ek=1b.ek,a.ef=1b.ef,a.91=1b.91},d.1g.qb=1a(){1e 1s===1b.91?1b.91=1b.sn("91"):1b.91},d.1g.vS=1a(a){1b.8r=a,a.dZ.1L(1b)},d.1g.gC=1a(){1e 1b.1P.6c===9h.gy?1b.2x.em:"4D"!==1b.2z("7j")&&"aY"!==1b.2z("oW")&&!1b.1P.m2("1l-4I-LX")&&("gB"!==1b.1P.6T||"aY"!==1b.1P.eU("1S"))},d.1g.2z=1a(a){1e 1b.cM||(1b.cM=1b.eQ?1b.2x.gw(1b.7U?":7U":":os"):1b.gw(1s)),1b.ek[a]||(1b.ek[a]=1b.cM[a])},d.1g.p0=1a(a){1d b=["ov","gt","ms","o"],c=1b.2z(a);1e 1x 0===c&&b.gc(1a(b){1e c=1b.2z(b+a.3j(0,1).9a()+a.3j(1)),1x 0!==c},1b),1x 0===c?1s:c},d.1g.gw=1a(a){1e 1b.1P.6i.9y.L4(1b.1P,a)},d.1g.7P=1a(a){1d b=2H(1b.2z(a),10);1e iv(b)?0:b},d.1g.3q=1a(a){1e 1b.oU[a]||(1b.oU[a]=1m j(1b.2z(a)))},d.1g.sn=1a(a){1d b=5W(1b.2z(a));1e iv(b)?0:b},d.1g.gf=1a(){1d a=1b.2z("gf");4F(2H(a,10)){1U KX:a="vj";2C;1U uI:a="eb"}1e a},d.1g.qr=1a(){1d a=1b.2z("3L").4t(1b.sA);1e a?{1Q:2H(a[1],10),1G:2H(a[2],10),7q:2H(a[3],10),1y:2H(a[4],10)}:1s},d.1g.oy=1a(){1e 1b.ef||(1b.ef=m(1b.2z("KT")))},d.1g.gh=1a(a,b){1d c=(1b.2z(a)||"").5S(",");1e c=c[b||0]||c[0]||"7n",c=c.55().5S(" "),1===c.1i&&(c=[c[0],g(c[0])?"7n":c[0]]),c},d.1g.tF=1a(a,b,c){1d d,e,f=1b.gh("La",c);if(g(f[0]))d=a.1n*5W(f[0])/3H;2p{if(/so|Ln/.7k(f[0])){1d h=a.1n/a.1v,i=b.1n/b.1v;1e i>h^"so"===f[0]?{1n:a.1v*i,1v:a.1v}:{1n:a.1n,1v:a.1n/i}}d=2H(f[0],10)}1e e="7n"===f[0]&&"7n"===f[1]?b.1v:"7n"===f[1]?d/b.1n*b.1v:g(f[1])?a.1v*5W(f[1])/3H:2H(f[1],10),"7n"===f[0]&&(d=e/b.1v*b.1n),{1n:d,1v:e}},d.1g.tt=1a(a,b,c,d){1d e,f,h=1b.gh("Ld",c);1e e=g(h[0])?(a.1n-(d||b).1n)*(5W(h[0])/3H):2H(h[0],10),f="7n"===h[1]?e/b.1n*b.1v:g(h[1])?(a.1v-(d||b).1v)*5W(h[1])/3H:2H(h[1],10),"7n"===h[0]&&(e=f/b.1v*b.1n),{1y:e,1Q:f}},d.1g.tw=1a(a){1e 1b.gh("Ji",a)[0]},d.1g.wL=1a(){1d a=1b.2z("Hc"),b=[];if(a&&"4D"!==a)1I(1d c=a.4t(1b.sE),d=0;c&&d0?(1b.pd=0,1b.gI(1b.az,a)):a():(1b.az.3P(1b.oH,1b),a())},1b))},1b))}1a e(a){1e a.2x&&a.2x.3L.1i}1a f(a){1e a.2B(/(\\-[a-z])/g,1a(a){1e a.9a().2B("-","")})}1a g(){}1a h(a,b,c,d){1e a.5l(1a(e,f){if(e.1n>0){1d g=b.1y,h=b.1Q,i=b.1n,j=b.1v-a[2].1n;4F(f){1U 0:j=a[0].1n,e.3O=l({c1:[g,h],c2:[g+i,h],c3:[g+i-a[1].1n,h+j],c4:[g+a[3].1n,h+j]},d[0],d[1],c.eO,c.ev,c.eT,c.e7);2C;1U 1:g=b.1y+b.1n-a[1].1n,i=a[1].1n,e.3O=l({c1:[g+i,h],c2:[g+i,h+j+a[2].1n],c3:[g,h+j],c4:[g,h+a[0].1n]},d[1],d[2],c.eT,c.e7,c.eS,c.e4);2C;1U 2:h=h+b.1v-a[2].1n,j=a[2].1n,e.3O=l({c1:[g+i,h+j],c2:[g,h+j],c3:[g+a[3].1n,h],c4:[g+i-a[3].1n,h]},d[2],d[3],c.eS,c.e4,c.eR,c.e5);2C;1U 3:i=a[3].1n,e.3O=l({c1:[g,h+j+a[2].1n],c2:[g,h],c3:[g+i,h+a[0].1n],c4:[g+i,h+j]},d[3],d[0],c.eR,c.e5,c.eO,c.ev)}}1e e})}1a i(a,b,c,d){1d e=4*((1R.I5(2)-1)/3),f=c*e,g=d*e,h=a+c,i=b+d;1e{p7:k({x:a,y:i},{x:a,y:i-g},{x:h-f,y:b},{x:h,y:b}),p6:k({x:a,y:b},{x:a+f,y:b},{x:h,y:i-g},{x:h,y:i}),oV:k({x:h,y:b},{x:h,y:b+g},{x:a+f,y:i},{x:a,y:i}),oX:k({x:h,y:i},{x:h-f,y:i},{x:a,y:b+g},{x:a,y:b})}}1a j(a,b,c){1d d=a.1y,e=a.1Q,f=a.1n,g=a.1v,h=b[0][0]f+c[3].1n?0:k-c[3].1n,l-c[0].1n).p6.9f(.5),eS:i(d+s,e+r,m,n).oV.9f(.5),e4:i(d+1R.7b(s,f-c[3].1n),e+1R.7b(r,g+c[0].1n),1R.5f(0,m-c[1].1n),n-c[2].1n).oV.9f(.5),eR:i(d,e+t,o,p).oX.9f(.5),e5:i(d+c[3].1n,e+t,1R.5f(0,o-c[3].1n),p-c[2].1n).oX.9f(.5)}}1a k(a,b,c,d){1d e=1a(a,b,c){1e{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}};1e{5Z:a,I0:b,HW:c,cj:d,9f:1a(f){1d g=e(a,b,f),h=e(b,c,f),i=e(c,d,f),j=e(g,h,f),l=e(h,i,f),m=e(j,l,f);1e[k(a,g,j,m),k(m,l,i,d)]},et:1a(a){a.1L(["qE",b.x,b.y,c.x,c.y,d.x,d.y])},p9:1a(d){d.1L(["qE",c.x,c.y,b.x,b.y,a.x,a.y])}}}1a l(a,b,c,d,e,f,g){1d h=[];1e b[0]>0||b[1]>0?(h.1L(["5o",d[1].5Z.x,d[1].5Z.y]),d[1].et(h)):h.1L(["5o",a.c1[0],a.c1[1]]),c[0]>0||c[1]>0?(h.1L(["5o",f[0].5Z.x,f[0].5Z.y]),f[0].et(h),h.1L(["5o",g[0].cj.x,g[0].cj.y]),g[0].p9(h)):(h.1L(["5o",a.c2[0],a.c2[1]]),h.1L(["5o",a.c3[0],a.c3[1]])),b[0]>0||b[1]>0?(h.1L(["5o",e[1].cj.x,e[1].cj.y]),e[1].p9(h)):h.1L(["5o",a.c4[0],a.c4[1]]),h}1a m(a,b,c,d,e,f,g){b[0]>0||b[1]>0?(a.1L(["5o",d[0].5Z.x,d[0].5Z.y]),d[0].et(a),d[1].et(a)):a.1L(["5o",f,g]),(c[0]>0||c[1]>0)&&a.1L(["5o",e[0].5Z.x,e[0].5Z.y])}1a n(a){1e a.7P("cY")<0}1a o(a){1e a.7P("cY")>0}1a p(a){1e 0===a.7P("cY")}1a q(a){1e-1!==["eu","eu-af","eu-qs"].3U(a.2z("7j"))}1a r(a){1e a 2Y V}1a s(a){1e a.1P.1l.55().1i>0}1a t(a){1e/^(eb|4D|he)$/.7k(a.2x.2z("If"))}1a u(a){1e["Ie","Ic","Ig","Es"].5l(1a(b){1d c=a.2z("e9"+b+"Ii"),d=c.5S(" ");1e d.1i<=1&&(d[1]=d[0]),d.5l(G)})}1a v(a){1e a.6c===9h.gy||a.6c===9h.eq}1a w(a){1d b=a.2z("3M"),c=-1!==["pr","Ij","gA"].3U(b)?a.2z("cY"):"7n";1e"7n"!==c}1a x(a){1e"Ik"!==a.2z("3M")}1a y(a){1e"4D"!==a.2z("Ih")}1a z(a){1e-1!==["eu-af","eu-qs"].3U(a.2z("7j"))}1a A(a){1d b=1b;1e 1a(){1e!a.6R(b,aZ)}}1a B(a){1e a.1P.6c===9h.eq}1a C(a){1e a.eQ===!0}1a D(a){1e a.1P.6c===9h.gy}1a E(a){1e 1a(b,c){1e b.7P("cY")+a.3U(b)/a.1i-(c.7P("cY")+a.3U(c)/a.1i)}}1a F(a){1e a.qb()<1}1a G(a){1e 2H(a,10)}1a H(a){1e a.1n}1a I(a){1e a.1P.6c!==9h.eq||-1===["qH","Il","Im","Is","BR","It"].3U(a.1P.6T)}1a J(a){1e[].5R.6R([],a)}1a K(a){1d b=a.3j(0,1);1e b===a.3j(a.1i-1)&&b.4t(/\'|"/)?a.3j(1,a.1i-2):a}1a L(a){1I(1d b,c=[],d=0,e=!1;a.1i;)M(a[d])===e?(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)),e=!e,d=0):d++,d>=a.1i&&(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)));1e c}1a M(a){1e-1!==[32,13,10,9,45].3U(a)}1a N(a){1e/[^\\Ir-\\Iq]/.7k(a)}1d O=a("./4R"),P=a("gx"),Q=a("./8M"),R=a("./wu"),S=a("./wA"),T=a("./wx"),U=a("./3q"),V=a("./wv"),W=a("./4L"),X=W.fP,Y=W.eL,Z=W.lD,$=W.eH;d.1g.qn=1a(){1b.cn.3P(1a(a){if(B(a)){C(a)&&a.pq(),a.5y=1b.wC(a);1d b="aY"===a.2z("9g")?[a.5y.3L]:[],c=a.qr();c&&-1!==["pr","gA"].3U(a.2z("3M"))&&b.1L([["ew",a.a2.1y+c.1y,a.a2.1Q+c.1Q,c.1G-c.1y,c.7q-c.1Q]]),a.3L=e(a)?a.2x.3L.5R(b):b,a.9q="aY"!==a.2z("9g")?a.3L.5R([a.5y.3L]):a.3L,C(a)&&a.pk()}2p D(a)&&(a.3L=e(a)?a.2x.3L:[]);C(a)||(a.a2=1s)},1b)},d.1g.gI=1a(a,b,c){c=c||aG.cQ(),1b.oH(a[1b.pd++]),a.1i===1b.pd?b():c+20>aG.cQ()?1b.gI(a,b,c):b3(X(1a(){1b.gI(a,b)},1b),0)},d.1g.r7=1a(a){1b.ot(a,"."+S.1g.pb+\':7U { 7I: "" !7m; 7j: 4D !7m; }.\'+S.1g.pa+\':os { 7I: "" !7m; 7j: 4D !7m; }\')},d.1g.r8=1a(a){1b.ot(a,"* { -ov-4O: 4D !7m; -gt-4O: 4D !7m; -o-4O: 4D !7m; 4O: 4D !7m; -ov-gF: 4D !7m; -gt-gF: 4D !7m; -o-gF: 4D !7m; gF: 4D !7m;}")},d.1g.ot=1a(a,b){1d c=a.3z("2M");c.hy=b,a.2A.4K(c)},d.1g.rl=1a(a){1d b=[[a]];if(a.1P.6c===9h.eq){1d c=1b.ok(a,":7U"),d=1b.ok(a,":os");c&&b.1L(c),d&&b.1L(d)}1e J(b)},d.1g.ok=1a(a,b){1d c=a.gw(b);if(!c||!c.7I||"4D"===c.7I||"-gt-HQ-7I"===c.7I||"4D"===c.7j)1e 1s;1I(1d d=K(c.7I),e="78"===d.3j(0,3),g=1J.3z(e?"7g":"HS"),h=1m S(g,a,b),i=c.1i-1;i>=0;i--){1d j=f(c.1H(i));g.2M[j]=c[j]}if(g.eV=S.1g.pb+" "+S.1g.pa,e)1e g.3a=Z(d)[0].3O[0],[h];1d k=1J.dW(d);1e g.4K(k),[h,1m R(k,h)]},d.1g.q1=1a(a){1e J([].2E.1K(a.1P.qQ,v).5l(1a(b){1d c=[b.6c===9h.gy?1m R(b,a):1m Q(b,a)].2E(I);1e b.6c===9h.eq&&c.1i&&"oA"!==b.qU?c[0].gC()?c.5R(1b.q1(c[0])):[]:c},1b))},d.1g.q8=1a(a,b){1d c=1m V(b,a.qb(),a.1P,a.2x);a.gs(c);1d d=b?c.m3(1b):c.2x.8r;d.8Y.1L(c),a.8r=c},d.1g.rd=1a(){1b.cn.3P(1a(a){B(a)&&(1b.vH(a)||F(a)||w(a)||1b.vM(a)||a.9G())?1b.q8(a,!0):B(a)&&(x(a)&&p(a)||z(a)||y(a))?1b.q8(a,!1):a.vS(a.2x.8r)},1b)},d.1g.vM=1a(a){1e"J5"===a.1P.6T&&a.2x.3q("gE").eW()},d.1g.vH=1a(a){1e 1s===a.2x},d.1g.pQ=1a(a){a.8Y.J7(E(a.8Y.9E(0))),a.8Y.3P(1b.pQ,1b)},d.1g.wG=1a(a){1e 1a(b,c,d){if("4D"!==a.2x.2z("wT").3j(0,4)||0!==b.55().1i){if(1b.6D.lY&&!a.2x.9G()){1d e=d.9E(0,c).8L("").1i;1e 1b.w7(a.1P,e,b.1i)}if(a.1P&&"ar"==1p a.1P.1l){1d f=a.1P.vU(b.1i),g=1b.w2(a.1P,a.2x.9G());1e a.1P=f,g}}2p(!1b.6D.lY||a.2x.9G())&&(a.1P=a.1P.vU(b.1i));1e{}}},d.1g.w2=1a(a,b){1d c=a.6i.3z("vz"),d=a.pj,e=a.qh(!0);c.4K(a.qh(!0)),d.qi(c,a);1d f=b?$(c):Y(c);1e d.qi(e,c),f},d.1g.w7=1a(a,b,c){1d d=1b.qa||(1b.qa=a.6i.ed());1e d.Jf(a,b),d.Jg(a,b+c),d.eG()},d.1g.ac=1a(a){1d b=a.8Y.2E(n),c=a.dZ.2E(B),d=c.2E(A(y)),e=d.2E(A(x)).2E(A(q)),f=c.2E(A(x)).2E(y),h=d.2E(A(x)).2E(q),i=a.8Y.5R(d.2E(x)).2E(p),j=a.dZ.2E(D).2E(s),k=a.8Y.2E(o);b.5R(e).5R(f).5R(h).5R(i).5R(j).5R(k).3P(1a(a){1b.az.1L(a),r(a)&&(1b.ac(a),1b.az.1L(1m g))},1b)},d.1g.oH=1a(a){3c{a 2Y g?1b.2D.2V.lp():D(a)?(C(a.2x)&&a.2x.pq(),1b.oz(a),C(a.2x)&&a.2x.pk()):1b.vW(a)}2S(b){if(O(b),1b.1B.2g)1D b}},d.1g.vW=1a(a){r(a)&&(1b.2D.uB(a.91),1b.2D.2V.iF(),a.9G()&&1b.2D.uD(a.vY())),"gB"===a.1P.6T&&"tO"===a.1P.1S?1b.vk(a):"gB"===a.1P.6T&&"9Z"===a.1P.1S?1b.vc(a):1b.vZ(a)},d.1g.vZ=1a(a){1d b=a.aS();1b.2D.3L(a.9q,1a(){1b.2D.u4(a,b,a.5y.5y.5l(H))},1b),1b.2D.3L(a.3L,1a(){1b.2D.oS(a.5y.5y)},1b),1b.2D.3L(a.9q,1a(){4F(a.1P.6T){1U"2U":1U"oC":1d c=1b.2R.eZ(a.1P);c?1b.2D.gv(a,b,a.5y,c):O("1E cz <"+a.1P.6T+">",a.1P);2C;1U"vm":1d d=1b.2R.eZ(a.1P.3a);d?1b.2D.gv(a,b,a.5y,d):O("1E cz <7g>",a.1P.3a);2C;1U"vl":1b.2D.gv(a,b,a.5y,{1W:a.1P});2C;1U"oL":1U"gB":1U"oA":1b.vq(a)}},1b)},d.1g.vk=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v),d={1n:c-1,1v:c-1,1Q:b.1Q,1y:b.1y},e=[3,3],f=[e,e,e,e],g=[1,1,1,1].5l(1a(a){1e{3q:1m U("#vd"),1n:a}}),i=j(d,f,g);1b.2D.3L(a.9q,1a(){1b.2D.9o(d.1y+1,d.1Q+1,d.1n-2,d.1v-2,1m U("#vb")),1b.2D.oS(h(g,d,i,f)),a.1P.vf&&(1b.2D.5M(1m U("#vg"),"eb","eb","vj",c-3+"px","IH"),1b.2D.1w("✔",d.1y+c/6,d.1Q+c-1))},1b)},d.1g.vc=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v)-2;1b.2D.3L(a.9q,1a(){1b.2D.uN(b.1y+1,b.1Q+1,c,1m U("#vb"),1,1m U("#vd")),a.1P.vf&&1b.2D.4T(1R.eM(b.1y+c/4)+1,1R.eM(b.1Q+c/4)+1,1R.aN(c/2),1m U("#vg"))},1b)},d.1g.vq=1a(a){1d b=a.vr();if(b.1i>0){1d c=a.1P.6i,d=c.3z("vz"),e=["vC","54","gg","gf","2v","3q","tL","tM","tW","u5","1n","1v","HL","Gy","Gz","GC","Gx","Gw","Gs"];e.3P(1a(b){3c{d.2M[b]=a.2z(b)}2S(c){O("4I: Gt: Gv GJ in GK: "+c.aK)}});1d f=a.aS();d.2M.3M="gA",d.2M.1y=f.1y+"px",d.2M.1Q=f.1Q+"px",d.H2=b,c.2A.4K(d),1b.oz(1m R(d.bw,a)),c.2A.aj(d)}},d.1g.oz=1a(a){a.ul();1d b=P.dV.ow(a.1P.1l),c=1b.1B.GO&&!t(a)||N(a.1P.1l)?b.5l(1a(a){1e P.dV.2f([a])}):L(b),d=a.2x.gf(),e=a.2x.2z("2v"),f=a.2x.2z("gg"),g=a.2x.wL();1b.2D.5M(a.2x.3q("3q"),a.2x.2z("Gp"),a.2x.2z("Gb"),d,e,f),g.1i?1b.2D.uo(g[0].3q,g[0].wO,g[0].wE,g[0].wF):1b.2D.uh(),1b.2D.3L(a.2x.3L,1a(){c.5l(1b.wG(a),1b).3P(1a(b,d){b&&(1b.2D.1w(c[d],b.1y,b.7q),1b.wZ(a.2x,b,1b.wQ.x2(f,e)))},1b)},1b)},d.1g.wZ=1a(a,b,c){4F(a.2z("wT").5S(" ")[0]){1U"G7":1b.2D.9o(b.1y,1R.5m(b.1Q+c.p5+c.p4),b.1n,1,a.3q("3q"));2C;1U"Gf":1b.2D.9o(b.1y,1R.5m(b.1Q),b.1n,1,a.3q("3q"));2C;1U"5o-mQ":1b.2D.9o(b.1y,1R.eM(b.1Q+c.ld+c.p4),b.1n,1,a.3q("3q"))}};1d 9M={wh:[["e3",.6],["e3",.1],["e3",.1],["e3",.6]]};d.1g.wC=1a(a){1d b=a.aS(),c=u(a),d=["Gn","Go","Gl","Gk"].5l(1a(b,c){1d d=a.2z("e9"+b+"Gh"),e=a.3q("e9"+b+"Gj");"wh"===d&&e.wg()&&(e=1m U([1O,1O,1O,e.a]));1d f=9M[d]?9M[d][c]:1s;1e{1n:a.7P("e9"+b+"Hx"),3q:f?e[f[0]](f[1]):e,3O:1s}}),e=j(b,c,d);1e{3L:1b.wf(a,e,d,c,b),5y:h(d,b,e,c)}},d.1g.wf=1a(a,b,c,d,e){1d f=a.2z("9q"),g=[];4F(f){1U"7I-wn":1U"gL-wn":m(g,d[0],d[1],b.ev,b.e7,e.1y+c[3].1n,e.1Q+c[0].1n),m(g,d[1],d[2],b.e7,b.e4,e.1y+e.1n-c[1].1n,e.1Q+c[0].1n),m(g,d[2],d[3],b.e4,b.e5,e.1y+e.1n-c[1].1n,e.1Q+e.1v-c[2].1n),m(g,d[3],d[0],b.e5,b.ev,e.1y+c[3].1n,e.1Q+e.1v-c[2].1n);2C;1j:m(g,d[0],d[1],b.eO,b.eT,e.1y,e.1Q),m(g,d[1],d[2],b.eT,b.eS,e.1y+e.1n,e.1Q),m(g,d[2],d[3],b.eS,b.eR,e.1y+e.1n,e.1Q+e.1v),m(g,d[3],d[0],b.eR,b.eO,e.1y,e.1Q+e.1v)}1e g},b.2n=d},{"./3q":3,"./wx":7,"./4R":13,"./8M":14,"./wA":18,"./wv":21,"./wu":25,"./4L":26,gx:1}],16:[1a(a,b,c){1a d(a,b,c){1d d="Hp"in 1m uW;if(!b)1e 3K.g4("No 5e Hb");1d e=g(d),i=h(b,a,e);1e d?k(i):f(c,i,e).2K(1a(a){1e o(a.7I)})}1a e(a,b,c){1d d="g8"in 1m 9e,e=g(d),i=h(b,a,e);1e d?3K.4y(i):f(c,i,e).2K(1a(a){1e"1l:"+a.1S+";7T,"+a.7I})}1a f(a,b,c){1e 1m 3K(1a(d,e){1d f=a.3z("rV"),g=1a(){Hd 2t.4I.5e[c],a.2A.aj(f)};2t.4I.5e[c]=1a(a){g(),d(a)},f.3a=b,f.7v=1a(a){g(),e(a)},a.2A.4K(f)})}1a g(a){1e a?"":"H9"+aG.cQ()+"9M"+ ++p+"9M"+1R.5m(qX*1R.nW())}1a h(a,b,c){1e a+"?78="+hC(b)+(c.1i?"&H8=4I.5e."+c:"")}1a i(a){1e 1a(b){1d c,d=1m wr;3c{c=d.H5(b,"1w/2T")}2S(e){m("wr 2a lT, wt v9 to oY"),c=1J.H7.oY("");3c{c.4Y(),c.p8(b),c.44()}2S(f){m("oY p8 2a lT, wt v9 to 1J.2A.hy"),c.2A.hy=b}}1d g=c.pm("tR");if(!g||!g.81.Hk){1d h=c.3z("tR");h.81=a,c.tQ.tI(h,c.tQ.bw)}1e c}}1a j(a,b,c,e,f,g){1e 1m d(a,b,2t.1J).2K(i(a)).2K(1a(a){1e n(a,c,e,f,g,0,0)})}1d k=a("./g7"),l=a("./4L"),m=a("./4R"),n=a("./gr"),o=l.eF,p=0;c.tS=d,c.tP=e,c.pn=j},{"./gr":2,"./4R":13,"./4L":26,"./g7":28}],17:[1a(a,b,c){1a d(a,b){1d c=1J.3z("a");c.81=a,a=c.81,1b.3a=a,1b.1W=1m 9e;1d d=1b;1b.8c=1m 3K(1a(c,f){d.1W.g8="Lg",d.1W.8n=c,d.1W.7v=f,1m e(a,b,1J).2K(1a(a){d.1W.3a=a})["2S"](f)})}1d e=a("./5e").tP;b.2n=d},{"./5e":16}],18:[1a(a,b,c){1a d(a,b,c){e.1K(1b,a,b),1b.eQ=!0,1b.7U=":7U"===c}1d e=a("./8M");d.1g.gs=1a(a){d.1g.gs.1K(1b,a),a.eQ=!0,a.7U=1b.7U},d.1g=1u.3n(e.1g),d.1g.pq=1a(){1b.7U?1b.2x.1P.tI(1b.1P,1b.2x.1P.bw):1b.2x.1P.4K(1b.1P),1b.2x.1P.eV+=" "+1b.pc()},d.1g.pk=1a(){1b.1P.pj.aj(1b.1P),1b.2x.1P.eV=1b.2x.1P.eV.2B(1b.pc(),"")},d.1g.pc=1a(){1e 1b["Lr"+(1b.7U?"Ls":"Lq")]},d.1g.pb="Lm",d.1g.pa="Lo",b.2n=d},{"./8M":14}],19:[1a(a,b,c){1a d(a,b,c,d,e){1b.1n=a,1b.1v=b,1b.2R=c,1b.1B=d,1b.1J=e}1d e=a("./4R");d.1g.gv=1a(a,b,c,d){1d e=a.7P("tL"),f=a.7P("tM"),g=a.7P("tW"),h=a.7P("u5"),i=c.5y,j=b.1n-(i[1].1n+i[3].1n+e+g),k=b.1v-(i[0].1n+i[2].1n+f+h);1b.9j(d,0,0,d.1W.1n||j,d.1W.1v||k,b.1y+e+i[3].1n,b.1Q+f+i[0].1n,j,k)},d.1g.u4=1a(a,b,c){b.1v>0&&b.1n>0&&(1b.u7(a,b),1b.u1(a,b,c))},d.1g.u7=1a(a,b){1d c=a.3q("gE");c.eW()||1b.9o(b.1y,b.1Q,b.1n,b.1v,c)},d.1g.oS=1a(a){a.3P(1b.u3,1b)},d.1g.u3=1a(a){a.3q.eW()||1s===a.3O||1b.uV(a.3O,a.3q)},d.1g.u1=1a(a,b,c){1d d=a.oy();d.tm().3P(1a(d,f,g){4F(d.5v){1U"78":1d h=1b.2R.eZ(d.3O[0]);h?1b.tq(a,b,h,g.1i-(f+1),c):e("1E cz 6H-1W",d.3O[0]);2C;1U"lE-gO":1U"gO":1d i=1b.2R.eZ(d.1k);i?1b.ux(i,b,c):e("1E cz 6H-1W",d.3O[0]);2C;1U"4D":2C;1j:e("L1 6H-1W 1S",d.3O[0])}},1b)},d.1g.tq=1a(a,b,c,d,e){1d f=a.tF(b,c.1W,d),g=a.tt(b,c.1W,d,f),h=a.tw(d);4F(h){1U"5x-x":1U"5x no-5x":1b.gJ(c,g,f,b,b.1y+e[3],b.1Q+g.1Q+e[0],u9,f.1v,e);2C;1U"5x-y":1U"no-5x 5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+e[0],f.1n,u9,e);2C;1U"no-5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+g.1Q+e[0],f.1n,f.1v,e);2C;1j:1b.ln(c,g,f,{1Q:b.1Q,1y:b.1y},e[3],e[0])}},b.2n=d},{"./4R":13}],20:[1a(a,b,c){1a d(a,b){f.6R(1b,aZ),1b.2l=1b.1B.2l||1b.1J.3z("2l"),1b.1B.2l||(1b.2l.1n=a,1b.2l.1v=b),1b.2V=1b.2l.4J("2d"),1b.gG=1b.1J.3z("2l").4J("2d"),1b.2V.L3="7q",1b.nT={},h("Lt cb ez 5r",a,"x",b)}1a e(a){1e a.1i>0}1d f=a("../2D"),g=a("../gj"),h=a("../4R");d.1g=1u.3n(f.1g),d.1g.cw=1a(a){1e 1b.2V.lk="3i"==1p a&&a.uP?a.1t():a,1b.2V},d.1g.9o=1a(a,b,c,d,e){1b.cw(e).ii(a,b,c,d)},d.1g.4T=1a(a,b,c,d){1b.cw(d),1b.2V.uk(),1b.2V.M7(a+c/2,b+c/2,c/2,0,2*1R.PI,!0),1b.2V.um(),1b.2V.e2()},d.1g.uN=1a(a,b,c,d,e,f){1b.4T(a,b,c,d),1b.2V.M6=f.1t(),1b.2V.M5()},d.1g.uV=1a(a,b){1b.pV(a),1b.cw(b).e2()},d.1g.uY=1a(a){if(1s===a.eX){1b.gG.9j(a.1W,0,0);3c{1b.gG.v1(0,0,1,1),a.eX=!1}2S(b){1b.gG=1J.3z("2l").4J("2d"),a.eX=!0}}1e a.eX},d.1g.9j=1a(a,b,c,d,e,f,g,h,i){(!1b.uY(a)||1b.1B.9J)&&1b.2V.9j(a.1W,b,c,d,e,f,g,h,i)},d.1g.3L=1a(a,b,c){1b.2V.iF(),a.2E(e).3P(1a(a){1b.pV(a).3L()},1b),b.1K(c),1b.2V.lp()},d.1g.pV=1a(a){1e 1b.2V.uk(),a.3P(1a(a,b){"ew"===a[0]?1b.2V.ew.6R(1b.2V,a.9E(1)):1b.2V[0===b?"Mj":a[0]+"To"].6R(1b.2V,a.9E(1))},1b),1b.2V.um(),1b.2V},d.1g.5M=1a(a,b,c,d,e,f){1b.cw(a).5M=[b,c,d,e,f].8L(" ").5S(",")[0]},d.1g.uo=1a(a,b,c,d){1b.cA("uc",a.1t()).cA("Mg",b).cA("Md",c).cA("Me",d)},d.1g.uh=1a(){1b.cA("uc","9W(0,0,0,0)")},d.1g.uB=1a(a){1b.2V.LF=a},d.1g.uD=1a(a){1b.2V.ak(a.a0[0],a.a0[1]),1b.2V.cp.6R(1b.2V,a.eY),1b.2V.ak(-a.a0[0],-a.a0[1])},d.1g.cA=1a(a,b){1e 1b.nT[a]!==b&&(1b.nT[a]=1b.2V[a]=b),1b},d.1g.1w=1a(a,b,c){1b.2V.tU(a,b,c)},d.1g.gJ=1a(a,b,c,d,e,f,g,h,i){1d j=[["5o",1R.5m(e),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(h+f)],["5o",1R.5m(e),1R.5m(h+f)]];1b.3L([j],1a(){1b.ln(a,b,c,d,i[3],i[0])},1b)},d.1g.ln=1a(a,b,c,d,e,f){1d g=1R.5m(d.1y+b.1y+e),h=1R.5m(d.1Q+b.1Q+f);1b.cw(1b.2V.Ly(1b.uC(a,c),"5x")),1b.2V.ak(g,h),1b.2V.e2(),1b.2V.ak(-g,-h)},d.1g.ux=1a(a,b){if(a 2Y g){1d c=1b.2V.LM(b.1y+b.1n*a.x0,b.1Q+b.1v*a.y0,b.1y+b.1n*a.x1,b.1Q+b.1v*a.y1);a.73.3P(1a(a){c.LQ(a.7x,a.3q.1t())}),1b.9o(b.1y,b.1Q,b.1n,b.1v,c)}},d.1g.uC=1a(a,b){1d c=a.1W;if(c.1n===b.1n&&c.1v===b.1v)1e c;1d d,e=1J.3z("2l");1e e.1n=b.1n,e.1v=b.1v,d=e.4J("2d"),d.9j(c,0,0,c.1n,c.1v,0,0,b.1n,b.1v),e},b.2n=d},{"../gj":12,"../4R":13,"../2D":19}],21:[1a(a,b,c){1a d(a,b,c,d){e.1K(1b,c,d),1b.uA=a,1b.8Y=[],1b.dZ=[],1b.91=(1b.2x?1b.2x.8r.91:1)*b}1d e=a("./8M");d.1g=1u.3n(e.1g),d.1g.m3=1a(a){1d b=1b.2x?1b.2x.8r:1s;1e b?b.uA?b:b.m3(a):a.8r},b.2n=d},{"./8M":14}],22:[1a(a,b,c){1a d(a){1b.lY=1b.uf(a),1b.uq=1b.ue(),1b.2U=1b.ud()}d.1g.uf=1a(a){1d b,c,d,e,f=!1;1e a.ed&&(b=a.ed(),b.eG&&(c=a.3z("JI"),c.2M.1v="JH",c.2M.7j="af",a.2A.4K(c),b.JD(c),d=b.eG(),e=d.1v,ug===e&&(f=!0),a.2A.aj(c))),f},d.1g.ue=1a(){1e"3Q"!=1p(1m 9e).g8},d.1g.ud=1a(){1d a=1m 9e,b=1J.3z("2l"),c=b.4J("2d");a.3a="1l:1W/2U+eC,<2U wc=\'gV://9d.w3.wp/wq/2U\'>";3c{c.9j(a,0,0),b.eo()}2S(d){1e!1}1e!0},b.2n=d},{}],23:[1a(a,b,c){1a d(a){1b.3a=a,1b.1W=1s;1d b=1b;1b.8c=1b.mc().2K(1a(){1e b.mh(a)?3K.4y(b.ub(a)):e(a)}).2K(1a(a){1e 1m 3K(1a(c){2t.4I.2U.eB.JN(a,b.lI.1K(b,c))})})}1d e=a("./g7"),f=a("./4L").eF;d.1g.mc=1a(){1e 2t.4I.2U&&2t.4I.2U.eB?3K.4y():3K.g4(1m 1E("4I.2U.js is 2a eJ, JW 7M 2U"))},d.1g.ub=1a(a){1e/^1l:1W\\/2U\\+eC;7T,/.7k(a)?1b.eF(1b.lA(a)):1b.lA(a)},d.1g.lA=1a(a){1e a.2B(/^1l:1W\\/2U\\+eC(;7T)?,/,"")},d.1g.mh=1a(a){1e/^1l:1W\\/2U\\+eC/i.7k(a)},d.1g.lI=1a(a){1d b=1b;1e 1a(c,d){1d e=1m 2t.4I.2U.eB.JR("c");b.1W=e.uj,e.JS(d.1n).JT(d.1v).wK(2t.4I.2U.eB.JC.JB(c,d)).Jo(),a(e.uj)}},d.1g.eF=1a(a){1e"1a"==1p 2t.un?2t.un(a):f(a)},b.2n=d},{"./4L":26,"./g7":28}],24:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1s;1d c=1b;1b.8c=b?1m 3K(1a(b,d){c.1W=1m 9e,c.1W.8n=b,c.1W.7v=d,c.1W.3a="1l:1W/2U+eC,"+(1m Jl).Jr(a),c.1W.md===!0&&b(c.1W)}):1b.mc().2K(1a(){1e 1m 3K(1a(b){2t.4I.2U.eB.Js(a,c.lI.1K(c,b))})})}1d e=a("./gl");d.1g=1u.3n(e.1g),b.2n=d},{"./gl":23}],25:[1a(a,b,c){1a d(a,b){f.1K(1b,a,b)}1a e(a,b,c){1e a.1i>0?b+c.9a():1x 0}1d f=a("./8M");d.1g=1u.3n(f.1g),d.1g.ul=1a(){1b.1P.1l=1b.cp(1b.2x.2z("Jw"))},d.1g.cp=1a(a){1d b=1b.1P.1l;4F(a){1U"Jt":1e b.8F();1U"Ju":1e b.2B(/(^|\\s|:|-|\\(|\\))([a-z])/g,e);1U"Jv":1e b.9a();1j:1e b}},b.2n=d},{"./8M":14}],26:[1a(a,b,c){c.lF=1a(){1e"1l:1W/JZ;7T,Ks///Kt"},c.fP=1a(a,b){1e 1a(){1e a.6R(b,aZ)}},c.eF=1a(a){1d b,c,d,e,f,g,h,i,j="Kr+/",k=a.1i,l="";1I(b=0;k>b;b+=4)c=j.3U(a[b]),d=j.3U(a[b+1]),e=j.3U(a[b+2]),f=j.3U(a[b+3]),g=c<<2|d>>4,h=(15&d)<<4|e>>2,i=(3&e)<<6|f,l+=64===e?2o.56(g):64===f||-1===f?2o.56(g,h):2o.56(g,h,i);1e l},c.eL=1a(a){if(a.eG){1d b=a.eG(),c=1s==a.cH?b.1n:a.cH;1e{1Q:b.1Q,7q:b.7q||b.1Q+b.1v,1G:b.1y+c,1y:b.1y,1n:c,1v:1s==a.cI?b.1v:a.cI}}1e{}},c.eH=1a(a){1d b=a.uG?c.eH(a.uG):{1Q:0,1y:0};1e{1Q:a.cC+b.1Q,7q:a.cC+a.cI+b.1Q,1G:a.v0+b.1y+a.cH,1y:a.v0+b.1y,1n:a.cH,1v:a.cI}},c.lD=1a(a){1d b,c,d,e,f,g,h,i=" \\r\\n ",j=[],k=0,l=0,m=1a(){b&&(\'"\'===c.3j(0,1)&&(c=c.3j(1,c.1i-2)),c&&h.1L(c),"-"===b.3j(0,1)&&(e=b.3U("-",1)+1)>0&&(d=b.3j(0,e),b=b.3j(e)),j.1L({KD:d,5v:b.8F(),1k:f,3O:h,1W:1s})),h=[],b=d=c=f=""};1e h=[],b=d=c=f="",a.5S("").3P(1a(a){if(!(0===k&&i.3U(a)>-1)){4F(a){1U\'"\':g?g===a&&(g=1s):g=a;2C;1U"(":if(g)2C;if(0===k)1e k=1,1x(f+=a);l++;2C;1U")":if(g)2C;if(1===k){if(0===l)1e k=0,f+=a,1x m();l--}2C;1U",":if(g)2C;if(0===k)1e 1x m();if(1===k&&0===l&&!b.4t(/^78$/i))1e h.1L(c),c="",1x(f+=a)}f+=a,0===k?b+=a:c+=a}}),m(),j}},{}],27:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S="lE"===a.3O[0]?e.gQ.lL:e.gQ.uZ}1d e=a("./iH");d.1g=1u.3n(e.1g),b.2n=d},{"./iH":9}],28:[1a(a,b,c){1a d(a){1e 1m 3K(1a(b,c){1d d=1m uW;d.4Y("ro",a),d.8n=1a(){eE===d.1Z?b(d.Km):c(1m 1E(d.rh))},d.7v=1a(){c(1m 1E("dM 1E"))},d.Kl()})}b.2n=d},{}]},{},[4])(4)}),!1a(a,b){"3i"==1p 2n&&"3i"==1p 4i?4i.2n=b():"1a"==1p cG&&cG.eI?cG("2k-5g",[],b):"3i"==1p 2n?2n["2k-5g"]=b():a["2k-5g"]=b()}(1b,1a(){1e 1a(a){1a b(d){if(c[d])1e c[d].2n;1d e=c[d]={2n:{},id:d,eJ:!1};1e a[d].1K(e.2n,e,e.2n,b),e.eJ=!0,e.2n}1d c={};1e b.m=a,b.c=c,b.p="",b(0)}([1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(43),f=d(e);b["1j"]=2k.4i("2k-5g",[]).wl("K6",f["1j"]),a.2n=b["1j"]},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a e(a,b){c(1b,e),1b.1l=a,1b.1w=b.1w||a,1b.1B=b};b["1j"]=d},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(){c(1b,a),1b.tB="7l",1b.ts="7l",1b.tC="b1",1b.uX=["K7","K4","G4","K0","K1","K2","K8","K9","Kg","Kj"],1b.v2=["Kk","Kf","Ke","Kb","Kc","Kd","Ml","F2","Au","At"],1b.v7=["Ae","Aj","Ak","B0","B1","AK","Az","AA","AB","AJ"]}1e a.1g.2f=1a(a,b,c){1d d="";c=c||"";1I(1d e=0;ec;c++)a="0"+a;1e a}1u.2y(b,"1F",{1k:!0});1d i=c(1),j=d(i),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1I(1d a="v6",b=0;b<1b.1l.1i;b++){1d c=2H(1b.1l[b]),d=c.1t(2);d=h(d,4-d.1i);1I(1d e=0;e=eE)d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):3H===d?c=1b.bb(a,b+1):98===d?(a[0]=a[0]>95?a[0]-96:a[0],c=1b.aW(a,b+1)):c=1b.aW(a,b+1);2p{1d e=a[0];d=32>e?e+64:e-32,a.9T(),c=1b.aW(a,b+1)}1d f=1b.b5(d),g=d*b;1e{3o:f+c.3o,7e:g+c.7e}},b.1g.bb=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):7l===d?c=1b.aW(a,b+1):98===d?(a[0]=a[0]<32?a[0]+96:a[0],c=1b.bb(a,b+1)):c=1b.bb(a,b+1)):(d=a[0]-32,a.9T(),c=1b.bb(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b.1g.cD=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),c=3H===d?1b.bb(a,b+1):7l===d?1b.aW(a,b+1):1b.cD(a,b+1)):(d=10*(a[0]-48)+a[1]-48,a.9T(),a.9T(),c=1b.cD(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b}(i["1j"]),k=1a(a){1a b(){e(1b,b);1d c=f(1b,a.1K(1b));1e c.1C="Aw",c.aK="me Av tV 2a 5Z ez a 5Z dS.",c}1e g(b,a),b}(1E);b["1j"]=j},1a(a,b){"2r 2g";1a c(a){1I(1d b=0,c=0;c0?b.2v+b.6M:0)+b.7s+b.bn}1a f(a,b,c){if(c.53&&a>b){if("4j"==c.54)1e 1R.aN((a-b)/2);if("1y"==c.54)1e 0;if("1G"==c.54)1e 1R.aN(a-b)}1e 0}1a g(a,b,c){1I(1d d=0;db&&(b=a[c].1v);1e b}1a j(a,b,c){1d d;d="3Q"==1p c?1J.3z("2l").4J("2d"):c,d.5M=b.cX+" "+b.2v+"px "+b.5M;1d e=d.Ag(a).1n;1e e}1u.2y(b,"1F",{1k:!0}),b.hP=b.it=b.ua=b.uQ=b.hO=1x 0;1d k=c(6),l=d(k);b.hO=i,b.uQ=e,b.ua=f,b.it=g,b.hP=h},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){z.1g[b]=z.1g[b.9a()]=z.1g[b.8F()]=1a(c,d){1d e=1b;1e e.lV.m1(1a(){1d g=l["1j"](e.8D,d);g=t["1j"](g);1d h=a[b],i=f(c,h,g);1e e.ey.1L(i),e})}}1a f(a,b,c){a=""+a;1d d=1m b(a,c);if(!d.2L())1D 1m w.ik(d.49.1C,a);1d e=d.2f();e=n["1j"](e);1I(1d f=0;f=2?2o.56(ex)+k(a):c>d?2o.56(m8)+i(a):2o.56(i3)+j(a),b=b.2B(/[\\tv\\tz]([^])[\\tv\\tz]/,1a(a,b){1e 2o.56(tA)+b})}1a i(a){1d b=a.4t(/^([\\b2-\\eA\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\b2-\\eA\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(8h)+j(a.2w(c[0].1i))}1a j(a){1d b=a.4t(/^([\\cE-\\b6\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\cE-\\b6\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(eD)+i(a.2w(c[0].1i))}1a k(a){1d b=a.4t(/^(\\5q*[0-9]{2}\\5q*)+/)[0],c=b.1i;if(c===a.1i)1e a;a=a.2w(c);1d d=a.4t(/^[\\b2-\\eA\\7d-\\5q]*/)[0].1i,e=a.4t(/^[\\cE-\\b6\\7d-\\5q]*/)[0].1i;1e d>=e?b+2o.56(eD)+i(a):b+2o.56(8h)+j(a)}1u.2y(b,"1F",{1k:!0});1d l=c(4),m=d(l),n=1a(a){1a b(c,d){if(e(1b,b),-1!==c.2N(/^[\\b2-\\b6\\7d-\\tE]+$/))1d g=f(1b,a.1K(1b,h(c),d));2p 1d g=f(1b,a.1K(1b,c,d));1e f(g)}1e g(b,a),b}(m["1j"]);b["1j"]=n},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.hZ=b.hW=b.hV=b.by=1x 0;1d e=c(15),f=d(e),g=c(12),h=d(g),i=c(13),j=d(i),k=c(14),l=d(k);b.by=f["1j"],b.hV=h["1j"],b.hW=j["1j"],b.hZ=l["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1e i(k(a))}1a i(a){1e q[a].1t(2)}1a j(a){1e p[a]}1a k(a){1e p.3U(a)}1a l(a){1I(1d b=0,c=0;cb;b+=2)c+=2H(a[b]);1I(b=1;12>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{12}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e!d.mf&&d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g.i9=d.i9,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{13}$/)&&1b.1l[12]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.mg=1a(){1e["td","FB","FC","Fz","Fy","Fv","Fw","Fx","Ew","Ev"]},b.1g.hT=1a(){1d a=1m j["1j"],b=[],c=1b.mg()[1b.1l[0]],d=1b.1l.3j(1,6),e=1b.1l.3j(7,6);1e 1b.1B.53&&b.1L({1l:"Dv",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),b.1L({1l:a.2f(d,c),1w:1b.1w.3j(1,6),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(e,"m7"),1w:1b.1w.3j(7,6),1B:{2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),1b.1B.i9&&1b.1B.53&&(b.1L({1l:"bX"}),b.1L({1l:"Dw",1w:1b.1B.i9,1B:{2v:1b.2v}})),b},b.1g.hU=1a(){1d a=1m j["1j"],b="",c=1b.mg()[1b.1l[0]];1e b+="7l",b+=a.2f(1b.1l.3j(1,6),c),b+="b1",b+=a.2f(1b.1l.3j(7,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["LL","LG","GL","GG"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{2}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.ia[2H(1b.1l)%4],c="tD";1e c+=a.2f(1b.1l,b,"oh"),{1l:c,1w:1b.1w}},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["Dt","Dq","Dr","Ds","Dy","Dz","DH","DI","DL","DF"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{5}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.7e(),c="tD";1e c+=a.2f(1b.1l,1b.ia[b],"oh"),{1l:c,1w:1b.1w}},b.1g.7e=1a(){1d a=0;1e a+=3*2H(1b.1l[0]),a+=9*2H(1b.1l[1]),a+=3*2H(1b.1l[2]),a+=9*2H(1b.1l[3]),a+=3*2H(1b.1l[4]),a%10},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=0;7>b;b+=2)c+=3*2H(a[b]);1I(b=1;7>b;b+=2)c+=2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){1e e(1b,b),-1!==c.2N(/^[0-9]{7}$/)&&(c+=h(c)),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{8}$/)&&1b.1l[7]==h(1b.1l)},b.1g.2f=1a(){1d a=1m j["1j"],b="",c=1b.1l.3j(0,4),d=1b.1l.3j(4,4);1e b+=a.tB,b+=a.2f(c,"Dp"),b+=a.tC,b+=a.2f(d,"Da"),b+=a.ts,{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=1;11>b;b+=2)c+=2H(a[b]);1I(b=0;11>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{11}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.53=d.53,d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{12}$/)&&1b.1l[11]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.hU=1a(){1d a=1m j["1j"],b="";1e b+="7l",b+=a.2f(1b.1l.3j(0,6),"td"),b+="b1",b+=a.2f(1b.1l.3j(6,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b.1g.hT=1a(){1d a=1m j["1j"],b=[];1e 1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l"+a.2f(1b.1l[0],"L"),1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(1,5),"D2"),1w:1b.1w.3j(1,5),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(6,5),"D3"),1w:1b.1w.3j(6,5),1B:{2v:1b.2v}}),b.1L({1l:a.2f(1b.1l[11],"R")+"7l",1B:{1v:1b.aB}}),1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(11,1),1B:{54:"1G",2v:1b.2v}}),b},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.er=b.ih=b.ig=b.hX=b.hY=1x 0;1d e=c(18),f=d(e),g=c(21),h=d(g),i=c(20),j=d(i),k=c(19),l=d(k),m=c(22),n=d(m);b.hY=f["1j"],b.hX=h["1j"],b.ig=j["1j"],b.ih=l["1j"],b.er=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iw=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1e{1l:"De",1w:1b.1w}},b.1g.2L=1a(){1e!0},b}(i["1j"]);b.iw=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1I(1d b=0,c=0;13>c;c++)b+=2H(a[c])*(3-c%2*2);1e 10*1R.eM(b/10)-b}1u.2y(b,"1F",{1k:!0}),b.iA=1x 0;1d i=c(1),j=d(i),k=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{13}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{14}$/)&&1b.1l[13]==h(1b.1l)},b.1g.2f=1a(){1I(1d a="tG",b=0;14>b;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(j["1j"]);b.iA=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iy=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^([0-9]{2})+$/)},b.1g.2f=1a(){1I(1d a="tG",b=0;b<1b.1l.1i;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(i["1j"]);b.iy=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.eN(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.eN(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.lX(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.lX(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.iE=b.iG=b.iC=b.iB=b.ix=1x 0;1d e=c(3),f=d(e),g=c(27),h=d(g),i=c(29),j=d(i),k=c(28),l=d(k),m=c(30),n=d(m);b.ix=f["1j"],b.iB=h["1j"],b.iC=j["1j"],b.iG=l["1j"],b.iE=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iD=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b),0===c.2N(/^[0-9\\-\\$\\:\\.\\+\\/]+$/)&&(c="A"+c+"A");1d g=f(1b,a.1K(1b,c.9a(),d));1e g.1w=g.1B.1w||g.1w.2B(/[A-D]/g,""),g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[A-D][0-9\\-\\$\\:\\.\\+\\/]+[A-D]$/)},b.1g.2f=1a(){1I(1d a=[],b=1b.tY(),c=0;c<1b.1l.1i;c++)a.1L(b[1b.1l.Ek(c)]),c!==1b.1l.1i-1&&a.1L("0");1e{1w:1b.1w,1l:a.8L("")}},b.1g.tY=1a(){1e{0:"Et",1:"Eu",2:"Er",3:"Eq",4:"Em",5:"Eo",6:"Ep",7:"Ea",8:"E9",9:"DV","-":"DW",$:"DX",":":"DU","/":"DT",".":"DQ","+":"DR",A:"DS",B:"DY",C:"E0",D:"E6"}},b}(i["1j"]);b.iD=j},1a(a,b,c){"2r 2g";1u.2y(b,"1F",{1k:!0});1d d=c(17),e=c(16),f=c(23),g=c(25),h=c(26),i=c(31),j=c(34),k=c(32),l=c(24);b["1j"]={hR:d.hR,by:e.by,hV:e.hV,hW:e.hW,hZ:e.hZ,hY:f.hY,hX:f.hX,ig:f.ig,ih:f.ih,er:f.er,iA:g.iA,iy:h.iy,ix:i.ix,iB:i.iB,iC:i.iC,iG:i.iG,iE:i.iE,im:j.im,iD:k.iD,iw:l.iw}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.im=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.3B=2H(c,10),g}1e g(b,a),b.1g.2f=1a(){1I(1d a=1b.3B,b="";!iv(a)&&0!=a;)a%2===0?(b="Vk"+b,a=(a-2)/2):(b="3H"+b,a=(a-1)/2);1e b=b.9E(0,-2),{1l:b,1w:1b.1w}},b.1g.2L=1a(){1e 1b.3B>=3&&1b.3B<=V6},b}(i["1j"]);b.im=j},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(b){c(1b,a),1b.aX=b}1e a.1g.u8=1a(a){if("ik"!==a.1C)1D a;if(1b.aX.8D.2L===1b.aX.u2.2L)1D a.aK;1b.aX.8D.2L(!1),1b.aX.7M=1a(){}},a.1g.m1=1a(a){3c{1d b=a.6R(1x 0,aZ);1e 1b.aX.8D.2L(!0),b}2S(a){1e 1b.u8(a),1b.aX}},a}();b["1j"]=d},1a(a,b){"2r 2g";1a c(a){1e a.7s=a.7s||a.7w,a.bn=a.bn||a.7w,a.9V=a.9V||a.7w,a.8J=a.8J||a.7w,a}1u.2y(b,"1F",{1k:!0}),b["1j"]=c},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){1d b={};1I(1d c in i["1j"])i["1j"].9v(c)&&(a.m2("m5-"+c.8F())&&(b[c]=a.eU("m5-"+c.8F())),a.m2("1l-"+c.8F())&&(b[c]=a.eU("1l-"+c.8F())));1e b.1k=a.eU("m5-1k")||a.eU("1l-1k"),b=g["1j"](b)}1u.2y(b,"1F",{1k:!0});1d f=c(8),g=d(f),h=c(9),i=d(h);b["1j"]=e},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){if("ar"==1p a)1e f(a);if(bf.cK(a)){1I(1d b=[],c=0;c0?(e=0,c.54="1y"):"1G"==a.54?(e=b.1n-1,c.54="1G"):(e=b.1n/2,c.54="4j"),c.tU(b.1w,e,f)}},a.1g.tT=1a(a){1d b=1b.2l.4J("2d");b.ak(a.1n,0)},a.1g.v8=1a(){1d a=1b.2l.4J("2d");a.lp()},a}();b["1j"]=i},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(40),f=d(e),g=c(42),h=d(g);b["1j"]={cb:f["1j"],ws:h["1j"]}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b,c){1d d=1J.ly(l,"g");1e d.3x("cp","ak("+a+", "+b+")"),c.4K(d),d}1a g(a,b){a.3x("2M","e2:"+b.es+";")}1a h(a,b,c,d,e){1d f=1J.ly(l,"ew");1e f.3x("x",a),f.3x("y",b),f.3x("1n",c),f.3x("1v",d),e.4K(f),f}1u.2y(b,"1F",{1k:!0});1d i=c(6),j=d(i),k=c(10),l="gV://9d.w3.wp/wq/2U",m=1a(){1a a(b,c,d){e(1b,a),1b.2U=b,1b.4V=c,1b.1B=d}1e a.1g.7M=1a(){1d a=1b.1B.8J;1b.wz();1I(1d b=0;b<1b.4V.1i;b++){1d c=1b.4V[b],d=j["1j"](1b.1B,c.1B),e=f(a,d.7s,1b.2U);g(e,d),1b.wy(e,d,c),1b.ww(e,d,c),a+=c.1n}},a.1g.wz=1a(){1I(;1b.2U.bw;)1b.2U.aj(1b.2U.bw);k.it(1b.4V,1b.1B);1d a=k.hP(1b.4V),b=k.hO(1b.4V),c=a+1b.1B.8J+1b.1B.9V;1b.wd(c,b),1b.1B.6H&&h(0,0,c,b,1b.2U).3x("2M","e2:"+1b.1B.6H+";")},a.1g.wy=1a(a,b,c){1d d,e=c.1l;d="1Q"==b.bo?b.2v+b.6M:0;1I(1d f=0,g=0,i=0;i0&&(h(g-b.1n*f,d,b.1n*f,b.1v,a),f=0);f>0&&h(g-b.1n*(f-1),d,b.1n*f,b.1v,a)},a.1g.ww=1a(a,b,c){1d d=1J.ly(l,"1w");if(b.53){1d e,f;d.3x("2M","5M:"+b.cX+" "+b.2v+"px "+b.5M),f="1Q"==b.bo?b.2v-b.6M:b.1v+b.6M+b.2v,"1y"==b.54||c.dX>0?(e=0,d.3x("1w-lj","5Z")):"1G"==b.54?(e=c.1n-1,d.3x("1w-lj","cj")):(e=c.1n/2,d.3x("1w-lj","ld")),d.3x("x",e),d.3x("y",f),d.4K(1J.dW(c.1w)),a.4K(d)}},a.1g.wd=1a(a,b){1d c=1b.2U;c.3x("1n",a+"px"),c.3x("1v",b+"px"),c.3x("x","he"),c.3x("y","he"),c.3x("U3","0 0 "+a+" "+b),c.3x("wc",l),c.3x("pl","1.1"),c.2M.cp="ak(0,0)"},a}();b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(11),f=d(e);b["1j"]=1a(){"U4";1e{2B:!0,wk:"E",dY:"U5",5O:{wb:"@",wa:"@?",cm:"="},Ub:"",e1:1a(a,b,c,d){1d e=1a(){1d b=a.wa||"5g",c="";4F(a.wb){1U"2U":c=\'<2U 1f="\'+b+\'">\';2C;1U"7g":c=\'<7g 1f="\'+b+\'">\';2C;1U"2l":c=\'<2l 1f="\'+b+\'">\';2C;1j:c=\'<7g 1f="\'+b+\'">\'}1e c},g={9l:"by",es:"#nw",1n:2,1v:3H,53:!1,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:10,7s:10,bn:10,8J:10,9V:10,2L:1a(){1e!0}},h=1a(a){1e 1u.wm(g).3P(1a(b){a.9v(b)?a[b]=a[b]||g[b]:a[b]=g[b]}),a},i=1a(a){1d c=2k.5b(e()),g=d.$U6||"",h=f["1j"](c[0],g,a);1e 2k.3P(b.dZ(),1a(a){1e a.U8()}),b.TQ(c),h};i(h(a.9v("cm")&&"3Q"!=1p a.cm?a.cm:g)),a.$9L("cm",1a(a){i(a)},!0),d.$7M=1a(){i(a.cm)}}}},a.2n=b["1j"]}])}),2k.4i("5j",["Tm","Tl","Tg","ab-7T","ng.oa","ui.Ts","Tt","e8-4F","2k-5g","oe","2k.2z.TB","TE.wj","TI.Tz"]).wl("jD",["$66",1a(a){1e{wk:"A",e1:1a(b,c,d){c.on("Tx",1a(){a.wJ()})}}}]).hq("wi",1a(){1e{mK:1a(a){1e a.gZ=nC,a}}}).Ue(["$Uf","$UI",1a(a,b){a.e0("/",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/9p",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/6O",{4P:"3m/6O.2T",3p:"vp",hc:"6O"}).e0("/7r",{4P:"3m/7r.2T",3p:"zw",hc:"7r"}).UH({UF:"/"}),b.UC.1L("wi")}]).kC(["$66","$bT","$gV","7T","o9","oa","$2E","n5","UE","oe","$hs","wj","$w0","1N","$Wo",1a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){1a p(){a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.nr=a.3A+"4C/3o.4W"}UN.UU(1J.2A),a.nI=1a(a,b){a&&b3(1a(){a.UV=b,a.UT=b},0)},2o.1g.hv=1a(a,b,c){1e 1b.2B(1m wB(a.2B(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"gi":"g"),"ar"==1p b?b.2B(/\\$/g,"$$$$"):b)},a.hd=1a(a,b){1d c=1m wB(a,"g"),d=c.UB(b);1e d},a.hm=1a(b){1d c=/^[a-zA-og-9.!#$%&’*+\\/=?^9M`{|}~-]+@[a-zA-og-9-]+(?:\\.[a-zA-og-9-]+)*$/i,d={};1e d.1Z=!0,d.8m=1x 0,b&&d.1Z&&!c.7k(b)&&(d.8m=n[a.1c.1M].6C,d.1Z=!1),d},a.hl=1a(b,c){1d d=/^[^a-z]*$/i,e={};if(e.1Z=!0,e.8m=1x 0,b&&c&&e.1Z)3c{e.1Z=2t.Un.Uk(b,c),e.8m=n[a.1c.1M].5P}2S(f){e.8m=f,""===f&&(e.8m=n[a.1c.1M].5P),e.1Z=!1}1e b&&e.1Z&&!d.7k(b)&&(e.8m=n[a.1c.1M].5P,e.1Z=!1),e},a.h9=!0,a.1q=!1,a.w9="3.12.",a.h9||(a.1q=!0),a.wV="fQ://9d.Ug.hE.my/",a.np="fQ://qM.bm.hE/",a.nm="fQ://Ui.bm.co.id/",a.ns="fQ://9P.bm.hE/",a.3A=a.wV,a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.dH="",a.6F="",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.bJ="",a.rY="XI://",a.mW="XN://",a.hk="XM://",a.Xt="Xv://",a.Xw="XA://",a.bz="XP://",a.vV="Xy://",a.nr=a.3A+"4C/3o.4W",a.vt="XO.do",a.vy="Y6/8W/ec/Y5",a.vx="Y4.do",a.nN=!1,a.bI=!0,a.77=[],a.5L=0,a.nM=!1,a.al=!1,a.wD=!1,a.5F=1x 0,a.rC=nC,a.hA=Y2,a.n4=0,a.ne=!1,a.ai=!1,a.2P=1a(){1d a={};1e a.6j=n.3l.6j,a.6k=n.3l.6k,a.6p=n.3l.6p,a.6v=n.3l.6v,a.6X=n.3l.6X,a.6s=n.3l.6s,a.6I=n.3l.6I,a.6G=n.3l.6G,a.5E=n.3l.5E,a.6L=n.3l.6L,a.6r=n.3l.6r,a.6A=n.3l.6A,a.6B=n.3l.6B,a.6x=n.3l.6x,a.6u=n.3l.6u,a.6b=n.3l.6b,a.6Q=n.3l.6Q,a.6K=n.3l.6K,a.6t=n.3l.6t,a.5N=n.3l.5N,a.6h=n.3l.6h,a.6Z=n.3l.6Z,a.5C=n.3l.5C,a.6m=n.3l.6m,a},a.1c={3E:"",3D:"",1T:"",2J:"",3h:"",2i:"",bv:"",3F:"4B",3g:"MY",2F:"",4z:!0,vw:!1,2b:"",9H:!0,4o:"",3I:"",3t:"",3r:"",5c:"",hr:"0",eP:!1,XT:"",hx:"",4l:"",3J:"",7o:"",hu:"2",XW:"",cR:"",aE:"",hn:"",hF:"bm-4Q-nl-9d",Y0:!1,8C:"",5G:"",5t:"",7h:"",bh:"",bj:"",5k:"",3w:!0,6o:"MY",ci:"bW",6d:"",8U:"",bt:"",oK:"",ht:"1",5d:"",6a:"",4m:"",lx:"",au:"",hH:!0,nX:"",6N:"vu",8O:"0",c0:!1,ep:!1,nB:"",bg:"",bl:"",w1:"",nz:"",bS:"",t4:"",fC:"",fl:"",nK:!1,4Z:!1,4M:!1,fe:!1,cJ:!1,cW:!1,1M:"EN",ff:"",fG:"",jI:!1,jH:!1,jE:!1,jF:!1,wH:!1,nn:!1},!a.h9,a.1c.1M&&(a.1c.1M=2o(a.1c.1M).9a()),a.XX=n[a.1c.1M].6J,a.XY=n[a.1c.1M].7u,a.Xz=n[a.1c.1M].6e,a.$9L("1c.6o",1a(){1d b=n.4E[a.1c.1M],c=[];1I(1d d in b)c.1L([d,b[d]]);1d e=c,f=g("2E")(e,a.1c.6o,!0);f.1i?a.1c.ci=f[0][1]:a.1c.6o=""}),a.$9L("1c.5t",1a(){if(a.1c.5t){1d b=2o(a.1c.5t);b=b.2B(/\\//g,"");1d c="";b.1i>4&&(b=b.2w(0,4)),1===b.1i&&(c=2H(b.2w(0,1)),c>1&&(b="")),2===b.1i&&(c=2H(b.2w(0,2)),c>12&&(b=b.2w(0,1))),b.1i>2&&(b=b.2w(0,2)+"/"+b.2w(2,b.1i)),a.1c.5t=b,a.nI(2k.5b(1J.8R("vs"))[0],b.1i),5===a.1c.5t.1i&&(a.1c.bh=a.1c.5t.2w(0,2),a.1c.bj=a.1c.5t.2w(3,5))}}),a.$9L("1c.3w",1a(){if(a.1c.3w)a.1c.8C="",a.1c.6d="",a.1c.5G="",a.1c.5t="",a.1c.7h="",a.1c.bh="",a.1c.bj="",a.1c.5k="";2p if(a.1c.6a){if(a.1c.6a.1i>0&&!a.1c.4m)if(a.1c.fC){1d b=g("2E")(a.1c.6a,a.1c.fC,!0);if(b.1i){a.1q;1d c=a.1c.6a.3U(b[0]);a.1c.4m=a.1c.6a[c]}2p a.1c.4m=a.1c.6a[0]}2p a.1c.4m=a.1c.6a[0];a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k}}),a.$9L("1c.4m",1a(){!a.1c.3w&&a.1c.4m&&(a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k)}),a.n6=1a(){1e a.hd("nD 4.1",a.1c.aE)||a.hd("nD 4.2",a.1c.aE)||a.hd("nD 4.3",a.1c.aE)?!0:!1},a.6g=1a(){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.5c||b||(c.2Z=n[a.1c.1M].8s,b=!0),a.1c.5c&&a.1c.5c.1i<5&&!b&&(c.2Z=n[a.1c.1M].6h,b=!0),"c5"!==a.1c.2b||b||(c.2Z=n[a.1c.1M].5u,b=!0),"4X"!==a.1c.2b&&"aA"!==a.1c.2b||b||(a.1c.8C&&!(a.1c.8C.1i<16)||b||(c.2Z=n[a.1c.1M].8t,b=!0),l.aT(a.1c.8C)||!a.1c.3w||b||(c.2Z=n[a.1c.1M].8q,b=!0),a.1c.5t&&!(a.1c.5t.1i<5)||b||(c.2Z=n[a.1c.1M].7O,b=!0),a.1c.5G&&!(a.1c.5G.1i<3)||b||(c.2Z=n[a.1c.1M].8w,b=!0),a.1c.7h||(a.1c.7h="o1 wR"),a.1c.bS&&!b&&a.1c.bS.1i>0&&(b=e.mt(a.1c.8C))),"cq"!==a.1c.2b||b||(a.1c.8U&&!(a.1c.8U.1i<10)||b||(c.2Z=n[a.1c.1M].7F,b=!0),a.1c.bt||b||(c.2Z=n[a.1c.1M].7C,b=!0)),b){1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){},1a(){2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1,a.1c.fe=!1,m.oc()})}2p a.1c.nK?e.t3():a.1c.wH?e.qm():e.qw()},a.WG=1a(a){1d b,c;1J.ed?(b=1J.ed(),b.WQ(a),b.x7(!1),c=2t.WP(),c.WO(),c.WM(b)):1J.WN&&(b=1J.2A.WD(),b.WC(a),b.x7(!1),b.hS())},a.$9L("1c.6d",1a(){if(a.1c.6d){1d b=2o(a.1c.6d);if(b=b.2B(/ /g,""),6===b.1i&&a.1c.8O&&"1"===a.1c.8O&&e.sv(b),6===b.1i&&a.1c.bS&&a.1c.bS.1i>0){1d c=e.mt(b);c&&(a.1c.6d="")}b.1i>16&&(b=b.2w(0,16)),a.n6()||(b.1i>4&&b.1i<=8?b=b.2w(0,4)+" "+b.2w(4,b.1i):b.1i>8&&b.1i<=12?b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,b.1i):b.1i>12&&b.1i<16&&(b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,b.1i))),16===b.1i&&(a.1c.8C=b,b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,16)),b&&(a.1c.6d=b,a.nI(2k.5b(1J.8R("vv"))[0],b.1i))}}),a.$9L("1c.5G",1a(){if(a.1c.5G){1d b=2o(a.1c.5G);b.1i>4&&(b=b.2w(0,4)),a.1c.5G=b}}),a.$9L("5L",1a(){a.1c.4Z||(a.1q,a.5L>0?(a.1q,a.nN=!0):0===a.5L&&a.al&&(a.1q,a.nN=!1,a.wD=!0,a.o0()))}),a.o0=1a(){a.1q,a.1c.fe&&!a.nM?(a.nM=!0,a.6g()):a.1c.fe||(a.1q,2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1)},a.wJ=1a(){if(!a.1c.6a&&a.1c.3I&&a.1c.3t&&a.1c.3r){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(b){a.1c.6a=1x 0;1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){m.oc()},1a(){})}2p e.mD()}},a.hb=1a(b){a.1q,i.wK(b)},a.wM=1a(b){1d c=!1,d=n.4E[a.1c.1M],e=[];1I(1d f in d)e.1L([f,d[f]]);1d h=e,i=g("2E")(h,b,!0);1e i.1i&&(c=!0),c},a.Xb=1a(b){a.1q;1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3G),c},a.z7=1a(){1d b=a.1c.2i,c=5W(b);c=3H*c,a.1c.oK=c.dU(0)},a.f5=1a(){if(a.1c.1M&&n[a.1c.1M]||(a.1c.1M="EN"),a.1c.1M=2o(a.1c.1M).9a(),o.X9(),!a.1c.3F)1e 1x h.3f({1E:a.2P().6L});3c{a.1c.3F=2o(a.1c.3F.55())}2S(b){a.1q}if(!a.1c.2i)1e 1x h.3f({1E:a.2P().5E});1d c;if("vR"===a.1c.3F||"RP"===a.1c.3F){if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2),c=g("3B")(a.1c.2i,0),a.1c.bv=2o(c).2B(/,/g,".");2p if(2k.wN(a.1c.2i)){1d i=a.1c.2i.5S(",");if(2===i.1i)c=2o(i[0]).2B(/\\./g,""),c=c+"."+i[1];2p if(1===i.1i)if("."===i[0].2w(i[0].1i-3,i[0].1i-2)){1d k=i[0].2w(0,i[0].1i-3);k=k.2B(/\\./g,"");1d l=i[0].2w(i[0].1i-2);c=k+"."+l}2p c=i[0].2B(/\\./g,"");2p if(i.1i>2)1e 1x h.3f({1E:a.2P().6m});if(c=5W(c).dU(2),a.1c.2i=c,a.1c.bv=g("3B")(a.1c.2i,0),a.1c.bv=2o(a.1c.bv).2B(/,/g,"."),!a.1c.2i)1e 1x h.3f({1E:a.2P().5E})}}2p{if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2);2p if(2k.wN(a.1c.2i)&&(c=5W(a.1c.2i).dU(2),a.1c.2i=c,!a.1c.2i))1e 1x h.3f({1E:a.2P().5E});a.1c.bv=g("3B")(a.1c.2i,2)}if(a.1c.2i){1d m=ax(a.1c.2i);if(0>=m)1e 1x h.3f({1E:a.2P().6m})}if(!a.1c.3E)1e 1x h.3f({1E:a.2P().6v});3c{a.1c.3E=2o(a.1c.3E.55())}2S(b){a.1q}if(!a.1c.3D)1e 1x h.3f({1E:a.2P().6X});3c{a.1c.3D=2o(a.1c.3D.55())}2S(b){a.1q}if(!a.1c.1T)1e 1x h.3f({1E:a.2P().6s});3c{a.1c.1T=2o(a.1c.1T.55())}2S(b){a.1q}if(!a.1c.2J)1e 1x h.3f({1E:a.2P().6I});3c{a.1c.2J=2o(a.1c.2J.55())}2S(b){a.1q}if(!a.1c.3h)1e 1x h.3f({1E:a.2P().6G});3c{a.1c.3h=2o(a.1c.3h.55())}2S(b){a.1q}if(!a.1c.3g)1e 1x h.3f({1E:a.2P().6r});3c{a.1c.3g=2o(a.1c.3g.55())}2S(b){a.1q}if(!a.wM(a.1c.3g))1e 1x h.3f({1E:a.2P().6A});if(!a.1c.2F)1e 1x h.3f({1E:a.2P().6B});3c{a.1c.2F=2o(a.1c.2F.55())}2S(b){a.1q}if((1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d q=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,q).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,q).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,q).1t()}}2S(b){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);if(1x 0===a.1c.hn&&(a.1c.hn="x"),a.1c.cR=a.w9+a.1c.hn,a.1c.aE=f.WZ.w8,a.1c.hu="2",a.1c.ht="1",1x 0===a.1c.hr&&(a.1c.hr="0"),a.1c.vw=!1,a.1c.cJ||(a.1c.cJ=!1),a.1c.cW||(a.1c.cW=!1),a.1c.8O||(a.1c.8O="0"),1x 0===a.1c.hH&&(a.1c.hH=!0),a.1c.hF||(a.1c.hF="bm-4Q-nl-9d"),a.1c.9H||(a.1c.9H=!1),a.1c.2b?"c5"===a.1c.2b&&(a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u):(a.1c.2b="c5",a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u),a.1c.4o||(a.1c.4o=!1),a.1c.3I&&a.1c.3t&&a.1c.3r&&a.1c.5c&&a.1c.3I||(a.1c.4o=!0),a.1c.3t){3c{a.1c.3t=2o(a.1c.3t.55())}2S(b){a.1q}if(a.1c.cJ&&!a.1c.4o){1d r=a.hm(a.1c.3t);if(!r.1Z)1e 1x h.3f({1E:a.2P().6K})}if(a.1c.3t.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6Z})}if(a.1c.3r){3c{a.1c.3r=2o(a.1c.3r.55())}2S(b){a.1q}if(a.1c.cW&&!a.1c.4o){1d r=a.hl(a.1c.3r,a.1c.3g);if(!r.1Z)1e 1x h.3f({1E:a.2P().6t})}if(a.1c.3r.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5C})}if(a.1c.5c){3c{a.1c.5c=2o(a.1c.5c.55())}2S(b){a.1q}if(a.1c.5c.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6h})}if(a.1c.3I){3c{a.1c.3I=2o(a.1c.3I.55())}2S(b){a.1q}if(a.1c.3I.1i<3&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5N})}1e a.1c.eP||(a.1c.eP=!1),a.1c.6o="MY",a.1c.ci="bW",a.1c.3w=!0,a.1c.4M=!1,a.1c.fl||(a.1c.fl="Wz"),a.1c.nK&&(a.1c.hx=["4X","aA"]),1x 0!==a.1c.4Z&&a.1c.4Z?a.1c.4Z&&(a.1c.6N="9r"):(a.1c.4Z=!1,a.1c.6N="vu"),"9Q"!==a.1c.3J||a.1c.4l?(a.1c.ff||(a.1c.ff=2o(2H(a.1c.ff))),a.1c.fG||(a.1c.fG=2o(2H(a.1c.fG))),a.1c.nB&&b3(1a(){a.$6R(a.hb(a.1c.nB))},0),(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl",XR.XQ(n.4E.ID)),p()),a.1c.nn&&(a.3A=a.ns,p()),1x(a.1c.3J&&"ft"===a.1c.3J?a.cU():e.rb())):1x h.3f({1E:a.2P().6x})},a.XS=1a(){1e a.1c.aE},a.vE=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].4v),c},a.vF=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3W+" "+d[0].1C),c},a.r2=1a(b){1d c="",d=g("2E")(a.1c.5d,{3G:b},!0);1e d.1i&&(c=d[0].1C),c},a.f4=1a(a,b){1e 1R.aN(1R.nW()*(b-a+1)+a)},a.fq=1a(b){1d c=!1;if(b&&b.9c&&b.5p&&b.52&&b.3e){1d d=a.1c.1T,e=a.1c.2F;if(a.1c.4z){1d f=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();e=1Y.4A.5B(a.1c.2F.1t(),f).1t(1Y.5z.5w)}1d g=d+b.9c+b.5p+b.52+b.3e+e,h=1Y.7i(g).1t();h===b.7o.1t()&&(c=!0)}1e c},2t.Yb=1a(){a.ai=!0},2t.f5=1a(b,c){a.1c={},c&&(a.nt=c),a.1q;3c{a.1c=5H.ac(b)}2S(d){a.1c=2k.vB(a.1c,b)}a.1q,a.f5()},2t.XU=1a(b){1d c=b.nA;3c{c=5H.ac(b).nA}2S(d){c=b.nA}a.1q;1d f="";c.3U(a.nr)>-1?(a.1q,a.dH=c,e.sy(),f=a.hk,a.5U(f)):(c.3U(a.vt)>-1||c.3U(a.vx)>-1||c.3U(a.vy)>-1)&&(a.1q,a.n3(),f=a.hk,a.5U(f))},a.vD=1a(){1d b=a.hk;a.5U(b)},a.nq=1a(){a.5F?a.5F.44("XG"):(a.hB(),a.vD())},2t.nq=1a(){a.nq()},a.cU=1a(){"9Q"===a.1c.3J&&a.1c.4l&&""!==a.1c.4l?a.bH():a.1c.4l&&""!==a.1c.4l?a.bH():a.hB()},2t.cU=1a(){a.cU()},2t.XB=1a(b){b&&(a.1c.3h=b),a.cU()},2t.Xp=1a(b){b&&(a.1c.4l=b),a.cU()},2t.Wt=1a(a){1d b=2o(a),c=f.h0;1e a&&"vh"===c&&(b=b.2B(/\\-/g,"+"),b=b.2B(/\\9M/g,"=")),b},2t.hb=1a(b){a.hb(b)},2t.Wy=1a(b,c){a.1c={},a.1q,c&&(a.9I=c);3c{a.1c=5H.ac(b)}2S(f){a.1c=2k.vB(a.1c,b)}if(a.1q,(1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d g=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,g).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,g).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,g).1t()}}2S(f){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl"),p()),a.1c.nn&&(a.3A=a.ns,p()),e.mF()},a.5U=1a(b){1d c=b,d=f.h0;a.1q,a.1q,a.nt?(a.nt(b),a.1q):("vh"===d&&(c=b.2B(/\\+/g,"-"),c=c.2B(/\\=/g,"9M")),a.1c.nz&&(c=a.1c.nz+c,a.1q),2t.bT=c)},a.wo=1a(){a.f5(),b.6V("/9p").2B()},a.h9||a.f5()}]),2k.4i("5j").3p("Y3",1a(){}),2k.4i("5j").3p("nv",["$5O","$66","$bT","$hs","o9","1N",1a(a,b,c,d,e,f){a.1N=f[b.1c.1M],a.r3=1a(){1d a=!1;1e b.1c.8O&&b.1c.3w&&"1"===2o(b.1c.8O)&&(b.1c.c0||(a=!0)),a},a.wW=1a(){if(!b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uu.2T",3p:"z0",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.we=1a(){if(b.1c.9H){1d c=d.4Y({4O:!0,4P:"3m/uw.2T",3p:"z6",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.vX=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uz.2T",3p:"z3",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.t7=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uE.2T",3p:"z4",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.qR=1a(){b.6g()}}]),2k.4i("5j").3p("vp",["$5O","$66","7T","1N",1a(a,b,c,d){1a e(a){1d b="Y7";if(a){1d c="Xr";b=c+a,b=b.2w(b.1i-c.1i)}1e b}1a f(a){1d c=1m 9e;c.8n=1a(){1d c=1J.3z("2l");c.1n=1b.vo,c.1v=1b.vn,c.4J("2d").9j(1b,0,0);3c{a(c.eo("1W/3C"))}2S(d){b.1q,a(1s)}},c.7v=1a(){b.1q,a(1s)},c.3a="2R/4h.3C"}1a g(a,c){1d d=1m 9e;d.8n=1a(){1d a=1J.3z("2l");a.1n=1b.vo,a.1v=1b.vn,a.4J("2d").9j(1b,0,0);3c{c(a.eo("1W/3C"))}2S(d){b.1q,f(c)}},d.7v=1a(){b.1q,f(c)},d.3a=a}a.1N=d[b.1c.1M],2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),b.bI=!1,a.bc={9l:"er",es:"#nw",1n:2,1v:60,53:!0,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:0,7s:1x 0,bn:1x 0,8J:1x 0,9V:1x 0,2L:1a(a){}},a.p3=b.vE(b.2I.3S),a.iQ=!0,a.t6=b.vF(b.2I.3S).1t(),a.8H=5H.ac(5H.8z(b.2I)),a.8H.a9=e(a.8H.a9),a.8H.5p=e(a.8H.5p),a.8H.cP=e(a.8H.cP),2t.Om=1a(){1e b.o6},a.sl=1a(){g(a.p3,1a(d){d?1J.8R("6O-iL").3a=d:a.iQ=!1,a.$6R(),2t.o7(0,0);3c{b3(1a(){4I(1J.8R("6O"),{gY:1a(a){b.o6=a.eo().2B(/^1l:1W\\/(3C|OC);7T,/,"");1d d={OD:b.o6,OB:b.1c.3h+".3C"},e=c.2f(5H.8z(d,1s,"")),f=b.vV+e;b.1q,b.5U(f)}})},50)}2S(e){b.1q}})}}]),2k.4i("5j").hq("o9",["7T","$gV","$66","$gZ","oa","n5","$bT","oe","$hs","$2E","$P4","$w0","1N",1a(a,b,c,d,e,f,g,h,i,j,k,l,m){1d n={};1e n.5J=1a(a,b){l.oc(),c.al||(c.5L=3,c.al=!0,c.1q),c.1q;1d d=1s;if(a===c.d3.1t())d=[{1C:"PB-Px",3W:"vN aU","1j":1,1Z:1,4n:["4B"],3G:"4X",3M:"1",4v:"2R/4h.3C"},{1C:"w6-Pw",3W:"w6","1j":1,1Z:1,4n:["4B"],3G:"Pu",3M:"2",4v:"2R/4h.3C"},{1C:"Pv",3W:"a8 PC","1j":1,1Z:2,4n:["RM","4B"],3G:"PD",3M:"2",4v:"2R/4h.3C"},{1C:"PV",3W:"PX","1j":1,1Z:1,4n:["4B"],3G:"PZ",3M:"3",4v:"2R/4h.3C"},{1C:"PQ-w4",3W:"dB PJ vG","1j":1,1Z:1,4n:["4B"],3G:"PO",3M:"4",4v:"2R/4h.3C"},{1C:"eh-w5",3W:"eh w5","1j":1,1Z:1,4n:["4B"],3G:"Ps",3M:"5",4v:"2R/4h.3C"},{1C:"h1-w4",3W:"h1 Pc","1j":1,1Z:1,4n:["4B"],3G:"Pd",3M:"6",4v:"2R/4h.3C"},{1C:"vK-aH",3W:"Pe","1j":0,1Z:2,4n:["4B"],3G:"aH",3M:"7",4v:"2R/4h.3C"},{1C:"vT-4w",3W:"vT 4w","1j":0,1Z:2,4n:["4B"],3G:"cq",3M:"8",4v:"2R/4h.3C"},{1C:"vK-P5",3W:"7-P6","1j":0,1Z:1,4n:["4B"],3G:"bN",3M:"9",4v:"2R/4h.3C"},{1C:"P8-Pf",3W:"Pg","1j":1,1Z:1,4n:["4B"],3G:"Pn",3M:"13",4v:"2R/4h.3C"},{1C:"Pp",3W:"Pm","1j":1,1Z:1,4n:["4B"],3G:"Pl",3M:"16",4v:"2R/4h.3C"},{1C:"PM-Pj",3W:"oO jL","1j":1,1Z:1,4n:["4B","RM","vJ","Pk","nU"],3G:"Ol",3M:"18",4v:"2R/4h.3C"},{1C:"vL",3W:"vL","1j":1,1Z:1,4n:["4B","RM","nU","Nd","vJ"],3G:"Nb",3M:"19",4v:"2R/4h.3C"},{1C:"vI-N5",3W:"vI vG","1j":1,1Z:1,4n:["4B"],3G:"N8-Nf",3M:"22",Nj:2,4v:"2R/4h.3C"},{1C:"o3",3W:"o3","1j":0,1Z:1,4n:["4B"],3G:"o3",3M:"38",4v:"2R/4h.3C"},{1C:"o2",3W:"o2","1j":0,1Z:1,4n:["4B"],3G:"o2",3M:"50",4v:"2R/4h.3C"},{1C:"Nn",3W:"Nk a8","1j":1,1Z:2,4n:["RM","4B"],3G:"Nm",3M:"57",4v:"2R/4h.3C"},{1C:"N3",3W:"vN aU","1j":0,1Z:1,4n:["nU","Mv","Ms","Mr","vR","Mo","Mp","Mq","Mw","Mx","N0","N1","4B"],3G:"aA",3M:"58",4v:"2R/4h.3C"}],f.n0(d),c.5L--;2p if(a===c.dj.1t())d=[{1C:"MJ rg MI (M) 2W"},{1C:"vQ 3v 2W"},{1C:"vQ aM 3v 2W"},{1C:"AL qI hp & Mz MB (4S) 2W"},{1C:"vO 3v 4S 2W"},{1C:"vO aM 3v 4S 2W"},{1C:"Nt (M) 2W"},{1C:"Nu 3v 2W"},{1C:"3v O7 4S 2W"},{1C:"3v O8 O9 4S 2W"},{1C:"3v rf 4S 2W"},{1C:"3v O6 4S 2W (O5)"},{1C:"3v re r5"},{1C:"eh 3v 2W"},{1C:"eh aM 3v 2W"},{1C:"O2 2W"},{1C:"O3 O4 (4S) qB ql"},{1C:"nQ Oa 4S 2W"},{1C:"nQ 3v 4S 2W"},{1C:"vP x6 3v 2W"},{1C:"vP x6 aM 3v 2W"},{1C:"Oi Oj Og 3v OF Oc (4S) 2W"},{1C:"Od Oe O1"},{1C:"nR hp 2W"},{1C:"rc aM 2W"},{1C:"sX AL-O0 3v 2W"},{1C:"sX 3v (4S) 2W"},{1C:"qF 3v 2W"},{1C:"qF aM 3v 2W"},{1C:"h1 3v 2W"},{1C:"h1 aM 3v 2W"},{1C:"qx qv 3v 4S 2W"},{1C:"qx qv Nz 2W"},{1C:"Nv Nw qB. ql."},{1C:"Ny NK 3v (4S) 2W"},{1C:"rc"},{1C:"nQ 4S"},{1C:"3v re r5"},{1C:"NV 3v 4S"},{1C:"3v rf"},{1C:"AL qI 3v 4S"},{1C:"NN 4S"}],f.n2(d),c.5L--;2p if(a===c.d5.1t())d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"},{5k:"NS",cv:"Q0",cx:"Q1",aF:"RZ",ei:"eh 3v 2W",ej:"MY",kT:"rg"}],"1"===c.1c.8O&&(d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"}]),f.n1(d),c.5L--;2p if(a===c.bY.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d j=["bM S8"],d={};d.8P=!0,d.1Z="kk",d.qD=c.1c.3h.1t(),d.fm=c.f4(qW,qV),d.bK="";1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e j}}});k.3o.2K(1a(a){},1a(a){d.3e=1x 0,d.1E=1x 0,d.4M=1x 0,a.cV&&"6g"===a.cV.1t()?f.mV(d):g.6V("/9p").2B()})}2p if(a===c.9K.1t()||a===c.bZ.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d d={},n=[];d.52=c.1c.2i.1t(),d.9m=c.f4(qX,S4),d.5p=c.f4(qW,qV),d.7y="0",n=["C6","D8"],d.9c=n[1R.aN(1R.nW()*n.1i)];1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e 1s}}});k.3o.2K(1a(a){},1a(a){if("1s"===d.3e)d.1E=1x 0,d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.nc="Rx",d.iI="mx 2a 3Y";2p if("1E"===d.3e)d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.9c=1x 0;2p{if(d.1E=1x 0,d.qK=aG.cQ(),d.Rr=c.1c.3h.1t(),d.qJ="o1 Rt on 9r 5X",d.3S=c.r2(c.1c.2b.1t()),"aH"===c.1c.2b||"bN"===c.1c.2b){d.7y=1,d.9m="",d.jm=c.1c.3F.1t();1d b=1m aG;b.RC(b.qT()+48),d.qN=b.RK(),d.3J="9Q";1d e=b.RL()+1;e.1t().1i<10&&(e="0"+e.1t());1d h=b.RI()+"-"+e+"-"+b.RH()+" "+b.qT()+":"+b.RD()+":"+b.RF();d.ee=["** aL qM 7U "+h],d.oT=c.1c.2i.1t(),d.cP=c.f4(qL,Sd),d.jo="T0 T2"}2p d.qK=1x 0,d.qJ=1x 0;"aH"!==c.1c.2b&&"bN"!==c.1c.2b||"22"===d.3e||(d.9m=1x 0,d.jm=1x 0,d.qN=1x 0,d.ee=1x 0,d.oT=1x 0,d.cP=1x 0,d.jo=1x 0)}1d i=c.1c.1T,j=c.1c.2F;if(c.1c.4z){1d k=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();j=1Y.4A.5B(c.1c.2F.1t(),k).1t(1Y.5z.5w)}1d l=i+d.9c+d.5p+d.52+d.3e+j;d.7o=1Y.7i(l).1t(),a.cV&&"6g"===a.cV.1t()?(("1s"===d.3e||"1E"===d.3e)&&(d.7o=1x 0),d.fS&&(d.7o=d.fS,d.fS=1x 0),g.6V("/7r").2B(),f.mV(d)):g.6V("/9p").2B()})}if(c.al&&0===c.5L){1d o={};o.a1=m[c.1c.1M].6U,o.2Z=m[c.1c.1M].7D;1d k=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e o}}});k.3o.2K(1a(){},1a(){});1d p=2k.5b(1J.qO("2A")).2z("1v");p&&""!==p.1t()||2k.5b(1J.qO("2A")).2z({1v:"SQ"}),c.1c.fe||2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),c.bI=!1,c.al=!1,c.1q,c.o0()}},c.8g=1a(a,d,e){if(c.1c.hH){c.1q;1d f="v=1",g="&Tc=UA-Td-7",i=c.1c.nX;2t.nZ&&!i?(i=2t.nZ.Ta("qP"),i?c.1q:(i=h.hG().1t(),2t.nZ.T7("qP",i),c.1q)):i||(i=h.hG().1t(),c.1c.nX=i,c.1q);1d j="&Sk="+i,k="&r4=4D";c.1c.1T&&(k="&r4="+c.1c.1T.1t());1d l="&t=Sj",m="&dp=nY",n="&dt=nY",o="&cd=nY",p="&an="+c.1c.hF.1t(),q="&rj=bm-4Q-nl-9d";c.1c.2J&&(q="&rj="+c.1c.2J.1t());1d r="&av="+c.1c.cR.1t(),s="&ec="+a.1t(),t="&ea="+d.1t(),u="&el="+e.1t(),v="fQ://9d.Ss-Sp.hE/Sr?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5v:"mM",78:v};b(w).2K(1a(a){c.1q},1a(a){c.1q})}},n.7i=1a(a){1e 1Y.7i(a).1t()},n.9R=1a(a){1e 1Y.9R(a).1t()},n.bE=1a(a,b){1e"bM="+a+"&Rp="+5H.8z(b,1s,"")},n.7c=1a(d,e){c.1q,c.1q;1d g=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();g="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i={5v:"mM",78:d,mL:{mC:"c6/bU",ss:g,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:e};c.al||(c.al=!0),c.77.1L(i),c.5L=c.77.1i,c.1q,b(i).2K(1a(a){if(c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,a.1l.1Z)c.1q,"ko"===a.1l.1Z?f.3f({1E:a.1l.Qv}):f.mY(d,a.1l.3o);2p if("OK"===a.rh){if(c.1q,a.1l.1Z===!1)4F(a.1l.3o.nk){1U rm:1U Qn:c.1q,f.3f({1E:c.2P().6k}),c.9I&&c.9I(!1,c.2P().6k);2C;1U Qo:c.1c.3w=!0}d===c.9K||d===c.dH||d===c.bY?f.mY(d,a.1l):d===c.bZ&&f.mT(a.1l)}2p c.1q},1a(){c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q,f.3f({1E:c.2P().6j}),c.9I&&c.9I(!1,c.2P().6j)})},n.Qp=1a(a){1d d={5v:"ro",78:a,mL:{mC:"c6/bU","mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU"}};c.77.1L(d),c.5L=c.77.1i,c.1q,b(d).2K(1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i},1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q})},n.bD=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}c.1q;1d d=n.7i(a).1t(),e=c.1c.1T+c.1c.2J+d;c.1q;1d f=n.9R(e).1t();1e c.1q,f},n.qo=1a(a){1d b=c.1c.2F;if(c.1c.4z){1d d=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();b=1Y.4A.5B(c.1c.2F.1t(),d).1t(1Y.5z.5w)}1d e=c.1c.2i,f=c.1c.1T,g=c.1c.3h,h=b,i=a,j=n.7i(e+f+g+h+i).1t();1e j},n.qq=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h=1s;3c{h=n.7i(d+e+f+g).1t()}2S(i){}1e h},n.sx=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.4l,g=a,h="C5",i=n.7i(e+h+f+d+g).1t();1e i},n.sB=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="D7",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},n.sF=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="mS",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},c.QH=1a(a){1d b=c.mH,d=c.1c.1T+a+c.1c.aE,e=d+n.bD();c.1q;1d f=n.9R(e).1t();c.1q;1d g={hw:c.1c.1T,aK:a+c.1c.aE},h=n.bE(f,g);c.1q,n.7c(b,h)},n.mF=1a(){1d a=c.d3,b=c.1c.1T+c.1c.3F,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T,4n:c.1c.3F},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.qk=1a(){1d a=c.dj,b=c.1c.1T,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.mD=1a(){1d a="T1",b=c.1c.8O,d=c.d5,e=hC("+"),f=2o(c.1c.3r).hv("+",e),g=c.1c.1T+c.1c.3I+c.1c.3t+c.1c.3r+c.1c.2J+a+b,h=g;c.1q;1d i=n.9R(h).1t(),j=i+n.bD();c.1q;1d k={f8:c.1c.1T,qC:c.1c.3I,qt:c.1c.3t,qA:f,qz:c.1c.2J,9c:a,2E:b},l=n.bE(j,k);c.1q,c.1c.4Z?n.5J(d,l):n.7c(d,l)},n.rb=1a(){n.mF(),n.qk(),(c.1c.3I&&c.1c.3t&&c.1c.3r||c.1c.4Z)&&n.mD()},n.qm=1a(){1d b=c.bZ,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();f="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i,j={93:"&93="+c.1c.1T,fJ:"&fJ="+c.1c.3h,fK:"&fK="+c.1c.fl,fR:"&fR="+c.1c.2b,fV:"&fV="+c.1c.3F,fT:"&fT="+c.1c.2i,fW:"&fW="+c.1c.3I,fU:"&fU="+c.1c.3t,fI:"&fI="+e,fF:"&fF="+c.1c.5c,fi:"&fi="+n.qq(),fh:"&fh=4Q://"},k={hI:"",hJ:"",hN:"",hM:"",hL:"",hK:"",hD:""};"4X"===c.1c.2b||"aA"===c.1c.2b?(k.hJ="&hJ="+c.1c.5G,k.hN="&hN="+c.1c.bh,k.hM="&hM="+c.1c.bj,!c.1c.3w&&c.1c.5k?k.hL="&hL="+c.1c.5k:k.hI="&hI="+c.1c.8C,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hI+k.hJ+k.hN+k.hM+k.hL):"cq"===c.1c.2b?(k.hK="&hK="+c.1c.8U,k.hD="&hD="+c.1c.bt,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hK+k.hD):i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh,c.ai&&(i.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,i):(g.6V("/7r").2B(),n.7c(b,i))},n.qw=1a(){c.6F="B3";1d a=c.6F,b=c.9K,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f={52:c.1c.2i,qz:c.1c.2J,R9:c.1c.5c,qt:c.1c.3t,qA:e,qC:c.1c.3I,3S:c.1c.2b,jm:c.1c.3F,hu:c.1c.hu,f8:c.1c.1T,9c:a,qD:c.1c.3h,ht:c.1c.ht,4E:c.1c.3g,Rm:n.qo(a),8U:c.1c.8U,2E:c.1c.8O,Rl:c.1c.hr,Rg:c.1c.fl,Rj:c.1c.ff,R4:c.1c.fG};"4X"===c.1c.2b||"aA"===c.1c.2b?(f.8X=c.1c.5G,f.bh=c.1c.bh,f.bj=c.1c.bj,f.QS=c.1c.7h,!c.1c.3w&&c.1c.5k?f.5k=c.1c.5k:f.QT=c.1c.8C):"cq"===c.1c.2b&&(f.8U=c.1c.8U,f.bt=c.1c.bt),c.ai&&(f.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,f):(g.6V("/7r").2B(),n.7c(b,f))},n.sy=1a(){1d a=c.dH,b="";c.1q,n.7c(a,b)},c.bH=1a(){c.6F="C5";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,5p:c.1c.4l,52:c.1c.2i,7o:n.sx(),9c:a};c.1q,g.6V("/7r").2B(),n.7c(b,d)},c.hB=1a(){c.6F="D7";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sB(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},c.n3=1a(){c.6F="mS";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sF(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},n.sv=1a(d){1d e=d;if(c.1q,e){c.1c.c0=!1,c.1c.ep=!0;1d f=c.mO,g=c.1c.1T+e,h=g+n.bD();c.1q;1d j=n.9R(h).1t();c.1q;1d k={hw:c.1c.1T,QW:e},l=n.bE(j,k);c.1q;1d o=c.1c.f6;if(c.1c.4z){1d p=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();o="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),p).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),p).1t(1Y.5z.5w))}1d q={5v:"mM",78:f,mL:{mC:"c6/bU",ss:o,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:l};b(q).2K(1a(a){if(c.1c.ep=!1,a.1l.1Z&&(c.1q,t0(a.1l.1Z)&&(c.1c.c0=t0(a.1l.3o.1Z),!c.1c.c0))){1d b={};b.a1=m[c.1c.1M].6l,b.2Z=m[c.1c.1M].7N;1d d=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e b}}});d.3o.2K(1a(){},1a(){c.1c.6d=""})}},1a(){if(c.1c.ep=!1,c.1c.4Z){1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7Q;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.c0=!0})}2p{1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7X;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.6d=""})}})}},n.mt=1a(a){1d b=!1,d=a;if(c.1q,d){d.1i>5&&(d=a.2w(0,6),c.1q),c.1q;1d e=j("2E")(c.1c.bS,d,!0);if(c.1q,0===e.1i){1d f={};f.a1=m[c.1c.1M].6l,f.2Z=c.1c.t4;1d g=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e f}}});1e g.3o.2K(1a(){},1a(){c.1c.3w&&(c.1c.6d="")}),b=!0}}1e b},n.t3=1a(){if(c.1q,"4X"===c.1c.2b||"aA"===c.1c.2b){1d a=c.bY,b={93:c.1c.1T,fd:"",5h:c.1c.3h,fc:c.1c.3F,fA:c.1c.2i,"4u h6":c.1c.3I,"4u aP":c.1c.3t,"4u h7":c.1c.3r,"4u h8":c.1c.5c},d="",e=c.1c.2F;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();e=1Y.4A.5B(c.1c.2F.1t(),h).1t(1Y.5z.5w)}1d i="";!c.1c.3w&&c.1c.5k?(b.bP="T",b["bQ / bR"]=c.1c.5k,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b.bM):(b.bP="P",b["bQ / bR"]=c.1c.8C,b.n8=c.1c.bh+c.1c.bj,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.n8+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.n8+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b["4u h6"]+"|"+b["4u aP"]+"|"+b["4u h7"]+"|"+b["4u h8"]+"|"+b.bM),c.1q,g.6V("/7r").2B();1d j=k([d]);c.1c.4Z?n.5J(a,j):n.7c(a,j)}2p f.3f({1E:c.2P().6Q})},n}]),2k.4i("5j").hq("n5",["$66","7T","$bT","$2E","1N",1a(a,b,c,d,e){1d f={};1e f.n0=1a(b){if(b){a.1c.5d=b,a.9I&&a.1c.5d.1i>0&&a.9I(!0,5H.8z(a.1c.5d));1d c="";if(a.n6()){1d g=["4X","aA"];c=d("2E")(a.1c.5d,1a(a){1e-1===g.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}1d h=!0;if(h){1d i=["KC"];c=d("2E")(a.1c.5d,1a(a){1e-1===i.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}a.1c.hx&&(a.1q,c=d("2E")(a.1c.5d,1a(b){1e-1!==a.1c.hx.3U(b.3G)}),c.1i&&(a.1q,a.1c.5d=c)),0===a.1c.5d.1i?(a.1q,f.3f({1E:a.2P().6p}),a.9I&&a.9I(!1,a.2P().6p),a.8g(a.1c.6N,"mZ-Jp","11")):a.8g(a.1c.6N,"mZ-"+a.1c.2b.1t(),"bX"),"c5"!==a.1c.2b?(c=d("2E")(a.1c.5d,{3G:a.1c.2b},!0),c.1i?a.1c.au=c[0].3W:(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u,a.1c.9H=!0)):(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u),("9Q"===a.1c.3J||a.1c.4l)&&a.bH()}a.1q},f.n1=1a(b){a.1c.fC&&"1m"===a.1c.fC||b&&(a.1c.6a=b,a.1c.6a.1i>0?a.1c.3w=!1:a.1c.3w=!0),a.1q},f.n2=1a(b){b&&(a.1c.lx=b),a.1q},f.zD=1a(c){if(a.1q,c&&c.1i>0){1d d=b.2f(c);a.1q;1d e=a.mW+d;a.5U(e),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"bX")}2p{a.1q;3c{1d g=1s;3c{g=5H.ac(c)}2S(h){g=c}if(a.1q,g.nc&&g.iI&&g.iI.1i>0){1d i=g.nc+", "+g.iI;f.3f({1E:i}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}2S(h){f.3f({1E:a.2P().6u}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}},f.zy=1a(b){a.bJ=b,a.1q,a.bJ&&""!==a.bJ&&(a.1c.4l=a.bJ.fm,a.1c.7o=a.bJ.7o,a.bH())},f.zd=1a(d){a.2I=d,a.fq(d)&&(a.1c.4M=!0),a.2I.4M=a.1c.4M,a.2I.7y&&1===a.2I.7y&&(a.2I.3J="9Q"),a.1c.3J&&(a.2I.3J=a.1c.3J,"9Q"===a.2I.3J&&a.2I&&a.2I.3e&&"11"===a.2I.3e&&(a.1q,a.2I.3J="")),a.1q;1d e=b.2f(5H.8z(a.2I,1s,""));a.1q;1d f=a.bz+e;a.5U(f),("9Q"===a.1c.3J||1===a.2I.7y)&&a.2I&&a.2I.3e&&"11"!==a.2I.3e&&(a.1q,c.6V("/6O").2B());1d g=a.2I.3e;g||(g="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),g.1t())},f.zz=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));a.1q;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())},f.zB=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));if(a.1q,"22"!==a.5Q.3e||a.5Q.7y&&1===a.5Q.7y){a.ne=!1;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())}2p a.n40&&(d.bK=b.a4[0])}),b.q4=1a(){c.6P({cV:"q4"})},b.6g=1a(){c.6P({cV:"6g"})}}]),2k.4i("5j").3p("n7",["$66","$5O","$aO","8b","1N",1a(a,b,c,d,e){b.1N=e[a.1c.1M],b.8b=d,b.tn=1a(a){c.6P(a)},b.44=1a(){c.6P()}}]),2k.4i("5j").hq("1N",1a(){1d a={};1e a.3l={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.EN={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.MS={5h:"ID QN",8u:"bA",8i:"aP",8p:"QM QL",7K:"mI xZ",8d:"QK QP",5u:"QQ QR R5",5D:"Rh",5s:"Rk",8v:"Ro",83:"xL Rn mz",6W:"Ya",No:"lJ",7B:"7W xL",7Z:"6f",7E:"xP R7",89:"BB/TT",6S:"i8",7R:"mJ i8",7f:"bA a8",7H:"mJ a8",84:"xN R6 4k (8K = 3H 4k xN)",7G:"7W Ra 4w 8V 43",8a:"(7W 10-dT Rd)",7V:"iq mJ",7S:"xO 1Z dn",7u:"Rc x9",86:"mG hg (QJ)",6y:"QI",8f:"7W Qf",88:"y4 xE",6q:"Qg",8k:"Qk Qj",6J:"xO...",6e:"Qb...",6l:"mI dn 2c 5I",7z:"bA 2c 5I",6C:"Q5 2c 5I",5P:"7W nS y2 2c 5I",8s:"mI 2c 5I",8t:"7W hf d4 2c 5I",8q:"7W hf d4 2c 5I (8G)",8w:"7W 6f 2c 5I",7O:"xP Q7 2c 5I",7F:"7W 4k 2c 5I",7C:"oN 4k 2c 5I",7N:"7W hf aa fY 2c 5I",1E:"iq",8Z:"Qa xK - 8B hg",7X:"xJ 6w, Q9 Q8 gp Ql xK 6w",7Q:"xG hf i6/d4 QC",6U:"yZ",7D:"mG hg -QD",8l:"xm mG QE",8e:"lR QG QF g3 xo i7:

    Qy Qq i7 dk 8B hg xd Qs 5X Qw So (Sn), Sg xA dk Sm fY Sy.",6n:"T8",6j:"xw iq, ir T6 T5 6w, fX SF lB SU SW",6k:"xq xp, ir xF id T3, fX xs, lB Sc xH",6p:"xJ dh 8x, ir xF g2 y5 Rv",6v:"3E 2c 8x",6X:"3D 2c 8x",6s:"1T 2c 8x",6I:"2J 2c 8x",6G:"3h 2c 8x",5E:"2i 2c 8x",6L:"3F 2c 8x",6r:"3g 2c 8x",6A:"3g g2 2c 5I",6B:"2F 2c 8x",6x:"4l g2 g3 y6 Rs 2c RA",6u:"iq S6 S5, ir yG S7",6b:"Sb nV cy",6Q:"xE RV 2c RR RX yK dh gp",6K:"xG e-xR aR cy",6t:"7W xH nS lc cy",5N:"bA xQ iu 9X ip 2 xI-xI",6h:"NY xQ iu 9X ip 4 mk",6Z:"E-xR NM iu 9X ip 4 mk",5C:"xZ Nx nS y2 iu 9X ip 4 mk",6m:"y4 2c 5I"},a.VI={5h:"ID đơn đặt hàng",8u:"Tên người đứng hóa đơn",8i:"ob toán bằng thư điện tử",8p:"ob toán điện duại di động",7K:"Mô tả 8y toán",8d:"Trả xT",5u:"Ob lòng chọn một kênh",5D:"THỰC HIỆN",5s:"GẦN",8v:"il",83:"Thẻ mới",6W:"Vâng",No:"Không",7B:"Số thẻ",7Z:"6f",7E:"Ngày hết hạn",89:"MM/9D",6S:"Quốc xY",7R:"Quốc xY tìm kiếm",7f:"tên ngân hàng",7H:"Ngân hàng tìm kiếm",84:"Sử dụng điểm 4k (8K = 3H điểm 4k)",7G:"Thẻ # 8V 43",8a:"(Số 10 chữ số cuối cùng)",7V:"Lỗi tìm kiếm",7S:"Hoàn xXện trạng thái 8y toán.",7u:"pW chờ.",86:"Chế độ hộp cát",6y:"Dịch vụ",8f:"ID io dịch",88:"Số tiền phải trả",6q:"chú thích",8k:"Lưu ảnh vào xXết bị",6J:"Mtẩn bị...",6e:"Tải...",6l:"Thông Ns 8y toán không hợp lệ",7z:"Tên hóa đơn không hợp lệ",6C:"aP 8y toán không hợp lệ",5P:"Điện duại di động 8y toán không hợp lệ",8s:"Mô tả 8y toán không hợp lệ",8t:"Số thẻ tín dụng không hợp lệ",8q:"Số thẻ tín dụng không hợp lệ (8G)",8w:"Số 8X không hợp lệ",7O:"Ngày hết hạn không hợp lệ",7F:"Số 4w không hợp lệ",7C:"Nq 4w không hợp lệ",7N:"Số thẻ aa không hợp lệ",1E:"lỗi",8Z:"Lỗi mạng - Chế độ bd",7X:"d2 bị ngắt kết nối, io dịch này cần có 6w",7Q:"Kiểm ij thẻ N7 nợ đã bị bỏ xT.",6U:"Nhắc nhở",7D:"Chế độ cát là ON",8l:"Tùy chọn 5J",8e:"Sử dụng các tùy chọn dưới đây để cấu hình kết quả:

    pW dy lòng được thông báo rằng tất cả các kết quả io dịch được 4G đ9z dl mô phỏng, không có quá trình trực Neến sẽ diễn ra.",6n:"Bị làm giả",6j:"Lỗi io tiếp, dy lòng kiểm ij kết nối 6w, tên người dùng hoặc mật khẩu",6k:"Nc cập đã bị từ chối, dy lòng kiểm ij id của người bán, tên ứng dụng hoặc mã xác P9",6p:"Không tìm thấy kênh, dy lòng kiểm ij giá trị tiền tệ",6v:"3E không tìm thấy",6X:"3D không tìm thấy",6s:"1T không tìm thấy",6I:"2J không tìm thấy",6G:"3h không tìm thấy",5E:"2i không tìm thấy",6L:"3F không tìm thấy",6r:"3g không tìm thấy",6A:"3g giá trị không hợp lệ",6B:"2F không tìm thấy",6x:"4l không tìm thấy giá trị Pq yêu cầu nhận",6u:"Lỗi không được xử lý, dy lòng liên hệ với bộ phận hỗ trợ",6b:"Mã hóa an toàn không thành công",6Q:"ob toán định kỳ không thể tiến hành trên kênh này",6K:"Xác thực 59 nâng od không thàXác nhận số điện duại nâng od không thành côPt công",6t:"Xác nhận số điện duại nâng od không thành công",5N:"Tên 8y toán phải dài hơn 2 ký tự",6h:"Mô tả 8y toán phải dài hơn 4 ký tự",6Z:"aP 8y toán phải dài hơn 4 ký tự",5C:"Số điện duại 8y toán phải dài hơn 4 ký tự",6m:"Số tiền không hợp lệ"},a.TH={5h:"รหัสคำสั่งซื้อ",8u:"ชื่อการเรียกเก็บเงิน",8i:"อีเมลการเรียกเก็บเงิน",8p:"การเรียกเก็บเงินมือถือ",7K:"คำอธิบายการเรียกเก็บเงิน",8d:"จ่ายผ่าน",5u:"โปรดเลือกช่อง",5D:"ดำเนินการต่อไป",5s:"ปิด",8v:"ยกเลิก",83:"บัตรใหม่",6W:"ใช่",No:"ไม่",7B:"หมายเลขบัตร",7Z:"6f",7E:"วันหมดอายุ",89:"MM/9D",6S:"ประเทศ",7R:"ค้นหาประเทศ",7f:"ชื่อธนาคาร",7H:"ค้นหาธนาคาร",84:"ใช้คะแนน 4k (8K = 3H 4k dL)",7G:"การ์ดหมายเลข 8V 43",8a:"(ตัวเลขล่าสุด 10 หลัก)",7V:"ข้อผิดพลาดในการค้นหา",7S:"กำลังสรุปสถานะการชำระเงิน",7u:"โปรดรอ.",86:"โหมด 9r ON",6y:"บริการ",8f:"รหัสธุรกรรม",88:"จำนวนเงินที่ต้องชำระ",6q:"บันทึก",8k:"บันทึกรูปภาพลงในอุปกรณ์",6J:"การจัดเตรียม...",6e:"กำลังโหลด...",6l:"ข้อมูลการชำระเงินไม่ถูกต้อง",7z:"ชื่อการเรียกเก็บเงินไม่ถูกต้อง",6C:"อีเมลเรียกเก็บเงินไม่ถูกต้อง",5P:"การเรียกเก็บเงินมือถือไม่ถูกต้อง",8s:"คำอธิบายการเรียกเก็บเงินไม่ถูกต้อง",8t:"หมายเลขบัตรเครดิตไม่ถูกต้อง",8q:"หมายเลขบัตรเครดิตไม่ถูกต้อง (8G)",8w:"หมายเลข 8X ไม่ถูกต้อง",7O:"วันที่มีค่าไม่ถูกต้อง",7F:"หมายเลข 4w ไม่ถูกต้อง",7C:"OA 4w ไม่ถูกต้อง",7N:"หมายเลขบัตรเดบิตไม่ถูกต้อง",1E:"ความผิดพลาด",8Z:"ข้อผิดพลาดเกี่ยวกับเครือข่าย - โหมด 9r",7X:"อินเทอร์เน็ตถูกตัดการเชื่อมต่อรายการนี้ต้องใช้อินเทอร์เน็ต",7Q:"การตรวจสอบบัตรเดบิตถูกข้ามแล้ว",6U:"การแจ้งเตือน",7D:"โหมด bd เปิดอยู่",8l:"ตัวเลือก 5J",8e:"ใช้ตัวเลือกด้านล่างเพื่อกำหนดค่าผลลัพธ์:

    โปรดทราบว่าผลการทำธุรกรรมของ 4G แบบออฟไลน์ทั้งหมดจะไม่มีการดำเนินการออนไลน์",6n:"ดัดแปลง",6j:"ข้อผิดพลาดในการสื่อสารโปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตชื่อผู้ใช้หรือรหัสผ่าน",6k:"การเข้าถึงถูกปฏิเสธโปรดตรวจสอบรหัสร้านค้าชื่อแอปหรือรหัสยืนยัน",6p:"ไม่พบช่องโปรดตรวจสอบสกุลเงิน",6v:"3E ไม่พบ",6X:"3D ไม่พบ",6s:"1T ไม่พบ",6I:"2J ไม่พบ",6G:"3h ไม่พบ",5E:"2i ไม่พบ",6L:"3F ไม่พบ",6r:"3g ไม่พบ",6A:"3g ค่าที่ไม่ถูกต้อง",6B:"2F ไม่พบ",6x:"4l ไม่พบค่าสำหรับใบเสร็จรับเงิน",6u:"เกิดข้อผิดพลาดที่ไม่สามารถจัดการได้โปรดติดต่อฝ่ายสนับสนุน",6b:"การเข้ารหัสลับที่ปลอดภัยล้มเหลว",6Q:"การชำระเงินที่เกิดขึ้นประจำจะไม่สามารถดำเนินการต่อในช่องนี้ได้",6K:"การตรวจสอบอีเมลขั้นสูงล้มเหลว",6t:"การตรวจสอบหมายเลขโทรศัพท์ขั้นสูงล้มเหลว",5N:"ชื่อการเรียกเก็บเงินต้องมีความยาวมากกว่า 2 ตัว",6h:"คำอธิบายการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6Z:"อีเมลสำหรับการเรียกเก็บเงินต้องมีความยาวไม่เกิน 4 ตัว",5C:"หมายเลขโทรศัพท์มือถือการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6m:"จำนวนไม่ถูกต้อง"},a.yq={5h:"ID ng o5",8u:"nG ng o4",8i:"59 o4",8p:"4u aC ng 4Q",7K:"lr ng o4",8d:"OE sa Oo ng",5u:"Oq Tf ng 3S",5D:"o8",5s:"OG",8v:"il",83:"OT 4q",6W:"oo",No:"xU",7B:"OQ ng 4q",7Z:"6f",7E:"7a cc",89:"MM/9D",6S:"xS",7R:"ah xS",7f:"xf ng Yc",7H:"ah nx",84:"xV 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(WH 10-dT na aC)",7V:"cg WK",7S:"Wq 9z xC WA sa ll.",7u:"WX WW na X1.",86:"9r 5X ON",6y:"yV XL",8f:"ID ng xD",88:"XE dN",6q:"XJ",8k:"I-iF 9z XC sa Xs",6J:"การจัดเตรียม...",6e:"Xq...",6l:"Di-5V XV sa ll",7z:"Di-5V nG ng gT",6C:"xU 5V 59 sa gT",5P:"Di-5V 4Q e6",8s:"Di-5V lr sa gT",8t:"Di-5V aC ng 4X 4q",8q:"Di-5V aC ng 4X 4q (8G)",8w:"Di-5V aC 6f",7O:"Di-5V Wp 7a",7F:"Di-5V aC 4w",7C:"Di-5V 4w c7",7N:"Di-5V aC aa 4q",1E:"X5",8Z:"dM 1E - nH-9P 5X",7X:"d2 X0 9z, sa WY na xj ay X6 ng 6w nJ",7Q:"aa 4q nL ay Xk.",6U:"Xc",7D:"nH-9P na WR",8l:"5J 1B",8e:"xV 9z cf WB sa Ww Wr i-i1 9z cf xW:

    Wu na 9z WI ng nH-9P na cf xW sa xD ay dl Yd, XF Wn ng g9 ay Us sa Ur.",6n:"Ux",6j:"nE 1E, iz lK 6w nF, g1, o cB",6k:"i2 Uw, iz lK fZ id, nG ng 8W, o xC-Up ib",6p:"Ul 3S na xg, iz lK 9z UQ dN",6v:"3E 7L 9n",6X:"3D 7L 9n",6s:"1T 7L 9n",6I:"2J 7L 9n",6G:"3h 7L 9n",5E:"2i 7L 9n",6L:"3F 7L 9n",6r:"3g 7L 9n",6A:"3g di-5V dN",6B:"2F 7L 9n",6x:"4l dN UD sa Tv Ty ay 7L xg",6u:"ic cg, iz Ud-Uc sa U0",6b:"UW ie VY",6Q:"VX na ll ay 7L W2 W1 sa 3S na xj",6K:"xk aR 59 ng xl",6t:"xk 9z 3B aR lo xl",5N:"xf ng gT ay db na i0 sa 2 dS",6h:"4u lr ay db na i0 sa 4 na cf dS",6Z:"4u 59 ay db na i0 sa 4 na cf dS",5C:"4u aC ng 4Q ay db na i0 sa 4 na cf dS",6m:"Di-5V dN"},a.MY={5h:"အမိန့်အိုင်ဒီ",8u:"ငွေတောင်းခံနာမကိုအမှီ",8i:"ငွေတောင်းခံအီးမေးလျ",8p:"ငွေတောင်းခံမိုဘိုင်း",7K:"ငွေတောင်းခံဖော်ပြချက်",8d:"တဆင့်ပေးဆောင်",5u:"တစ်ဦးရုပ်သံလိုင်းကို hS ပေးပါ",5D:"ဆက်လက်ဆောင်ရွက်",5s:"lw",8v:"ပယ်ဖျက်",83:"နယူးကဒ်",6W:"ဟုတ်ကဲ့",No:"အဘယ်သူမျှမ",7B:"ကတ်နံပါတ်",7Z:"6f",7E:"jA နေ့စွဲ",89:"MM/9D",6S:"ပြည်",7R:"ရှာရန်တိုင်းပြည်",7f:"ဘဏ်အမည်",7H:"ရှာရန်ဘဏ်",84:"4k ရမှတ် (8K = 3H ကျော် 4k အမှတ်) ကိုသုံးပါ",7G:"ကဒ် # 8V 43",8a:"(နောက်ဆုံး 10-ဂဏန်းနံပါတ်)",7V:"ရှာရန်အမှား",7S:"ငွေပေးချေမှု 1Z ကိုအပြီးသတ်နေသည်။",7u:"ကျေးဇူးပြုပြီးခဏစောင့်ပါ။",86:"bd 5X ကို ON",6y:"န်ဆောင်မှုများ",8f:"ငွေသွင်းငွေထုတ် ID ကို",88:"ပေးဆောင်ရမည့်ငွေပမာဏကို",6q:"မှတ်စု",8k:"ကိရိယာ 1W ကို lz",6J:"ပြင်ဆင်နေ...",6e:"6e...",6l:"မှားနေသောငွေပေးချေမှုသတင်းအချက်အလက်များ",7z:"မှားနေသောငွေတောင်းခံနာမကိုအမှီ",6C:"မှားနေသောငွေတောင်းခံအီးမေးလျ",5P:"မှားနေသောငွေတောင်းခံမိုဘိုင်း",8s:"မှားနေသောငွေတောင်းခံဖော်ပြချက်",8t:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က",8q:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က (8G)",8w:"မှားနေသော 8X အရေအတွက်ကို",7O:"မှားနေသော Wf နေ့စွဲ",7F:"မှားနေသော 4w အရေအတွက်ကို",7C:"မှားနေသော 4w c7 ကို",7N:"မှားနေသောမြီစားကတ်နံပါတ်",1E:"အမှား",8Z:"dM မှအမှား - 4G 5X ကို",7X:"အင်တာနက်ကိုအဆက်ပြတ်, ဒီအရောင်းအဝယ်အတွက်အင်တာနက်ရရှိနိုင်မှုလိုအပ်ပြီး",7Q:"i6 4q ကိုစစ်ဆေးခြင်းကိုကျော်သွားခဲ့တာဖြစ်ပါတယ်။",6U:"သတိပေးချက်",7D:"9P 5X ကို ON ဖြစ်ပါသည်",8l:"4G 1B များ",8e:"ရလဒ် i1 ဖို့အောက်က W8 4G ရွေးချယ်စရာ:

    အားလုံး 4G ငွေပေးငွေယူရလဒ်များကိုအော့ဖ်လိုင်း lb နေကြသည်မရှိအွန်လိုင်းဖြစ်စဉ်ကိုရာအရပျယူလိမ့်မည်ဟုအကြောင်းကြားလိမ့်ပေးပါ။",6n:"နှောင့်အယှက်",6j:"ဆက်သွယ်ရေးမှားယွင်းနေသည်, အင်တာနက်ကွန်နက်ရှင်, အသုံးပြုသူအမည်, ဒါမှမဟုတ် cB ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6k:"i2 ကို, ငြင်းပယ်ကုန်သည်အိုင်ဒီ, 8W ကိုအမည်, သို့မဟုတ်စိစစ်အတည်ပြု ib ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6p:"ရုပ်သံလိုင်းတစ်ခုမှမတွေ့, ငွေကြေးတန်ဖိုးကိုစစ်ဆေးကျေးဇူးပြုပြီး",6v:"3E မတွေ့ပါ",6X:"3D မတွေ့ပါ",6s:"1T မတွေ့ပါ",6I:"2J မတွေ့ပါ",6G:"3h မတွေ့ပါ",5E:"2i မတွေ့ပါ",6L:"3F မတွေ့ပါ",6r:"3g မတွေ့ပါ",6A:"3g မမှန်ကန်တဲ့တန်ဖိုးကို",6B:"2F မတွေ့ပါ",6x:"4l မတွေ့ရှိလက်ခံရရှိတောင်းဆိုချက်အတွက်တန်ဖိုးကို",6u:"ic အမှား, ထောက်ခံမှုဆက်သွယ်နိုင်ပါသည်",6b:"လုံခြုံသော ie ကိုပျက်ကွက်",6Q:"ငွေပေးချေမှုထပ်တလဲလဲဤချန်နယ်ပေါ်တွင်ဆက်လက်ဆောင်ရွက်မနိုင်",6K:"အဆင့်မြင့်အီးမေးလ် ct ကိုမအောင်မြင်ခဲ့",6t:"W9 ဖုန်းနံပါတ် ct ကိုမအောင်မြင်ခဲ့",5N:"ငွေတောင်းခံနာမကိုအမှီ 2 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6h:"ငွေတောင်းခံဖော်ပြချက် 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6Z:"ငွေတောင်းခံအီးမေးလ်က 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",5C:"မိုဘိုင်းနံပါတ်ငွေတောင်းခံလွှာပေါ်ရှိ 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6m:"မှားနေသောငွေပမာဏ"},a.KM={5h:"លេខ​សម្គាល់​លំដាប់",8u:"ឈ្មោះវិក័យប័ត្រ",8i:"អ៊ីម៉ែលវិក័យប័ត្រ",8p:"ទូរស័ព្ទដៃវិក័យប័ត្រ",7K:"ការរៀបរាប់វិក័យប័ត្រ",8d:"បង់តាមរយៈការ",5u:"សូមជ្រើសឆានែល",5D:"បន្តដំណើរការ",5s:"ជិតស្និទ្ធ",8v:"បដិសេធ",83:"កាតថ្មី",6W:"បាទ",No:"គ្មាន",7B:"លេខ​កាត",7Z:"6f",7E:"កាលបរិច្ឆេទ 7a",89:"MM/9D",6S:"ប្រទេស",7R:"ប្រទេសស្វែងរក",7f:"ឈ្មោះ​របស់​ធនាគារ",7H:"ធនាគារស្វែងរក",84:"ពិន្ទុការប្រើ 4k (8K = 3H 4k ពិន្ទុ)",7G:"កាត # 8V 43",8a:"(ចំនួន 10 ខ្ទង់ចុងក្រោយ)",7V:"កំហុសស្វែងរក",7S:"បញ្ចប់ស្ថានភាពបង់ប្រាក់។",7u:"សូមរង់ចាំ។",86:"លើរបៀប 9P",6y:"សេវាកម្ម",8f:"លេខសម្គាល់ប្រតិបត្តិការ",88:"ចំនួនទឹកប្រាក់ដែលត្រូវបង់",6q:"ចំណាំ",8k:"រក្សាទុករូបភាពទៅកាន់ឧបករណ៍",6J:"ការរៀបចំ...",6e:"កំពុងផ្ទុក...",6l:"ពបង់ប្រាក់គ្មានសុពលភាព",7z:"ឈ្មោះវិក្កយបត្រមិនត្រឹមត្រូវ",6C:"អ៊ីម៉ែលវិក័យប័ត្រមិនត្រឹមត្រូវ",5P:"វិក័យប័ត្រមិនត្រឹមត្រូវចល័ត",8s:"ការរៀបរាប់វិក័យប័ត្រមិនត្រឹមត្រូវ",8t:"លេខកាតឥណទានមិនត្រឹមត្រូវ",8q:"លេខកាតឥណទានមិនត្រឹមត្រូវ (8G)",8w:"ចំនួន 6f មិនត្រឹមត្រូវ",7O:"កាលបរិច្ឆេទ 7a មិនត្រឹមត្រូវ",7F:"ចំនួន 4w មិនត្រឹមត្រូវ",7C:"ម្ជុល 4w មិនត្រឹមត្រូវ",7N:"លេខកាតឥណពន្ធមិនត្រឹមត្រូវ",1E:"កំហុសក្នុងការ",8Z:"កំហុសក្នុងការបណ្តាញ - របៀបសេនបក់",7X:"អ៊ីនធឺណិតបានផ្តាច់, ប្រតិបត្តិការនេះតម្រូវឱ្យមានភាពអាចរកបានអ៊ិនធឺណិ",7Q:"ការត្រួតពិនិត្យកាតឥណពន្ធត្រូវបានរំលង។",6U:"ការ​រំលឹក",7D:"របៀប 9P ត្រូវបានបើក",8l:"ជម្រើសសេនបក់",8e:"ប្រើជម្រើសខាងក្រោមដើម្បីកំណត់រចនាសម្ព័ន្ធលទ្ធផលនេះ:

    សូមជំរាបជូនថាលទ្ធផលនៃការប្រតិបត្តិការទាំងអស់ត្រូវបានក្លែងធ្វើសេនបក់ក្រៅបណ្តាញ, មិនមានដំណើរការលើបណ្តាញនឹងយកកន្លែង។",6n:"បន្លំ",6j:"កំហុសក្នុងការប្រាស្រ័យទាក់ទង, សូមពិនិត្យមើលការតភ្ជាប់អ៊ីធឺណិត, ឈ្មោះអ្នកប្រើឬពាក្យសម្ងាត់",6k:"ការចូលដំណើរការត្រូវបានបដិសេធ, សូមពិនិត្យមើលលេខសម្គាល់អ្នកជំនួញ, ឈ្មោះកម្មវិធីឬកូនសោផ្ទៀងផ្ទាត់",6p:"រកមិនឃើញឆានែល, សូមពិនិត្យមើលតម្លៃរូបិយប័ណ្ណ",6v:"3E រក​មិន​ឃើញ",6X:"3D រក​មិន​ឃើញ",6s:"1T រក​មិន​ឃើញ",6I:"2J រក​មិន​ឃើញ",6G:"3h រក​មិន​ឃើញ",5E:"2i រក​មិន​ឃើញ",6L:"3F រក​មិន​ឃើញ",6r:"3g រក​មិន​ឃើញ",6A:"3g តម្លៃមិនត្រឹមត្រូវ",6B:"2F រក​មិន​ឃើញ",6x:"4l រកមិនឃើញតម្លៃសម្រាប់ការស្នើរសុំវិក័យប័ត្រ",6u:"កំហុសដែលមិនបានដោះស្រាយសូមទាក់ទងបានការគាំទ្រ",6b:"ការអ៊ិនគ្រីបបានបរាជ័យកិច្ចធានា",6Q:"កើតឡើងការទូទាត់មិនអាចបន្តនៅលើឆានែលនេះ",6K:"សុពលភាពអ៊ីមែលកម្រិតខ្ពស់បរាជ័យ",6t:"សុពលភាពលេខទូរស័ព្ទកម្រិតខ្ពស់បរាជ័យ",5N:"ឈ្មោះវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 2",6h:"ការរៀបរាប់វិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",6Z:"អ៊ីម៉ែលវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",5C:"វិក័យប័ត្រចំនួនទូរស័ព្ទចល័តត្រូវតែមានតួអក្សរច្រើនជាង 4",6m:"ចំនួនទឹកប្រាក់មិនត្រឹមត្រូវ"},a.ID={5h:"Id VH",8u:"bA Vb",8i:"59 9F",8p:"x8 9F",7K:"yE 9F",8d:"Ve Vf",5u:"xr Vh dh",5D:"V9",5s:"V2",8v:"V3",83:"aV V4",6W:"Mm Ec",No:"lJ",7B:"lZ aV",7Z:"6f",7E:"Eb Ee",89:"MM/9D",6S:"i8",7R:"i8 xe",7f:"fX a8",7H:"a8 xe",84:"Eg lR 4k (8K = 3H 4k dL)",7G:"lZ aV 8V 43",8a:"(Dh lZ 10-dT)",7V:"Dg Df",7S:"Dj 1Z dn.",7u:"xy x9.",86:"Dk 4G ON",6y:"Dn",8f:"ID dk",88:"yB Dm",6q:"D5",8k:"D6 D9 ke Db",6J:"Do...",6e:"DC...",6l:"DA dn 2c 2L",7z:"bA 9F fY 2c 2L",6C:"59 9F 2c 2L",5P:"DD x8 2c 2L",8s:"EI 9F 2c 2L",8t:"d9 aV d4 2c 2L",8q:"d9 aV d4 2c 2L (8G)",8w:"d9 8X 2c 2L",7O:"Fe 7a 2c 5I",7F:"d9 4w 2c 2L",7C:"oN 4w 2c 2L",7N:"d9 aV i6 2c 2L",1E:"m6",8Z:"m6 Fi - Fg 4G",7X:"d2 D1, dk gp F8 F7 6w",7Q:"Cz aV i6 Ao Am.",6U:"yZ",7D:"5X 9P xd ON",8l:"xm bd",8e:"lR AH di A6 g3 xo i7:

    xy C3 Cn Bf i7 dk bd Cb dl Ac, 2c xu xA g9 zV A7.",6n:"Ad",6j:"m6 xw, m0 lW Kz 6w, g1, 3X cB",6k:"xq xp, xr lW fZ id, fX xs, lB JY JA",6p:"lJ xu dh fY 8o, m0 lW g2 y5 Jq",6v:"3E 2c 8o",6X:"3D 2c 8o",6s:"1T 2c 8o",6I:"2J 2c 8o",6G:"3h 2c 8o",5E:"2i 2c 8o",6L:"3F 2c 8o",6r:"3g 2c 8o",6A:"3g 2c 2L",6B:"2F 2c 8o",6x:"4l g3 y6 JU JV 2c 8o",6u:"JG, m0 yG JF",6b:"JL JK cy",6Q:"JJ dn 2c db LO yK dh gp",6K:"yF 59 lc cy",6t:"yF yA lc cy",5N:"bA 9F gH 9X gR 2 gN",6h:"yE 9F gH 9X gR 4 gN",6Z:"59 9F gH 9X gR 4 gN",5C:"Lz yA gH 9X gR 4 gN",6m:"yB 2c 2L"},a.rn={5h:"订单编号",8u:"帐单名称",8i:"帐单电子邮件",8p:"帐单手机号码",7K:"帐单说明",8d:"付款",5u:"请选择一个频道",5D:"继续",5s:"关",8v:"取消",83:"新卡",6W:"是",No:"没有",7B:"卡号",7Z:"6f",7E:"过期日期",89:"MM/9D",6S:"国家",7R:"搜索国家",7f:"银行名",7H:"搜索银行",84:"使用4k积分(8K = 3H 4k积分)",7G:"卡 # 8V 43",8a:"(最后10位数字)",7V:"搜索错误",7S:"完成付款状态。",7u:"请稍候。",86:"沙箱模式开启",6y:"服务",8f:"交易ID",88:"应付金额",6q:"注意",8k:"将图像保存到设备",6J:"准备...",6e:"载入中...",6l:"付款信息无效",7z:"帐单名称无效",6C:"帐单电子邮件无效",5P:"帐单手机无效",8s:"帐单说明无效",8t:"无效的信用卡号码",8q:"无效的信用卡号码 (8G)",8w:"8X号码无效",7O:"7a日期无效",7F:"4w编号无效",7C:"4w引脚无效",7N:"借记卡号码无效",1E:"错误",8Z:"网络错误 - 沙盒模式",7X:"互联网断开连接,此事务需要互联网",7Q:"借记卡检查已被跳过。",6U:"提醒",7D:"沙箱模式为开",8l:"5J选项",8e:"使用以下选项配置结果:

    请注意,所有沙盒交易结果都离线模拟,不会发生在线流程。",6n:"篡改",6j:"通信错误,请检查互联网连接,用户名或密码",6k:"访问被拒绝,请检查商家ID,应用名称或验证密钥",6p:"找不到频道,请检查货币价值",6v:"3E 未找到",6X:"3D 未找到",6s:"1T 未找到",6I:"2J 未找到",6G:"3h 未找到",5E:"2i 未找到",6L:"3F 未找到",6r:"3g 未找到",6A:"3g 无效值",6B:"2F 未找到",6x:"4l 没有找到收据请求的值",6u:"未处理的错误,请联系支持",6b:"安全加密失败",6Q:"此频道无法重复付款",6K:"高级邮件验证失败",6t:"高级电话号码验证失败",5N:"帐单名称必须超过2个字符",6h:"帐单说明必须超过4个字元",6Z:"帐单电子邮件必须超过4个字符",5C:"帐单手机号码必须超过4个字符",6m:"金额无效"},a.4E={},a.4E.EN={AF:"jc",AX:"Åyi 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 2Q jT",AR:"jR",AM:"k6",AW:"dr",AC:"kA 5a",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BQ:"L8, yg L7, 2Q L6",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 2q",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d’jw",HR:"pp",CU:"p2",CW:"L0çao",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"KO",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MA:"yL",MZ:"yD",MM:"jp [KK]",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",QO:"kJ pR",PK:"kj",PW:"fu",PS:"lm ja",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"KQ",PN:"d8 2q",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"KS",RW:"kl",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"São KUé 2Q PríL9",SA:"jP yJ",SN:"kU",RS:"bq",CS:"bq 2Q a5",SC:"kN",SL:"mA mu",SG:"yI",SX:"yg Ll",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q a7 6E d0 2q",KR:"6E 9U",SS:"6E fb",ES:"Lc",LK:"kR k8",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj da fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",UM:"U.S. pH kJ 2q",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",US:"bx yd",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q df",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MS={AF:"jc",9B:"kg f7",AL:"k9",DZ:"Lb",AS:"pO ag",US:"l7 Le",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 3X jT",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",TD:"Lh",CV:"pY je",KY:"hj 2q",EA:"dP 3X dG",CN:"7Y",CX:"kG 5a",CL:"xh",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG",CD:"bG - kc",CK:"dF 2q",CI:"Côte d’jw",HR:"pp",CU:"p2",DK:"jy",DG:"dw dv",DM:"jq",EC:"oq",SV:"El k4",AE:"Hi cL Hh",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",FK:"j2 2q",FO:"dO 2q",PT:"Hg",FJ:"jX",PH:"y3",FI:"oQ",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl S.A.R., 7Y",HU:"Hj",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"Hn",JM:"zm",JP:"Hm",DE:"za",JE:"dE",DJ:"Hl",JO:"q0",CM:"zr",CA:"zs",KZ:"pG",KH:"Hf",KE:"l9",AX:"3R Åyi",IC:"3R ds",MH:"3R kp",SB:"3R kq",EU:"H6 HE",CY:"HD",KI:"ks",CR:"ze z1",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LB:"HC",LU:"HF",MO:"pS bk 7Y",MK:"pU",MG:"zv",MA:"HG",MW:"kx",MY:"bW",MV:"HJ",ML:"kK",MT:"kF",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",MP:"q3 dJ 2q",NO:"ps",QO:"pR HH",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",FR:"mU",PE:"kB",PN:"d8",PL:"lt",PR:"fs km",AC:"b7 kA",CP:"b7 fy",QA:"ku",CF:"aQ kg rv",CZ:"aQ oi",DO:"aQ ol",RE:"Rékf",RO:"ls",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 3X l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 3X mv",KR:"f7 9U",SN:"kU",ES:"HB",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"HA Ht",SG:"sV",SK:"l4",SI:"l1",SO:"kS",GS:"6E 9w 2Q a7 6E d0 2q",LK:"kR k8",SD:"fb",SR:"Hs",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TJ:"Hr",TW:"j8",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",GB:"bx lO",UM:"bx yd pH kJ 2q",UY:"iM",KP:"nb 9U",UZ:"iS",VU:"iT",VA:"lN",VE:"j0",VN:"j1",WF:"dd 2Q df",9x:"qp",GR:"r9",9u:"iV",9i:"iW"},a.4E.VI={SA:"A-rập Xê-út",AR:"Ác-Hz-ti-na",AM:"Ác-mê-ni-a",EG:"Ai Cập",AZ:"Ai-déc-H4-H3",IE:"Ai-q2",IS:"Ai-xơ-q2",AL:"An-ba-ni",DZ:"An-giê-ri",AG:"An-ti-gu-a và Ba-bu-đa",AD:"gb",AI:"d7",AT:"Áo",AF:"Áp-ga-ni-b9",AW:"dr",AO:"Ăng-gô-la",IN:"Ấn Độ",PL:"Ba bF",BS:"Ba-ha-ma",BH:"Ba-G6",BB:"Bác-ba-đốt",KP:"Bắc ytều Tiên",GL:"Băng Đảo",BD:"Băng-la-đét",BM:"dR",BY:"Bê-la-rút",BZ:"Bê-li-xê",BJ:"Bê-G5",BE:"Bỉ",PT:"Bồ Đào yj",BO:"Bô-li-vi-a",BA:"Bô-G8-a Héc-xê-gô-vi-na",BW:"Bốt-G9-na",CI:"Bờ Biển Ngà",BR:"Gd-Gc",BN:"Gq-nây",BI:"Bu-kC-đi",BT:"Bu-yc (dQ)",BG:"GV-ga-ri",BF:"Buốc-ki-na GZ-xô",CM:"Ca-mơ-kC",CA:"Ca-na-đa",QA:"Ca-ta",UM:"Các đảo nhỏ xa HO tâm a3ộc Mỹ",AE:"Các Tiểu Vương quốc A-rập Thống nhất",KH:"IK",CV:"Cáp-ve",EA:"dP và dG",CL:"IJ-lê",CO:"Cô-lôm-bi-a",KM:"Cô-mô",KW:"Cô-oét",CD:"Cộng hoà dân chủ Côngô",DO:"Cộng hoà Đô-mi-ni-ca",CZ:"Cộng hòa Séc",CF:"Cộng hòa gz gD",CG:"Công-gô",CR:"Cốt-IV Ri-ca",HR:"Crô-a-ti-a",CU:"Cu Ba",KG:"Cư-rơ-gư-b9",9u:"Dăm-bi-a",DG:"dw dv",9i:"Iy-ba-bu-ê",DM:"jq",TW:"Đài Iw",DK:"Đan Mạch",AC:"Đảo kA",BV:"Đảo fx (Na Uy)",CP:"Đảo fy",CX:"Đảo Giáng Iz",GU:"Đảo Gu-am",HM:"Đảo fD và Quần đảo fE",IM:"Đảo bp",NF:"Đảo dK",AS:"Đảo IB a3ộc Mỹ",VG:"Đảo 8A, a3ộc oj",HK:"Đặc y8 hành chính Hồng Kông a3ộc y7 gz pT",MO:"Đặc y8 hành chính IZ a3ộc y7 gz pT",TL:"Đông Ti-mo",DE:"Đức",EE:"E-xtô-ni-a",SV:"En-yb-va-đo",EC:"Ê-cu-a-đo",ER:"Ê-ri-tơ-rê-a",ET:"Ê-ti-ô-pi-a",GA:"Ga-bông",GM:"Găm-bi-a",GH:"J0-na",GN:"g5-nê",GW:"g5-nê Bít-J3",GQ:"g5-nê Xích-đạo",DJ:"Gi-bu-ti",GI:"dz",JO:"Gióc-đa-ni",GT:"Iv-tê-ma-la",GD:"Grê-na-đa",GE:"Iu-di-a",GP:"dD",GG:"dC",GY:"I4-a-na",NL:"Hà bF",HT:"Ha-i-ti",JM:"Ha-I3-ca",KR:"Hàn Quốc",US:"pT Kỳ",HN:"Hôn-đu-rát",HU:"I2-ga-ri",GR:"Hy Lạp",IR:"I-I6",IQ:"I-rắc",IL:"I-I9-en",JE:"dE",KZ:"Ka-dắc-b9",KE:"Kê-ni-a",KI:"Ki-ri-ba-ti",PS:"Lãnh thổ HV",LA:"Lào",LV:"Lát-vi-a",LS:"Lê-xô-thô",LB:"Li-băng",LR:"Li-bê-ri-a",LY:"Li-bi",LT:"Li-tu-a-ni-a",LI:"HZ-HY-xtên",EU:"Liên Ib Châu Âu",LU:"Lúc-xăm-Ip",MG:"Ma-đa-gát-Io",MW:"Ma-la-uy",MY:"Ma-In-xi-a",ML:"Ma-li",MA:"Ma-rốc",MK:"Ma-xê-đô-ni-a",MV:"bp-đi-vơ",MT:"bp-ta",MX:"Mê-hi-cô",MM:"Mi-an-ma",FM:"Mi-crô-nê-xi-a",ME:"a5",MS:"f1",MZ:"Mô-dăm-bích",MC:"Mô-na-cô",MR:"Mô-ri-ta-ni",MU:"Mô-ri-xơ",MD:"Môn-đô-va",MN:"Mông Cổ",NO:"Na Uy",AQ:"aD Cực",ID:"aD Dương",9B:"aD gD",NA:"aD-mi-bi-a",NR:"fv",NC:"7A kt",NP:"Nê-I1",RU:"I7",JP:"Nhật Bản",NI:"Ni-ca-ra-I8",NE:"Ni-giê",NG:"Ni-giê-ri-a",NZ:"y9 Di-lân",NU:"fw",OM:"Ô-J8",PK:"Pa-ki-b9",PA:"Pa-na-ma",PG:"Pa-pu-a y9 g5-nê",PY:"Pa-ra-ys",PW:"fu",PE:"Pê-ru",FR:"Pháp",FI:"Phần bF",FJ:"gD-gi",PH:"gD-Ge-c7",PF:"j6 a3ộc Pháp",PR:"fs km",AX:"Quần đảo n9",MP:"Quần Đảo Bắc dJ",IC:"Quần đảo ds",KY:"Quần Đảo hj",CC:"Quần đảo dx",CK:"Quần Đảo dF",FK:"Quần Đảo j2",FO:"Quần Đảo dO",MH:"Quần đảo Mác-yb",GS:"Quần đảo aD 9w và aD d0",PN:"Quần đảo d8",TC:"Quần Đảo Gm và dm",VI:"Quần đảo 8A, Mỹ",SB:"Quần đảo Xô-lô-mông",GF:"Lk a3ộc Pháp",RW:"Ru-an-đa",RO:"Ru-ma-ni",SH:"3s fz",PM:"3s fp và fo",TD:"Sát",CS:"Séc-L5",CY:"Síp",SJ:"d1 và d6 dq",TZ:"M8-da-ni-a",TJ:"Tát-gi-ki-b9",AN:"Tây Ấn Hà bF",ES:"Tây KJ yj",EH:"Tây fB",TH:"Thái bF",TR:"Thổ Nhĩ Kỳ",IO:"ykộc địa oj tại Ấn Độ Dương",TF:"ykộc Địa aD của Pháp",SE:"Thụy Điển",CH:"Thụy Sĩ",TK:"fk",TG:"Tô-gô",TO:"Tông-ga",TT:"yt-ni-đát và Tô-ba-gô",TA:"fj da fg",CN:"gz Quốc",TV:"Tu-va-lu",TM:"Tuốc-mê-ni-b9",TN:"Ku-ni-di",UA:"U-Kq-na",UZ:"U-dơ-bê-ki-b9",UG:"U-yw-đa",UY:"U-ru-ys",AU:"Úc",VU:"Va-nu-a-tu",VA:"Va-ti-căng",VE:"Vê-nê-zu-ê-la",VN:"Việt aD",QO:"Vùng xa xôi a3ộc Châu Đại Dương",GB:"Vương quốc oj",WF:"dd và df",WS:"Xa-B2",LC:"gS Lu-xi",SM:"gS Ma-ri-nô",VC:"gS F5-F4 và Grê-na-Fc",KN:"gS-kít và Nê-vi",ST:"DB Tô-mê và Ef-xi-pê",SC:"Xây-Vr",RS:"Xéc-bi",SN:"Xê-nê-yw",SL:"Xi-ê-ra Lê-ôn",SY:"Xi-ri",SG:"pW-ga-po",SK:"Xlô-va-ki-a",SI:"Xlô-U2-ni-a",SZ:"U9-di-q2",SO:"Xô-ma-li",LK:"Tp bF-ca",SD:"Xu-đăng",SR:"Xu-ri-N2",IT:"Ý",9x:"Y-ê-S3"},a.4E.TH={GR:"กรีซ",GL:"กรีนแลนด์",GU:"กวม",GP:"กวาเดอลูป",KH:"กัมพูชา",GT:"กัวเตมาลา",QA:"กาตาร์",GH:"กานา",GA:"กาบอง",GY:"กายอานา",GN:"กินี",GW:"กินี-บิสเซา",GD:"เกรเนดา",KR:"เกาหลีใต้",KP:"เกาหลีเหนือ",CX:"เกาะคริสต์มาส",CP:"เกาะคลิปเปอร์ตัน",GS:"เกาะเซาท์จอร์เจียและหมู่เกาะเซาท์แซนด์วิช",NF:"เกาะนอร์ฟอล์ก",BV:"เกาะบูเวต",IM:"เกาะแมน",AC:"เกาะแอสเซนชัน",HM:"เกาะเฮิร์ดและหมู่เกาะแมกดอนัลด์",GG:"เกิร์นซีย์",GM:"แกมเบีย",CD:"คองโก-กินชาซา",CG:"คองโก-บราซซาวิล",KM:"คอโมโรส",CR:"คอสตาริกา",KZ:"คาซัคสถาน",KI:"คิริบาส",CU:"คิวบา",KG:"คีร์กีซสถาน",KW:"คูเวต",KE:"เคนยา",CV:"เคปเวิร์ด",CA:"แคนาดา",CM:"แคเมอรูน",HR:"โครเอเชีย",CO:"โคลอมเบีย",GE:"จอร์เจีย",JO:"จอร์แดน",JM:"จาเมกา",DJ:"จิบูตี",CN:"จีน",JE:"เจอร์ซีย์",TD:"ชาด",CL:"ชิลี",SM:"ซานมารีโน",WS:"ซามัว",SA:"ซาอุดีอาระเบีย",EH:"ซาฮาราตะวันตก",9i:"ซิมบับเว",SY:"ซีเรีย",EA:"ซีโอตาและเมลิลลา",SD:"ซูดาน",SR:"ซูรินาเม",SC:"เซเชลส์",KN:"เซนต์คิตส์และเนวิส",BL:"เซนต์บาร์เธเลมี",MF:"เซนต์มาติน",LC:"เซนต์ลูเซีย",VC:"เซนต์วินเซนต์และเกรนาดีนส์",SH:"เซนต์เฮเลนา",SN:"เซเนกัล",RS:"เซอร์เบีย",CS:"เซอร์เบียและมอนเตเนโกร",ST:"เซาตูเมและปรินซิปี",SL:"เซียร์ราลีโอน",PM:"แซงปีแยร์และมีเกอลง",9u:"แซมเบีย",SO:"โซมาเลีย",CY:"ไซปรัส",JP:"ญี่ปุ่น",DG:"ดิเอโกการ์เซีย",DK:"เดนมาร์ก",DM:"โดมินิกา",TT:"ตรินิแดดและโตเบโก",TO:"ตองกา",TL:"ติมอร์ตะวันออก",TR:"ตุรกี",TN:"ตูนิเซีย",TV:"ตูวาลู",TM:"เติร์กเมนิสถาน",TK:"โตเกเลา",TG:"โตโก",TW:"ไต้หวัน",TA:"ทริสตัน เดอ คูนา",TJ:"ทาจิกิสถาน",TZ:"แทนซาเนีย",TH:"ไทย",NO:"นอร์เวย์",NA:"นามิเบีย",NR:"นาอูรู",NI:"นิการากัว",NC:"นิวแคลิโดเนีย",NZ:"นิวซีแลนด์",NU:"นีอูเอ",NL:"เนเธอร์แลนด์",AN:"เนเธอร์แลนด์แอนทิลลิส",NP:"เนปาล",NG:"ไนจีเรีย",NE:"ไนเจอร์",BR:"บราซิล",IO:"บริติชอินเดียนโอเชียนเทร์ริทอรี",BN:"บรูไน",BW:"บอตสวานา",BA:"บอสเนียและเฮอร์เซโกวีนา",BD:"บังกลาเทศ",BG:"บัลแกเรีย",BB:"บาร์เบโดส",BH:"บาห์เรน",BS:"บาฮามาส",BI:"บุรุนดี",BF:"บูร์กินาฟาโซ",BJ:"เบนิน",BE:"เบลเยียม",BY:"เบลารุส",BZ:"เบลีซ",BM:"เบอร์มิวดา",BO:"โบลิเวีย",PK:"ปากีสถาน",PA:"ปานามา",PG:"ปาปัวนิวกินี",PY:"ปารากวัย",PS:"ปาเลสไตน์",PW:"ปาเลา",PE:"เปรู",PR:"เปอร์โตริโก",PT:"โปรตุเกส",PL:"โปแลนด์",FR:"ฝรั่งเศส",PN:"พิตแคร์น",FJ:"ฟิจิ",FI:"ฟินแลนด์",PH:"ฟิลิปปินส์",GF:"เฟรนช์เกียนา",TF:"เฟรนช์เซาเทิร์นเทร์ริทอรีส์",PF:"เฟรนช์โปลินีเซีย",BT:"ภูฏาน",MN:"มองโกเลีย",MS:"มอนต์เซอร์รัต",ME:"มอนเตเนโกร",MU:"มอริเชียส",MR:"มอริเตเนีย",MD:"มอลโดวา",MT:"มอลตา",MV:"มัลดีฟส์",MO:"มาเก๊า เขตปกครองพิเศษประเทศจีน",MK:"มาซิโดเนีย",MG:"มาดากัสการ์",c8:"มายอต",MQ:"มาร์ตินีก",MW:"มาลาวี",ML:"มาลี",MY:"มาเลเซีย",MX:"เม็กซิโก",MM:"เมียนม่าร์ [พม่า]",MZ:"โมซัมบิก",MC:"โมนาโก",MA:"โมร็อกโก",FM:"ไมโครนีเซีย",GI:"ยิบรอลตาร์",UG:"ยูกันดา",UA:"ยูเครน",9x:"เยเมน",DE:"เยอรมนี",RW:"รวันดา",RU:"รัสเซีย",RE:"เรอูนียง",RO:"โรมาเนีย",LU:"ลักเซมเบิร์ก",LV:"ลัตเวีย",LA:"ลาว",LI:"ลิกเตนสไตน์",LT:"ลิทัวเนีย",LY:"ลิเบีย",LS:"เลโซโท",LB:"เลบานอน",LR:"ไลบีเรีย",VA:"วาติกัน",VU:"วานูอาตู",WF:"วาลลิสและฟุตูนา",VE:"เวเนซุเอลา",VN:"เวียดนาม",LK:"ศรีลังกา",ES:"สเปน",SJ:"สฟาลบาร์และยานไมเอน",SK:"สโลวะเกีย",SI:"สโลวีเนีย",SZ:"สวาซิแลนด์",CH:"สวิตเซอร์แลนด์",SE:"สวีเดน",EU:"สหภาพยุโรป",US:"สหรัฐอเมริกา",AE:"สหรัฐอาหรับเอมิเรตส์",GB:"สหราชอาณาจักร",CZ:"สาธารณรัฐเช็ก",DO:"สาธารณรัฐโดมินิกัน",CF:"สาธารณรัฐแอฟริกากลาง",SG:"สิงคโปร์",IC:"หมู่เกาะคานารี",CK:"หมู่เกาะคุก",KY:"หมู่เกาะเคย์แมน",CC:"หมู่เกาะโคโคส",SB:"หมู่เกาะโซโลมอน",TC:"หมู่เกาะเติกส์และหมู่เกาะเคคอส",MP:"หมู่เกาะนอร์เทิร์นมาเรียนา",VG:"หมู่เกาะบริติชเวอร์จิน",FK:"หมู่เกาะฟอล์กแลนด์",FO:"หมู่เกาะแฟโร",MH:"หมู่เกาะมาร์แชลล์",VI:"หมู่เกาะยูเอสเวอร์จิน",UM:"หมู่เกาะสหรัฐไมเนอร์เอาต์ไลอิง",AX:"หมู่เกาะโอลันด์",AS:"อเมริกันซามัว",AU:"ออสเตรเลีย",AT:"ออสเตรีย",AD:"อันดอร์รา",AF:"อัฟกานิสถาน",AZ:"อาเซอร์ไบจาน",AR:"อาร์เจนตินา",AM:"อาร์เมเนีย",AW:"อารูบา",GQ:"อิเควทอเรียลกินี",IT:"อิตาลี",IN:"อินเดีย",ID:"อินโดนีเซีย",IQ:"อิรัก",IL:"อิสราเอล",IR:"อิหร่าน",EG:"อียิปต์",UZ:"อุซเบกิสถาน",UY:"อุรุกวัย",EC:"เอกวาดอร์",ET:"เอธิโอเปีย",ER:"เอริเทรีย",SV:"เอลซัลวาดอร์",EE:"เอสโตเนีย",QO:"เอาต์ไลอิงโอเชียเนีย",AI:"แองกวิลลา",AO:"แองโกลา",AQ:"แอนตาร์กติกา",AG:"แอนติกาและบาร์บูดา",9B:"แอฟริกาใต้",DZ:"แอลจีเรีย",AL:"แอลเบเนีย",OM:"โอมาน",IS:"ไอซ์แลนด์",IE:"ไอร์แลนด์",CI:"ไอวอรี่โคสต์",HK:"ฮ่องกง เขตปกครองพิเศษประเทศจีน",HN:"ฮอนดูรัส",HU:"ฮังการี",HT:"เฮติ"},a.4E.yq={AC:"Sa RQ",AF:"jc",AX:"n9 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AQ:"RN",AG:"iU 2Q jT",AO:"iY",AI:"d7",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 5a",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d\'jw",HR:"pp",CU:"p2",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",ES:"L2",US:"yU yM",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"M3",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",QO:"Mc Mk ng pR",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",UM:"yV pH kJ 5a ng yU yM",FM:"py",MD:"l5",MC:"pv",ME:"a5",MS:"f1",MN:"l0",MA:"yL",MZ:"yD",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"LH",PN:"d8",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"Lx LJ",RW:"kl",BL:"3s lhélf",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 2Q mv",SA:"jP yJ",SN:"kU",RS:"bq",SC:"kN",SL:"mA mu",SG:"yI",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q me 6E d0 2q",KR:"6E 9U",LK:"kR k8",SH:"St. fz",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq 2q",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj de fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q a7 df 2q",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MY={CA:"ကနေဒါ",KZ:"ကာဇက်စတန်",QA:"ကာတာ",KW:"ကူဝိတ်",KY:"ကေမန် ကျွန်းစု",CR:"ကော့စ်တာရီကာ",CC:"ကိုကိုး ကျွန်းစု",CO:"ကိုလံဘီယာ",KE:"ကင်ညာ",CM:"ကင်မရွန်း",KH:"ကမ္ဘောဒီးယား",CU:"ကျူးဘား",CK:"ကွတ် ကျွန်းစု",HR:"ခရိုအေးရှား",CX:"ခရစ်စမတ် ကျွန်း",CL:"ချီလီ",CZ:"ချက် ပြည်ထောင်စု",TD:"ချဒ်",GR:"ဂရိ",GL:"ဂရင်းလန်း",GH:"ဂါနာ",GN:"ဂီရာနာ",GU:"ဂူအမ်",GM:"ဂန်ဘီရာ",JP:"ဂျပန်",JM:"ဂျမေနီကာ",JE:"ဂျာစီ",DE:"ဂျာမဏီ",GI:"ဂျီဘရော်လ်တာ",GE:"ဂျော်ဂျီယာ",JO:"ဂျော်ဒန်",GT:"ဂွာတီမာလာ",ES:"စပိန်",SK:"စလိုဗေးကီးယား",SI:"စလိုဗေးနီးယား",SG:"စင်္ကာပူ",MF:"စိန့်မာတင်",RS:"ဆားဘီးယား",SN:"ဆီနီဂေါ",SY:"ဆီးရီးယား",SD:"ဆူဒန်",SA:"ဆော်ဒီအာရေးဗီးယား",SB:"ဆော်လမွန်ကျွန်းစု",SO:"ဆိုမာလီယာ",CY:"ဆိုက်ပရက်စ်",SE:"ဆွီဒင်",CH:"ဆွစ်ဇလန်",9i:"ဇင်ဘာဘွေ",9u:"ဇမ်ဘီယာ",CN:"တရုတ်",MO:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ မကာအို",HK:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ ဟောင်ကောင်",TJ:"တာဂျီကစ္စတန်",TN:"တူနီးရှား",TR:"တူရကီ",KR:"တောင်ကိုရီးယား",9B:"တောင်အာဖရိက",TZ:"တန်ဇန်နီးယား",TO:"တွန်ဂါ",TW:"ထိုင်ဝမ်",TH:"ထိုင်း",DM:"ဒိုမီနီကာ",DO:"ဒိုမီနီကန်",DK:"ဒိန်းမတ်",NC:"နယူး ကယ်လီဒိုနီးယား",NZ:"နယူးဇီလန်",NI:"နီကာရာဂွာ",NP:"နီပေါ",NO:"နော်ဝေ",NE:"နိုင်ဂျာ",NG:"နိုင်ဂျီးရီးယား",NA:"နမ်မီးဘီးယား",NL:"နယ်သာလန်",PA:"ပနားမား",PK:"ပါကစ္စတန်",PG:"ပါပူရာနယူးဂီနီ",PY:"ပါရာဂွေး",PS:"ပါလက်စတိုင်း ပိုင်နက်",PE:"ပီရူး",PT:"ပေါ်တူဂီ",PR:"ပေါ်တူရီကို",PL:"ပိုလန်",FR:"ပြင်သစ်",GF:"ပြင်သစ် ဂီယာနာ",TF:"ပြင်သစ် တောင်ပိုင်း ပိုင်နက်များ",PF:"ပြင်သစ် ပေါ်လီနေးရှား",FO:"ဖာရိုး ကျွန်းစုများ",PH:"ဖိလစ်ပိုင်",FJ:"ဖီဂျီ",FK:"ဖောက်ကလန် ကျွန်းစု",FI:"ဖင်လန်",VA:"ဗာတီကန်",VN:"ဗီယက်နမ်",VE:"ဗင်နီဇွဲလား",VG:"ဗြိတိသျှ ဗာဂျင်း ကျွန်းစု",IO:"ဗြိတိသျှ အိန္ဒြိယ သမုဒ္ဒရာ ပိုင်နက်",BR:"ဘရာဇီး",BN:"ဘရူနိုင်း",BS:"ဘဟားမား",BM:"ဘာမူဒါ",BH:"ဘာရိန်း",BY:"ဘီလာရုစ်",BG:"ဘူဂေးရီးယား",BT:"ဘူတန်",BZ:"ဘေလီဇ်",BA:"ဘော့စနီးယား နှင့် ဟာဇီဂိုဘီးနား",BW:"ဘော့စ်ဝါနာ",BO:"ဘိုလီးဘီးယား",BD:"ဘင်္ဂလားဒေ့ရှ်",BE:"ဘယ်လ်ဂျီယမ်",MG:"မဒဂတ်စကာ",MY:"မလေးရှား",MK:"မာစီဒိုးနီးယား",MH:"မာရှယ် ကျွန်းစု",MW:"မာလာဝီ",ML:"မာလီ",MA:"မော်ရိုကို",MV:"မော်လဒိုက်",MZ:"မိုဇန်ဘစ်",MC:"မိုနကို",MX:"မက္ကဆီကို",KP:"မြောက်ကိုရီးယား",MM:"မြန်မာ",MN:"မွန်ဂိုးလီးယား",ME:"မွန်တီနိဂရိုး",9x:"ယီမင်",UA:"ယူကရိန်း",UG:"ယူဂန္ဒာ",GB:"ယူနိုက်တက်ကင်းဒမ်း",US:"ယူနိုက်တက်စတိတ်",UM:"ယူနိုက်တက်စတိတ် အပြင်ထွက် နေသည့် သေးငယ်သောကျွန်းများ",AE:"ယူအေအီး",VI:"ယူအက်စ် ဗာဂျင်း ကျွန်းစု",RW:"ရဝန်ဒါ",RU:"ရုရှ",RO:"ရိုမေးနီးယား",LA:"လာအို",LU:"လူဇင်ဘတ်",LB:"လက်ဘနွန်",LR:"လိုင်ဘေးရီးယား",LT:"လစ်သူယေးနီးယား",LV:"လတ်ဗီးယား",LK:"သီရိလင်္ကာ",HT:"ဟေတီ",HU:"ဟန်ဂေရီ",HN:"ဟွန်ဒူးရပ်စ်",AZ:"အဇာဘိုင်ဂျန်",EH:"အနောက်ပိုင်း ဆာဟာရ",AS:"အမေရိကန် စမိုအ",TL:"အရှေ့တီမော",CF:"အလယ်ပိုင်း အာဖရိက ပြည်ထောင်စု",AR:"အာဂျင်တီးနား",AF:"အာဖဂန်နစ္စတန်",AM:"အာမေနီးယား",GQ:"အီကွေတာ ဂီရာနာ",EC:"အီကွေဒေါ",EG:"အီဂျစ်",IT:"အီတလီ",IQ:"အီရတ်",IR:"အီရန်",ET:"အီသီယိုးပီးယား",UZ:"ဥဘက်ကစ္စတန်",UY:"ဥရုဂွေး",EU:"ဥရောပသမဂ္ဂ",AT:"ဩစတြီးယား",AU:"ဩစတြေးလျှား",OM:"အိုမန်",EE:"အက်စတိုးနီးယား",IS:"အိုက်စလန်",AO:"အင်ဂိုလာ",ID:"အင်ဒိုနီးရှား",CI:"အိုင်ဗရီကိုစ့်",IE:"အိုင်ယာလန်",IL:"အစ္စရေး",AI:"အန်ကွီလာ",AQ:"အန္တာတိက",IN:"အိန္ဒိယ",DZ:"အယ်လ်ဂျီးရီးယား",SV:"အယ်လ်ဆာဗေးဒိုး"},a.4E.KM={KH:"កម្ពុជា",CA:"កាណាដា",QA:"កាតារ",CV:"កាបវែរ",CM:"កាមេរូន",KZ:"កាហ្សាក់ស្តាង់់",CG:"កុងហ្គោ",CI:"កូដឌីវ័រ",CR:"កូស្តារីកា",CO:"កូឡុំប៊ី",KE:"កេនយ៉ា",KM:"កុំម៉ូរ៉ូស",GR:"ក្រិច",HR:"ក្រូអាស៊ី",KI:"គិរិបាទី",CU:"គុយបា",KW:"គុយវ៉ែត",KG:"គៀរហ្គីស្តង់",CN:"ចិន",TD:"ឆាដ",JP:"ជប៉ុន",CL:"ឈីលី",DK:"ដាណឺម៉ាក",DM:"ដូមីនីកា",NA:"ណាមីប៊ី",TZ:"តង់ហ្សានី",TJ:"តាដហ្ស៉ីគីស្តង់",TO:"តុងហ្គា",TG:"តូហ្គូ",TW:"តៃវ៉ាន់",TH:"ថៃ",TL:"ទីម័រខាងកើត",TN:"ទុយនេស៊ី",TM:"ទួគមេនីស្តង់",TR:"ទួរគី",TT:"ទ្រីនីដាដនឹងតូបាហ្គោ",NO:"ន័រវែស",NI:"នីការ៉ាហ្គ័រ",NE:"នីហ្សេរ",NG:"នីហ្សេរីយ៉ា",NZ:"នូវែលហ្សេឡង់",NP:"នេប៉ាល់",BD:"បង់ក្លាដេស្ហ",PK:"ប៉ាគីស្ថាន",PA:"ប៉ាណាម៉ា",PG:"ប៉ាពូអានូវែលហ្គីណេ",BB:"បារបាដូស",PY:"ប៉ារ៉ាហ្គាយ",BH:"បារ៉ែន",FR:"បារាំង",PS:"ប៉ាលេស្ទីន",BS:"បាហាម៉ា",BW:"បុតស្វាណា",BG:"ប៊ុលហ្គារី",BT:"ប៊ូតាន",BF:"ប៊ូរគីណាហ្វាសូ",BI:"ប៊ូរុនឌី",BO:"បូលីវី",PL:"ប៉ូលូញ",BA:"បូស្ន៉ី",BJ:"បេណាំង",PE:"ប៉េរូ",BZ:"បេលីហ្ស",BY:"បេឡារុស្ស",BE:"បែលហ្ស៉ិក",BN:"ប៊្រុយណេ",BR:"ប្រេស៊ីល",PR:"ព័រតូរីកូ",PT:"ព័រទុយហ្កាល់",MG:"ម៉ាដាហ្កាស្ការ",MA:"ម៉ារ៉ុក",MT:"ម៉ាល់តា",ML:"ម៉ាលី",MY:"ម៉ាលេស៉ី",MK:"ម៉ាសេដន",FM:"មិក្រូនេស៊ី",MX:"ម៉ិចសិក",MM:"មីយ៉ាន់ម៉ា",MN:"ម៉ុងហ្គោលី",MC:"ម៉ូណាកូ",MR:"ម៉ូរីតានី",MU:"ម៉ូរីទុស",MZ:"ម៉ូហ្សាំប៊ិក",9x:"យេមែន",RW:"រវ៉ាន់ដា",RO:"រូម៉ានី",RU:"រូស្ស៊ី",LI:"លិចទេនស្តែន",LT:"លីទុយអានី",LB:"លីបង់",LY:"លីប៊ី",LR:"លីបេរីយ៉ា",LU:"លុចហ្សំបួរ",LS:"លើសូតូ",VA:"វ៉ាទីកង់",VN:"វៀតណាម",VE:"វេនេហ្ស៊ុយឡា",US:"សហរដ្ឋអាមេរិក",KR:"សាធារណរដ្ឋកូរ៉េ",CZ:"សាធារណរដ្ឋឆេក",DO:"សាធារណរដ្ឋដូមីនីកែន",KP:"សាធារណរដ្ឋប្រជាធិបតេយ្យប្រជាមានិតកូរ៉េ",MD:"សាធារណរដ្ឋម៉ុលដាវី",CF:"សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល",WS:"សាមូអា",EH:"សាហារ៉ាខាងលិច",SG:"សិង្ហបុរី",CY:"ស៉ីពរ៍",SY:"ស៊ីរី",SC:"សីសែល",SE:"ស៊ុយអែដ",SD:"ស៊ូដង់",SO:"សូម៉ាលី",SR:"សូរីណាម",SZ:"សូហ្ស៉ីឡង់",SN:"សេនេហ្កាល់",SL:"សេរ៉ាឡេអូន",LK:"ស្រីលង្កា",SK:"ស្លូវ៉ាគី",SI:"ស្លូវេនី",CH:"ស្វីស",HK:"ហុងកុង",HU:"ហុងគ្រី",HN:"ហុងឌួរ៉ាស់",NL:"ហូល្លង់",HT:"ហៃទី",GH:"ហ្កាណា",GT:"ហ្គាតេម៉ាឡា",GA:"ហ្គាបុង",GN:"ហ្គីណេ",GW:"ហ្គីណេប៊ីសូ",GQ:"ហ្គីណេអេក្វាទ័រ",GY:"ហ្គីយ៉ាណា",GM:"ហ្គាំប៊ី",PH:"ហ្វ៉ីលីពីន",FJ:"ហ្វ៉ីហ្ស៉ី",FI:"ហ្វាំងឡង់",JO:"ហ៊្សកដានី",GE:"ហ្សកហ្ស៉ី",JM:"ហ្សាម៉ាអ៉ិគ",DJ:"ហ្ស៉ីបូទី",9i:"ហ្ស៊ីមបាបវ៉េ",9u:"ហ្សាំប៊ី",LV:"ឡាតវីយ៉ា",LA:"ឡាវ",AO:"អង់ហ្គោឡា",AD:"អានដូរ៉ា",AM:"អារមេនី",SA:"អារ៉ាប៊ីសាអ៊ូឌីត",AL:"អាល់បានី",DZ:"អាល់ហ្សេរី",DE:"អាល្លឺម៉ង់",AF:"អាហ្វហ្គានីស្ថាន",9B:"អាហ្វ្រិកខាងត្បូង",AR:"អាហ្សង់ទីន",AZ:"អាហ៊្សែរបែហ្សង់",IN:"ឥណ្ឌា",ID:"ឥណ្ឌូនេស៊ី",IT:"អ៊ីតាលី",IR:"អ៊ីរ៉ង់",IQ:"អ៊ីរ៉ាក់",IL:"អ៊ីស្រាអែល",IS:"អ៉ីស្លង់",UA:"អ៊ុយក្រែន",UY:"អ៊ុយរុយហ្គាយ",AT:"អូទ្រីស",OM:"អូម៉ង់",AU:"អូស្ត្រាលី",UG:"អ៊ូហ្កង់ដា",UZ:"អ៊ូហ្សបេគីស្តង់",IE:"អៀរឡង់",EC:"អេក្វាឌ័រ",ET:"អេត្យូពី",AE:"អេមីរ៉ែទអារ៉ាប់រួម",ER:"អេរីទ្រា",EE:"អេស្តូនី",ES:"អេស្ប៉ាញ",EG:"អេហ្ស៉ីប",SV:"អែលសាល់វ៉ាឌ័រ"},a.4E.ID={AF:"jc",9B:"kg f7",AL:"k9",DZ:"lG",US:"l7 zF",AD:"F3",AO:"iY",AI:"d7",AQ:"Ff",AG:"iU 3X jT",AN:"DN lv",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"W7",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"Wl",BE:"Wm",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BR:"Wg",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",EA:"dP 3X dG",TD:"le",CL:"xh",CN:"Xj",CI:"XK d\'jw",DK:"jy",DG:"dw dv",DM:"rx",EC:"OZ",SV:"El k4",ER:"k7",EE:"k5",ET:"jY",FJ:"jX",PH:"y3",FI:"NB",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GD:"jV",GL:"Qr",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GQ:"5A QU",GW:"5A-jh",GY:"dA",GF:"dA mU",HT:"jg",HN:"jk",HK:"dB jl bk 7Y",HU:"R2",IN:"jf",ID:"cl",GB:"mE QZ",IQ:"QY",IR:"j7",IE:"C7",IS:"R0",IM:"j9 of bp",IL:"jd",IT:"NX",JM:"zm",JP:"My",DE:"za",JE:"dE",DJ:"WJ",NC:"VP mz",KH:"Al",CM:"zr",CA:"zs",KZ:"B6",KE:"l9",AX:"3R n9",IC:"3R ds",CC:"3R dx",CK:"3R dF",FO:"3R dO",KY:"3R Cf",UM:"3R Bb BK l7 zF",FK:"3R zY",MP:"3R dJ nb",MH:"3R kp",NF:"3R dK",PN:"3R d8",SB:"3R kq",GS:"3R 6E d0 3X 6E 9w",SJ:"3R d1 3X d6 dq",TC:"3R kM 3X dm",VI:"3R U.S. 8A",VG:"3R 8A mE",WF:"3R dd 3X df",KG:"KB",KI:"ks",CO:"Kp",KM:"Jy",CD:"zc - kc",CG:"zc - aQ",KR:"9U f7",KP:"9U nb",CR:"ze z1",HR:"Lw",CU:"LD",KW:"kv",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"LE",LI:"ky",LT:"M0",LU:"M1",MG:"zv",MO:"M2 bk 7Y",MK:"M9",MV:"Lv",MW:"kx",MY:"bW",ML:"kK",MT:"kF",MA:"Vu",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"Qx",MD:"l5",MC:"QB",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NE:"kP",NG:"kb",NI:"JQ",NU:"fw",NO:"KF",PG:"rX ka rX",OM:"kd",QO:"Jc IY",PS:"He Lp",PK:"kj",PW:"fu",PA:"kw",PY:"kz",FR:"mU",PE:"kB",PL:"M4",PF:"Mb sC",PT:"Mh",PR:"fs Mf",AC:"b7 kA",BV:"b7 fx",CX:"b7 kG",CP:"b7 fy",HM:"b7 fD 3X 3R fE",QA:"ku",CF:"aQ kg rv",CZ:"aQ LW",DO:"aQ rx",RE:"Rékf",RO:"JX",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s KA",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 3X fo",VC:"3s l2 3X l8",WS:"ag",AS:"ag l7",SM:"l6 kZ",ST:"mP mw 3X mv",NZ:"Eh mz",SN:"kU",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"mA mu",SG:"sV",CY:"Uv",SK:"l4",SI:"l1",SO:"kS",ES:"N6",LK:"kR k8",SD:"fb",SR:"ml",SZ:"jb",SE:"RG",CH:"Qm",SY:"j5",TW:"j8",TJ:"mN",CV:"QX je",TZ:"jn",TF:"R3 QV f7 sC",TH:"ji",TL:"jj j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"Rb",TV:"iJ",UG:"iK",UA:"Qe",AE:"qG Qd cL",EU:"qG Qh",UY:"iM",UZ:"iS",VU:"iT",VA:"Qc",VE:"j0",VN:"j1",IO:"Q4 mE di Q2 Q6",9x:"qp",JO:"Qz",GR:"r9",9u:"iV",9i:"iW"},a.4E.rn={AL:"阿尔巴尼亚",DZ:"阿尔及利亚",AF:"阿富汗",AR:"阿根廷",AE:"阿拉伯联合酋长国",AW:"阿鲁巴",OM:"阿曼",AZ:"阿塞拜疆",AC:"阿森松岛",EG:"埃及",ET:"埃塞俄比亚",IE:"爱尔兰",EE:"爱沙尼亚",AD:"安道尔",AO:"安哥拉",AI:"安圭拉",AG:"安提瓜和巴布达",AT:"奥地利",AX:"奥兰群岛",AU:"澳大利亚",BB:"巴巴多斯",PG:"巴布亚新几内亚",BS:"巴哈马",PK:"巴基斯坦",PY:"巴拉圭",PS:"巴勒斯坦领土",BH:"巴林",PA:"巴拿马",BR:"巴西",BY:"白俄罗斯",BM:"百慕大",BG:"保加利亚",MP:"北马里亚纳群岛",BJ:"贝宁",BE:"比利时",IS:"冰岛",PR:"波多黎各",PL:"波兰",BA:"波斯尼亚和黑塞哥维那",BO:"玻利维亚",BZ:"伯利兹",BW:"博茨瓦纳",BT:"不丹",BF:"布基纳法索",BI:"布隆迪",BV:"布维特岛",KP:"朝鲜",GQ:"赤道几内亚",QO:"大洋洲边远群岛",DK:"丹麦",DE:"德国",DG:"迪戈加西亚岛",TL:"东帝汶",TG:"多哥",DM:"多米尼加",DO:"多米尼加共和国",RU:"俄罗斯",EC:"厄瓜多尔",ER:"厄立特里亚",FR:"法国",FO:"法罗群岛",PF:"法属波利尼西亚",GF:"法属圭亚那",TF:"法属南部领土",VA:"梵蒂冈",PH:"菲律宾",FJ:"斐济",FI:"芬兰",CV:"佛得角",FK:"福克兰群岛",GM:"冈比亚",CG:"刚果(布)",CD:"刚果(金)",CO:"哥伦比亚",CR:"哥斯达黎加",GG:"格恩西岛",GD:"格林纳达",GL:"格陵兰",GE:"格鲁吉亚",CU:"古巴",GP:"瓜德罗普岛",GU:"关岛",GY:"圭亚那",KZ:"哈萨克斯坦",HT:"海地",KR:"韩国",NL:"荷兰",AN:"荷属安的列斯群岛",HM:"赫德与麦克唐纳群岛",ME:"黑山共和国",HN:"洪都拉斯",KI:"基里巴斯",DJ:"吉布提",KG:"吉尔吉斯斯坦",GN:"几内亚",GW:"几内亚比绍",CA:"加拿大",GH:"加纳",IC:"加纳利群岛",GA:"加蓬",KH:"柬埔寨",CZ:"捷克共和国",9i:"津巴布韦",CM:"喀麦隆",QA:"卡塔尔",KY:"开曼群岛",CC:"科科斯群岛",KM:"科摩罗",CI:"科特迪瓦",KW:"科威特",CP:"克利珀顿岛",HR:"克罗地亚",KE:"肯尼亚",CK:"库克群岛",LV:"拉脱维亚",LS:"莱索托",LA:"老挝人民民主共和国",LB:"黎巴嫩",LT:"立陶宛",LR:"利比里亚",LY:"利比亚",LI:"列支敦士登",RE:"留尼汪",LU:"卢森堡",RW:"卢旺达",RO:"罗马尼亚",MG:"马达加斯加",MV:"马尔代夫",MT:"马耳他",MW:"马拉维",MY:"马来西亚",ML:"马里",MK:"马其顿",MH:"马绍尔群岛",MQ:"马提尼克群岛",c8:"马约特",IM:"曼岛",MU:"毛里求斯",MR:"毛里塔尼亚",US:"美国",UM:"美国边远小岛",AS:"美属萨摩亚",VI:"美属维京群岛",MN:"蒙古",MS:"蒙塞拉特群岛",BD:"孟加拉国",PE:"秘鲁",FM:"密克罗尼西亚联邦",MM:"缅甸",MD:"摩尔多瓦",MA:"摩洛哥",MC:"摩纳哥",MZ:"莫桑比克",MX:"墨西哥",NA:"纳米比亚",9B:"南非",AQ:"南极洲",GS:"南乔治亚岛和南桑威齐群岛",NR:"瑙鲁",NI:"尼加拉瓜",NP:"尼泊尔",NE:"尼日尔",NG:"尼日利亚",NU:"纽埃",NO:"挪威",NF:"诺福克岛",EU:"欧盟",PW:"帕劳",PN:"皮特凯恩群岛",PT:"葡萄牙",JP:"日本",SE:"瑞典",CH:"瑞士",SV:"萨尔瓦多",WS:"萨摩亚",RS:"塞尔维亚",CS:"塞尔维亚和黑山",SL:"塞拉利昂",SN:"塞内加尔",CY:"塞浦路斯",SC:"塞舌尔群岛",SA:"沙特阿拉伯",BL:"圣巴泰勒米",CX:"圣诞岛",ST:"圣多美和普林西比",SH:"圣赫勒拿",KN:"圣基茨和尼维斯",LC:"圣卢西亚",MF:"圣马丁",SM:"圣马力诺",PM:"圣皮埃尔和密克隆",VC:"圣文森特和格林纳丁斯",LK:"斯里兰卡",SK:"斯洛伐克",SI:"斯洛文尼亚",SJ:"斯瓦尔巴特和扬马延",SZ:"斯威士兰",SD:"苏丹",SR:"苏里南",SB:"所罗门群岛",SO:"索马里",TJ:"塔吉克斯坦",TW:"台湾",TH:"泰国",TZ:"坦桑尼亚",TO:"汤加",TC:"特克斯和凯科斯群岛",TA:"特里斯坦-达库尼亚群岛",TT:"特立尼达和多巴哥",TN:"突尼斯",TV:"图瓦卢",TR:"土耳其",TM:"土库曼斯坦",TK:"托克劳",WF:"瓦利斯和富图纳",VU:"瓦努阿图",GT:"危地马拉",VE:"委内瑞拉",BN:"文莱",UG:"乌干达",UA:"乌克兰",UY:"乌拉圭",UZ:"乌兹别克斯坦",GR:"希腊",ES:"西班牙",EH:"西撒哈拉",SG:"新加坡",NC:"新喀里多尼亚",NZ:"新西兰",HU:"匈牙利",EA:"休达及梅利利亚",SY:"叙利亚",JM:"牙买加",AM:"亚美尼亚",9x:"也门",IQ:"伊拉克",IR:"伊朗",IL:"以色列",IT:"意大利",IN:"印度",ID:"印度尼西亚",GB:"英国",VG:"英属维京群岛",IO:"英属印度洋领地",JO:"约旦",VN:"越南",9u:"赞比亚",JE:"泽西岛",TD:"乍得",GI:"直布罗陀",CL:"智利",CF:"中非共和国",CN:"中国",MO:"中国澳门特别行政区",HK:"中国香港特别行政区"},a}),2k.4i("5j").kC(["$LN",1a(a){"2r 2g";a.8j("3m/a6.2T",\'<1h 1f="3k-fO">

    {{7J.a1}}

    <1h 1f="3k-2A">
    {{7J.2Z}}
    <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uE.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o !== \\\'MY\\\'"> <1X 1S="1w" ng-2j="1c.7h" 1f="2h-3b" 4x="{{1N.7f}}"> <1r 1f="fa fa-5K-4T-o fa-lg 2N-jW" ng-2O="1c.7h = \\\'\\\'"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o === \\\'MY\\\'"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7H}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A" ng-3T="1c.6o === \\\'MY\\\'"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.1C }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uu.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.cv }} ****** {{ 1H.cx }} <1h 1f="1G-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.kT }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uw.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.3W }} <1h 1f="1G-bs-1o-1k-1z"> <7g 1f="3S-iL" ng-3a="{{ 1H.4v }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'"> <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uz.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7R}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H[1] }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/qe.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7V}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/7r.2T",\'<1h 1f="1w-4j tX-4j">

    {{1N.7S}}

    {{1N.7u}}

    <1h 1f="1w-4j tX-4j" ng-if="1c.4Z">

    {{1N.86}}

    \'),a.8j("3m/KL.2T",\'

    4C X-KV

    <2h 1f="2h-Lf"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">5c <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.5c"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3h <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3h"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3E <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3E"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3I <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3I"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3g <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3g"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">1T <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.1T"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3t <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3t"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3r <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3r"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2J <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2J"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3D <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3D"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2i <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2i"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">eP <1h 1f="3d-sm-8"> <1X 1S="tO" ng-2j="1c.eP"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2b <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2b"> <1h 1f="2h-1A"> <1h 1f="3d-sm-Jh-2 3d-sm-10"> <2G ng-2O="wo()">jL \'),a.8j("3m/9p.2T",\'<1h 1f="1o-1A"> <1h 1f="1o-1A-1H 3h"> <1r 1f="1y-1z">{{1N.5h}} <1r 1f="1o-1k 1V-1G">{{1c.3h}} <1h 1f="1o-1A-1H 3F 1w-4j"> <1r 1f="1y-1z 1V-1y">{{1c.3F}} <1r 1f="qY-1w">{{1c.bv}} <1h 1f="1o-1A-1H 3I"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3I" 4x="{{1N.8u}}" ng-ce="!1c.4o || 1c.jI"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jI">&6z; <1h 1f="1o-1A-1H 3t"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3t" 4x="{{1N.8i}}" ng-ce="!1c.4o || 1c.jH"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jH">&6z; <1h 1f="1o-1A-1H 3r"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3r" 4x="{{1N.8p}}" ng-ce="!1c.4o || 1c.jE"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jE">&6z; <1h 1f="1o-1A-1H 5c"> <1X 1f="1o-1k e6" 1S="1w" ng-2j="1c.5c" 4x="{{1N.7K}}" ng-ce="!1c.4o || 1c.jF"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jF">&6z; <1r 1f="1y-1z">{{1N.8d}} <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H">&6z; <1r 1f="1o-1k 1V-1G">{{1c.au}} <1h 1f="Hv-2h" ng-3T="1c.2b===\\\'4X\\\'||1c.2b===\\\'aA\\\'||1c.2b===\\\'Hw\\\'"> <1h 1f="1m-4X-4q-2h" ng-3T="1c.6a.1i>0"> <1r 1f="1m-4q-1z">{{1N.83}} <1h 1f="1o-1A-1H" ng-2O="wW()"> <1r 1f="1y-1z">{{1N.7B}} <1r 1f="1o-1k 1V-1G">&6z; <1X id="vv" 1f="1o-1k 1V-1G 4X-4q-1X" 1S="9t" ng-2j="1c.6d" 4x="jJ jJ jJ jJ" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7E}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1X id="vs" 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.5t" 4x="{{1N.89}}" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7Z}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1c.5G" 4x="vA"> <1r 1f="1y-1z">{{1N.6S}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.ci}} <1h 1f="1o-1A-1H 7h" ng-2O="t7()"> <1r 1f="1y-1z">{{1N.7f}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.7h}} <1h 1f="4X-r6"> <1r>{{1c.w1}} <1h 1f="pD-2h" ng-3T="1c.2b===\\\'cq\\\'"> <1h 1f="1o-1A-1H pD-oF-1z"> <1r 1f="1y-1z">{{1N.84}} <1h 1f="1o-1A-1H 1w-4j pD-oF"> <1r 1f="qY-1w">{{1c.oK}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7G}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 4q-3B-1X" 1S="9t" ng-2j="1c.8U" 4x="{{1N.8a}}"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">oN <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.bt" 4x="(c7)"> <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="qR()" 1f="6g-2G" ng-HP="r3()">&6z;{{1N.5D}} <1h 1f="fN"> <1h 1f="1w-4j bm-r6-8E"> <7g ng-3a="2R/rq.3C" 1f="rq"> <1h 1f="mp-pl"> <1r>V{{1c.cR}} \'),a.8j("3m/6O.2T",\'<1h 1f="1o-1A" id="6O"> <1h 1f="1o-1A-1H 1w-4j"> <7g id="6O-iL" 1f="6O-iL" ng-3a="{{ p3 }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'" ng-5i="!iQ"> <1h ng-5i="iQ">

    {{t6}}

    <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.6y}} <1r 1f="1o-1k 1V-1G">4C {{2I.3S}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.8f}} <1r 1f="1o-1k 1V-1G" ng-if="!2I.a9">{{2I.5p}} <1r 1f="1o-1k 1V-1G" ng-if="2I.a9">{{2I.a9}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.5p" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="!2I.a9"> <2k-5g ng-2j="8H.a9" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="2I.a9"> <1h 1f="1o-1A-1H" ng-3T="2I.jo.1i > 0"> <1r 1f="1y-1z">{{2I.jo}} <1r 1f="1o-1k 1V-1G">{{2I.cP}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.cP" bc-1B="bc" bc-1f="5g" bc-1S="7g"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.88}} <1r 1f="1o-1k 1V-1G">{{2I.jm}}{{2I.oT}} <1h 1f="1o-1A-1H" ng-3T="2I.ee.1i > 0"> <1r 1f="1y-1z">{{1N.6q}} <1h 1f="1o-1A">
  • {{ 1H }}
  • <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="sl()" 1f="6g-2G">{{1N.8k}} \'),a.8j("3m/pe.2T",\'<1h 1f="3k-fO">

    {{sL}}

    <1h 1f="3k-2A">

    <1h 1f="1o-1A-1H 1o-1A-1H-4G"> <1r>3e <1h 1f="3N-1A 3N-1A-4G" ng-5i="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'bX\\\'" ng-5i="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">bX <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'11\\\'">11 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'22\\\'" ng-3T="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">22 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1s\\\'">1s <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1E\\\'">1E <1h 1f="3N-1A 3N-1A-4G" ng-3T="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'kk\\\'">kk <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'9k\\\'">9k <1r>1E: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.1E}} <1r>bK: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.bK}} <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>9m <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.9m" 4x="9m"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.5p" 4x="5p"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 52 <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fH" 4x="52"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 7o <1X 1f="1o-1k 1V-1G" 1S="1w" ng-2j="1l.fS" 4x="7o"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-3T="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fm" 4x="fm"> <1h 1f="3k-b4" 2M="1w-VV: 4j"> <2G 1f="44-2G" 1S="2G" ng-2O="q4()" 2M="1n:30%; 6H-3q:#OY">{{1N.8v}} <2G 1f="44-2G" 1S="2G" ng-2O="6g()" 2M="1n:40%; 7w-1y:Qt">{{1N.5D}} \')}]);',62,3734,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|this|sdkData|var|return|class|prototype|div|length|default|value|data|new|width|list|typeof|isInternalDebugging|span|null|toString|Object|height|text|void|left|label|group|options|name|throw|Error|__esModule|right|item|for|document|call|push|mp_language|localizable|255|node|top|Math|type|mp_merchant_ID|case|pull|image|input|CryptoJS|status|||||||||||not|mp_channel|tidak||TypeError|encode|strict|form|mp_amount|model|angular|canvas|been|exports|String|else|Islands|use|setPrototypeOf|window|hasn|fontSize|substring|parent|defineProperty|css|body|replace|break|renderer|filter|mp_verification_key|button|parseInt|C5ResultData|mp_app_name|then|valid|style|search|click|sdkConstants|and|images|catch|html|svg|ctx|BERHAD|must|instanceof|errorDesc|||||||||||src|control|try|col|status_code|commErrorHandler|mp_country|mp_order_ID|object|substr|modal|console|views|create|result|controller|color|mp_bill_mobile|Saint|mp_bill_email|Invalid|BANK|new_credit_card|setAttribute|Cannot|createElement|MPdomain|number|png|mp_password|mp_username|mp_currency|maskname|100|mp_bill_name|mp_request_type|Promise|clip|position|btn|args|forEach|undefined|Kepulauan|channel|show|indexOf|128|title|dan|found|super|||||close|||||constructor|Super|__proto__|configurable|enumerable|either|expression|writable|ImageUnavailable|module|center|BCARD|mp_transaction_id|current_token|currency|mp_editing_enabled|called|card|initialised|ReferenceError|match|Billing|logo_url|BCard|placeholder|resolve|mp_encrypt_credentials|AES|MYR|MOLPay|none|country|switch|sandboxed|documentElement|html2canvas|getContext|appendChild|utils|mp_secured_verified|SandboxedResultData|animation|templateUrl|mobile|log|MALAYSIA|circle|seed|encodings|php|credit|open|mp_sandbox_mode|||amount|displayValue|textAlign|trim|fromCharCode|||email|Island|element|mp_bill_description|available_channel|proxy|max|barcode|OrderID|hide|molpayXsdkApp|token|map|round|API|line|txn_ID|xCF|size|Close|mp_credit_card_expiry|PleaseSelectAChannel|method|Utf8|repeat|borders|enc|Guinea|decrypt|BillingMobileMustBeMoreThan4Characters|Proceed|AmountNotFound|currentActiveModal|mp_credit_card_cvv|JSON|sah|SandBoxed|times|preloadCount|font|BillingNameMustBeMoreThan2Characters|scope|InvalidBillingMobile|D7ResultData|concat|split|SHA256|callNativeWebview|wastong|parseFloat|mode|index|start|||||||rootScope|105|||available_token|SecuredEncryptionFailed|nodeType|mp_credit_card_no_display|Loading|CVV|proceed|BillingDescriptionMustBeMoreThan4Characters|ownerDocument|CommunicationError|AccessDeniedMidAppnameVerificationkey|InvalidPaymentInformation|InvalidAmount|Tampered|mp_credit_card_country|NoChannelFoundCheckCurrencyValue|Note|CountryNotFound|MerchantIdNotFound|AdvancedPhoneValidationFailed|UnhandledErrorContactSupport|UsernameNotFound|internet|TransactionIdForReceiptRequestNotFound|Services|nbsp|InvalidCountryCode|VerificationKeyNotFound|InvalidBillingEmail|support|South|CurrentMsgType|OrderIdNotFound|background|AppNameNotFound|Preparing|AdvancedEmailValidationFailed|CurrencyNotFound|textMargin|mp_ga_category|receipt|dismiss|RecurringPaymentCantProceedOnThisChannel|apply|Country|nodeName|Reminder|path|Yes|PasswordNotFound|250|BillingEmailMustBeMoreThan4Characters||||colorStops||||preloadItems|url||exp|min|HttpPost|xC8|checksum|BankName|img|mp_credit_card_bank|MD5|display|test|101|important|auto|chksum|_renderProperties|bottom|finalizingpayment|marginTop|contentWindow|PleaseWait|onerror|margin|stop|pInstruction|InvalidBillingName|New|CardNumber|InvalidBCardPin|SandboxModeIsOn|ExpDate|InvalidBCardNumber|BCardPrefix|SearchBank|content|alertdata|BillingDescription|hindi|render|InvalidDebitCardNumber|InvalidExpDate|cssInt|DebitCardCheckingHasBeenSkipped|SearchCountry|FinalizingPaymentStatus|base64|before|SearchError|Nombor|InternetDisconnectedThisRequiresInternet|China|Cvv||href||NewCard|UseBCard||SandboxedModeOn||PayableAmount|MMYY|BCardNumberPlaceHolder|errors|promise|PayThrough|SandBoxedUseOptions|TransactionId|GaTrackEvent|205|BillingEmail|put|SaveImageToDevice|SandBoxedOptions|errormsg|onload|ditemukan|BillingMobile|InvalidCreditCardNumberLuhn|stack|InvalidBillingDescription|InvalidCreditCardNumber|BillingName|Cancel|InvalidCvvNumber|ditemui|thanh|stringify|Virgin|mod|mp_credit_card_no|_options|container|toLowerCase|LUHN|receiptData|240|marginLeft|RM1|join|nodecontainer|than|mp_filter|isRecurring|more|getElementById|245|139|bcard_no|6298|app|cvv|contexts|NetworkErrorSandboxedMode||opacity||MerchantID|||||||toUpperCase|characters|msgType|www|Image|subdivide|overflow|Node|ZW|drawImage|failed|format|app_code|mahanap|rectangle|paymentinfo|backgroundClip|Sandboxed|TxnData|tel|ZM|hasOwnProperty|Georgia|YE|defaultView|ang||ZA|French|YY|slice|penagihan|hasTransform|mp_channel_editing|testMerchantCredentialsCallback|allowTaint|MobileNewApiUrl|watch|_|please|230|sandbox|Receipt|SHA1|211|shift|Korea|marginRight|rgba|lebih|AlertModalCtrl|radio|origin|errorTitle|bounds|thu|reasons|Montenegro|alertmodal|the|Bank|payTxnID|Debit||parse|splice|InternalUsed|block|Samoa|Search|in_app_mode|removeChild|translate|preloadStarted||||238|opt|string|||mp_channel_title||Payment|Number||renderQueue|credit3|guardHeight|numero|Nam|device_info|expdate|Date|epay|uib|primary|message|Please|ISLAMIC|floor|uibModalInstance|Email|Republik|Advanced|parseBounds|check|Card|kartu|nextA|api|hidden|arguments|220|01010|x00|setTimeout|footer|getEncoding|x7F|Pulau|112|xtan||nextB||Sandbox||Array|cdomain|month||year|SAR|domain_mode|molpay|marginBottom|textPosition|Man|Serbia||aligned|bcard_pin||mp_amount_display|firstChild|United|CODE128|nativeWebTransactionResults|Nama|169|British|PasswordHash|Payload|Lan|Congo|ApiC5|isStarting|B4ResultData|reason|Republic|Checksum|cash|chevron|RecordType|Token|PAN|mp_bin_lock|location|json|Type|Malaysia|00|RecurringApiUrl|DirectApiUrl|bin_checked|||||multi|application|pin|YT|javascriptEnabled||CanvasRenderer|date||readonly|mga|error||mp_credit_card_country_title|end|payment|Indonesia|bcOptions|nodes||transform|pointbcard||binaryRepresentation|validation||bin|setFillStyle|bin4|gagal|loading|setVariable|password|offsetTop|nextC|x20|charCodeAt|define|offsetWidth|offsetHeight|mp_advanced_email_validation_enabled|isArray|Arab|computedStyles|async|rgb|pcode|now|sdk_version|imageTimeout|encrypt|transactionRequest|buttonClicked|mp_advanced_phone_validation_enabled|fontOptions|zIndex|removeContainer|Sandwich|Svalbard|Internet|GetAvailableChannelByIdUrl|kredit|T1Url|Jan|Anguilla|Pitcairn|Nomor||dapat|Netherlands|Wallis||Futuna|Territory|saluran||GetBankListUrl|transaksi|offline|Caicos|pembayaran|||Mayen|Aruba|Canary||tho|Garcia|Diego|Cocos|vui|Gibraltar|Guyana|Hong|Guernsey|Guadeloupe|Jersey|Cook|Melilla|B4ResultUrl|Recurring|Mariana|Norfolk|Points|Network|halaga|Faroe|Ceuta|Bhutan|Bermuda|character|digit|toFixed|ucs2|createTextNode|barcodePadding|require|children|when|link|fill|darken|bottomRightInner|bottomLeftInner|billing|topRightInner|toggle|border||normal||createRange|notes|backgroundImages|transformData|CIMB|issuer_bank|bank_country|styles||visible||toDataURL|bin_checking_in_progress|ELEMENT_NODE|UPC|lineColor|curveTo|inline|topLeftInner|rect|210|_encodings|with|x5F|fabric|xml|206|200|decode64|getBoundingClientRect|offsetBounds|amd|loaded|224|getBounds|ceil|mod10|topLeftOuter|mp_debug_mode|isPseudoElement|bottomLeftOuter|bottomRightOuter|topRightOuter|getAttribute|className|isTransparent|tainted|matrix|get||Montserrat|listgroup|marginless|randomIntFromInterval|updateSdkData|authData|Selatan|merchant_id|Basic||Sudan|Currency|SubMerchant|mp_express_mode|mp_installmonth|Cunha|ReturnURL|Signature|Tristan|Tokelau|mp_tcctype|tranID||Miquelon|Pierre|verifyChecksum|global|Puerto|Status|Palau|Nauru|Niue|Bouvet|Clipperton|Helena|Amount|Sahara|mp_preferred_token|Heard|McDonald|CustDesc|mp_cash_waittime|tampered_amount|CustContact|ReferenceNo|TxnType|144|view|row|header|bind|https|TxnChannel|tampered_chksum|TxnAmount|CustEmail|TxnCurrency|CustName|nama|yang|merchant|127|username|nilai|untuk|reject|Ghi|ready|xhr|crossOrigin|online||Andorra|some|logging|1023|fontWeight|fontFamily|cssList||lineargradientcontainer|transformMatrix|svgcontainer|143|self|222|ini|248|clone|cloneTo|moz||renderImage|computedStyle|punycode|TEXT_NODE|Trung|fixed|INPUT|isElementVisible|Phi|backgroundColor|transition|taintCtx|harus|asyncRenderer|backgroundRepeatShape|153|padding|192|karakter|gradient|160|TYPES|dari|Xan|pagsingil|Use|http|transaction|results|onrendered|timeout|device|RHB|||||Name|Mobile|Description|isDeploy||addCustomCSS|controllerAs|searchString|0px|kad|percubaan|description||Cayman|nativeWebCloseAllWindows|advancedPhoneValidate|advancedEmailValidate|wrapper_version||BANKING|factory|mp_is_escrow|uibModal|token_status|l_version|replaceAll|merchantID|mp_allowed_channels|innerHTML|RequestData|D7ARequeryRetryIntervalInMs|ApiD7|encodeURIComponent|BCARD_PIN|com|module_id|generate|mp_ga_enabled|CC_PAN|CC_CVV2|BCARD_NO|CC_TOKEN|CC_YEAR|CC_MONTH|getMaximumHeightOfEncodings|getTotalWidthOfEncodings|calculatePair|CODE39|select|guardedEncoding|flatEncoding|CODE128A|CODE128B|EAN8|EAN13|CODE128C|higit|configure|Access|209|204|218|debit|hasil|Negara|lastChar|structure|key|Unhandled||encryption||EAN5|EAN2|fillRect|tra|InvalidInputException|CANCEL|pharmacode||giao|daripada|Ralat|sila||calculateEncodingAttributes|mesti|isNaN|GenericBarcode|MSI|ITF|mangyaring|ITF14|MSI10|MSI11|codabar|MSI1110|save|MSI1010|gradientcontainer|error_message|Tuvalu|Uganda|logo|Uruguay|Tunisia|Tobago|Tonga|receiptLogoCanShow|Trinidad|Uzbekistan|Vanuatu|Antigua|Zambia|Zimbabwe|Guam|Angola|Guatemala|Venezuela|Vietnam|Falkland|Togo|Leste|Syria|Polynesia|Iran|Taiwan|Isle|Territories|Swaziland|Afghanistan|Israel|Verde|India|Haiti|Bissau|Thailand|Timor|Honduras|Kong|cur|Tanzania|pcode_lbl|Myanmar|Dominica|Bosnia||Herzegovina|Botswana|Brunei|Ivoire|Bolivia|Denmark|Benin|Exp|Bulgaria|Burkina|billinginfo|mp_bill_mobile_edit_disabled|mp_bill_description_edit_disabled|Burundi|mp_bill_email_edit_disabled|mp_bill_name_edit_disabled|xxxx|Faso|Pay|Belize|Barbados|Gambia|Saudi|Gabon|Argentina|Ghana|Barbuda|bar|Grenada|icon|Fiji|Ethiopia|Austria|Azerbaijan|Bahrain|Bangladesh|Australia|Salvador|Estonia|Armenia|Eritrea|Lanka|Albania|Papua|Nigeria|Kinshasa|Oman||union|Afrika|||Pakistan|accepted|Rwanda|Rico|Martinique||Marshall|Solomon|Kitts|Kiribati|Caledonia|Qatar|Kuwait|Panama|Malawi|Liechtenstein|Paraguay|Ascension|Peru|run|Liberia|Lesotho|Malta|Christmas|Laos|Latvia|Outlying|Mali|Nevis|Turks|Seychelles|Mauritius|Niger|Mauritania|Sri|Somalia|debit_credit|Senegal|Lucia|Namibia|Mayotte|Nepal|Marino|Mongolia|Slovenia|Vincent|Martin|Slovakia|Moldova|San|Amerika|Grenadines|Kenya||simulated|canggih|middle|Chad|lemy||Barth||anchor|fillStyle|pagbabayad|Palestinian|renderBackgroundRepeat|phone|restore|afterRender|paglalarawan|Romania|Poland||Belanda|CLOSE|available_banklist|createElementNS|Save|removeContentType|atau|Switzerland|parseBackgrounds|linear|smallImage|Algeria|Sweden|createCanvas|Tidak|suriin|LINEAR|122|Vatican|Kingdom|176|bytes|Gunakan|Turkmenistan|supported|Ukraine|_errorHandler|cek|mod11|rangeBounds|nomor|silahkan|wrapBarcodeCall|hasAttribute|getParentStack|HTMLCanvasElement|jsbarcode|Kesalahan|RRRRRR|208|jQuery||NoElementException|hasFabric|complete|The|flat|getStructure|isInline||InvalidElementException|aksara|Suriname|all|process|||Data|urlencoded||BinLockCheck|Leone|Principe|Tome|Transaction||Baru|Sierra|Content|Accept|ApiT1|Inggris|ApiGetAvailableChannelById|Mod|PaymentRecordsLogUrl|Maklumat|Carian|request|headers|POST|Tajikistan|IsDebitCardUrl|Sao|through|RecurringResultData|D7A|DirectApiHandler|Perancis|SandboxedHandler|nativeWebOpenMOLPayWindow|RequestURL|OnApiResponseReceived|Initiate|GetAvailableChannelByIdHandler|T1Handler|GetBankListHandler|ApiD7A|D7ARequeryCurrentAccumulatedRetryInMs|ApiHandlerService|isBelowAndroid44|ErrorlistModalCtrl|ExpiredDate|Aland||Utara|error_code|Lebanon|D7ARequeryActiveNow|unknown||||SandboxedModalCtrl|code|xdk|MPDomainID|mp_dev_mode||MPSecondaryDomain|closemolpay|molpayResultString|MPSandboxDomain|inAppCallback||PaymentInfoCtrl|000000|bank|points|webview_url_prefix|requestPath|mp_custom_css_url|1e4|Android|Communication|connection|pangalan|naka|setCaretPosition|availability|mp_is_recurring|checking|expressProceeded|isLoading|monospace|ffffff|HSBC|MALAYAN|telefon|variables|USD|Secured|random|mp_ga_userid|MOLPayPayment|localStorage|pastExpressMode|Not|MOLPoints|MOLWallet|Pagsingil|Order|pInstructionCaptureData|scrollTo|PROCEED|AuthenticationService|deviceDetector|Thanh|dismissAll|cao|uuid4||Z0|01|Czech|Anh|getPseudoElement|Dominican|130|||216|Ecuador||after|createStyles|loadImage|webkit|decode|addImage|parseBackgroundImages|paintText|TEXTAREA|Equatorial|IFRAME|Southern|135|point|147|paint|Greenland|Guiana|bcard_point|SELECT|180|Pin|Union|235|Finland|isSVG|renderBorders|payable_amt|colors|bottomRight|visibility|bottomLeft|createHTMLDocument|REGEXP_COLORSTOP|prefixedCss|parseTransformMatrix|Cuba|toplogourl|lineWidth|baseline|topRight|topLeft|write|curveToReversed|PSEUDO_HIDE_ELEMENT_CLASS_AFTER|PSEUDO_HIDE_ELEMENT_CLASS_BEFORE|getHideClass|renderIndex|sandboxedmodal|isSameOrigin|getOrigin|||parentNode|cleanDOM|version|querySelector|loadUrlDocument||Croatia|appendToDOM|absolute|Norway|140||Monaco|Libya||Micronesia|Colombia|Lithuania|Ocean|Kyrgyzstan|bcard|Antilles|Zealand|Kazakhstan|Minor|basic|Indian|Brazil|Belarus|Belgium|Bahamas|American|Comoros|sortStackingContexts|Oceania|Macau|Hoa|Macedonia|shape|Xin|Nicaragua|Cape|Ireland|Jordan|getChildren|len|Northern|cancel|Iraq|173|Iceland|newStackingContext|228|range|getOpacity|Keeling|165|errorlistmodal|107|170|cloneNode|replaceChild|stacking|ApiGetBankList|BHD|ApiDirect|calculateOverflowClips|VcodeHash|Yaman|SignatureHash|parseClip|table|bill_email||CHARTERED|ApiB3|STANDARD|Turki|app_name|bill_mobile|SDN|bill_name|orderid|bezierCurve|PUBLIC|Uni|SCRIPT|RAJHI|err_desc|paydate|1e3|pay|expired_at|getElementsByTagName|mpUserId|childNodes|proceedClicked|1111|getHours|tagName|9999999|1e6|1e5|larger|DEBIT|fetch|2112|getChannelNameFromChannelMaskname|proceedDisabled|uid|NASIONAL|disclaimer|createPseudoHideStyles|disableAnimations|Yunani||PreloadData|MAYBANK|createStackingContexts|SIMPANAN|MUAMALAT|CREDIT|statusText||aid|411111|getPseudoElements|1001|ZH|GET|1234345656787890|poweredByMOLPay|SDK|188|102||Tengah|225|Dominika|221|133|196|152|D7ARequeryMaxThresholdInMs|219|onReasonListClicked|Rusia|pageXOffset|innerHeight|pageYOffset|onclone|rendering|innerWidth|154|onErrorListClicked|Barat|191|179|136|119|outerHTML|scrollTop|script|_scrollTop|Nugini|nativeWebOpenBankWindow|invalid|65536|55296|mp_transaction_request_type|56320|scrollLeft|_scrollLeft|namedColor|184|215|178||hex6|DirectApiResultData|nextSibling|fromArray|TxnID|hex3|scrollWidth|clientWidth|REGEXP_DIRECTION|webkitgradientcontainer|capture||cssFloat|contain|svgnodecontainer|proxyimagecontainer|dummyimagecontainer|Authorization|framecontainer|imagecontainer|IsDebitCardCheck|MATRIX_PROPERTY|ChecksumForC5|ApiB4|TEXT_SHADOW_VALUES|CLIP|ChecksumForD7|Prancis|matrix3d|TEXT_SHADOW_PROPERTY|ChecksumForD7A|order_ID|clearTimeout|Finished|Desc|verticalAlign|Title|proxyLoad|core|DummyImageContainer|renderers|scrollHeight|clientHeight|imageloader|nodeparser|hasImageBackground|Singapura|Version|OCBC|findImages|getPromise|Boolean|findBackgroundImage|imageExists|ApiRecurring|mp_bin_lock_err_msg|reduce|LogoReplacementText|onBanklistClicked|01001|11000||10001|00110|LLLLLL||00000000|00101|||10100|00011|10010|reverse|onItemSelected||01100|renderBackgroundRepeating||endBin|parseBackgroundPosition||xCD|parseBackgroundRepeat|JsBarcode|blank|xCE|203|startBin|middleBin|1011|xD3|parseBackgroundSize|1010|11101|insertBefore|drawCanvasText|drawCanvasBarcode|paddingLeft|paddingTop|prepareCanvas|checkbox|ProxyURL|head|base|Proxy|moveCanvasDrawing|fillText|does|paddingRight|vertical|getEncodings|000|111|renderBackgroundImage|_defaults|renderBorder|renderBackground|paddingBottom|SVGElement|renderBackgroundColor|handleCatch|99999|getBarcodePadding|inlineFormatting|shadowColor|testSVG|testCORS|testRangeBounds|123|clearShadow||lowerCanvasEl|beginPath|applyTextTransform|closePath|atob|fontShadow||cors|countryArray|onBankSelected|onChannelSelected|cardlistmodal|onCardSelected|channelmodal|renderBackgroundGradient||countrylistmodal|ownStacking|setOpacity|resizeImage|setTransform|banklistmodal|onCountrySelected|offsetParent|182|400|212|232|142|158|circleStroke|104|isColor|getEncodingHeight|symbology|106|103|134|drawShape|XMLHttpRequest|Lbinary|taints|RADIAL|offsetLeft|getImageData|Gbinary|124|244|164|110|Rbinary|restoreCanvas|back||DEDEDE|paintRadio|A5A5A5||checked|424242|iphone||bold|paintCheckbox|CANVAS|IMG|naturalHeight|naturalWidth|ReceiptCtrl|paintFormValue|getValue|expinput|maybankSuccessString|Production|ccinput|mp_is_secure|cimbAcknowledgeString|hlbCompletedString|html2canvaswrapper|xxx|extend|lineHeight|closeAll|getChannelLogoFromChannelName|getChannelTitleNameFromChannelName|Online|isRootElement|Affin|RMB|Cash|Alipay|isBodyWithTransparentRoot|Credit|ALLIANCE|HONG|AFFIN|IDR|assignStack|Point|splitText|nativeWebPInstructionCapture|paintNode|onCountrylistClicked|parseTransform|paintElement|uibModalStack|credit_disclaimer|getWrapperBounds||ONL|Clicks|FPX|getRangeBounds|userAgent|coreVersion|bcClass|bcType|xmlns|setSvgAttributes|onChannelListClicked|parseBackgroundClip|isBlack|inset|timeoutHttpIntercept|luhn|restrict|directive|keys|box|onPayClicked|org|2000|DOMParser|SVGRenderer|falling|textcontainer|stackingcontext|drawSVGText|fontmetrics|drawSvgBarcode|prepareSVG|pseudoelementcontainer|RegExp|parseBorders|loadingAllDone|offsetY|blur|parseTextBounds|use_direct_api|Chile|onBillingInfoChanged|add|parseTextShadows|checkIfThisIsAValidCountryCode|isString|offsetX|isNumber|fontMetrics|provided|GetAvailableChannelById|textDecoration|recordsLog|MPMainDomain|onCardNumberClicked|GetBankList|IsDebitCard|renderTextDecoration|||getMetrics|seamlesspayment|chips|mobile_new|LEONG|collapse|seluler|tunggu||Mozambik|Yemen|adalah|pencarian|Pangalan|natagpuan|Cile||ito|Nabigo|pagpapatunay|Pilihan||mengkonfigurasi|ditolak|Akses|silakan|aplikasi||ada|Turkey|Komunikasi|Western|Mohon|City|proses|Emirates|pag|transaksyon|Bayaran|periksa|Pengesahan|pengesahan|watak|Tiada|rangkaian|Kad|can|Mata|Memuatkan|Tarikh|bil|mel|bansa|qua|Hindi|Gamitin|resulta|thi|gia|Bil|||bimbit|Filipina|Jumlah|mata|permintaan|CHND|khu|Niu|Cyprus|san|tan|States|Djibouti|Egypt|Sint|Antarctica|land|Nha|Thu|Cameroon|Cambodia|Canada|Central|African|FIL|Brazzaville|goay|Tri|Rica|Costa|gan|European|France|Portugal|ponsel|jumlah|North|Mozambique|deskripsi|validasi|hubungi|Africa|Singapore|Arabia|pada|Morocco|Unidos|Jamaica|Japan|Hungary|Greece|Germany|Luxembourg|Madagascar|Estados|Mga|Mexico|Maldives|contact|Peringatan|CardlistModalCtrl|Rika|disconnected|CountrylistModalCtrl|BanklistModalCtrl|Meksiko|ChannelModalCtrl|updateBCardPoints|Finalizing|information|Jerman|denied|Kongo|C5Handler|Kosta|Mesir|Payable|requires|skipped|has|that|informed|Jamaika|Last|will|are|take|Kamerun|Kanada|place||Madagaskar|FinalizingPaymentCtrl|RecurringHandler|B4Handler|D7Handler||D7AHandler|wait|B3Handler|below|Serikat|verification|960|954|502|740|506|644|512|518|886|692|5379|680|668|966|akan|118|310|Malvinas|940|956|266|608|268|938|758|bawah|berlangsung|974|604|782|638|simulasi|dirusak|1110010|Cleaned|measureText|false||1100110|1101100|Kamboja|dilewati||telah|was|getModule|cloned|removeAttribute|0010111|0001001|encoding|InvalidStartCharacterException|x7E|Initiating|1010000|1000100|1001000||||||opsi||1110100|1001110|||||NodeContainer||||||Resulting|||Cropping||1000010|1011100|moa||crop|508|Kazakstan|496|478|764||Kecil|422|570|464|semua|910|774||880|762|768|678|582|576|672|842|752|734|844||892|836|830|902|590|||about||||||||Terluar|||||652|||||416|||304|||URL|862|614|diperhatikan|Hidden|||Irlandia|412|436||secara|424|554|616|Kayman|572||340|146|978|556|Text|bahwa|818|914|650||890|896||814|628|602|254|Pemeriksaan||292|||328|||||484|||||||260|||930|||||||868|terputus|LLLLL|RRRRR|springgreen|Catatan|Menyimpan|||gambar|RRRR|perangkat|steelblue|snow|10101010101010101010101010101010101010101|kesalahan|cari|Terakhir||Menyelesaikan|Modus|slategrey|hutang|Jasa|Mempersiapkan|LLLL|GLGLL|GLLGL|GLLLG|GGLLL|teal|000000000000|00000|thistle|LGGLL|LLGGL|informasi|Xao|Pemuatan|Penagihan||LLGLG||LLLGG|LGLGL|||LGLLG||Antilla||slategray|1101101101|101100110011|1011001001|1101101011|1101011011|110100101|101001101|101100101|1010010011||1001001011|114|salmon|saddlebrown|sandybrown|seagreen|1010011001|sienna|seashell|100110101|100101101|tanggal|nih|skyblue|kadaluarsa|Prin|poin|Selandia|slateblue|silver|charAt||101101001||110101001|100101011|110010101|101001011|BottomLeft|101010011|101011001|LGGLGL|LGLGGL|turquoise|tomato|20957||violet||mod43||white|||Deskripsi|wheat|29783|23639|29789||23645|29975|20855|||||23669|30485|20951|29813|whitesmoke|yellow|containing|0010001|Andora|xen|Vin|Document|ketersediaan|membutuhkan|each|returns|used|din|yellowgreen|tarikh|Antarktika|Mode|deprecated|Jaringan|23831|30533|18269|17477|17489|29021|17783|17879|29045|18293|17681|20753|LGGLLG|LGGGLL|LGLGLG|LGLLGG|LLGGGL|35770|LLGLGG|LLGGLG|29141|18263|23837|22301|30023||||29981||21623||22295|30149||24005|23879|30545|23921|22385|29015|30065|21959|22343|30161|24017|init|0010011|nanh|ren|underline|xni|xoa||fontVariant|xin|Bra|lip|overline|off|Style||Color|Left|Bottom|Turk|Top|Right|fontStyle|Bru||wordWrap|Parse||Exception|whiteSpace|boxSizing|borderTopStyle|borderLeftWidth|||borderTopWidth|||||||caught|renderFormValue||||letterRendering|||||||Bun||action||Pha|Starting|cvc|textContent|gian|bai|parseFromString|Kesatuan|implementation|callback|html2canvas_||configured|textShadow|delete|Otoritas|Kemboja|Feringgi|Bersatu|Emiriah|Hungari|host|Jibouti|Jepun|Itali||withCredentials|transformOrigin|Tadjikistan|Surinam|Leon|RequestMethod|creditcard|crossborder|Width||hen|Siera|Sepanyol|Lubnan|Kibris|Eropah|Luksembourg|Maghribi|Terpencil||Maldiv||borderLeftStyle|||trung|disabled|alt||html2canvaspseudoelement|||Palestine|endControl|spinner|ten|Lich|startControl|pan|Hung|mai|Guy|sqrt|ran|Nga|goa|xra|spin|Minh|TopRight||TopLeft|letterSpacing|BottomRight|float|Radius|relative|static|HEAD|TITLE|lay|xca|bua|u00ff|u0000|OBJECT|OPTION|Gru|Goa|Loan|clips|Dim|Sinh|YYYY|Somoa||||fetching|Start|arial|Calculate|Chi|Campuchia|||||NodeParser|||||visibile|xta|total|Fetched|Luar|Macao|Gha|queue|Render|xao|created|BODY|items|sort|man|Sorting|starting|Images|Oseania|parsing|Creating|setStart|setEnd|offset|backgroundRepeat|race|searching|XMLSerializer|Timed|out|renderAll|NoChannels|uang|serializeToString|parseSVGDocument|lowercase|capitalize|uppercase|textTransform|Succesfully|Komoros|Failed|verifikasi|groupSVGElements|util|selectNode||dukungan|Tertangani|123px|boundtest|Berulang|dijamin|enkripsi||loadSVGFromString|||Nikaragua|StaticCanvas|setWidth|setHeight|tanda|terima|cannot|Rumania|tombol|gif|0111101|0100011|0110001|royalblue|0011001|anonymous|angularBarcode|0001101|0101111|0111011||0100001|0011101|0111001|0011011|0110011|0110111|||0001011|0100111|send|responseText|port|hostname|Kolombia|crai|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|R0lGODlhAQABAIAAAAAAAP|yH5BAEAAAAALAAAAAABAAEAAAIBRAA7|Tuy|protocol|submit|useCORS|Added|koneksi|Barthelemy|Kirgistan|PEXPLUS|prefix||Norwegia||||Ban|Burma|main|||Italy||Philippines||Russia|backgroundImage|Tom|Platform||401|||Cura|Unknown|Espanya|textBaseline|getComputedStyle|bia|Saba|Eustatius|Bonaire|ncipe|backgroundSize|Aljazair|Spain|backgroundPosition|Syarikat|horizontal|Anonymous|Cad||xdkform|Quiana|Maarten|___html2canvas___pseudoelement_before|cover|___html2canvas___pseudoelement_after|Palestina|AFTER|PSEUDO_HIDE_ELEMENT_CLASS_|BEFORE|Initialized||Maladewa|Kroasia|Russian|createPattern|Tagihan||||Kuba|Libia|globalAlpha||Pilipinas||Federation|||createLinearGradient|templateCache|melanjutkan|Function|addColorStop||||||Ceko|ignore||selectedIndex|Lituania|Luksemburg|Makau|Italya|Polandia|stroke|strokeStyle|arc|Tan|Makedonia||Polinesia|Malayong|shadowOffsetX|shadowBlur|Riko|shadowOffsetY|Portugis||moveTo|bahagi|0000101|iya|transparent|INR|THB|PHP|GBP|EUR|Chu|aliceblue|SGD|HKD|AUD|Jepang|INVESTMENT||CORPORATION|||||||SERVICE|AEON|||||||||||||||||JPY|VND|nam|GoInterpay|antiquewhite|EPG|Spanyol|ghi|affin|beige||alipay|Truy|TWD|tuy|epg||||minAmt|Public|aqua|publicbank|FPX_PBB||aquamarine|Ghim|azure|tin|AMBANK|AMISLAMIC|SYNERGY|CARDS|nombor|UNITED|SAADIQ||Finlandia||scrollX||||scrollY||navigator|OVERSEAS||pengebilan|UOB|||iPad||5234646534754347|iPhone||AGRO|iPod|Italia|Huraian||AMIN|HOUSE|CITIBANK|DINERS|CLUB|AGROBANK|PERTANIAN|ISLAM|KERJASAMA|RAKYAT|AMANAH|Vui|CHINA|KUWAIT|FINANCE|DOCTYPE|COMMERCIAL|adoptNode|INDUSTRIAL|AND|bisque|paymentasia|getPInstructionCapture|cornsilk|pamamagitan|237|Mangyaring|crimson|darkcyan|darkblue|cyan|149|cornflowerblue|coral|chocolate|chartreuse|PIN|filename|jpg|base64ImageUrlData|Magbayad||ISARA|darkgoldenrod|darkorchid|darkorange||darkolivegreen|||darkred|darksalmon|Numero|150|233|bagong|darkmagenta|darkgrey|darkgreen|darkgray|999|Ekuador|183|189|darkkhaki|cadetblue|httpParamSerializer|711|Eleven|blue|AMB|minh||blueviolet|Now|rhb|Petronas|W2W|AmOnline||black|ASIA|CNY|webcash|Webcash|amb|blanchedalmond|WEBCASH|cho||cimb|ngnh|fpx|FPX_BIMB|TPA|Paymex|burlywood|brown||ALB|Islam|bankislam||||||Leong|||||hlb|138|HLB||||226|MB2u||Maybank2u||maybank2u|401288|1881|Samudra|65535|Wilayah|Emel|Hindia|luput|niaga|urus|Masalah|Proses|Vatikan|Emirat|Ukraina|Transaksi|Nota|Eropa|64512|Imej|Simpan|memerlukan|Swiss|1002|1003|HttpGet|segala|Grinlandia|dalam|10px||msg|luar|Mikronesia|Dimaklumkan|Yordania||Monako|diabaikan|Diaktifkan|Percubaan|dibawah|pilihan|ApiRecordsLog|Perkhidmatan|aktif|Bayar|Bimbit|Telefon|Pesanan||Melalui|Pilih|Saluran|bank_name|cardnumber|Khatulistiwa|Kutub|BIN|Tanjung|Irak|Raya|Islandia|find|Hungaria|Teritori|cash_waittime|Pembayaran|penggunaan|Luput|56319|bill_desc|Awalan|Turkimenistan|Sila|terakhir|RangeError|MODULE_NOT_FOUND|tcctype|Teruskan||installmonth|Tutup|is_escrow|vcode|Kredit|Batal|Params|lastIndexOf|order_id|penerimaan|available||wang|copy|M00008|nodeValue|from|dijumpai|Unable|setHours|getMinutes||getSeconds|Swedia|getDate|getFullYear|putImageData|getTime|getMonth||Antartica|||island|boleh||10000px||berulang||meneruskan|scrolling|1808|clearInterval|setInterval|iframe|men|999999|dikendali|tak|sokongan|incorrect|ApiGenBarcode|Acsencion|Penyulitan|kekunci|9999|needs|Overflow|tiada|uFF61|wider|event|cid|integers|sebenar|Offline|talian|analytics|2147483647|collect|google||700|uFF0E|u3002|x2E|berlaku|Illegal||||||pengguna||||||||||toUnicode|1000px||||kata||laluan||||Verification||Code|saudagar|toASCII|sambungan|semak|setItem|Digodam|0x80|getItem|CommError|tid|29894240|darkseagreen|pumili|ngTouch|||lightsalmon|193|ngSanitize|ngRoute|lightskyblue||Xri|lightseagreen||bootstrap|creditCardInput||resibo|lightpink|change|kahilingan|phonenumber||injector|||leodido||||cwill747|||||||lightslategray|append||limegreen||lime|||lightyellow|linen||suporta|magenta|ven|viewBox|ngInject|ngModel|viewValue|lightslategrey|remove|Xoa|lightsteelblue|template|ugnay|makipag|config|routeProvider|onlinepayment|252|secure|lemonchiffon|isValidNumberForRegion|Walang|lightblue|phoneUtils|lawngreen|verify|khaki|lugar|magdadala|lavender|lavenderblush|Siprus|tinanggihan|napakialaman||lightcoral||exec|interceptors|para|cssInjector|redirectTo||otherwise|httpProvider|lightgrey|lightgreen|darkslateblue||FastClick|lightgoldenrodyellow|lightcyan|pera|lightgray||selectionEnd|attach|selectionStart|Ligtas|maroon|||palegoldenrod|214|TUTUP|MEMBATALKAN|baru|251|131070|palegreen|orchid|MEMPROSES||tagihan|querySelectorAll|orange|membayar|melalui|orangered|pilih||HTMLImageElement|11100|paleturquoise|powderblue|plum|pink|purple|rebeccapurple|sen|rosybrown|red|Maroko|peru|papayawhip|palevioletred|175|239||213||185||peachpuff||pemesanan||olivedrab|mediumslateblue|113|mediumseagreen||mediumspringgreen|Kaledonia|199|mediumvioletred|mediumturquoise|mediumpurple||align|mediumaquamarine|Umuulit|nabigo|mediumblue|mediumorchid|magpatuloy|maaaring|186|midnightblue|mintcream|clearRect|Bahama|optionsUse|advanced|oldlace|olive|253|browser|navy|EXP|Brasil|moccasin|mistyrose|181|navajowhite|Belarusia|Belgia|proseso|route|petsa|Tinatapos|upang|honeydew|convertSafeBase64StringBackToOriginalVersion|Tandaan|dimgrey|ibaba|grey|testMerchantCredentials|SALS|katayuan|opsyon|moveToElementText|createTextRange|darkturquoise||setEndOfContent|Huling|lahat|Jibuti|Paghahanap|hotpink|addRange|selection|removeAllRanges|getSelection|selectNodeContents|pagpipilian||darkviolet|gainsboro|gold|lamang|Mangyari|transaksiyon|raw|pagkakakonekta|maghintay|deepskyblue|deeppink|148|pagkakamali|nangangailangan|GenBarcodeHandler|greenyellow|reload||getChannelMasknameFromChannelName|paalaala|dimgray|forestgreen|fuchsia|gray|goldenrod||Cina|malampasan||green|ghostwhite|indianred|transactionRequestWithTransactionId|pagkarga|00000000000|aparato|nativeWebClosePopupAndRunScriptOnMOLPayWindow||mpclosepopupandrunscriptonmolpaywindow|nativeWebRunScriptOnPopup|indigo|mppinstructioncapture|label_loading|mprunscriptonpopup|transactionRequestWithOrderId|imahe|firebrick|mababayarang|walang|closemodal|ivory|mpopenbankwindow|nota|Cote|Serbisyo|mpcloseallwindows|mpopenmolpaywindow|m2uTicketsPaymentConfirmed|mptransactionresults|setCountries|Countries|getDeviceInfo|mp_url_scheme|nativeWebRequestUrlUpdates|impormasyon|mp_authData|label_preparing|label_pleasewait|floralwhite|is_submodule|darkslategrey|500|MainCtrl|ePayment_acknowledge|logout|rib|Unavailable|darkslategray|dodgerblue||enableInAppMode|bangko|simulate'.split('|'),0,{})) diff --git a/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js b/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js index 1289dbf..f461469 100644 --- a/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js +++ b/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js @@ -43,12 +43,12 @@ module.exports.metadata = // TOP OF METADATA { "cordova-plugin-whitelist": "1.3.2", - "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-inappbrowser": "1.7.1", "cordova-plugin-privacyscreen": "0.3.1", "cordova-save-image-gallery": "0.0.26", "cordova-plugin-x-toast": "2.6.0", "cordova-plugin-android-permissions": "0.10.0", - "molpay-mobile-xdk-cordova": "3.11.0" + "molpay-mobile-xdk-cordova": "3.12.0" }; // BOTTOM OF METADATA }); \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/js/index.js b/MOLPayXDKExample/platforms/ios/www/js/index.js index 4476fb7..771a8e0 100644 --- a/MOLPayXDKExample/platforms/ios/www/js/index.js +++ b/MOLPayXDKExample/platforms/ios/www/js/index.js @@ -46,7 +46,9 @@ var app = { // 'mp_bill_name_edit_disabled': true, // Optional, explicitly force disable billing name edit. // 'mp_bill_email_edit_disabled': true, // Optional, explicitly force disable billing email edit. // 'mp_bill_mobile_edit_disabled': true, // Optional, explicitly force disable billing mobile edit. - // 'mp_bill_description_edit_disabled': true // Optional, explicitly force disable billing description edit. + // 'mp_bill_description_edit_disabled': true, // Optional, explicitly force disable billing description edit. + // 'mp_language': 'EN', // Optional, EN, MS, VI, TH, FIL, MY, KM, ID, ZH. + // 'mp_dev_mode': false // Optional, enable for online sandbox testing. }; var molpayCallback = function (transactionResult) { diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html index e06c9e0..c10252a 100644 --- a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html +++ b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html @@ -1 +1 @@ -

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file +

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js new file mode 100644 index 0000000..f2c601e --- /dev/null +++ b/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.69e44cc3.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('!1a(a){if("3i"==1p 2n&&"3Q"!=1p 4i)4i.2n=a();2p if("1a"==1p cG&&cG.eI)cG([],a);2p{1d b;"3Q"!=1p 2t?b=2t:"3Q"!=1p fr?b=fr:"3Q"!=1p gn&&(b=gn),b.4I=a()}}(1a(){1d a;1e 1a b(a,c,d){1a e(g,h){if(!c[g]){if(!a[g]){1d i="1a"==1p dY&&dY;if(!h&&i)1e i(g,!0);if(f)1e f(g,!0);1d j=1m 1E("3y R1 4i \'"+g+"\'");1D j.nk="Rf",j}1d k=c[g]={2n:{}};a[g][0].1K(k.2n,1a(b){1d c=a[g][1][b];1e e(c?c:b)},k,k.2n,b,a,c,d)}1e c[g].2n}1I(1d f="1a"==1p dY&&dY,g=0;ge;)b=a.cF(e++),b>=s1&&R8>=b&&f>e?(c=a.cF(e++),s3==(Qi&c)?d.1L(((ge&b)<<10)+(ge&c)+s0):(d.1L(b),e--)):d.1L(b);1e d}1a j(a){1e g(a,1a(a){1d b="";1e a>Q3&&(a-=s0,b+=L(a>>>10&ge|s1),a=s3|ge&a),b+=L(a)}).8L("")}1a k(a){1e 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}1a l(a,b){1e a+22+75*(26>a)-((0!=b)<<5)}1a m(a,b,c){1d d=0;1I(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);1e K(d+(J+1)*a/(a+A))}1a n(a){1d b,c,d,e,g,h,i,l,n,o,p=[],q=a.1i,r=0,s=D,t=C;1I(c=a.Rq(E),0>c&&(c=0),d=0;c>d;++d)a.cF(d)>=3V&&f("2a-pI"),p.1L(a.cF(d));1I(e=c>0?c+1:0;q>e;){1I(g=r,h=1,i=x;e>=q&&f("rZ-1X"),l=k(a.cF(e++)),(l>=x||l>K((w-r)/h))&&f("9g"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("9g"),h*=o;b=p.1i+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("9g"),s+=K(r/b),r%=b,p.ad(r++,0,s)}1e j(p)}1a o(a){1d b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];1I(a=i(a),q=a.1i,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],3V>p&&u.1L(L(p));1I(d=e=u.1i,e&&u.1L(E);q>d;){1I(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);1I(r=d+1,j-b>K((w-c)/r)&&f("9g"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("9g"),p==b){1I(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.1L(L(l(o+t%s,0))),k=K(t/s);u.1L(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}1e u.8L("")}1a p(a){1e h(a,1a(a){1e F.7k(a)?n(a.9E(4).8F()):a})}1a q(a){1e h(a,1a(a){1e G.7k(a)?"xn--"+o(a):a})}1d r="3i"==1p d&&d,s="3i"==1p c&&c&&c.2n==r&&c,t="3i"==1p b&&b;(t.fr===t||t.2t===t)&&(e=t);1d u,v,w=Sq,x=36,y=1,z=26,A=38,B=Su,C=72,D=3V,E="-",F=/^xn--/,G=/[^ -~]/,H=/\\Sx|\\Sw|\\Sv|\\Sh/g,I={9g:"Sf: 1X Se Si Sl to mn","2a-pI":"Sz 1X >= T9 (2a a pI nk oF)","rZ-1X":"3u 1X"},J=x-y,K=1R.aN,L=2o.56;if(u={pl:"1.2.4",dV:{ow:i,2f:j},ow:n,2f:o,T4:q,SP:p},"1a"==1p a&&"3i"==1p a.eI&&a.eI)a("gx",1a(){1e u});2p if(r&&!r.6c)if(s)s.2n=u;2p 1I(v in u)u.9v(v)&&(r[v]=u[v]);2p e.gx=u}(1b)}).1K(1b,"3Q"!=1p fr?fr:"3Q"!=1p gn?gn:"3Q"!=1p 2t?2t:{})},{}],2:[1a(a,b,c){1a d(a,b,c){!a.9y||b===a.9y.rG&&c===a.9y.rI||a.9y.o7(b,c)}1a e(a,b){3c{b&&(b.1n=a.1n,b.1v=a.1v,b.4J("2d").RJ(a.4J("2d").v1(0,0,a.1n,a.1v),0,0))}2S(c){h("RB to Rw 2l 7I Rz",a,c)}}1a f(a,b){1I(1d c=3===a.6c?1J.dW(a.Ry):a.qh(!1),d=a.bw;d;)(b===!0||1!==d.6c||"qH"!==d.6T)&&c.4K(f(d,b)),d=d.sd;1e 1===a.6c&&(c.rW=a.rU,c.s5=a.s4,"vl"===a.6T?e(a,c):("oA"===a.6T||"oL"===a.6T)&&(c.1k=a.1k)),c}1a g(a){if(1===a.6c){a.rU=a.rW,a.s4=a.s5;1I(1d b=a.bw;b;)g(b),b=b.sd}}1d h=a("./4R");b.2n=1a(a,b,c,e,h,i,j){1d k=f(a.4H,h.c9),l=b.3z("S2");1e l.eV="4I-8E",l.2M.oW="aY",l.2M.3M="gA",l.2M.1y="-RT",l.2M.1Q="he",l.2M.e9="0",l.1n=c,l.1v=e,l.RY="no",b.2A.4K(l),1m 3K(1a(b){1d c=l.7t.1J;l.7t.8n=l.8n=1a(){1d a=S1(1a(){c.2A.qQ.1i>0&&(g(c.4H),S0(a),"fM"===h.1S&&(l.7t.o7(i,j),!/(NQ|NT|NW)/g.7k(NJ.w8)||l.7t.NH===j&&l.7t.ND===i||(c.4H.2M.1Q=-j+"px",c.4H.2M.1y=-i+"px",c.4H.2M.3M="pr")),b(l))},50)},c.4Y(),c.p8("<2T>"),d(a,i,j),c.qi(c.Oh(k),c.4H),c.44()})}},{"./4R":13}],3:[1a(a,b,c){1a d(a){1b.r=0,1b.g=0,1b.b=0,1b.a=1s;1b.se(a)||1b.s6(a)||1b.cO(a)||1b.9W(a)||1b.sb(a)||1b.sg(a)}d.1g.e3=1a(a){1d b=1-a;1e 1m d([1R.5m(1b.r*b),1R.5m(1b.g*b),1R.5m(1b.b*b),1b.a])},d.1g.eW=1a(){1e 0===1b.a},d.1g.wg=1a(){1e 0===1b.r&&0===1b.g&&0===1b.b},d.1g.se=1a(a){1e bf.cK(a)&&(1b.r=1R.7b(a[0],1O),1b.g=1R.7b(a[1],1O),1b.b=1R.7b(a[2],1O),a.1i>3&&(1b.a=a[3])),bf.cK(a)};1d e=/^#([a-f0-9]{3})$/i;d.1g.sg=1a(a){1d b=1s;1e 1s!==(b=a.4t(e))&&(1b.r=2H(b[1][0]+b[1][0],16),1b.g=2H(b[1][1]+b[1][1],16),1b.b=2H(b[1][2]+b[1][2],16)),1s!==b};1d f=/^#([a-f0-9]{6})$/i;d.1g.sb=1a(a){1d b=1s;1e 1s!==(b=a.4t(f))&&(1b.r=2H(b[1].2w(0,2),16),1b.g=2H(b[1].2w(2,4),16),1b.b=2H(b[1].2w(4,6),16)),1s!==b};1d g=/^cO\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;d.1g.cO=1a(a){1d b=1s;1e 1s!==(b=a.4t(g))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3])),1s!==b};1d h=/^9W\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d?\\.?\\d+)\\s*\\)$/;d.1g.9W=1a(a){1d b=1s;1e 1s!==(b=a.4t(h))&&(1b.r=ax(b[1]),1b.g=ax(b[2]),1b.b=ax(b[3]),1b.a=ax(b[4])),1s!==b},d.1g.1t=1a(){1e 1s!==1b.a&&1!==1b.a?"9W("+[1b.r,1b.g,1b.b,1b.a].8L(",")+")":"cO("+[1b.r,1b.g,1b.b].8L(",")+")"},d.1g.s6=1a(a){a=a.8F();1d b=i[a];if(b)1b.r=b[0],1b.g=b[1],1b.b=b[2];2p if("Mn"===a)1e 1b.r=1b.g=1b.b=1b.a=0,!0;1e!!b},d.1g.uP=!0;1d i={Mu:[8I,gq,1O],N4:[6Y,oP,s8],Nl:[0,1O,1O],Np:[g0,1O,uJ],Nr:[8I,1O,1O],N9:[8S,8S,b0],Ok:[1O,q9,rA],Pi:[0,0,0],Po:[1O,oP,8h],P7:[0,0,1O],Pb:[PP,43,PU],Pz:[qd,42,42],Py:[go,s7,oE],P3:[95,uM,gP],Oz:[g0,1O,0],Oy:[ex,67,30],Ox:[1O,g0,80],Ow:[3H,Ov,Op],On:[1O,gq,b0],Or:[b0,20,60],Ou:[0,1O,1O],Ot:[0,0,8T],Os:[0,8T,8T],OH:[s7,uU,11],OX:[bB,bB,bB],OW:[0,3H,0],OV:[bB,bB,bB],P2:[P1,P0,qf],OU:[8T,0,8T],OL:[85,qf,47],OJ:[1O,pt,0],OI:[gK,50,i4],OO:[8T,0,0],OP:[OS,OR,lM],Te:[gm,rs,gm],UL:[72,61,8T],Y8:[47,79,79],Y1:[47,79,79],WE:[0,eD,i3],WT:[X4,0,9S],X3:[1O,20,oG],X2:[0,rP,1O],Xd:[67,67,67],Wv:[67,67,67],Y9:[30,fL,1O],XD:[s9,34,34],XZ:[1O,6Y,8I],Xe:[34,8T,34],Xf:[1O,0,1O],WU:[b0,b0,b0],Xn:[gq,gq,1O],WV:[1O,s8,0],Xh:[i5,qd,32],Xg:[3V,3V,3V],Xm:[0,3V,0],X8:[q6,1O,47],Wx:[3V,3V,3V],Ws:[8I,1O,8I],WL:[1O,67,oM],Xo:[8h,92,92],Xx:[75,0,om],XH:[1O,1O,8I],Uq:[8I,9O,pt],Ut:[9O,9O,6Y],Uu:[1O,8I,8S],Uo:[v3,Uh,0],Uj:[1O,6Y,8h],Um:[q6,op,9O],Uz:[8I,3V,3V],UP:[eK,1O,1O],UO:[6Y,6Y,ex],UR:[9S,9S,9S],UK:[fL,ap,fL],UJ:[9S,9S,9S],Tw:[1O,uH,Tk],Tj:[1O,gP,lM],Tq:[32,s9,qg],Tn:[oE,eD,6Y],TP:[rS,rR,gK],U7:[rS,rR,gK],Ua:[lP,rA,go],TX:[1O,1O,eK],TU:[0,1O,0],TS:[50,8h,50],TY:[6Y,8I,9O],U1:[1O,0,1O],UX:[3V,0,0],VW:[rt,8h,qg],VZ:[0,0,8h],W0:[W3,85,9S],VT:[oG,b8,rD],VM:[60,rQ,VL],VK:[ug,uO,ap],VO:[0,6Y,rM],VS:[72,i3,i4],VR:[VQ,21,rz],W4:[25,25,b8],W5:[8S,1O,6Y],Wi:[1O,q9,rw],Wh:[1O,q9,Wj],Wk:[1O,go,q6],We:[0,0,3V],Wa:[Wc,8S,9O],Wb:[3V,3V,0],VJ:[qf,uL,35],Vd:[1O,qd,0],Vg:[1O,69,0],V8:[i5,b8,V1],V0:[ap,uK,qg],V7:[rB,V5,rB],Vl:[Vy,ap,ap],Vx:[rD,b8,oG],Vw:[1O,Vz,VB],VF:[1O,i5,VD],Vv:[8h,rz,63],Vo:[1O,gM,tA],Vn:[ry,gP,ry],Vm:[lP,eK,9O],Vp:[3V,0,3V],Vq:[rt,51,gK],Vt:[1O,0,0],Vs:[rs,gm,gm],K3:[65,67,rw],E3:[8T,69,19],E2:[6Y,3V,E1],E4:[v4,v5,96],E5:[46,8T,87],E8:[1O,8S,ap],E7:[gP,82,45],Ej:[gM,gM,gM],Ed:[oE,eD,oP],Ei:[uS,90,8h],DP:[b8,3V,fL],Dl:[b8,3V,fL],Dd:[1O,6Y,6Y],D4:[0,1O,g0],Dc:[70,om,oM],yc:[ex,oM,pt],Du:[0,3V,3V],Dx:[op,rP,op],Ey:[1O,99,71],Ex:[64,eK,m8],EB:[ap,om,ap],EJ:[8S,go,rQ],EF:[1O,1O,1O],EZ:[8S,8S,8S],F0:[1O,1O,0],Fd:[rM,8h,50]};b.2n=d},{}],4:[1a(b,c,d){1a e(a,b){1d c=x++;if(b=b||{},b.gd&&(r.1B.gd=!0,r.1B.5Z=aG.cQ()),b.cN="3Q"==1p b.cN?!0:b.cN,b.9J="3Q"==1p b.9J?!1:b.9J,b.cZ="3Q"==1p b.cZ?!0:b.cZ,b.c9="3Q"==1p b.c9?!1:b.c9,b.cS="3Q"==1p b.cS?nC:b.cS,b.2D="1a"==1p b.2D?b.2D:n,b.2g=!!b.2g,"ar"==1p a){if("ar"!=1p b.5e)1e 3K.g4("tS 2X be Fb e0 rK 78");1d d=1s!=b.1n?b.1n:2t.rL,e=1s!=b.1v?b.1v:2t.rH;1e u(l(a),b.5e,1J,d,e,b).2K(1a(a){1e g(a.7t.1J.4H,a,b,d,e)})}1d h=(1x 0===a?[1J.4H]:a.1i?a:[a])[0];1e h.3x(w+c,c),f(h.6i,b,h.6i.9y.rL,h.6i.9y.rH,c).2K(1a(a){1e"1a"==1p b.gY&&(r("1B.gY is Fh, 4I Fa a 3K F1 a7 2l"),b.gY(a)),a})}1a f(a,b,c,d,e){1e t(a,a,c,d,b,a.9y.rG,a.9y.rI).2K(1a(f){r("F6 Ar");1d h=w+e,i="["+h+"=\'"+e+"\']";a.pm(i).As(h);1d j=f.7t,k=j.1J.pm(i),l="1a"==1p b.rJ?3K.4y(b.rJ(j.1J)):3K.4y(!0);1e l.2K(1a(){1e g(k,f,b,c,d)})})}1a g(a,b,c,d,e){1d f=b.7t,g=1m m(f.1J),l=1m o(c,g),n=v(a),q="fM"===c.1S?d:j(f.1J),s="fM"===c.1S?e:k(f.1J),t=1m c.2D(q,s,l,c,1J),u=1m p(a,t,g,l,c);1e u.g6.2K(1a(){r("sI rK");1d d;1e d="fM"===c.1S?i(t.2l,{1n:t.2l.1n,1v:t.2l.1v,1Q:0,1y:0,x:0,y:0}):a===f.1J.2A||a===f.1J.4H||1s!=c.2l?t.2l:i(t.2l,{1n:1s!=c.1n?c.1n:n.1n,1v:1s!=c.1v?c.1v:n.1v,1Q:n.1Q,1y:n.1y,x:0,y:0}),h(b,c),d})}1a h(a,b){b.cZ&&(a.pj.aj(a),r("Af up 8E"))}1a i(a,b){1d c=1J.3z("2l"),d=1R.7b(a.1n-1,1R.5f(0,b.1y)),e=1R.7b(a.1n,1R.5f(1,b.1y+b.1n)),f=1R.7b(a.1v-1,1R.5f(0,b.1Q)),g=1R.7b(a.1v,1R.5f(1,b.1Q+b.1v));c.1n=b.1n,c.1v=b.1v;1d h=e-d,i=g-f;1e r("AY 2l at:","1y:",b.1y,"1Q:",b.1Q,"1n:",h,"1v:",i),r("AV B4 ez 1n",b.1n,"2Q 1v",b.1v,"ez x",d,"2Q y",f),c.4J("2d").9j(a,d,f,h,i,b.x,b.y,h,i),c}1a j(a){1e 1R.5f(1R.5f(a.2A.sh,a.4H.sh),1R.5f(a.2A.cH,a.4H.cH),1R.5f(a.2A.si,a.4H.si))}1a k(a){1e 1R.5f(1R.5f(a.2A.sQ,a.4H.sQ),1R.5f(a.2A.cI,a.4H.cI),1R.5f(a.2A.sR,a.4H.sR))}1a l(a){1d b=1J.3z("a");1e b.81=a,b.81=b.81,b}1d m=b("./6D"),n=b("./sP/2l"),o=b("./sS"),p=b("./sT"),q=b("./8M"),r=b("./4R"),s=b("./4L"),t=b("./gr"),u=b("./5e").pn,v=s.eL,w="1l-4I-1P",x=0;e.cb=n,e.AP=q,e.4R=r,e.4L=s;1d y="3Q"==1p 1J||"1a"!=1p 1u.3n||"1a"!=1p 1J.3z("2l").4J?1a(){1e 3K.g4("No 2l 6D")}:e;c.2n=y,"1a"==1p a&&a.eI&&a("4I",[],1a(){1e y})},{"./gr":2,"./sS":11,"./4R":13,"./8M":14,"./sT":15,"./5e":16,"./sP/2l":20,"./6D":22,"./4L":26}],5:[1a(a,b,c){1a d(a){if(1b.3a=a,e("sO 1I",a),!1b.8c||!1b.1W){e("Ay sO"),d.1g.1W=1m 9e;1d b=1b.1W;d.1g.8c=1m 3K(1a(a,c){b.8n=a,b.7v=c,b.3a=f(),b.md===!0&&a(b)})}}1d e=a("./4R"),f=a("./4L").lF;b.2n=d},{"./4R":13,"./4L":26}],6:[1a(a,b,c){1a d(a,b){1d c,d,f=1J.3z("1h"),g=1J.3z("7g"),h=1J.3z("1r"),i="C4 Cm";f.2M.oW="aY",f.2M.gg=a,f.2M.2v=b,f.2M.7w=0,f.2M.gL=0,1J.2A.4K(f),g.3a=e(),g.1n=1,g.1v=1,g.2M.7w=0,g.2M.gL=0,g.2M.sK="p5",h.2M.gg=a,h.2M.2v=b,h.2M.7w=0,h.2M.gL=0,h.4K(1J.dW(i)),f.4K(h),f.4K(g),c=g.cC-h.cC+1,f.aj(h),f.4K(1J.dW(i)),f.2M.vC="eb",g.2M.sK="3Z",d=g.cC-f.cC+1,1J.2A.aj(f),1b.p5=c,1b.p4=1,1b.ld=d}1d e=a("./4L").lF;b.2n=d},{"./4L":26}],7:[1a(a,b,c){1a d(){1b.1l={}}1d e=a("./5M");d.1g.x2=1a(a,b){1e 1x 0===1b.1l[a+"-"+b]&&(1b.1l[a+"-"+b]=1m e(a,b)),1b.1l[a+"-"+b]},b.2n=d},{"./5M":6}],8:[1a(a,b,c){1a d(b,c,d){1b.1W=1s,1b.3a=b;1d e=1b,g=f(b);1b.8c=(c?1m 3K(1a(a){"BC:ty"===b.7t.1J.C0||1s==b.7t.1J.4H?b.7t.8n=b.8n=1a(){a(b)}:a(b)}):1b.sM(d.5e,g,d)).2K(1a(b){1d c=a("./sN");1e c(b.7t.1J.4H,{1S:"fM",1n:b.1n,1v:b.1v,5e:d.5e,c9:d.c9,cZ:d.cZ,9J:d.9J,cS:d.cS/2})}).2K(1a(a){1e e.1W=a})}1d e=a("./4L"),f=e.eL,g=a("./5e").pn;d.1g.sM=1a(a,b,c){1d d=1b.3a;1e g(d.3a,a,d.6i,b.1n,b.1v,c)},b.2n=d},{"./sN":4,"./5e":16,"./4L":26}],9:[1a(a,b,c){1a d(a){1b.3a=a.1k,1b.73=[],1b.1S=1s,1b.x0=.5,1b.y0=.5,1b.x1=.5,1b.y1=.5,1b.8c=3K.4y(!0)}d.gQ={lL:1,uZ:2},d.oZ=/^\\s*(9W?\\(\\s*\\d{1,3},\\s*\\d{1,3},\\s*\\d{1,3}(?:,\\s*[0-9\\.]+)?\\s*\\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\\s+(\\d{1,3}(?:\\.\\d+)?)(%|px)?)?(?:\\s|$)/i,b.2n=d},{}],10:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1m 9e;1d c=1b;1b.eX=1s,1b.8c=1m 3K(1a(d,e){c.1W.8n=d,c.1W.7v=e,b&&(c.1W.g8="K5"),c.1W.3a=a,c.1W.md===!0&&d(c.1W)})}b.2n=d},{}],11:[1a(a,b,c){1a d(a,b){1b.e1=1s,1b.1B=a,1b.6D=b,1b.a0=1b.pg(2t.bT.81)}1d e=a("./4R"),f=a("./su"),g=a("./sr"),h=a("./sq"),i=a("./st"),j=a("./gl"),k=a("./sp"),l=a("./gj"),m=a("./sk"),n=a("./4L").fP;d.1g.sY=1a(a){1d b=[];1e a.t5(1a(a,b){4F(b.1P.6T){1U"vm":1e a.5R([{3O:[b.1P.3a],5v:"78"}]);1U"2U":1U"oC":1e a.5R([{3O:[b.1P],5v:b.1P.6T}])}1e a},[]).3P(1b.ox(b,1b.ou),1b),b},d.1g.t1=1a(a,b){1e b.oy().2E(1b.sU).3P(1b.ox(a,1b.ou),1b),a},d.1g.ox=1a(a,b){1e 1a(c){c.3O.3P(1a(d){1b.t2(a,d)||(a.ad(0,0,b.1K(1b,c)),e("Ky 1W #"+a.1i,"ar"==1p d?d.2w(0,3H):d))},1b)}},d.1g.sU=1a(a){1e"4D"!==a.5v},d.1g.ou=1a(a){if("78"===a.5v){1d b=a.3O[0];1e!1b.oR(b)||1b.6D.2U||1b.1B.9J?b.4t(/1l:1W\\/.*;7T,/i)?1m f(b.2B(/78\\([\'"]{0,}|[\'"]{0,}\\)$/gi,""),!1):1b.pf(b)||1b.1B.9J===!0||1b.oR(b)?1m f(b,!1):1b.6D.uq&&!1b.1B.9J&&1b.1B.Kx?1m f(b,!0):1b.1B.5e?1m h(b,1b.1B.5e):1m g(b):1m j(b)}1e"lE-gO"===a.5v?1m l(a):"gO"===a.5v?1m m(a):"2U"===a.5v?1m k(a.3O[0],1b.6D.2U):"oC"===a.5v?1m i(a.3O[0],1b.pf(a.3O[0].3a),1b.1B):1m g(a)},d.1g.oR=1a(a){1e"2U"===a.2w(a.1i-3).8F()||j.1g.mh(a)},d.1g.t2=1a(a,b){1e a.gc(1a(a){1e a.3a===b})},d.1g.pf=1a(a){1e 1b.pg(a)===1b.a0},d.1g.pg=1a(a){1d b=1b.e1||(1b.e1=1J.3z("a"));1e b.81=a,b.81=b.81,b.Kv+b.Ko+b.Kn},d.1g.sZ=1a(a){1e 1b.gZ(a,1b.1B.cS)["2S"](1a(){1d b=1m g(a.3a);1e b.8c.2K(1a(b){a.1W=b})})},d.1g.eZ=1a(a){1d b=1s;1e 1b.2R.gc(1a(c){1e(b=c).3a===a})?b:1s},d.1g.r0=1a(a){1e 1b.2R=a.t5(n(1b.t1,1b),1b.sY(a)),1b.2R.3P(1a(a,b){a.8c.2K(1a(){e("Jx eJ 1W #"+(b+1),a)},1a(c){e("Jz cz 1W #"+(b+1),a,c)})}),1b.g6=3K.mm(1b.2R.5l(1b.sZ,1b)),e("sI Jk 2R"),1b},d.1g.gZ=1a(a,b){1d c,d=3K.Jj([a.8c,1m 3K(1a(d,f){c=b3(1a(){e("Jm Jn cz 1W",a),f(a)},b)})]).2K(1a(a){1e sH(c),a});1e d["2S"](1a(){sH(c)}),d},b.2n=d},{"./sr":5,"./st":8,"./su":10,"./gj":12,"./4R":13,"./sq":17,"./gl":23,"./sp":24,"./4L":26,"./sk":27}],12:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S=e.gQ.lL;1d b=d.sj.7k(a.3O[0])||!e.oZ.7k(a.3O[0]);b?a.3O[0].5S(/\\s+/).tm().3P(1a(a,b){4F(a){1U"1y":1b.x0=0,1b.x1=1;2C;1U"1Q":1b.y0=0,1b.y1=1;2C;1U"1G":1b.x0=1,1b.x1=0;2C;1U"7q":1b.y0=1,1b.y1=0;2C;1U"to":1d c=1b.y0,d=1b.x0;1b.y0=1b.y1,1b.x0=1b.x1,1b.x1=d,1b.y1=c;2C;1U"4j":2C;1j:1d e=.oh*5W(a,10);if(iv(e))2C;0===b?(1b.y0=e,1b.y1=1-1b.y0):(1b.x0=e,1b.x1=1-1b.x0)}},1b):(1b.y0=0,1b.y1=1),1b.73=a.3O.9E(b?1:0).5l(1a(a){1d b=a.4t(e.oZ),c=+b[2],d=0===c?"%":b[3];1e{3q:1m f(b[1]),7x:"%"===d?c/3H:1s}}),1s===1b.73[0].7x&&(1b.73[0].7x=0),1s===1b.73[1b.73.1i-1].7x&&(1b.73[1b.73.1i-1].7x=1),1b.73.3P(1a(a,b){1s===a.7x&&1b.73.9E(b).gc(1a(c,d){1e 1s!==c.7x?(a.7x=(c.7x-1b.73[b-1].7x)/(d+1)+1b.73[b-1].7x,!0):!1},1b)},1b)}1d e=a("./iH"),f=a("./3q");d.1g=1u.3n(e.1g),d.sj=/^\\s*(?:to|1y|1G|1Q|7q|4j|\\d{1,3}(?:\\.\\d+)?%?)(?:\\s|$)/i,b.2n=d},{"./3q":3,"./iH":9}],13:[1a(a,b,c){1d d=1a(){d.1B.gd&&2t.3l&&2t.3l.4R&&LP.1g.fP.1K(2t.3l.4R,2t.3l).6R(2t.3l,[aG.cQ()-d.1B.5Z+"ms","4I:"].5R([].9E.1K(aZ,0)))};d.1B={gd:!1},b.2n=d},{}],14:[1a(a,b,c){1a d(a,b){1b.1P=a,1b.2x=b,1b.8r=1s,1b.a2=1s,1b.5y=1s,1b.3L=[],1b.9q=[],1b.eH=1s,1b.em=1s,1b.cM=1s,1b.oU={},1b.ek={},1b.ef=1s,1b.eg=1s,1b.gk=1s,1b.eQ=!1,1b.91=1s}1a e(a){1d b=a.1B[a.LZ||0];1e b?b.1w||"":""}1a f(a){if(a&&"eY"===a[1])1e a[2].5S(",").5l(1a(a){1e 5W(a.55())});if(a&&"sD"===a[1]){1d b=a[2].5S(",").5l(1a(a){1e 5W(a.55())});1e[b[0],b[1],b[4],b[5],b[12],b[13]]}}1a g(a){1e-1!==a.1t().3U("%")}1a h(a){1e a.2B("px","")}1a i(a){1e 5W(a)}1d j=a("./3q"),k=a("./4L"),l=k.eL,m=k.lD,n=k.eH;d.1g.gs=1a(a){a.em=1b.em,a.5y=1b.5y,a.a2=1b.a2,a.3L=1b.3L,a.9q=1b.9q,a.cM=1b.cM,a.ek=1b.ek,a.ef=1b.ef,a.91=1b.91},d.1g.qb=1a(){1e 1s===1b.91?1b.91=1b.sn("91"):1b.91},d.1g.vS=1a(a){1b.8r=a,a.dZ.1L(1b)},d.1g.gC=1a(){1e 1b.1P.6c===9h.gy?1b.2x.em:"4D"!==1b.2z("7j")&&"aY"!==1b.2z("oW")&&!1b.1P.m2("1l-4I-LX")&&("gB"!==1b.1P.6T||"aY"!==1b.1P.eU("1S"))},d.1g.2z=1a(a){1e 1b.cM||(1b.cM=1b.eQ?1b.2x.gw(1b.7U?":7U":":os"):1b.gw(1s)),1b.ek[a]||(1b.ek[a]=1b.cM[a])},d.1g.p0=1a(a){1d b=["ov","gt","ms","o"],c=1b.2z(a);1e 1x 0===c&&b.gc(1a(b){1e c=1b.2z(b+a.3j(0,1).9a()+a.3j(1)),1x 0!==c},1b),1x 0===c?1s:c},d.1g.gw=1a(a){1e 1b.1P.6i.9y.L4(1b.1P,a)},d.1g.7P=1a(a){1d b=2H(1b.2z(a),10);1e iv(b)?0:b},d.1g.3q=1a(a){1e 1b.oU[a]||(1b.oU[a]=1m j(1b.2z(a)))},d.1g.sn=1a(a){1d b=5W(1b.2z(a));1e iv(b)?0:b},d.1g.gf=1a(){1d a=1b.2z("gf");4F(2H(a,10)){1U KX:a="vj";2C;1U uI:a="eb"}1e a},d.1g.qr=1a(){1d a=1b.2z("3L").4t(1b.sA);1e a?{1Q:2H(a[1],10),1G:2H(a[2],10),7q:2H(a[3],10),1y:2H(a[4],10)}:1s},d.1g.oy=1a(){1e 1b.ef||(1b.ef=m(1b.2z("KT")))},d.1g.gh=1a(a,b){1d c=(1b.2z(a)||"").5S(",");1e c=c[b||0]||c[0]||"7n",c=c.55().5S(" "),1===c.1i&&(c=[c[0],g(c[0])?"7n":c[0]]),c},d.1g.tF=1a(a,b,c){1d d,e,f=1b.gh("La",c);if(g(f[0]))d=a.1n*5W(f[0])/3H;2p{if(/so|Ln/.7k(f[0])){1d h=a.1n/a.1v,i=b.1n/b.1v;1e i>h^"so"===f[0]?{1n:a.1v*i,1v:a.1v}:{1n:a.1n,1v:a.1n/i}}d=2H(f[0],10)}1e e="7n"===f[0]&&"7n"===f[1]?b.1v:"7n"===f[1]?d/b.1n*b.1v:g(f[1])?a.1v*5W(f[1])/3H:2H(f[1],10),"7n"===f[0]&&(d=e/b.1v*b.1n),{1n:d,1v:e}},d.1g.tt=1a(a,b,c,d){1d e,f,h=1b.gh("Ld",c);1e e=g(h[0])?(a.1n-(d||b).1n)*(5W(h[0])/3H):2H(h[0],10),f="7n"===h[1]?e/b.1n*b.1v:g(h[1])?(a.1v-(d||b).1v)*5W(h[1])/3H:2H(h[1],10),"7n"===h[0]&&(e=f/b.1v*b.1n),{1y:e,1Q:f}},d.1g.tw=1a(a){1e 1b.gh("Ji",a)[0]},d.1g.wL=1a(){1d a=1b.2z("Hc"),b=[];if(a&&"4D"!==a)1I(1d c=a.4t(1b.sE),d=0;c&&d0?(1b.pd=0,1b.gI(1b.az,a)):a():(1b.az.3P(1b.oH,1b),a())},1b))},1b))}1a e(a){1e a.2x&&a.2x.3L.1i}1a f(a){1e a.2B(/(\\-[a-z])/g,1a(a){1e a.9a().2B("-","")})}1a g(){}1a h(a,b,c,d){1e a.5l(1a(e,f){if(e.1n>0){1d g=b.1y,h=b.1Q,i=b.1n,j=b.1v-a[2].1n;4F(f){1U 0:j=a[0].1n,e.3O=l({c1:[g,h],c2:[g+i,h],c3:[g+i-a[1].1n,h+j],c4:[g+a[3].1n,h+j]},d[0],d[1],c.eO,c.ev,c.eT,c.e7);2C;1U 1:g=b.1y+b.1n-a[1].1n,i=a[1].1n,e.3O=l({c1:[g+i,h],c2:[g+i,h+j+a[2].1n],c3:[g,h+j],c4:[g,h+a[0].1n]},d[1],d[2],c.eT,c.e7,c.eS,c.e4);2C;1U 2:h=h+b.1v-a[2].1n,j=a[2].1n,e.3O=l({c1:[g+i,h+j],c2:[g,h+j],c3:[g+a[3].1n,h],c4:[g+i-a[3].1n,h]},d[2],d[3],c.eS,c.e4,c.eR,c.e5);2C;1U 3:i=a[3].1n,e.3O=l({c1:[g,h+j+a[2].1n],c2:[g,h],c3:[g+i,h+a[0].1n],c4:[g+i,h+j]},d[3],d[0],c.eR,c.e5,c.eO,c.ev)}}1e e})}1a i(a,b,c,d){1d e=4*((1R.I5(2)-1)/3),f=c*e,g=d*e,h=a+c,i=b+d;1e{p7:k({x:a,y:i},{x:a,y:i-g},{x:h-f,y:b},{x:h,y:b}),p6:k({x:a,y:b},{x:a+f,y:b},{x:h,y:i-g},{x:h,y:i}),oV:k({x:h,y:b},{x:h,y:b+g},{x:a+f,y:i},{x:a,y:i}),oX:k({x:h,y:i},{x:h-f,y:i},{x:a,y:b+g},{x:a,y:b})}}1a j(a,b,c){1d d=a.1y,e=a.1Q,f=a.1n,g=a.1v,h=b[0][0]f+c[3].1n?0:k-c[3].1n,l-c[0].1n).p6.9f(.5),eS:i(d+s,e+r,m,n).oV.9f(.5),e4:i(d+1R.7b(s,f-c[3].1n),e+1R.7b(r,g+c[0].1n),1R.5f(0,m-c[1].1n),n-c[2].1n).oV.9f(.5),eR:i(d,e+t,o,p).oX.9f(.5),e5:i(d+c[3].1n,e+t,1R.5f(0,o-c[3].1n),p-c[2].1n).oX.9f(.5)}}1a k(a,b,c,d){1d e=1a(a,b,c){1e{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}};1e{5Z:a,I0:b,HW:c,cj:d,9f:1a(f){1d g=e(a,b,f),h=e(b,c,f),i=e(c,d,f),j=e(g,h,f),l=e(h,i,f),m=e(j,l,f);1e[k(a,g,j,m),k(m,l,i,d)]},et:1a(a){a.1L(["qE",b.x,b.y,c.x,c.y,d.x,d.y])},p9:1a(d){d.1L(["qE",c.x,c.y,b.x,b.y,a.x,a.y])}}}1a l(a,b,c,d,e,f,g){1d h=[];1e b[0]>0||b[1]>0?(h.1L(["5o",d[1].5Z.x,d[1].5Z.y]),d[1].et(h)):h.1L(["5o",a.c1[0],a.c1[1]]),c[0]>0||c[1]>0?(h.1L(["5o",f[0].5Z.x,f[0].5Z.y]),f[0].et(h),h.1L(["5o",g[0].cj.x,g[0].cj.y]),g[0].p9(h)):(h.1L(["5o",a.c2[0],a.c2[1]]),h.1L(["5o",a.c3[0],a.c3[1]])),b[0]>0||b[1]>0?(h.1L(["5o",e[1].cj.x,e[1].cj.y]),e[1].p9(h)):h.1L(["5o",a.c4[0],a.c4[1]]),h}1a m(a,b,c,d,e,f,g){b[0]>0||b[1]>0?(a.1L(["5o",d[0].5Z.x,d[0].5Z.y]),d[0].et(a),d[1].et(a)):a.1L(["5o",f,g]),(c[0]>0||c[1]>0)&&a.1L(["5o",e[0].5Z.x,e[0].5Z.y])}1a n(a){1e a.7P("cY")<0}1a o(a){1e a.7P("cY")>0}1a p(a){1e 0===a.7P("cY")}1a q(a){1e-1!==["eu","eu-af","eu-qs"].3U(a.2z("7j"))}1a r(a){1e a 2Y V}1a s(a){1e a.1P.1l.55().1i>0}1a t(a){1e/^(eb|4D|he)$/.7k(a.2x.2z("If"))}1a u(a){1e["Ie","Ic","Ig","Es"].5l(1a(b){1d c=a.2z("e9"+b+"Ii"),d=c.5S(" ");1e d.1i<=1&&(d[1]=d[0]),d.5l(G)})}1a v(a){1e a.6c===9h.gy||a.6c===9h.eq}1a w(a){1d b=a.2z("3M"),c=-1!==["pr","Ij","gA"].3U(b)?a.2z("cY"):"7n";1e"7n"!==c}1a x(a){1e"Ik"!==a.2z("3M")}1a y(a){1e"4D"!==a.2z("Ih")}1a z(a){1e-1!==["eu-af","eu-qs"].3U(a.2z("7j"))}1a A(a){1d b=1b;1e 1a(){1e!a.6R(b,aZ)}}1a B(a){1e a.1P.6c===9h.eq}1a C(a){1e a.eQ===!0}1a D(a){1e a.1P.6c===9h.gy}1a E(a){1e 1a(b,c){1e b.7P("cY")+a.3U(b)/a.1i-(c.7P("cY")+a.3U(c)/a.1i)}}1a F(a){1e a.qb()<1}1a G(a){1e 2H(a,10)}1a H(a){1e a.1n}1a I(a){1e a.1P.6c!==9h.eq||-1===["qH","Il","Im","Is","BR","It"].3U(a.1P.6T)}1a J(a){1e[].5R.6R([],a)}1a K(a){1d b=a.3j(0,1);1e b===a.3j(a.1i-1)&&b.4t(/\'|"/)?a.3j(1,a.1i-2):a}1a L(a){1I(1d b,c=[],d=0,e=!1;a.1i;)M(a[d])===e?(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)),e=!e,d=0):d++,d>=a.1i&&(b=a.ad(0,d),b.1i&&c.1L(P.dV.2f(b)));1e c}1a M(a){1e-1!==[32,13,10,9,45].3U(a)}1a N(a){1e/[^\\Ir-\\Iq]/.7k(a)}1d O=a("./4R"),P=a("gx"),Q=a("./8M"),R=a("./wu"),S=a("./wA"),T=a("./wx"),U=a("./3q"),V=a("./wv"),W=a("./4L"),X=W.fP,Y=W.eL,Z=W.lD,$=W.eH;d.1g.qn=1a(){1b.cn.3P(1a(a){if(B(a)){C(a)&&a.pq(),a.5y=1b.wC(a);1d b="aY"===a.2z("9g")?[a.5y.3L]:[],c=a.qr();c&&-1!==["pr","gA"].3U(a.2z("3M"))&&b.1L([["ew",a.a2.1y+c.1y,a.a2.1Q+c.1Q,c.1G-c.1y,c.7q-c.1Q]]),a.3L=e(a)?a.2x.3L.5R(b):b,a.9q="aY"!==a.2z("9g")?a.3L.5R([a.5y.3L]):a.3L,C(a)&&a.pk()}2p D(a)&&(a.3L=e(a)?a.2x.3L:[]);C(a)||(a.a2=1s)},1b)},d.1g.gI=1a(a,b,c){c=c||aG.cQ(),1b.oH(a[1b.pd++]),a.1i===1b.pd?b():c+20>aG.cQ()?1b.gI(a,b,c):b3(X(1a(){1b.gI(a,b)},1b),0)},d.1g.r7=1a(a){1b.ot(a,"."+S.1g.pb+\':7U { 7I: "" !7m; 7j: 4D !7m; }.\'+S.1g.pa+\':os { 7I: "" !7m; 7j: 4D !7m; }\')},d.1g.r8=1a(a){1b.ot(a,"* { -ov-4O: 4D !7m; -gt-4O: 4D !7m; -o-4O: 4D !7m; 4O: 4D !7m; -ov-gF: 4D !7m; -gt-gF: 4D !7m; -o-gF: 4D !7m; gF: 4D !7m;}")},d.1g.ot=1a(a,b){1d c=a.3z("2M");c.hy=b,a.2A.4K(c)},d.1g.rl=1a(a){1d b=[[a]];if(a.1P.6c===9h.eq){1d c=1b.ok(a,":7U"),d=1b.ok(a,":os");c&&b.1L(c),d&&b.1L(d)}1e J(b)},d.1g.ok=1a(a,b){1d c=a.gw(b);if(!c||!c.7I||"4D"===c.7I||"-gt-HQ-7I"===c.7I||"4D"===c.7j)1e 1s;1I(1d d=K(c.7I),e="78"===d.3j(0,3),g=1J.3z(e?"7g":"HS"),h=1m S(g,a,b),i=c.1i-1;i>=0;i--){1d j=f(c.1H(i));g.2M[j]=c[j]}if(g.eV=S.1g.pb+" "+S.1g.pa,e)1e g.3a=Z(d)[0].3O[0],[h];1d k=1J.dW(d);1e g.4K(k),[h,1m R(k,h)]},d.1g.q1=1a(a){1e J([].2E.1K(a.1P.qQ,v).5l(1a(b){1d c=[b.6c===9h.gy?1m R(b,a):1m Q(b,a)].2E(I);1e b.6c===9h.eq&&c.1i&&"oA"!==b.qU?c[0].gC()?c.5R(1b.q1(c[0])):[]:c},1b))},d.1g.q8=1a(a,b){1d c=1m V(b,a.qb(),a.1P,a.2x);a.gs(c);1d d=b?c.m3(1b):c.2x.8r;d.8Y.1L(c),a.8r=c},d.1g.rd=1a(){1b.cn.3P(1a(a){B(a)&&(1b.vH(a)||F(a)||w(a)||1b.vM(a)||a.9G())?1b.q8(a,!0):B(a)&&(x(a)&&p(a)||z(a)||y(a))?1b.q8(a,!1):a.vS(a.2x.8r)},1b)},d.1g.vM=1a(a){1e"J5"===a.1P.6T&&a.2x.3q("gE").eW()},d.1g.vH=1a(a){1e 1s===a.2x},d.1g.pQ=1a(a){a.8Y.J7(E(a.8Y.9E(0))),a.8Y.3P(1b.pQ,1b)},d.1g.wG=1a(a){1e 1a(b,c,d){if("4D"!==a.2x.2z("wT").3j(0,4)||0!==b.55().1i){if(1b.6D.lY&&!a.2x.9G()){1d e=d.9E(0,c).8L("").1i;1e 1b.w7(a.1P,e,b.1i)}if(a.1P&&"ar"==1p a.1P.1l){1d f=a.1P.vU(b.1i),g=1b.w2(a.1P,a.2x.9G());1e a.1P=f,g}}2p(!1b.6D.lY||a.2x.9G())&&(a.1P=a.1P.vU(b.1i));1e{}}},d.1g.w2=1a(a,b){1d c=a.6i.3z("vz"),d=a.pj,e=a.qh(!0);c.4K(a.qh(!0)),d.qi(c,a);1d f=b?$(c):Y(c);1e d.qi(e,c),f},d.1g.w7=1a(a,b,c){1d d=1b.qa||(1b.qa=a.6i.ed());1e d.Jf(a,b),d.Jg(a,b+c),d.eG()},d.1g.ac=1a(a){1d b=a.8Y.2E(n),c=a.dZ.2E(B),d=c.2E(A(y)),e=d.2E(A(x)).2E(A(q)),f=c.2E(A(x)).2E(y),h=d.2E(A(x)).2E(q),i=a.8Y.5R(d.2E(x)).2E(p),j=a.dZ.2E(D).2E(s),k=a.8Y.2E(o);b.5R(e).5R(f).5R(h).5R(i).5R(j).5R(k).3P(1a(a){1b.az.1L(a),r(a)&&(1b.ac(a),1b.az.1L(1m g))},1b)},d.1g.oH=1a(a){3c{a 2Y g?1b.2D.2V.lp():D(a)?(C(a.2x)&&a.2x.pq(),1b.oz(a),C(a.2x)&&a.2x.pk()):1b.vW(a)}2S(b){if(O(b),1b.1B.2g)1D b}},d.1g.vW=1a(a){r(a)&&(1b.2D.uB(a.91),1b.2D.2V.iF(),a.9G()&&1b.2D.uD(a.vY())),"gB"===a.1P.6T&&"tO"===a.1P.1S?1b.vk(a):"gB"===a.1P.6T&&"9Z"===a.1P.1S?1b.vc(a):1b.vZ(a)},d.1g.vZ=1a(a){1d b=a.aS();1b.2D.3L(a.9q,1a(){1b.2D.u4(a,b,a.5y.5y.5l(H))},1b),1b.2D.3L(a.3L,1a(){1b.2D.oS(a.5y.5y)},1b),1b.2D.3L(a.9q,1a(){4F(a.1P.6T){1U"2U":1U"oC":1d c=1b.2R.eZ(a.1P);c?1b.2D.gv(a,b,a.5y,c):O("1E cz <"+a.1P.6T+">",a.1P);2C;1U"vm":1d d=1b.2R.eZ(a.1P.3a);d?1b.2D.gv(a,b,a.5y,d):O("1E cz <7g>",a.1P.3a);2C;1U"vl":1b.2D.gv(a,b,a.5y,{1W:a.1P});2C;1U"oL":1U"gB":1U"oA":1b.vq(a)}},1b)},d.1g.vk=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v),d={1n:c-1,1v:c-1,1Q:b.1Q,1y:b.1y},e=[3,3],f=[e,e,e,e],g=[1,1,1,1].5l(1a(a){1e{3q:1m U("#vd"),1n:a}}),i=j(d,f,g);1b.2D.3L(a.9q,1a(){1b.2D.9o(d.1y+1,d.1Q+1,d.1n-2,d.1v-2,1m U("#vb")),1b.2D.oS(h(g,d,i,f)),a.1P.vf&&(1b.2D.5M(1m U("#vg"),"eb","eb","vj",c-3+"px","IH"),1b.2D.1w("✔",d.1y+c/6,d.1Q+c-1))},1b)},d.1g.vc=1a(a){1d b=a.aS(),c=1R.7b(b.1n,b.1v)-2;1b.2D.3L(a.9q,1a(){1b.2D.uN(b.1y+1,b.1Q+1,c,1m U("#vb"),1,1m U("#vd")),a.1P.vf&&1b.2D.4T(1R.eM(b.1y+c/4)+1,1R.eM(b.1Q+c/4)+1,1R.aN(c/2),1m U("#vg"))},1b)},d.1g.vq=1a(a){1d b=a.vr();if(b.1i>0){1d c=a.1P.6i,d=c.3z("vz"),e=["vC","54","gg","gf","2v","3q","tL","tM","tW","u5","1n","1v","HL","Gy","Gz","GC","Gx","Gw","Gs"];e.3P(1a(b){3c{d.2M[b]=a.2z(b)}2S(c){O("4I: Gt: Gv GJ in GK: "+c.aK)}});1d f=a.aS();d.2M.3M="gA",d.2M.1y=f.1y+"px",d.2M.1Q=f.1Q+"px",d.H2=b,c.2A.4K(d),1b.oz(1m R(d.bw,a)),c.2A.aj(d)}},d.1g.oz=1a(a){a.ul();1d b=P.dV.ow(a.1P.1l),c=1b.1B.GO&&!t(a)||N(a.1P.1l)?b.5l(1a(a){1e P.dV.2f([a])}):L(b),d=a.2x.gf(),e=a.2x.2z("2v"),f=a.2x.2z("gg"),g=a.2x.wL();1b.2D.5M(a.2x.3q("3q"),a.2x.2z("Gp"),a.2x.2z("Gb"),d,e,f),g.1i?1b.2D.uo(g[0].3q,g[0].wO,g[0].wE,g[0].wF):1b.2D.uh(),1b.2D.3L(a.2x.3L,1a(){c.5l(1b.wG(a),1b).3P(1a(b,d){b&&(1b.2D.1w(c[d],b.1y,b.7q),1b.wZ(a.2x,b,1b.wQ.x2(f,e)))},1b)},1b)},d.1g.wZ=1a(a,b,c){4F(a.2z("wT").5S(" ")[0]){1U"G7":1b.2D.9o(b.1y,1R.5m(b.1Q+c.p5+c.p4),b.1n,1,a.3q("3q"));2C;1U"Gf":1b.2D.9o(b.1y,1R.5m(b.1Q),b.1n,1,a.3q("3q"));2C;1U"5o-mQ":1b.2D.9o(b.1y,1R.eM(b.1Q+c.ld+c.p4),b.1n,1,a.3q("3q"))}};1d 9M={wh:[["e3",.6],["e3",.1],["e3",.1],["e3",.6]]};d.1g.wC=1a(a){1d b=a.aS(),c=u(a),d=["Gn","Go","Gl","Gk"].5l(1a(b,c){1d d=a.2z("e9"+b+"Gh"),e=a.3q("e9"+b+"Gj");"wh"===d&&e.wg()&&(e=1m U([1O,1O,1O,e.a]));1d f=9M[d]?9M[d][c]:1s;1e{1n:a.7P("e9"+b+"Hx"),3q:f?e[f[0]](f[1]):e,3O:1s}}),e=j(b,c,d);1e{3L:1b.wf(a,e,d,c,b),5y:h(d,b,e,c)}},d.1g.wf=1a(a,b,c,d,e){1d f=a.2z("9q"),g=[];4F(f){1U"7I-wn":1U"gL-wn":m(g,d[0],d[1],b.ev,b.e7,e.1y+c[3].1n,e.1Q+c[0].1n),m(g,d[1],d[2],b.e7,b.e4,e.1y+e.1n-c[1].1n,e.1Q+c[0].1n),m(g,d[2],d[3],b.e4,b.e5,e.1y+e.1n-c[1].1n,e.1Q+e.1v-c[2].1n),m(g,d[3],d[0],b.e5,b.ev,e.1y+c[3].1n,e.1Q+e.1v-c[2].1n);2C;1j:m(g,d[0],d[1],b.eO,b.eT,e.1y,e.1Q),m(g,d[1],d[2],b.eT,b.eS,e.1y+e.1n,e.1Q),m(g,d[2],d[3],b.eS,b.eR,e.1y+e.1n,e.1Q+e.1v),m(g,d[3],d[0],b.eR,b.eO,e.1y,e.1Q+e.1v)}1e g},b.2n=d},{"./3q":3,"./wx":7,"./4R":13,"./8M":14,"./wA":18,"./wv":21,"./wu":25,"./4L":26,gx:1}],16:[1a(a,b,c){1a d(a,b,c){1d d="Hp"in 1m uW;if(!b)1e 3K.g4("No 5e Hb");1d e=g(d),i=h(b,a,e);1e d?k(i):f(c,i,e).2K(1a(a){1e o(a.7I)})}1a e(a,b,c){1d d="g8"in 1m 9e,e=g(d),i=h(b,a,e);1e d?3K.4y(i):f(c,i,e).2K(1a(a){1e"1l:"+a.1S+";7T,"+a.7I})}1a f(a,b,c){1e 1m 3K(1a(d,e){1d f=a.3z("rV"),g=1a(){Hd 2t.4I.5e[c],a.2A.aj(f)};2t.4I.5e[c]=1a(a){g(),d(a)},f.3a=b,f.7v=1a(a){g(),e(a)},a.2A.4K(f)})}1a g(a){1e a?"":"H9"+aG.cQ()+"9M"+ ++p+"9M"+1R.5m(qX*1R.nW())}1a h(a,b,c){1e a+"?78="+hC(b)+(c.1i?"&H8=4I.5e."+c:"")}1a i(a){1e 1a(b){1d c,d=1m wr;3c{c=d.H5(b,"1w/2T")}2S(e){m("wr 2a lT, wt v9 to oY"),c=1J.H7.oY("");3c{c.4Y(),c.p8(b),c.44()}2S(f){m("oY p8 2a lT, wt v9 to 1J.2A.hy"),c.2A.hy=b}}1d g=c.pm("tR");if(!g||!g.81.Hk){1d h=c.3z("tR");h.81=a,c.tQ.tI(h,c.tQ.bw)}1e c}}1a j(a,b,c,e,f,g){1e 1m d(a,b,2t.1J).2K(i(a)).2K(1a(a){1e n(a,c,e,f,g,0,0)})}1d k=a("./g7"),l=a("./4L"),m=a("./4R"),n=a("./gr"),o=l.eF,p=0;c.tS=d,c.tP=e,c.pn=j},{"./gr":2,"./4R":13,"./4L":26,"./g7":28}],17:[1a(a,b,c){1a d(a,b){1d c=1J.3z("a");c.81=a,a=c.81,1b.3a=a,1b.1W=1m 9e;1d d=1b;1b.8c=1m 3K(1a(c,f){d.1W.g8="Lg",d.1W.8n=c,d.1W.7v=f,1m e(a,b,1J).2K(1a(a){d.1W.3a=a})["2S"](f)})}1d e=a("./5e").tP;b.2n=d},{"./5e":16}],18:[1a(a,b,c){1a d(a,b,c){e.1K(1b,a,b),1b.eQ=!0,1b.7U=":7U"===c}1d e=a("./8M");d.1g.gs=1a(a){d.1g.gs.1K(1b,a),a.eQ=!0,a.7U=1b.7U},d.1g=1u.3n(e.1g),d.1g.pq=1a(){1b.7U?1b.2x.1P.tI(1b.1P,1b.2x.1P.bw):1b.2x.1P.4K(1b.1P),1b.2x.1P.eV+=" "+1b.pc()},d.1g.pk=1a(){1b.1P.pj.aj(1b.1P),1b.2x.1P.eV=1b.2x.1P.eV.2B(1b.pc(),"")},d.1g.pc=1a(){1e 1b["Lr"+(1b.7U?"Ls":"Lq")]},d.1g.pb="Lm",d.1g.pa="Lo",b.2n=d},{"./8M":14}],19:[1a(a,b,c){1a d(a,b,c,d,e){1b.1n=a,1b.1v=b,1b.2R=c,1b.1B=d,1b.1J=e}1d e=a("./4R");d.1g.gv=1a(a,b,c,d){1d e=a.7P("tL"),f=a.7P("tM"),g=a.7P("tW"),h=a.7P("u5"),i=c.5y,j=b.1n-(i[1].1n+i[3].1n+e+g),k=b.1v-(i[0].1n+i[2].1n+f+h);1b.9j(d,0,0,d.1W.1n||j,d.1W.1v||k,b.1y+e+i[3].1n,b.1Q+f+i[0].1n,j,k)},d.1g.u4=1a(a,b,c){b.1v>0&&b.1n>0&&(1b.u7(a,b),1b.u1(a,b,c))},d.1g.u7=1a(a,b){1d c=a.3q("gE");c.eW()||1b.9o(b.1y,b.1Q,b.1n,b.1v,c)},d.1g.oS=1a(a){a.3P(1b.u3,1b)},d.1g.u3=1a(a){a.3q.eW()||1s===a.3O||1b.uV(a.3O,a.3q)},d.1g.u1=1a(a,b,c){1d d=a.oy();d.tm().3P(1a(d,f,g){4F(d.5v){1U"78":1d h=1b.2R.eZ(d.3O[0]);h?1b.tq(a,b,h,g.1i-(f+1),c):e("1E cz 6H-1W",d.3O[0]);2C;1U"lE-gO":1U"gO":1d i=1b.2R.eZ(d.1k);i?1b.ux(i,b,c):e("1E cz 6H-1W",d.3O[0]);2C;1U"4D":2C;1j:e("L1 6H-1W 1S",d.3O[0])}},1b)},d.1g.tq=1a(a,b,c,d,e){1d f=a.tF(b,c.1W,d),g=a.tt(b,c.1W,d,f),h=a.tw(d);4F(h){1U"5x-x":1U"5x no-5x":1b.gJ(c,g,f,b,b.1y+e[3],b.1Q+g.1Q+e[0],u9,f.1v,e);2C;1U"5x-y":1U"no-5x 5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+e[0],f.1n,u9,e);2C;1U"no-5x":1b.gJ(c,g,f,b,b.1y+g.1y+e[3],b.1Q+g.1Q+e[0],f.1n,f.1v,e);2C;1j:1b.ln(c,g,f,{1Q:b.1Q,1y:b.1y},e[3],e[0])}},b.2n=d},{"./4R":13}],20:[1a(a,b,c){1a d(a,b){f.6R(1b,aZ),1b.2l=1b.1B.2l||1b.1J.3z("2l"),1b.1B.2l||(1b.2l.1n=a,1b.2l.1v=b),1b.2V=1b.2l.4J("2d"),1b.gG=1b.1J.3z("2l").4J("2d"),1b.2V.L3="7q",1b.nT={},h("Lt cb ez 5r",a,"x",b)}1a e(a){1e a.1i>0}1d f=a("../2D"),g=a("../gj"),h=a("../4R");d.1g=1u.3n(f.1g),d.1g.cw=1a(a){1e 1b.2V.lk="3i"==1p a&&a.uP?a.1t():a,1b.2V},d.1g.9o=1a(a,b,c,d,e){1b.cw(e).ii(a,b,c,d)},d.1g.4T=1a(a,b,c,d){1b.cw(d),1b.2V.uk(),1b.2V.M7(a+c/2,b+c/2,c/2,0,2*1R.PI,!0),1b.2V.um(),1b.2V.e2()},d.1g.uN=1a(a,b,c,d,e,f){1b.4T(a,b,c,d),1b.2V.M6=f.1t(),1b.2V.M5()},d.1g.uV=1a(a,b){1b.pV(a),1b.cw(b).e2()},d.1g.uY=1a(a){if(1s===a.eX){1b.gG.9j(a.1W,0,0);3c{1b.gG.v1(0,0,1,1),a.eX=!1}2S(b){1b.gG=1J.3z("2l").4J("2d"),a.eX=!0}}1e a.eX},d.1g.9j=1a(a,b,c,d,e,f,g,h,i){(!1b.uY(a)||1b.1B.9J)&&1b.2V.9j(a.1W,b,c,d,e,f,g,h,i)},d.1g.3L=1a(a,b,c){1b.2V.iF(),a.2E(e).3P(1a(a){1b.pV(a).3L()},1b),b.1K(c),1b.2V.lp()},d.1g.pV=1a(a){1e 1b.2V.uk(),a.3P(1a(a,b){"ew"===a[0]?1b.2V.ew.6R(1b.2V,a.9E(1)):1b.2V[0===b?"Mj":a[0]+"To"].6R(1b.2V,a.9E(1))},1b),1b.2V.um(),1b.2V},d.1g.5M=1a(a,b,c,d,e,f){1b.cw(a).5M=[b,c,d,e,f].8L(" ").5S(",")[0]},d.1g.uo=1a(a,b,c,d){1b.cA("uc",a.1t()).cA("Mg",b).cA("Md",c).cA("Me",d)},d.1g.uh=1a(){1b.cA("uc","9W(0,0,0,0)")},d.1g.uB=1a(a){1b.2V.LF=a},d.1g.uD=1a(a){1b.2V.ak(a.a0[0],a.a0[1]),1b.2V.cp.6R(1b.2V,a.eY),1b.2V.ak(-a.a0[0],-a.a0[1])},d.1g.cA=1a(a,b){1e 1b.nT[a]!==b&&(1b.nT[a]=1b.2V[a]=b),1b},d.1g.1w=1a(a,b,c){1b.2V.tU(a,b,c)},d.1g.gJ=1a(a,b,c,d,e,f,g,h,i){1d j=[["5o",1R.5m(e),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(f)],["5o",1R.5m(e+g),1R.5m(h+f)],["5o",1R.5m(e),1R.5m(h+f)]];1b.3L([j],1a(){1b.ln(a,b,c,d,i[3],i[0])},1b)},d.1g.ln=1a(a,b,c,d,e,f){1d g=1R.5m(d.1y+b.1y+e),h=1R.5m(d.1Q+b.1Q+f);1b.cw(1b.2V.Ly(1b.uC(a,c),"5x")),1b.2V.ak(g,h),1b.2V.e2(),1b.2V.ak(-g,-h)},d.1g.ux=1a(a,b){if(a 2Y g){1d c=1b.2V.LM(b.1y+b.1n*a.x0,b.1Q+b.1v*a.y0,b.1y+b.1n*a.x1,b.1Q+b.1v*a.y1);a.73.3P(1a(a){c.LQ(a.7x,a.3q.1t())}),1b.9o(b.1y,b.1Q,b.1n,b.1v,c)}},d.1g.uC=1a(a,b){1d c=a.1W;if(c.1n===b.1n&&c.1v===b.1v)1e c;1d d,e=1J.3z("2l");1e e.1n=b.1n,e.1v=b.1v,d=e.4J("2d"),d.9j(c,0,0,c.1n,c.1v,0,0,b.1n,b.1v),e},b.2n=d},{"../gj":12,"../4R":13,"../2D":19}],21:[1a(a,b,c){1a d(a,b,c,d){e.1K(1b,c,d),1b.uA=a,1b.8Y=[],1b.dZ=[],1b.91=(1b.2x?1b.2x.8r.91:1)*b}1d e=a("./8M");d.1g=1u.3n(e.1g),d.1g.m3=1a(a){1d b=1b.2x?1b.2x.8r:1s;1e b?b.uA?b:b.m3(a):a.8r},b.2n=d},{"./8M":14}],22:[1a(a,b,c){1a d(a){1b.lY=1b.uf(a),1b.uq=1b.ue(),1b.2U=1b.ud()}d.1g.uf=1a(a){1d b,c,d,e,f=!1;1e a.ed&&(b=a.ed(),b.eG&&(c=a.3z("JI"),c.2M.1v="JH",c.2M.7j="af",a.2A.4K(c),b.JD(c),d=b.eG(),e=d.1v,ug===e&&(f=!0),a.2A.aj(c))),f},d.1g.ue=1a(){1e"3Q"!=1p(1m 9e).g8},d.1g.ud=1a(){1d a=1m 9e,b=1J.3z("2l"),c=b.4J("2d");a.3a="1l:1W/2U+eC,<2U wc=\'gV://9d.w3.wp/wq/2U\'>";3c{c.9j(a,0,0),b.eo()}2S(d){1e!1}1e!0},b.2n=d},{}],23:[1a(a,b,c){1a d(a){1b.3a=a,1b.1W=1s;1d b=1b;1b.8c=1b.mc().2K(1a(){1e b.mh(a)?3K.4y(b.ub(a)):e(a)}).2K(1a(a){1e 1m 3K(1a(c){2t.4I.2U.eB.JN(a,b.lI.1K(b,c))})})}1d e=a("./g7"),f=a("./4L").eF;d.1g.mc=1a(){1e 2t.4I.2U&&2t.4I.2U.eB?3K.4y():3K.g4(1m 1E("4I.2U.js is 2a eJ, JW 7M 2U"))},d.1g.ub=1a(a){1e/^1l:1W\\/2U\\+eC;7T,/.7k(a)?1b.eF(1b.lA(a)):1b.lA(a)},d.1g.lA=1a(a){1e a.2B(/^1l:1W\\/2U\\+eC(;7T)?,/,"")},d.1g.mh=1a(a){1e/^1l:1W\\/2U\\+eC/i.7k(a)},d.1g.lI=1a(a){1d b=1b;1e 1a(c,d){1d e=1m 2t.4I.2U.eB.JR("c");b.1W=e.uj,e.JS(d.1n).JT(d.1v).wK(2t.4I.2U.eB.JC.JB(c,d)).Jo(),a(e.uj)}},d.1g.eF=1a(a){1e"1a"==1p 2t.un?2t.un(a):f(a)},b.2n=d},{"./4L":26,"./g7":28}],24:[1a(a,b,c){1a d(a,b){1b.3a=a,1b.1W=1s;1d c=1b;1b.8c=b?1m 3K(1a(b,d){c.1W=1m 9e,c.1W.8n=b,c.1W.7v=d,c.1W.3a="1l:1W/2U+eC,"+(1m Jl).Jr(a),c.1W.md===!0&&b(c.1W)}):1b.mc().2K(1a(){1e 1m 3K(1a(b){2t.4I.2U.eB.Js(a,c.lI.1K(c,b))})})}1d e=a("./gl");d.1g=1u.3n(e.1g),b.2n=d},{"./gl":23}],25:[1a(a,b,c){1a d(a,b){f.1K(1b,a,b)}1a e(a,b,c){1e a.1i>0?b+c.9a():1x 0}1d f=a("./8M");d.1g=1u.3n(f.1g),d.1g.ul=1a(){1b.1P.1l=1b.cp(1b.2x.2z("Jw"))},d.1g.cp=1a(a){1d b=1b.1P.1l;4F(a){1U"Jt":1e b.8F();1U"Ju":1e b.2B(/(^|\\s|:|-|\\(|\\))([a-z])/g,e);1U"Jv":1e b.9a();1j:1e b}},b.2n=d},{"./8M":14}],26:[1a(a,b,c){c.lF=1a(){1e"1l:1W/JZ;7T,Ks///Kt"},c.fP=1a(a,b){1e 1a(){1e a.6R(b,aZ)}},c.eF=1a(a){1d b,c,d,e,f,g,h,i,j="Kr+/",k=a.1i,l="";1I(b=0;k>b;b+=4)c=j.3U(a[b]),d=j.3U(a[b+1]),e=j.3U(a[b+2]),f=j.3U(a[b+3]),g=c<<2|d>>4,h=(15&d)<<4|e>>2,i=(3&e)<<6|f,l+=64===e?2o.56(g):64===f||-1===f?2o.56(g,h):2o.56(g,h,i);1e l},c.eL=1a(a){if(a.eG){1d b=a.eG(),c=1s==a.cH?b.1n:a.cH;1e{1Q:b.1Q,7q:b.7q||b.1Q+b.1v,1G:b.1y+c,1y:b.1y,1n:c,1v:1s==a.cI?b.1v:a.cI}}1e{}},c.eH=1a(a){1d b=a.uG?c.eH(a.uG):{1Q:0,1y:0};1e{1Q:a.cC+b.1Q,7q:a.cC+a.cI+b.1Q,1G:a.v0+b.1y+a.cH,1y:a.v0+b.1y,1n:a.cH,1v:a.cI}},c.lD=1a(a){1d b,c,d,e,f,g,h,i=" \\r\\n ",j=[],k=0,l=0,m=1a(){b&&(\'"\'===c.3j(0,1)&&(c=c.3j(1,c.1i-2)),c&&h.1L(c),"-"===b.3j(0,1)&&(e=b.3U("-",1)+1)>0&&(d=b.3j(0,e),b=b.3j(e)),j.1L({KD:d,5v:b.8F(),1k:f,3O:h,1W:1s})),h=[],b=d=c=f=""};1e h=[],b=d=c=f="",a.5S("").3P(1a(a){if(!(0===k&&i.3U(a)>-1)){4F(a){1U\'"\':g?g===a&&(g=1s):g=a;2C;1U"(":if(g)2C;if(0===k)1e k=1,1x(f+=a);l++;2C;1U")":if(g)2C;if(1===k){if(0===l)1e k=0,f+=a,1x m();l--}2C;1U",":if(g)2C;if(0===k)1e 1x m();if(1===k&&0===l&&!b.4t(/^78$/i))1e h.1L(c),c="",1x(f+=a)}f+=a,0===k?b+=a:c+=a}}),m(),j}},{}],27:[1a(a,b,c){1a d(a){e.6R(1b,aZ),1b.1S="lE"===a.3O[0]?e.gQ.lL:e.gQ.uZ}1d e=a("./iH");d.1g=1u.3n(e.1g),b.2n=d},{"./iH":9}],28:[1a(a,b,c){1a d(a){1e 1m 3K(1a(b,c){1d d=1m uW;d.4Y("ro",a),d.8n=1a(){eE===d.1Z?b(d.Km):c(1m 1E(d.rh))},d.7v=1a(){c(1m 1E("dM 1E"))},d.Kl()})}b.2n=d},{}]},{},[4])(4)}),!1a(a,b){"3i"==1p 2n&&"3i"==1p 4i?4i.2n=b():"1a"==1p cG&&cG.eI?cG("2k-5g",[],b):"3i"==1p 2n?2n["2k-5g"]=b():a["2k-5g"]=b()}(1b,1a(){1e 1a(a){1a b(d){if(c[d])1e c[d].2n;1d e=c[d]={2n:{},id:d,eJ:!1};1e a[d].1K(e.2n,e,e.2n,b),e.eJ=!0,e.2n}1d c={};1e b.m=a,b.c=c,b.p="",b(0)}([1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(43),f=d(e);b["1j"]=2k.4i("2k-5g",[]).wl("K6",f["1j"]),a.2n=b["1j"]},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a e(a,b){c(1b,e),1b.1l=a,1b.1w=b.1w||a,1b.1B=b};b["1j"]=d},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(){c(1b,a),1b.tB="7l",1b.ts="7l",1b.tC="b1",1b.uX=["K7","K4","G4","K0","K1","K2","K8","K9","Kg","Kj"],1b.v2=["Kk","Kf","Ke","Kb","Kc","Kd","Ml","F2","Au","At"],1b.v7=["Ae","Aj","Ak","B0","B1","AK","Az","AA","AB","AJ"]}1e a.1g.2f=1a(a,b,c){1d d="";c=c||"";1I(1d e=0;ec;c++)a="0"+a;1e a}1u.2y(b,"1F",{1k:!0});1d i=c(1),j=d(i),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1I(1d a="v6",b=0;b<1b.1l.1i;b++){1d c=2H(1b.1l[b]),d=c.1t(2);d=h(d,4-d.1i);1I(1d e=0;e=eE)d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):3H===d?c=1b.bb(a,b+1):98===d?(a[0]=a[0]>95?a[0]-96:a[0],c=1b.aW(a,b+1)):c=1b.aW(a,b+1);2p{1d e=a[0];d=32>e?e+64:e-32,a.9T(),c=1b.aW(a,b+1)}1d f=1b.b5(d),g=d*b;1e{3o:f+c.3o,7e:g+c.7e}},b.1g.bb=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),99===d?c=1b.cD(a,b+1):7l===d?c=1b.aW(a,b+1):98===d?(a[0]=a[0]<32?a[0]+96:a[0],c=1b.bb(a,b+1)):c=1b.bb(a,b+1)):(d=a[0]-32,a.9T(),c=1b.bb(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b.1g.cD=1a(a,b){if(a.1i<=0)1e{3o:"",7e:0};1d c,d;a[0]>=eE?(d=a[0]-67,a.9T(),c=3H===d?1b.bb(a,b+1):7l===d?1b.aW(a,b+1):1b.cD(a,b+1)):(d=10*(a[0]-48)+a[1]-48,a.9T(),a.9T(),c=1b.cD(a,b+1));1d e=1b.b5(d),f=d*b;1e{3o:e+c.3o,7e:f+c.7e}},b}(i["1j"]),k=1a(a){1a b(){e(1b,b);1d c=f(1b,a.1K(1b));1e c.1C="Aw",c.aK="me Av tV 2a 5Z ez a 5Z dS.",c}1e g(b,a),b}(1E);b["1j"]=j},1a(a,b){"2r 2g";1a c(a){1I(1d b=0,c=0;c0?b.2v+b.6M:0)+b.7s+b.bn}1a f(a,b,c){if(c.53&&a>b){if("4j"==c.54)1e 1R.aN((a-b)/2);if("1y"==c.54)1e 0;if("1G"==c.54)1e 1R.aN(a-b)}1e 0}1a g(a,b,c){1I(1d d=0;db&&(b=a[c].1v);1e b}1a j(a,b,c){1d d;d="3Q"==1p c?1J.3z("2l").4J("2d"):c,d.5M=b.cX+" "+b.2v+"px "+b.5M;1d e=d.Ag(a).1n;1e e}1u.2y(b,"1F",{1k:!0}),b.hP=b.it=b.ua=b.uQ=b.hO=1x 0;1d k=c(6),l=d(k);b.hO=i,b.uQ=e,b.ua=f,b.it=g,b.hP=h},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){z.1g[b]=z.1g[b.9a()]=z.1g[b.8F()]=1a(c,d){1d e=1b;1e e.lV.m1(1a(){1d g=l["1j"](e.8D,d);g=t["1j"](g);1d h=a[b],i=f(c,h,g);1e e.ey.1L(i),e})}}1a f(a,b,c){a=""+a;1d d=1m b(a,c);if(!d.2L())1D 1m w.ik(d.49.1C,a);1d e=d.2f();e=n["1j"](e);1I(1d f=0;f=2?2o.56(ex)+k(a):c>d?2o.56(m8)+i(a):2o.56(i3)+j(a),b=b.2B(/[\\tv\\tz]([^])[\\tv\\tz]/,1a(a,b){1e 2o.56(tA)+b})}1a i(a){1d b=a.4t(/^([\\b2-\\eA\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\b2-\\eA\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(8h)+j(a.2w(c[0].1i))}1a j(a){1d b=a.4t(/^([\\cE-\\b6\\7d-\\5q]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(b)1e b[1]+2o.56(i4)+k(a.2w(b[1].1i));1d c=a.4t(/^[\\cE-\\b6\\7d-\\5q]+/);1e c[0].1i===a.1i?a:c[0]+2o.56(eD)+i(a.2w(c[0].1i))}1a k(a){1d b=a.4t(/^(\\5q*[0-9]{2}\\5q*)+/)[0],c=b.1i;if(c===a.1i)1e a;a=a.2w(c);1d d=a.4t(/^[\\b2-\\eA\\7d-\\5q]*/)[0].1i,e=a.4t(/^[\\cE-\\b6\\7d-\\5q]*/)[0].1i;1e d>=e?b+2o.56(eD)+i(a):b+2o.56(8h)+j(a)}1u.2y(b,"1F",{1k:!0});1d l=c(4),m=d(l),n=1a(a){1a b(c,d){if(e(1b,b),-1!==c.2N(/^[\\b2-\\b6\\7d-\\tE]+$/))1d g=f(1b,a.1K(1b,h(c),d));2p 1d g=f(1b,a.1K(1b,c,d));1e f(g)}1e g(b,a),b}(m["1j"]);b["1j"]=n},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.hZ=b.hW=b.hV=b.by=1x 0;1d e=c(15),f=d(e),g=c(12),h=d(g),i=c(13),j=d(i),k=c(14),l=d(k);b.by=f["1j"],b.hV=h["1j"],b.hW=j["1j"],b.hZ=l["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1e i(k(a))}1a i(a){1e q[a].1t(2)}1a j(a){1e p[a]}1a k(a){1e p.3U(a)}1a l(a){1I(1d b=0,c=0;cb;b+=2)c+=2H(a[b]);1I(b=1;12>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{12}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e!d.mf&&d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g.i9=d.i9,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{13}$/)&&1b.1l[12]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.mg=1a(){1e["td","FB","FC","Fz","Fy","Fv","Fw","Fx","Ew","Ev"]},b.1g.hT=1a(){1d a=1m j["1j"],b=[],c=1b.mg()[1b.1l[0]],d=1b.1l.3j(1,6),e=1b.1l.3j(7,6);1e 1b.1B.53&&b.1L({1l:"Dv",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),b.1L({1l:a.2f(d,c),1w:1b.1w.3j(1,6),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(e,"m7"),1w:1b.1w.3j(7,6),1B:{2v:1b.2v}}),b.1L({1l:"7l",1B:{1v:1b.aB}}),1b.1B.i9&&1b.1B.53&&(b.1L({1l:"bX"}),b.1L({1l:"Dw",1w:1b.1B.i9,1B:{2v:1b.2v}})),b},b.1g.hU=1a(){1d a=1m j["1j"],b="",c=1b.mg()[1b.1l[0]];1e b+="7l",b+=a.2f(1b.1l.3j(1,6),c),b+="b1",b+=a.2f(1b.1l.3j(7,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["LL","LG","GL","GG"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{2}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.ia[2H(1b.1l)%4],c="tD";1e c+=a.2f(1b.1l,b,"oh"),{1l:c,1w:1b.1w}},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(2),i=d(h),j=c(1),k=d(j),l=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.ia=["Dt","Dq","Dr","Ds","Dy","Dz","DH","DI","DL","DF"],g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{5}$/)},b.1g.2f=1a(){1d a=1m i["1j"],b=1b.7e(),c="tD";1e c+=a.2f(1b.1l,1b.ia[b],"oh"),{1l:c,1w:1b.1w}},b.1g.7e=1a(){1d a=0;1e a+=3*2H(1b.1l[0]),a+=9*2H(1b.1l[1]),a+=3*2H(1b.1l[2]),a+=9*2H(1b.1l[3]),a+=3*2H(1b.1l[4]),a%10},b}(k["1j"]);b["1j"]=l},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=0;7>b;b+=2)c+=3*2H(a[b]);1I(b=1;7>b;b+=2)c+=2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){1e e(1b,b),-1!==c.2N(/^[0-9]{7}$/)&&(c+=h(c)),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{8}$/)&&1b.1l[7]==h(1b.1l)},b.1g.2f=1a(){1d a=1m j["1j"],b="",c=1b.1l.3j(0,4),d=1b.1l.3j(4,4);1e b+=a.tB,b+=a.2f(c,"Dp"),b+=a.tC,b+=a.2f(d,"Da"),b+=a.ts,{1l:b,1w:1b.1w}},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1d b,c=0;1I(b=1;11>b;b+=2)c+=2H(a[b]);1I(b=0;11>b;b+=2)c+=3*2H(a[b]);1e(10-c%10)%10}1u.2y(b,"1F",{1k:!0});1d i=c(2),j=d(i),k=c(1),l=d(k),m=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{11}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.53=d.53,d.2v>10*d.1n?g.2v=10*d.1n:g.2v=d.2v,g.aB=d.1v+g.2v/2+d.6M,g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{12}$/)&&1b.1l[11]==h(1b.1l)},b.1g.2f=1a(){1e 1b.1B.mf?1b.hU():1b.hT()},b.1g.hU=1a(){1d a=1m j["1j"],b="";1e b+="7l",b+=a.2f(1b.1l.3j(0,6),"td"),b+="b1",b+=a.2f(1b.1l.3j(6,6),"m7"),b+="7l",{1l:b,1w:1b.1w}},b.1g.hT=1a(){1d a=1m j["1j"],b=[];1e 1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(0,1),1B:{54:"1y",2v:1b.2v}}),b.1L({1l:"7l"+a.2f(1b.1l[0],"L"),1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(1,5),"D2"),1w:1b.1w.3j(1,5),1B:{2v:1b.2v}}),b.1L({1l:"b1",1B:{1v:1b.aB}}),b.1L({1l:a.2f(1b.1l.3j(6,5),"D3"),1w:1b.1w.3j(6,5),1B:{2v:1b.2v}}),b.1L({1l:a.2f(1b.1l[11],"R")+"7l",1B:{1v:1b.aB}}),1b.53&&b.1L({1l:"tf",1w:1b.1w.3j(11,1),1B:{54:"1G",2v:1b.2v}}),b},b}(l["1j"]);b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.er=b.ih=b.ig=b.hX=b.hY=1x 0;1d e=c(18),f=d(e),g=c(21),h=d(g),i=c(20),j=d(i),k=c(19),l=d(k),m=c(22),n=d(m);b.hY=f["1j"],b.hX=h["1j"],b.ig=j["1j"],b.ih=l["1j"],b.er=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iw=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c,d))}1e g(b,a),b.1g.2f=1a(){1e{1l:"De",1w:1b.1w}},b.1g.2L=1a(){1e!0},b}(i["1j"]);b.iw=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1a h(a){1I(1d b=0,c=0;13>c;c++)b+=2H(a[c])*(3-c%2*2);1e 10*1R.eM(b/10)-b}1u.2y(b,"1F",{1k:!0}),b.iA=1x 0;1d i=c(1),j=d(i),k=1a(a){1a b(c,d){e(1b,b),-1!==c.2N(/^[0-9]{13}$/)&&(c+=h(c));1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[0-9]{14}$/)&&1b.1l[13]==h(1b.1l)},b.1g.2f=1a(){1I(1d a="tG",b=0;14>b;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(j["1j"]);b.iA=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iy=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.cs={0:"tc",1:"tb",2:"t8",3:"t9",4:"tg",5:"tj",6:"tp",7:"tk",8:"tl",9:"b1"},g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^([0-9]{2})+$/)},b.1g.2f=1a(){1I(1d a="tG",b=0;b<1b.1l.1i;b+=2)a+=1b.hQ(1b.1l.3j(b,2));1e a+="tH",{1l:a,1w:1b.1w}},b.1g.hQ=1a(a){1I(1d b="",c=1b.cs[a[0]],d=1b.cs[a[1]],e=0;5>e;e++)b+="1"==c[e]?"u0":"1",b+="1"==d[e]?"tZ":"0";1e b},b}(i["1j"]);b.iy=j},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.eN(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.eN(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),f(1b,a.1K(1b,c+j.lX(c),d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0});1d h=c(3),i=d(h),j=c(5),k=1a(a){1a b(c,d){1e e(1b,b),c+=j.lX(c),c+=j.eN(c),f(1b,a.1K(1b,c,d))}1e g(b,a),b}(i["1j"]);b["1j"]=k},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0}),b.iE=b.iG=b.iC=b.iB=b.ix=1x 0;1d e=c(3),f=d(e),g=c(27),h=d(g),i=c(29),j=d(i),k=c(28),l=d(k),m=c(30),n=d(m);b.ix=f["1j"],b.iB=h["1j"],b.iC=j["1j"],b.iG=l["1j"],b.iE=n["1j"]},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.iD=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b),0===c.2N(/^[0-9\\-\\$\\:\\.\\+\\/]+$/)&&(c="A"+c+"A");1d g=f(1b,a.1K(1b,c.9a(),d));1e g.1w=g.1B.1w||g.1w.2B(/[A-D]/g,""),g}1e g(b,a),b.1g.2L=1a(){1e-1!==1b.1l.2N(/^[A-D][0-9\\-\\$\\:\\.\\+\\/]+[A-D]$/)},b.1g.2f=1a(){1I(1d a=[],b=1b.tY(),c=0;c<1b.1l.1i;c++)a.1L(b[1b.1l.Ek(c)]),c!==1b.1l.1i-1&&a.1L("0");1e{1w:1b.1w,1l:a.8L("")}},b.1g.tY=1a(){1e{0:"Et",1:"Eu",2:"Er",3:"Eq",4:"Em",5:"Eo",6:"Ep",7:"Ea",8:"E9",9:"DV","-":"DW",$:"DX",":":"DU","/":"DT",".":"DQ","+":"DR",A:"DS",B:"DY",C:"E0",D:"E6"}},b}(i["1j"]);b.iD=j},1a(a,b,c){"2r 2g";1u.2y(b,"1F",{1k:!0});1d d=c(17),e=c(16),f=c(23),g=c(25),h=c(26),i=c(31),j=c(34),k=c(32),l=c(24);b["1j"]={hR:d.hR,by:e.by,hV:e.hV,hW:e.hW,hZ:e.hZ,hY:f.hY,hX:f.hX,ig:f.ig,ih:f.ih,er:f.er,iA:g.iA,iy:h.iy,ix:i.ix,iB:i.iB,iC:i.iC,iG:i.iG,iE:i.iE,im:j.im,iD:k.iD,iw:l.iw}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b){if(!a)1D 1m 4s("1b 2u\'t 2m 4r - 3Z() 2u\'t 2m 4p");1e!b||"3i"!=1p b&&"1a"!=1p b?a:b}1a g(a,b){if("1a"!=1p b&&1s!==b)1D 1m 2e("4a 4f 2X 4e be 1s or a 1a, 2a "+1p b);a.1g=1u.3n(b&&b.1g,{49:{1k:a,4d:!1,4g:!0,4c:!0}}),b&&(1u.2s?1u.2s(a,b):a.4b=b)}1u.2y(b,"1F",{1k:!0}),b.im=1x 0;1d h=c(1),i=d(h),j=1a(a){1a b(c,d){e(1b,b);1d g=f(1b,a.1K(1b,c,d));1e g.3B=2H(c,10),g}1e g(b,a),b.1g.2f=1a(){1I(1d a=1b.3B,b="";!iv(a)&&0!=a;)a%2===0?(b="Vk"+b,a=(a-2)/2):(b="3H"+b,a=(a-1)/2);1e b=b.9E(0,-2),{1l:b,1w:1b.1w}},b.1g.2L=1a(){1e 1b.3B>=3&&1b.3B<=V6},b}(i["1j"]);b.im=j},1a(a,b){"2r 2g";1a c(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1u.2y(b,"1F",{1k:!0});1d d=1a(){1a a(b){c(1b,a),1b.aX=b}1e a.1g.u8=1a(a){if("ik"!==a.1C)1D a;if(1b.aX.8D.2L===1b.aX.u2.2L)1D a.aK;1b.aX.8D.2L(!1),1b.aX.7M=1a(){}},a.1g.m1=1a(a){3c{1d b=a.6R(1x 0,aZ);1e 1b.aX.8D.2L(!0),b}2S(a){1e 1b.u8(a),1b.aX}},a}();b["1j"]=d},1a(a,b){"2r 2g";1a c(a){1e a.7s=a.7s||a.7w,a.bn=a.bn||a.7w,a.9V=a.9V||a.7w,a.8J=a.8J||a.7w,a}1u.2y(b,"1F",{1k:!0}),b["1j"]=c},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){1d b={};1I(1d c in i["1j"])i["1j"].9v(c)&&(a.m2("m5-"+c.8F())&&(b[c]=a.eU("m5-"+c.8F())),a.m2("1l-"+c.8F())&&(b[c]=a.eU("1l-"+c.8F())));1e b.1k=a.eU("m5-1k")||a.eU("1l-1k"),b=g["1j"](b)}1u.2y(b,"1F",{1k:!0});1d f=c(8),g=d(f),h=c(9),i=d(h);b["1j"]=e},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a){if("ar"==1p a)1e f(a);if(bf.cK(a)){1I(1d b=[],c=0;c0?(e=0,c.54="1y"):"1G"==a.54?(e=b.1n-1,c.54="1G"):(e=b.1n/2,c.54="4j"),c.tU(b.1w,e,f)}},a.1g.tT=1a(a){1d b=1b.2l.4J("2d");b.ak(a.1n,0)},a.1g.v8=1a(){1d a=1b.2l.4J("2d");a.lp()},a}();b["1j"]=i},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(40),f=d(e),g=c(42),h=d(g);b["1j"]={cb:f["1j"],ws:h["1j"]}},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1a e(a,b){if(!(a 2Y b))1D 1m 2e("3y 1K a 1f as a 1a")}1a f(a,b,c){1d d=1J.ly(l,"g");1e d.3x("cp","ak("+a+", "+b+")"),c.4K(d),d}1a g(a,b){a.3x("2M","e2:"+b.es+";")}1a h(a,b,c,d,e){1d f=1J.ly(l,"ew");1e f.3x("x",a),f.3x("y",b),f.3x("1n",c),f.3x("1v",d),e.4K(f),f}1u.2y(b,"1F",{1k:!0});1d i=c(6),j=d(i),k=c(10),l="gV://9d.w3.wp/wq/2U",m=1a(){1a a(b,c,d){e(1b,a),1b.2U=b,1b.4V=c,1b.1B=d}1e a.1g.7M=1a(){1d a=1b.1B.8J;1b.wz();1I(1d b=0;b<1b.4V.1i;b++){1d c=1b.4V[b],d=j["1j"](1b.1B,c.1B),e=f(a,d.7s,1b.2U);g(e,d),1b.wy(e,d,c),1b.ww(e,d,c),a+=c.1n}},a.1g.wz=1a(){1I(;1b.2U.bw;)1b.2U.aj(1b.2U.bw);k.it(1b.4V,1b.1B);1d a=k.hP(1b.4V),b=k.hO(1b.4V),c=a+1b.1B.8J+1b.1B.9V;1b.wd(c,b),1b.1B.6H&&h(0,0,c,b,1b.2U).3x("2M","e2:"+1b.1B.6H+";")},a.1g.wy=1a(a,b,c){1d d,e=c.1l;d="1Q"==b.bo?b.2v+b.6M:0;1I(1d f=0,g=0,i=0;i0&&(h(g-b.1n*f,d,b.1n*f,b.1v,a),f=0);f>0&&h(g-b.1n*(f-1),d,b.1n*f,b.1v,a)},a.1g.ww=1a(a,b,c){1d d=1J.ly(l,"1w");if(b.53){1d e,f;d.3x("2M","5M:"+b.cX+" "+b.2v+"px "+b.5M),f="1Q"==b.bo?b.2v-b.6M:b.1v+b.6M+b.2v,"1y"==b.54||c.dX>0?(e=0,d.3x("1w-lj","5Z")):"1G"==b.54?(e=c.1n-1,d.3x("1w-lj","cj")):(e=c.1n/2,d.3x("1w-lj","ld")),d.3x("x",e),d.3x("y",f),d.4K(1J.dW(c.1w)),a.4K(d)}},a.1g.wd=1a(a,b){1d c=1b.2U;c.3x("1n",a+"px"),c.3x("1v",b+"px"),c.3x("x","he"),c.3x("y","he"),c.3x("U3","0 0 "+a+" "+b),c.3x("wc",l),c.3x("pl","1.1"),c.2M.cp="ak(0,0)"},a}();b["1j"]=m},1a(a,b,c){"2r 2g";1a d(a){1e a&&a.1F?a:{"1j":a}}1u.2y(b,"1F",{1k:!0});1d e=c(11),f=d(e);b["1j"]=1a(){"U4";1e{2B:!0,wk:"E",dY:"U5",5O:{wb:"@",wa:"@?",cm:"="},Ub:"",e1:1a(a,b,c,d){1d e=1a(){1d b=a.wa||"5g",c="";4F(a.wb){1U"2U":c=\'<2U 1f="\'+b+\'">\';2C;1U"7g":c=\'<7g 1f="\'+b+\'">\';2C;1U"2l":c=\'<2l 1f="\'+b+\'">\';2C;1j:c=\'<7g 1f="\'+b+\'">\'}1e c},g={9l:"by",es:"#nw",1n:2,1v:3H,53:!1,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:10,7s:10,bn:10,8J:10,9V:10,2L:1a(){1e!0}},h=1a(a){1e 1u.wm(g).3P(1a(b){a.9v(b)?a[b]=a[b]||g[b]:a[b]=g[b]}),a},i=1a(a){1d c=2k.5b(e()),g=d.$U6||"",h=f["1j"](c[0],g,a);1e 2k.3P(b.dZ(),1a(a){1e a.U8()}),b.TQ(c),h};i(h(a.9v("cm")&&"3Q"!=1p a.cm?a.cm:g)),a.$9L("cm",1a(a){i(a)},!0),d.$7M=1a(){i(a.cm)}}}},a.2n=b["1j"]}])}),2k.4i("5j",["Tm","Tl","Tg","ab-7T","ng.oa","ui.Ts","Tt","e8-4F","2k-5g","oe","2k.2z.TB","TE.wj","TI.Tz"]).wl("jD",["$66",1a(a){1e{wk:"A",e1:1a(b,c,d){c.on("Tx",1a(){a.wJ()})}}}]).hq("wi",1a(){1e{mK:1a(a){1e a.gZ=nC,a}}}).Ue(["$Uf","$UI",1a(a,b){a.e0("/",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/9p",{4P:"3m/9p.2T",3p:"nv",hc:"9p"}).e0("/6O",{4P:"3m/6O.2T",3p:"vp",hc:"6O"}).e0("/7r",{4P:"3m/7r.2T",3p:"zw",hc:"7r"}).UH({UF:"/"}),b.UC.1L("wi")}]).kC(["$66","$bT","$gV","7T","o9","oa","$2E","n5","UE","oe","$hs","wj","$w0","1N","$Wo",1a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){1a p(){a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.nr=a.3A+"4C/3o.4W"}UN.UU(1J.2A),a.nI=1a(a,b){a&&b3(1a(){a.UV=b,a.UT=b},0)},2o.1g.hv=1a(a,b,c){1e 1b.2B(1m wB(a.2B(/([\\/\\,\\!\\\\\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\<\\>\\-\\&])/g,"\\\\$&"),c?"gi":"g"),"ar"==1p b?b.2B(/\\$/g,"$$$$"):b)},a.hd=1a(a,b){1d c=1m wB(a,"g"),d=c.UB(b);1e d},a.hm=1a(b){1d c=/^[a-zA-og-9.!#$%&’*+\\/=?^9M`{|}~-]+@[a-zA-og-9-]+(?:\\.[a-zA-og-9-]+)*$/i,d={};1e d.1Z=!0,d.8m=1x 0,b&&d.1Z&&!c.7k(b)&&(d.8m=n[a.1c.1M].6C,d.1Z=!1),d},a.hl=1a(b,c){1d d=/^[^a-z]*$/i,e={};if(e.1Z=!0,e.8m=1x 0,b&&c&&e.1Z)3c{e.1Z=2t.Un.Uk(b,c),e.8m=n[a.1c.1M].5P}2S(f){e.8m=f,""===f&&(e.8m=n[a.1c.1M].5P),e.1Z=!1}1e b&&e.1Z&&!d.7k(b)&&(e.8m=n[a.1c.1M].5P,e.1Z=!1),e},a.h9=!0,a.1q=!1,a.w9="3.12.",a.h9||(a.1q=!0),a.wV="fQ://9d.Ug.hE.my/",a.np="fQ://qM.bm.hE/",a.nm="fQ://Ui.bm.co.id/",a.ns="fQ://9P.bm.hE/",a.3A=a.wV,a.mH=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wU",a.d3=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wS",a.dj=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wX",a.mO=a.3A+"4C/5n/ae/5Y.4W?8B=4Q&aq=aw/wY",a.9K=a.3A+"4C/5n/x5/5Y.4W",a.d5=a.3A+"4C/5n/x4/5Y.4W",a.bY=a.3A+"4C/5n/dI/1X.4W",a.dH="",a.6F="",a.bZ=a.3A+"4C/5n/x3/5Y.4W",a.bJ="",a.rY="XI://",a.mW="XN://",a.hk="XM://",a.Xt="Xv://",a.Xw="XA://",a.bz="XP://",a.vV="Xy://",a.nr=a.3A+"4C/3o.4W",a.vt="XO.do",a.vy="Y6/8W/ec/Y5",a.vx="Y4.do",a.nN=!1,a.bI=!0,a.77=[],a.5L=0,a.nM=!1,a.al=!1,a.wD=!1,a.5F=1x 0,a.rC=nC,a.hA=Y2,a.n4=0,a.ne=!1,a.ai=!1,a.2P=1a(){1d a={};1e a.6j=n.3l.6j,a.6k=n.3l.6k,a.6p=n.3l.6p,a.6v=n.3l.6v,a.6X=n.3l.6X,a.6s=n.3l.6s,a.6I=n.3l.6I,a.6G=n.3l.6G,a.5E=n.3l.5E,a.6L=n.3l.6L,a.6r=n.3l.6r,a.6A=n.3l.6A,a.6B=n.3l.6B,a.6x=n.3l.6x,a.6u=n.3l.6u,a.6b=n.3l.6b,a.6Q=n.3l.6Q,a.6K=n.3l.6K,a.6t=n.3l.6t,a.5N=n.3l.5N,a.6h=n.3l.6h,a.6Z=n.3l.6Z,a.5C=n.3l.5C,a.6m=n.3l.6m,a},a.1c={3E:"",3D:"",1T:"",2J:"",3h:"",2i:"",bv:"",3F:"4B",3g:"MY",2F:"",4z:!0,vw:!1,2b:"",9H:!0,4o:"",3I:"",3t:"",3r:"",5c:"",hr:"0",eP:!1,XT:"",hx:"",4l:"",3J:"",7o:"",hu:"2",XW:"",cR:"",aE:"",hn:"",hF:"bm-4Q-nl-9d",Y0:!1,8C:"",5G:"",5t:"",7h:"",bh:"",bj:"",5k:"",3w:!0,6o:"MY",ci:"bW",6d:"",8U:"",bt:"",oK:"",ht:"1",5d:"",6a:"",4m:"",lx:"",au:"",hH:!0,nX:"",6N:"vu",8O:"0",c0:!1,ep:!1,nB:"",bg:"",bl:"",w1:"",nz:"",bS:"",t4:"",fC:"",fl:"",nK:!1,4Z:!1,4M:!1,fe:!1,cJ:!1,cW:!1,1M:"EN",ff:"",fG:"",jI:!1,jH:!1,jE:!1,jF:!1,wH:!1,nn:!1},!a.h9,a.1c.1M&&(a.1c.1M=2o(a.1c.1M).9a()),a.XX=n[a.1c.1M].6J,a.XY=n[a.1c.1M].7u,a.Xz=n[a.1c.1M].6e,a.$9L("1c.6o",1a(){1d b=n.4E[a.1c.1M],c=[];1I(1d d in b)c.1L([d,b[d]]);1d e=c,f=g("2E")(e,a.1c.6o,!0);f.1i?a.1c.ci=f[0][1]:a.1c.6o=""}),a.$9L("1c.5t",1a(){if(a.1c.5t){1d b=2o(a.1c.5t);b=b.2B(/\\//g,"");1d c="";b.1i>4&&(b=b.2w(0,4)),1===b.1i&&(c=2H(b.2w(0,1)),c>1&&(b="")),2===b.1i&&(c=2H(b.2w(0,2)),c>12&&(b=b.2w(0,1))),b.1i>2&&(b=b.2w(0,2)+"/"+b.2w(2,b.1i)),a.1c.5t=b,a.nI(2k.5b(1J.8R("vs"))[0],b.1i),5===a.1c.5t.1i&&(a.1c.bh=a.1c.5t.2w(0,2),a.1c.bj=a.1c.5t.2w(3,5))}}),a.$9L("1c.3w",1a(){if(a.1c.3w)a.1c.8C="",a.1c.6d="",a.1c.5G="",a.1c.5t="",a.1c.7h="",a.1c.bh="",a.1c.bj="",a.1c.5k="";2p if(a.1c.6a){if(a.1c.6a.1i>0&&!a.1c.4m)if(a.1c.fC){1d b=g("2E")(a.1c.6a,a.1c.fC,!0);if(b.1i){a.1q;1d c=a.1c.6a.3U(b[0]);a.1c.4m=a.1c.6a[c]}2p a.1c.4m=a.1c.6a[0]}2p a.1c.4m=a.1c.6a[0];a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k}}),a.$9L("1c.4m",1a(){!a.1c.3w&&a.1c.4m&&(a.1c.6d=a.1c.4m.cv+"******"+a.1c.4m.cx,a.1c.5G="",a.1c.5t=a.1c.4m.aF.2w(2,4)+"/"+a.1c.4m.aF.2w(0,2),a.1c.7h=a.1c.4m.ei,a.1c.6o=a.1c.4m.ej,a.1c.5k=a.1c.4m.5k)}),a.n6=1a(){1e a.hd("nD 4.1",a.1c.aE)||a.hd("nD 4.2",a.1c.aE)||a.hd("nD 4.3",a.1c.aE)?!0:!1},a.6g=1a(){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.5c||b||(c.2Z=n[a.1c.1M].8s,b=!0),a.1c.5c&&a.1c.5c.1i<5&&!b&&(c.2Z=n[a.1c.1M].6h,b=!0),"c5"!==a.1c.2b||b||(c.2Z=n[a.1c.1M].5u,b=!0),"4X"!==a.1c.2b&&"aA"!==a.1c.2b||b||(a.1c.8C&&!(a.1c.8C.1i<16)||b||(c.2Z=n[a.1c.1M].8t,b=!0),l.aT(a.1c.8C)||!a.1c.3w||b||(c.2Z=n[a.1c.1M].8q,b=!0),a.1c.5t&&!(a.1c.5t.1i<5)||b||(c.2Z=n[a.1c.1M].7O,b=!0),a.1c.5G&&!(a.1c.5G.1i<3)||b||(c.2Z=n[a.1c.1M].8w,b=!0),a.1c.7h||(a.1c.7h="o1 wR"),a.1c.bS&&!b&&a.1c.bS.1i>0&&(b=e.mt(a.1c.8C))),"cq"!==a.1c.2b||b||(a.1c.8U&&!(a.1c.8U.1i<10)||b||(c.2Z=n[a.1c.1M].7F,b=!0),a.1c.bt||b||(c.2Z=n[a.1c.1M].7C,b=!0)),b){1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){},1a(){2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1,a.1c.fe=!1,m.oc()})}2p a.1c.nK?e.t3():a.1c.wH?e.qm():e.qw()},a.WG=1a(a){1d b,c;1J.ed?(b=1J.ed(),b.WQ(a),b.x7(!1),c=2t.WP(),c.WO(),c.WM(b)):1J.WN&&(b=1J.2A.WD(),b.WC(a),b.x7(!1),b.hS())},a.$9L("1c.6d",1a(){if(a.1c.6d){1d b=2o(a.1c.6d);if(b=b.2B(/ /g,""),6===b.1i&&a.1c.8O&&"1"===a.1c.8O&&e.sv(b),6===b.1i&&a.1c.bS&&a.1c.bS.1i>0){1d c=e.mt(b);c&&(a.1c.6d="")}b.1i>16&&(b=b.2w(0,16)),a.n6()||(b.1i>4&&b.1i<=8?b=b.2w(0,4)+" "+b.2w(4,b.1i):b.1i>8&&b.1i<=12?b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,b.1i):b.1i>12&&b.1i<16&&(b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,b.1i))),16===b.1i&&(a.1c.8C=b,b=b.2w(0,4)+" "+b.2w(4,8)+" "+b.2w(8,12)+" "+b.2w(12,16)),b&&(a.1c.6d=b,a.nI(2k.5b(1J.8R("vv"))[0],b.1i))}}),a.$9L("1c.5G",1a(){if(a.1c.5G){1d b=2o(a.1c.5G);b.1i>4&&(b=b.2w(0,4)),a.1c.5G=b}}),a.$9L("5L",1a(){a.1c.4Z||(a.1q,a.5L>0?(a.1q,a.nN=!0):0===a.5L&&a.al&&(a.1q,a.nN=!1,a.wD=!0,a.o0()))}),a.o0=1a(){a.1q,a.1c.fe&&!a.nM?(a.nM=!0,a.6g()):a.1c.fe||(a.1q,2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),a.bI=!1)},a.wJ=1a(){if(!a.1c.6a&&a.1c.3I&&a.1c.3t&&a.1c.3r){1d b=!1,c={};if(c.a1=n[a.1c.1M].6l,c.2Z="",a.1c.3I||b||(c.2Z=n[a.1c.1M].7z,b=!0),a.1c.3I&&a.1c.3I.1i<3&&!b&&(c.2Z=n[a.1c.1M].5N,b=!0),a.1c.3t||b||(c.2Z=n[a.1c.1M].6C,b=!0),a.1c.3t&&!b&&a.1c.3t.1i<5&&(c.2Z="4u 59 2X be 8Q 8N 4 9b",b=!0),a.1c.3t&&!b&&a.1c.cJ){1d d=a.hm(a.1c.3t);d.1Z||(c.2Z=d.8m,b=!0)}if(a.1c.3r||b||(c.2Z=n[a.1c.1M].5P,b=!0),a.1c.3r&&a.1c.3r.1i<5&&!b&&(c.2Z=n[a.1c.1M].5C,b=!0),a.1c.3r&&!b&&a.1c.cW){1d d=a.hl(a.1c.3r,a.1c.3g);d.1Z||(c.2Z=d.8m,b=!0)}if(b){a.1c.6a=1x 0;1d f=k.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e c}}});f.3o.2K(1a(){m.oc()},1a(){})}2p e.mD()}},a.hb=1a(b){a.1q,i.wK(b)},a.wM=1a(b){1d c=!1,d=n.4E[a.1c.1M],e=[];1I(1d f in d)e.1L([f,d[f]]);1d h=e,i=g("2E")(h,b,!0);1e i.1i&&(c=!0),c},a.Xb=1a(b){a.1q;1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3G),c},a.z7=1a(){1d b=a.1c.2i,c=5W(b);c=3H*c,a.1c.oK=c.dU(0)},a.f5=1a(){if(a.1c.1M&&n[a.1c.1M]||(a.1c.1M="EN"),a.1c.1M=2o(a.1c.1M).9a(),o.X9(),!a.1c.3F)1e 1x h.3f({1E:a.2P().6L});3c{a.1c.3F=2o(a.1c.3F.55())}2S(b){a.1q}if(!a.1c.2i)1e 1x h.3f({1E:a.2P().5E});1d c;if("vR"===a.1c.3F||"RP"===a.1c.3F){if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2),c=g("3B")(a.1c.2i,0),a.1c.bv=2o(c).2B(/,/g,".");2p if(2k.wN(a.1c.2i)){1d i=a.1c.2i.5S(",");if(2===i.1i)c=2o(i[0]).2B(/\\./g,""),c=c+"."+i[1];2p if(1===i.1i)if("."===i[0].2w(i[0].1i-3,i[0].1i-2)){1d k=i[0].2w(0,i[0].1i-3);k=k.2B(/\\./g,"");1d l=i[0].2w(i[0].1i-2);c=k+"."+l}2p c=i[0].2B(/\\./g,"");2p if(i.1i>2)1e 1x h.3f({1E:a.2P().6m});if(c=5W(c).dU(2),a.1c.2i=c,a.1c.bv=g("3B")(a.1c.2i,0),a.1c.bv=2o(a.1c.bv).2B(/,/g,"."),!a.1c.2i)1e 1x h.3f({1E:a.2P().5E})}}2p{if(2k.wP(a.1c.2i))a.1c.2i=a.1c.2i.dU(2);2p if(2k.wN(a.1c.2i)&&(c=5W(a.1c.2i).dU(2),a.1c.2i=c,!a.1c.2i))1e 1x h.3f({1E:a.2P().5E});a.1c.bv=g("3B")(a.1c.2i,2)}if(a.1c.2i){1d m=ax(a.1c.2i);if(0>=m)1e 1x h.3f({1E:a.2P().6m})}if(!a.1c.3E)1e 1x h.3f({1E:a.2P().6v});3c{a.1c.3E=2o(a.1c.3E.55())}2S(b){a.1q}if(!a.1c.3D)1e 1x h.3f({1E:a.2P().6X});3c{a.1c.3D=2o(a.1c.3D.55())}2S(b){a.1q}if(!a.1c.1T)1e 1x h.3f({1E:a.2P().6s});3c{a.1c.1T=2o(a.1c.1T.55())}2S(b){a.1q}if(!a.1c.2J)1e 1x h.3f({1E:a.2P().6I});3c{a.1c.2J=2o(a.1c.2J.55())}2S(b){a.1q}if(!a.1c.3h)1e 1x h.3f({1E:a.2P().6G});3c{a.1c.3h=2o(a.1c.3h.55())}2S(b){a.1q}if(!a.1c.3g)1e 1x h.3f({1E:a.2P().6r});3c{a.1c.3g=2o(a.1c.3g.55())}2S(b){a.1q}if(!a.wM(a.1c.3g))1e 1x h.3f({1E:a.2P().6A});if(!a.1c.2F)1e 1x h.3f({1E:a.2P().6B});3c{a.1c.2F=2o(a.1c.2F.55())}2S(b){a.1q}if((1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d q=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,q).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,q).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,q).1t()}}2S(b){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);if(1x 0===a.1c.hn&&(a.1c.hn="x"),a.1c.cR=a.w9+a.1c.hn,a.1c.aE=f.WZ.w8,a.1c.hu="2",a.1c.ht="1",1x 0===a.1c.hr&&(a.1c.hr="0"),a.1c.vw=!1,a.1c.cJ||(a.1c.cJ=!1),a.1c.cW||(a.1c.cW=!1),a.1c.8O||(a.1c.8O="0"),1x 0===a.1c.hH&&(a.1c.hH=!0),a.1c.hF||(a.1c.hF="bm-4Q-nl-9d"),a.1c.9H||(a.1c.9H=!1),a.1c.2b?"c5"===a.1c.2b&&(a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u):(a.1c.2b="c5",a.1c.9H=!0,a.1c.au=n[a.1c.1M].5u),a.1c.4o||(a.1c.4o=!1),a.1c.3I&&a.1c.3t&&a.1c.3r&&a.1c.5c&&a.1c.3I||(a.1c.4o=!0),a.1c.3t){3c{a.1c.3t=2o(a.1c.3t.55())}2S(b){a.1q}if(a.1c.cJ&&!a.1c.4o){1d r=a.hm(a.1c.3t);if(!r.1Z)1e 1x h.3f({1E:a.2P().6K})}if(a.1c.3t.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6Z})}if(a.1c.3r){3c{a.1c.3r=2o(a.1c.3r.55())}2S(b){a.1q}if(a.1c.cW&&!a.1c.4o){1d r=a.hl(a.1c.3r,a.1c.3g);if(!r.1Z)1e 1x h.3f({1E:a.2P().6t})}if(a.1c.3r.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5C})}if(a.1c.5c){3c{a.1c.5c=2o(a.1c.5c.55())}2S(b){a.1q}if(a.1c.5c.1i<5&&!a.1c.4o)1e 1x h.3f({1E:a.2P().6h})}if(a.1c.3I){3c{a.1c.3I=2o(a.1c.3I.55())}2S(b){a.1q}if(a.1c.3I.1i<3&&!a.1c.4o)1e 1x h.3f({1E:a.2P().5N})}1e a.1c.eP||(a.1c.eP=!1),a.1c.6o="MY",a.1c.ci="bW",a.1c.3w=!0,a.1c.4M=!1,a.1c.fl||(a.1c.fl="Wz"),a.1c.nK&&(a.1c.hx=["4X","aA"]),1x 0!==a.1c.4Z&&a.1c.4Z?a.1c.4Z&&(a.1c.6N="9r"):(a.1c.4Z=!1,a.1c.6N="vu"),"9Q"!==a.1c.3J||a.1c.4l?(a.1c.ff||(a.1c.ff=2o(2H(a.1c.ff))),a.1c.fG||(a.1c.fG=2o(2H(a.1c.fG))),a.1c.nB&&b3(1a(){a.$6R(a.hb(a.1c.nB))},0),(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl",XR.XQ(n.4E.ID)),p()),a.1c.nn&&(a.3A=a.ns,p()),1x(a.1c.3J&&"ft"===a.1c.3J?a.cU():e.rb())):1x h.3f({1E:a.2P().6x})},a.XS=1a(){1e a.1c.aE},a.vE=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].4v),c},a.vF=1a(b){1d c="",d=g("2E")(a.1c.5d,{1C:b},!0);1e d.1i&&(c=d[0].3W+" "+d[0].1C),c},a.r2=1a(b){1d c="",d=g("2E")(a.1c.5d,{3G:b},!0);1e d.1i&&(c=d[0].1C),c},a.f4=1a(a,b){1e 1R.aN(1R.nW()*(b-a+1)+a)},a.fq=1a(b){1d c=!1;if(b&&b.9c&&b.5p&&b.52&&b.3e){1d d=a.1c.1T,e=a.1c.2F;if(a.1c.4z){1d f=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();e=1Y.4A.5B(a.1c.2F.1t(),f).1t(1Y.5z.5w)}1d g=d+b.9c+b.5p+b.52+b.3e+e,h=1Y.7i(g).1t();h===b.7o.1t()&&(c=!0)}1e c},2t.Yb=1a(){a.ai=!0},2t.f5=1a(b,c){a.1c={},c&&(a.nt=c),a.1q;3c{a.1c=5H.ac(b)}2S(d){a.1c=2k.vB(a.1c,b)}a.1q,a.f5()},2t.XU=1a(b){1d c=b.nA;3c{c=5H.ac(b).nA}2S(d){c=b.nA}a.1q;1d f="";c.3U(a.nr)>-1?(a.1q,a.dH=c,e.sy(),f=a.hk,a.5U(f)):(c.3U(a.vt)>-1||c.3U(a.vx)>-1||c.3U(a.vy)>-1)&&(a.1q,a.n3(),f=a.hk,a.5U(f))},a.vD=1a(){1d b=a.hk;a.5U(b)},a.nq=1a(){a.5F?a.5F.44("XG"):(a.hB(),a.vD())},2t.nq=1a(){a.nq()},a.cU=1a(){"9Q"===a.1c.3J&&a.1c.4l&&""!==a.1c.4l?a.bH():a.1c.4l&&""!==a.1c.4l?a.bH():a.hB()},2t.cU=1a(){a.cU()},2t.XB=1a(b){b&&(a.1c.3h=b),a.cU()},2t.Xp=1a(b){b&&(a.1c.4l=b),a.cU()},2t.Wt=1a(a){1d b=2o(a),c=f.h0;1e a&&"vh"===c&&(b=b.2B(/\\-/g,"+"),b=b.2B(/\\9M/g,"=")),b},2t.hb=1a(b){a.hb(b)},2t.Wy=1a(b,c){a.1c={},a.1q,c&&(a.9I=c);3c{a.1c=5H.ac(b)}2S(f){a.1c=2k.vB(a.1c,b)}if(a.1q,(1x 0===a.1c.4z||1s===a.1c.4z)&&(a.1c.4z=!0),a.1c.3E&&a.1c.3D&&a.1c.2F&&a.1c.1T&&a.1c.2J&&a.1c.4z)3c{if(!a.4U){a.4U=j.hG().1t();1d g=1Y.5T(a.1c.1T+a.1c.2J+a.4U).1t();a.1c.3E=1Y.4A.cT(a.1c.3E,g).1t(),a.1c.3D=1Y.4A.cT(a.1c.3D,g).1t(),a.1c.2F=1Y.4A.cT(a.1c.2F,g).1t()}}2S(f){h.3f({1E:a.2P().6b})}2p a.1c.f6="f9 "+d.2f(a.1c.3E+":"+a.1c.3D);(a.1c.bl||a.1c.bg)&&("1"===a.1c.bl?a.3A=a.np:a.1c.bg?a.3A=a.1c.bg:"ID"===a.1c.bl&&(a.3A=a.nm,a.1c.6o="ID",a.1c.ci="cl"),p()),a.1c.nn&&(a.3A=a.ns,p()),e.mF()},a.5U=1a(b){1d c=b,d=f.h0;a.1q,a.1q,a.nt?(a.nt(b),a.1q):("vh"===d&&(c=b.2B(/\\+/g,"-"),c=c.2B(/\\=/g,"9M")),a.1c.nz&&(c=a.1c.nz+c,a.1q),2t.bT=c)},a.wo=1a(){a.f5(),b.6V("/9p").2B()},a.h9||a.f5()}]),2k.4i("5j").3p("Y3",1a(){}),2k.4i("5j").3p("nv",["$5O","$66","$bT","$hs","o9","1N",1a(a,b,c,d,e,f){a.1N=f[b.1c.1M],a.r3=1a(){1d a=!1;1e b.1c.8O&&b.1c.3w&&"1"===2o(b.1c.8O)&&(b.1c.c0||(a=!0)),a},a.wW=1a(){if(!b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uu.2T",3p:"z0",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.we=1a(){if(b.1c.9H){1d c=d.4Y({4O:!0,4P:"3m/uw.2T",3p:"z6",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.vX=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uz.2T",3p:"z3",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.t7=1a(){if(b.1c.3w){1d c=d.4Y({4O:!0,4P:"3m/uE.2T",3p:"z4",5r:"",4y:{5O:1a(){1e a}}});b.5F=c,c.3o.2K(1a(){b.5F=1x 0},1a(){b.5F=1x 0})}},a.qR=1a(){b.6g()}}]),2k.4i("5j").3p("vp",["$5O","$66","7T","1N",1a(a,b,c,d){1a e(a){1d b="Y7";if(a){1d c="Xr";b=c+a,b=b.2w(b.1i-c.1i)}1e b}1a f(a){1d c=1m 9e;c.8n=1a(){1d c=1J.3z("2l");c.1n=1b.vo,c.1v=1b.vn,c.4J("2d").9j(1b,0,0);3c{a(c.eo("1W/3C"))}2S(d){b.1q,a(1s)}},c.7v=1a(){b.1q,a(1s)},c.3a="2R/4h.3C"}1a g(a,c){1d d=1m 9e;d.8n=1a(){1d a=1J.3z("2l");a.1n=1b.vo,a.1v=1b.vn,a.4J("2d").9j(1b,0,0);3c{c(a.eo("1W/3C"))}2S(d){b.1q,f(c)}},d.7v=1a(){b.1q,f(c)},d.3a=a}a.1N=d[b.1c.1M],2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),b.bI=!1,a.bc={9l:"er",es:"#nw",1n:2,1v:60,53:!0,cX:"",5M:"nO",54:"4j",bo:"7q",6M:2,2v:20,6H:"#nP",7w:0,7s:1x 0,bn:1x 0,8J:1x 0,9V:1x 0,2L:1a(a){}},a.p3=b.vE(b.2I.3S),a.iQ=!0,a.t6=b.vF(b.2I.3S).1t(),a.8H=5H.ac(5H.8z(b.2I)),a.8H.a9=e(a.8H.a9),a.8H.5p=e(a.8H.5p),a.8H.cP=e(a.8H.cP),2t.Om=1a(){1e b.o6},a.sl=1a(){g(a.p3,1a(d){d?1J.8R("6O-iL").3a=d:a.iQ=!1,a.$6R(),2t.o7(0,0);3c{b3(1a(){4I(1J.8R("6O"),{gY:1a(a){b.o6=a.eo().2B(/^1l:1W\\/(3C|OC);7T,/,"");1d d={OD:b.o6,OB:b.1c.3h+".3C"},e=c.2f(5H.8z(d,1s,"")),f=b.vV+e;b.1q,b.5U(f)}})},50)}2S(e){b.1q}})}}]),2k.4i("5j").hq("o9",["7T","$gV","$66","$gZ","oa","n5","$bT","oe","$hs","$2E","$P4","$w0","1N",1a(a,b,c,d,e,f,g,h,i,j,k,l,m){1d n={};1e n.5J=1a(a,b){l.oc(),c.al||(c.5L=3,c.al=!0,c.1q),c.1q;1d d=1s;if(a===c.d3.1t())d=[{1C:"PB-Px",3W:"vN aU","1j":1,1Z:1,4n:["4B"],3G:"4X",3M:"1",4v:"2R/4h.3C"},{1C:"w6-Pw",3W:"w6","1j":1,1Z:1,4n:["4B"],3G:"Pu",3M:"2",4v:"2R/4h.3C"},{1C:"Pv",3W:"a8 PC","1j":1,1Z:2,4n:["RM","4B"],3G:"PD",3M:"2",4v:"2R/4h.3C"},{1C:"PV",3W:"PX","1j":1,1Z:1,4n:["4B"],3G:"PZ",3M:"3",4v:"2R/4h.3C"},{1C:"PQ-w4",3W:"dB PJ vG","1j":1,1Z:1,4n:["4B"],3G:"PO",3M:"4",4v:"2R/4h.3C"},{1C:"eh-w5",3W:"eh w5","1j":1,1Z:1,4n:["4B"],3G:"Ps",3M:"5",4v:"2R/4h.3C"},{1C:"h1-w4",3W:"h1 Pc","1j":1,1Z:1,4n:["4B"],3G:"Pd",3M:"6",4v:"2R/4h.3C"},{1C:"vK-aH",3W:"Pe","1j":0,1Z:2,4n:["4B"],3G:"aH",3M:"7",4v:"2R/4h.3C"},{1C:"vT-4w",3W:"vT 4w","1j":0,1Z:2,4n:["4B"],3G:"cq",3M:"8",4v:"2R/4h.3C"},{1C:"vK-P5",3W:"7-P6","1j":0,1Z:1,4n:["4B"],3G:"bN",3M:"9",4v:"2R/4h.3C"},{1C:"P8-Pf",3W:"Pg","1j":1,1Z:1,4n:["4B"],3G:"Pn",3M:"13",4v:"2R/4h.3C"},{1C:"Pp",3W:"Pm","1j":1,1Z:1,4n:["4B"],3G:"Pl",3M:"16",4v:"2R/4h.3C"},{1C:"PM-Pj",3W:"oO jL","1j":1,1Z:1,4n:["4B","RM","vJ","Pk","nU"],3G:"Ol",3M:"18",4v:"2R/4h.3C"},{1C:"vL",3W:"vL","1j":1,1Z:1,4n:["4B","RM","nU","Nd","vJ"],3G:"Nb",3M:"19",4v:"2R/4h.3C"},{1C:"vI-N5",3W:"vI vG","1j":1,1Z:1,4n:["4B"],3G:"N8-Nf",3M:"22",Nj:2,4v:"2R/4h.3C"},{1C:"o3",3W:"o3","1j":0,1Z:1,4n:["4B"],3G:"o3",3M:"38",4v:"2R/4h.3C"},{1C:"o2",3W:"o2","1j":0,1Z:1,4n:["4B"],3G:"o2",3M:"50",4v:"2R/4h.3C"},{1C:"Nn",3W:"Nk a8","1j":1,1Z:2,4n:["RM","4B"],3G:"Nm",3M:"57",4v:"2R/4h.3C"},{1C:"N3",3W:"vN aU","1j":0,1Z:1,4n:["nU","Mv","Ms","Mr","vR","Mo","Mp","Mq","Mw","Mx","N0","N1","4B"],3G:"aA",3M:"58",4v:"2R/4h.3C"}],f.n0(d),c.5L--;2p if(a===c.dj.1t())d=[{1C:"MJ rg MI (M) 2W"},{1C:"vQ 3v 2W"},{1C:"vQ aM 3v 2W"},{1C:"AL qI hp & Mz MB (4S) 2W"},{1C:"vO 3v 4S 2W"},{1C:"vO aM 3v 4S 2W"},{1C:"Nt (M) 2W"},{1C:"Nu 3v 2W"},{1C:"3v O7 4S 2W"},{1C:"3v O8 O9 4S 2W"},{1C:"3v rf 4S 2W"},{1C:"3v O6 4S 2W (O5)"},{1C:"3v re r5"},{1C:"eh 3v 2W"},{1C:"eh aM 3v 2W"},{1C:"O2 2W"},{1C:"O3 O4 (4S) qB ql"},{1C:"nQ Oa 4S 2W"},{1C:"nQ 3v 4S 2W"},{1C:"vP x6 3v 2W"},{1C:"vP x6 aM 3v 2W"},{1C:"Oi Oj Og 3v OF Oc (4S) 2W"},{1C:"Od Oe O1"},{1C:"nR hp 2W"},{1C:"rc aM 2W"},{1C:"sX AL-O0 3v 2W"},{1C:"sX 3v (4S) 2W"},{1C:"qF 3v 2W"},{1C:"qF aM 3v 2W"},{1C:"h1 3v 2W"},{1C:"h1 aM 3v 2W"},{1C:"qx qv 3v 4S 2W"},{1C:"qx qv Nz 2W"},{1C:"Nv Nw qB. ql."},{1C:"Ny NK 3v (4S) 2W"},{1C:"rc"},{1C:"nQ 4S"},{1C:"3v re r5"},{1C:"NV 3v 4S"},{1C:"3v rf"},{1C:"AL qI 3v 4S"},{1C:"NN 4S"}],f.n2(d),c.5L--;2p if(a===c.d5.1t())d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"},{5k:"NS",cv:"Q0",cx:"Q1",aF:"RZ",ei:"eh 3v 2W",ej:"MY",kT:"rg"}],"1"===c.1c.8O&&(d=[{5k:"rp",cv:"rk",cx:"qS",aF:"r1",ei:"nR hp 2W",ej:"MY",kT:"qZ"}]),f.n1(d),c.5L--;2p if(a===c.bY.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d j=["bM S8"],d={};d.8P=!0,d.1Z="kk",d.qD=c.1c.3h.1t(),d.fm=c.f4(qW,qV),d.bK="";1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e j}}});k.3o.2K(1a(a){},1a(a){d.3e=1x 0,d.1E=1x 0,d.4M=1x 0,a.cV&&"6g"===a.cV.1t()?f.mV(d):g.6V("/9p").2B()})}2p if(a===c.9K.1t()||a===c.bZ.1t()){1d e=[];1I(1d h in c.2P())e.1L(c.2P()[h]);1d d={},n=[];d.52=c.1c.2i.1t(),d.9m=c.f4(qX,S4),d.5p=c.f4(qW,qV),d.7y="0",n=["C6","D8"],d.9c=n[1R.aN(1R.nW()*n.1i)];1d k=i.4Y({4O:!0,4P:"3m/pe.2T",3p:"nj",5r:"sm",4y:{1l:1a(){1e d},8b:1a(){1e e},a4:1a(){1e 1s}}});k.3o.2K(1a(a){},1a(a){if("1s"===d.3e)d.1E=1x 0,d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.nc="Rx",d.iI="mx 2a 3Y";2p if("1E"===d.3e)d.52=1x 0,d.9m=1x 0,d.5p=1x 0,d.7y=1x 0,d.9c=1x 0;2p{if(d.1E=1x 0,d.qK=aG.cQ(),d.Rr=c.1c.3h.1t(),d.qJ="o1 Rt on 9r 5X",d.3S=c.r2(c.1c.2b.1t()),"aH"===c.1c.2b||"bN"===c.1c.2b){d.7y=1,d.9m="",d.jm=c.1c.3F.1t();1d b=1m aG;b.RC(b.qT()+48),d.qN=b.RK(),d.3J="9Q";1d e=b.RL()+1;e.1t().1i<10&&(e="0"+e.1t());1d h=b.RI()+"-"+e+"-"+b.RH()+" "+b.qT()+":"+b.RD()+":"+b.RF();d.ee=["** aL qM 7U "+h],d.oT=c.1c.2i.1t(),d.cP=c.f4(qL,Sd),d.jo="T0 T2"}2p d.qK=1x 0,d.qJ=1x 0;"aH"!==c.1c.2b&&"bN"!==c.1c.2b||"22"===d.3e||(d.9m=1x 0,d.jm=1x 0,d.qN=1x 0,d.ee=1x 0,d.oT=1x 0,d.cP=1x 0,d.jo=1x 0)}1d i=c.1c.1T,j=c.1c.2F;if(c.1c.4z){1d k=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();j=1Y.4A.5B(c.1c.2F.1t(),k).1t(1Y.5z.5w)}1d l=i+d.9c+d.5p+d.52+d.3e+j;d.7o=1Y.7i(l).1t(),a.cV&&"6g"===a.cV.1t()?(("1s"===d.3e||"1E"===d.3e)&&(d.7o=1x 0),d.fS&&(d.7o=d.fS,d.fS=1x 0),g.6V("/7r").2B(),f.mV(d)):g.6V("/9p").2B()})}if(c.al&&0===c.5L){1d o={};o.a1=m[c.1c.1M].6U,o.2Z=m[c.1c.1M].7D;1d k=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e o}}});k.3o.2K(1a(){},1a(){});1d p=2k.5b(1J.qO("2A")).2z("1v");p&&""!==p.1t()||2k.5b(1J.qO("2A")).2z({1v:"SQ"}),c.1c.fe||2k.5b(1J.8R("8W-2A")).2z({7j:"af"}),c.bI=!1,c.al=!1,c.1q,c.o0()}},c.8g=1a(a,d,e){if(c.1c.hH){c.1q;1d f="v=1",g="&Tc=UA-Td-7",i=c.1c.nX;2t.nZ&&!i?(i=2t.nZ.Ta("qP"),i?c.1q:(i=h.hG().1t(),2t.nZ.T7("qP",i),c.1q)):i||(i=h.hG().1t(),c.1c.nX=i,c.1q);1d j="&Sk="+i,k="&r4=4D";c.1c.1T&&(k="&r4="+c.1c.1T.1t());1d l="&t=Sj",m="&dp=nY",n="&dt=nY",o="&cd=nY",p="&an="+c.1c.hF.1t(),q="&rj=bm-4Q-nl-9d";c.1c.2J&&(q="&rj="+c.1c.2J.1t());1d r="&av="+c.1c.cR.1t(),s="&ec="+a.1t(),t="&ea="+d.1t(),u="&el="+e.1t(),v="fQ://9d.Ss-Sp.hE/Sr?"+f+g+j+k+l+m+n+o+p+q+r+s+t+u,w={5v:"mM",78:v};b(w).2K(1a(a){c.1q},1a(a){c.1q})}},n.7i=1a(a){1e 1Y.7i(a).1t()},n.9R=1a(a){1e 1Y.9R(a).1t()},n.bE=1a(a,b){1e"bM="+a+"&Rp="+5H.8z(b,1s,"")},n.7c=1a(d,e){c.1q,c.1q;1d g=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();g="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i={5v:"mM",78:d,mL:{mC:"c6/bU",ss:g,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:e};c.al||(c.al=!0),c.77.1L(i),c.5L=c.77.1i,c.1q,b(i).2K(1a(a){if(c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,a.1l.1Z)c.1q,"ko"===a.1l.1Z?f.3f({1E:a.1l.Qv}):f.mY(d,a.1l.3o);2p if("OK"===a.rh){if(c.1q,a.1l.1Z===!1)4F(a.1l.3o.nk){1U rm:1U Qn:c.1q,f.3f({1E:c.2P().6k}),c.9I&&c.9I(!1,c.2P().6k);2C;1U Qo:c.1c.3w=!0}d===c.9K||d===c.dH||d===c.bY?f.mY(d,a.1l):d===c.bZ&&f.mT(a.1l)}2p c.1q},1a(){c.77.3P(1a(a,b,d){a===i&&(d.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q,f.3f({1E:c.2P().6j}),c.9I&&c.9I(!1,c.2P().6j)})},n.Qp=1a(a){1d d={5v:"ro",78:a,mL:{mC:"c6/bU","mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU"}};c.77.1L(d),c.5L=c.77.1i,c.1q,b(d).2K(1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i},1a(){c.77.3P(1a(a,b,e){a===d&&(e.ad(b,1),c.1q,c.1q)}),c.5L=c.77.1i,c.1q})},n.bD=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}c.1q;1d d=n.7i(a).1t(),e=c.1c.1T+c.1c.2J+d;c.1q;1d f=n.9R(e).1t();1e c.1q,f},n.qo=1a(a){1d b=c.1c.2F;if(c.1c.4z){1d d=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();b=1Y.4A.5B(c.1c.2F.1t(),d).1t(1Y.5z.5w)}1d e=c.1c.2i,f=c.1c.1T,g=c.1c.3h,h=b,i=a,j=n.7i(e+f+g+h+i).1t();1e j},n.qq=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h=1s;3c{h=n.7i(d+e+f+g).1t()}2S(i){}1e h},n.sx=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.4l,g=a,h="C5",i=n.7i(e+h+f+d+g).1t();1e i},n.sB=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="D7",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},n.sF=1a(){1d a=c.1c.2F;if(c.1c.4z){1d b=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();a=1Y.4A.5B(c.1c.2F.1t(),b).1t(1Y.5z.5w)}1d d=c.1c.2i,e=c.1c.1T,f=c.1c.3h,g=a,h="mS",i=e+h+f+d+g;c.1q;1d j=n.7i(i).1t();1e j},c.QH=1a(a){1d b=c.mH,d=c.1c.1T+a+c.1c.aE,e=d+n.bD();c.1q;1d f=n.9R(e).1t();c.1q;1d g={hw:c.1c.1T,aK:a+c.1c.aE},h=n.bE(f,g);c.1q,n.7c(b,h)},n.mF=1a(){1d a=c.d3,b=c.1c.1T+c.1c.3F,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T,4n:c.1c.3F},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.qk=1a(){1d a=c.dj,b=c.1c.1T,d=b+n.bD();c.1q;1d e=n.9R(d).1t();c.1q;1d f={hw:c.1c.1T},g=n.bE(e,f);c.1q,c.1c.4Z?n.5J(a,g):n.7c(a,g)},n.mD=1a(){1d a="T1",b=c.1c.8O,d=c.d5,e=hC("+"),f=2o(c.1c.3r).hv("+",e),g=c.1c.1T+c.1c.3I+c.1c.3t+c.1c.3r+c.1c.2J+a+b,h=g;c.1q;1d i=n.9R(h).1t(),j=i+n.bD();c.1q;1d k={f8:c.1c.1T,qC:c.1c.3I,qt:c.1c.3t,qA:f,qz:c.1c.2J,9c:a,2E:b},l=n.bE(j,k);c.1q,c.1c.4Z?n.5J(d,l):n.7c(d,l)},n.rb=1a(){n.mF(),n.qk(),(c.1c.3I&&c.1c.3t&&c.1c.3r||c.1c.4Z)&&n.mD()},n.qm=1a(){1d b=c.bZ,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f=c.1c.f6;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();f="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),h).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),h).1t(1Y.5z.5w))}1d i,j={93:"&93="+c.1c.1T,fJ:"&fJ="+c.1c.3h,fK:"&fK="+c.1c.fl,fR:"&fR="+c.1c.2b,fV:"&fV="+c.1c.3F,fT:"&fT="+c.1c.2i,fW:"&fW="+c.1c.3I,fU:"&fU="+c.1c.3t,fI:"&fI="+e,fF:"&fF="+c.1c.5c,fi:"&fi="+n.qq(),fh:"&fh=4Q://"},k={hI:"",hJ:"",hN:"",hM:"",hL:"",hK:"",hD:""};"4X"===c.1c.2b||"aA"===c.1c.2b?(k.hJ="&hJ="+c.1c.5G,k.hN="&hN="+c.1c.bh,k.hM="&hM="+c.1c.bj,!c.1c.3w&&c.1c.5k?k.hL="&hL="+c.1c.5k:k.hI="&hI="+c.1c.8C,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hI+k.hJ+k.hN+k.hM+k.hL):"cq"===c.1c.2b?(k.hK="&hK="+c.1c.8U,k.hD="&hD="+c.1c.bt,i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh+k.hK+k.hD):i=j.93+j.fJ+j.fK+j.fR+j.fV+j.fT+j.fW+j.fU+j.fI+j.fF+j.fi+j.fh,c.ai&&(i.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,i):(g.6V("/7r").2B(),n.7c(b,i))},n.qw=1a(){c.6F="B3";1d a=c.6F,b=c.9K,d=hC("+"),e=2o(c.1c.3r).hv("+",d),f={52:c.1c.2i,qz:c.1c.2J,R9:c.1c.5c,qt:c.1c.3t,qA:e,qC:c.1c.3I,3S:c.1c.2b,jm:c.1c.3F,hu:c.1c.hu,f8:c.1c.1T,9c:a,qD:c.1c.3h,ht:c.1c.ht,4E:c.1c.3g,Rm:n.qo(a),8U:c.1c.8U,2E:c.1c.8O,Rl:c.1c.hr,Rg:c.1c.fl,Rj:c.1c.ff,R4:c.1c.fG};"4X"===c.1c.2b||"aA"===c.1c.2b?(f.8X=c.1c.5G,f.bh=c.1c.bh,f.bj=c.1c.bj,f.QS=c.1c.7h,!c.1c.3w&&c.1c.5k?f.5k=c.1c.5k:f.QT=c.1c.8C):"cq"===c.1c.2b&&(f.8U=c.1c.8U,f.bt=c.1c.bt),c.ai&&(f.ai=c.ai),c.1q,c.1c.4Z?n.5J(b,f):(g.6V("/7r").2B(),n.7c(b,f))},n.sy=1a(){1d a=c.dH,b="";c.1q,n.7c(a,b)},c.bH=1a(){c.6F="C5";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,5p:c.1c.4l,52:c.1c.2i,7o:n.sx(),9c:a};c.1q,g.6V("/7r").2B(),n.7c(b,d)},c.hB=1a(){c.6F="D7";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sB(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},c.n3=1a(){c.6F="mS";1d a=c.6F,b=c.9K,d={f8:c.1c.1T,sG:c.1c.3h,52:c.1c.2i,7o:n.sF(),9c:a};c.1q,c.1c.4Z?n.5J(b,d):(g.6V("/7r").2B(),n.7c(b,d))},n.sv=1a(d){1d e=d;if(c.1q,e){c.1c.c0=!1,c.1c.ep=!0;1d f=c.mO,g=c.1c.1T+e,h=g+n.bD();c.1q;1d j=n.9R(h).1t();c.1q;1d k={hw:c.1c.1T,QW:e},l=n.bE(j,k);c.1q;1d o=c.1c.f6;if(c.1c.4z){1d p=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();o="f9 "+a.2f(1Y.4A.5B(c.1c.3E.1t(),p).1t(1Y.5z.5w)+":"+1Y.4A.5B(c.1c.3D.1t(),p).1t(1Y.5z.5w))}1d q={5v:"mM",78:f,mL:{mC:"c6/bU",ss:o,"mB-bV":"c6/x-9d-2h-mr","mq-bV":"bU","rr-sW":c.1c.cR},1l:l};b(q).2K(1a(a){if(c.1c.ep=!1,a.1l.1Z&&(c.1q,t0(a.1l.1Z)&&(c.1c.c0=t0(a.1l.3o.1Z),!c.1c.c0))){1d b={};b.a1=m[c.1c.1M].6l,b.2Z=m[c.1c.1M].7N;1d d=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e b}}});d.3o.2K(1a(){},1a(){c.1c.6d=""})}},1a(){if(c.1c.ep=!1,c.1c.4Z){1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7Q;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.c0=!0})}2p{1d a={};a.a1=m[c.1c.1M].1E,a.2Z=m[c.1c.1M].7X;1d b=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e a}}});b.3o.2K(1a(){},1a(){c.1c.6d=""})}})}},n.mt=1a(a){1d b=!1,d=a;if(c.1q,d){d.1i>5&&(d=a.2w(0,6),c.1q),c.1q;1d e=j("2E")(c.1c.bS,d,!0);if(c.1q,0===e.1i){1d f={};f.a1=m[c.1c.1M].6l,f.2Z=c.1c.t4;1d g=i.4Y({4O:!0,4P:"3m/a6.2T",3p:"9Y",5r:"sm",4y:{7J:1a(){1e f}}});1e g.3o.2K(1a(){},1a(){c.1c.3w&&(c.1c.6d="")}),b=!0}}1e b},n.t3=1a(){if(c.1q,"4X"===c.1c.2b||"aA"===c.1c.2b){1d a=c.bY,b={93:c.1c.1T,fd:"",5h:c.1c.3h,fc:c.1c.3F,fA:c.1c.2i,"4u h6":c.1c.3I,"4u aP":c.1c.3t,"4u h7":c.1c.3r,"4u h8":c.1c.5c},d="",e=c.1c.2F;if(c.1c.4z){1d h=1Y.5T(c.1c.1T+c.1c.2J+c.4U).1t();e=1Y.4A.5B(c.1c.2F.1t(),h).1t(1Y.5z.5w)}1d i="";!c.1c.3w&&c.1c.5k?(b.bP="T",b["bQ / bR"]=c.1c.5k,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b.bM):(b.bP="P",b["bQ / bR"]=c.1c.8C,b.n8=c.1c.bh+c.1c.bj,i=b.bP+b.93+b.fd+b["bQ / bR"]+b.n8+b.5h+b.fc+b.fA+e,b.bM=n.7i(i).1t(),d=b.bP+"|"+b.93+"|"+b.fd+"|"+b["bQ / bR"]+"|"+b.n8+"|"+b.5h+"|"+b.fc+"|"+b.fA+"|"+b["4u h6"]+"|"+b["4u aP"]+"|"+b["4u h7"]+"|"+b["4u h8"]+"|"+b.bM),c.1q,g.6V("/7r").2B();1d j=k([d]);c.1c.4Z?n.5J(a,j):n.7c(a,j)}2p f.3f({1E:c.2P().6Q})},n}]),2k.4i("5j").hq("n5",["$66","7T","$bT","$2E","1N",1a(a,b,c,d,e){1d f={};1e f.n0=1a(b){if(b){a.1c.5d=b,a.9I&&a.1c.5d.1i>0&&a.9I(!0,5H.8z(a.1c.5d));1d c="";if(a.n6()){1d g=["4X","aA"];c=d("2E")(a.1c.5d,1a(a){1e-1===g.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}1d h=!0;if(h){1d i=["KC"];c=d("2E")(a.1c.5d,1a(a){1e-1===i.3U(a.3G)}),c.1i&&(a.1q,a.1c.5d=c)}a.1c.hx&&(a.1q,c=d("2E")(a.1c.5d,1a(b){1e-1!==a.1c.hx.3U(b.3G)}),c.1i&&(a.1q,a.1c.5d=c)),0===a.1c.5d.1i?(a.1q,f.3f({1E:a.2P().6p}),a.9I&&a.9I(!1,a.2P().6p),a.8g(a.1c.6N,"mZ-Jp","11")):a.8g(a.1c.6N,"mZ-"+a.1c.2b.1t(),"bX"),"c5"!==a.1c.2b?(c=d("2E")(a.1c.5d,{3G:a.1c.2b},!0),c.1i?a.1c.au=c[0].3W:(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u,a.1c.9H=!0)):(a.1c.2b="c5",a.1c.au=e[a.1c.1M].5u),("9Q"===a.1c.3J||a.1c.4l)&&a.bH()}a.1q},f.n1=1a(b){a.1c.fC&&"1m"===a.1c.fC||b&&(a.1c.6a=b,a.1c.6a.1i>0?a.1c.3w=!1:a.1c.3w=!0),a.1q},f.n2=1a(b){b&&(a.1c.lx=b),a.1q},f.zD=1a(c){if(a.1q,c&&c.1i>0){1d d=b.2f(c);a.1q;1d e=a.mW+d;a.5U(e),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"bX")}2p{a.1q;3c{1d g=1s;3c{g=5H.ac(c)}2S(h){g=c}if(a.1q,g.nc&&g.iI&&g.iI.1i>0){1d i=g.nc+", "+g.iI;f.3f({1E:i}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}2S(h){f.3f({1E:a.2P().6u}),a.8g(a.1c.6N,"5D-"+a.1c.2b.1t(),"11")}}},f.zy=1a(b){a.bJ=b,a.1q,a.bJ&&""!==a.bJ&&(a.1c.4l=a.bJ.fm,a.1c.7o=a.bJ.7o,a.bH())},f.zd=1a(d){a.2I=d,a.fq(d)&&(a.1c.4M=!0),a.2I.4M=a.1c.4M,a.2I.7y&&1===a.2I.7y&&(a.2I.3J="9Q"),a.1c.3J&&(a.2I.3J=a.1c.3J,"9Q"===a.2I.3J&&a.2I&&a.2I.3e&&"11"===a.2I.3e&&(a.1q,a.2I.3J="")),a.1q;1d e=b.2f(5H.8z(a.2I,1s,""));a.1q;1d f=a.bz+e;a.5U(f),("9Q"===a.1c.3J||1===a.2I.7y)&&a.2I&&a.2I.3e&&"11"!==a.2I.3e&&(a.1q,c.6V("/6O").2B());1d g=a.2I.3e;g||(g="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),g.1t())},f.zz=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));a.1q;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())},f.zB=1a(c){a.5Q=c,a.fq(c)&&(a.1c.4M=!0),a.2I?a.2I.4M=a.1c.4M:a.5Q&&(a.5Q.4M=a.1c.4M),a.1c.3J&&(a.5Q.3J=a.1c.3J),a.1q;1d d=b.2f(5H.8z(a.5Q,1s,""));if(a.1q,"22"!==a.5Q.3e||a.5Q.7y&&1===a.5Q.7y){a.ne=!1;1d e=a.bz+d;a.5U(e);1d f=a.5Q.3e;f||(f="nf"),a.8g(a.1c.6N,"ft-"+a.1c.2b.1t(),f.1t())}2p a.n40&&(d.bK=b.a4[0])}),b.q4=1a(){c.6P({cV:"q4"})},b.6g=1a(){c.6P({cV:"6g"})}}]),2k.4i("5j").3p("n7",["$66","$5O","$aO","8b","1N",1a(a,b,c,d,e){b.1N=e[a.1c.1M],b.8b=d,b.tn=1a(a){c.6P(a)},b.44=1a(){c.6P()}}]),2k.4i("5j").hq("1N",1a(){1d a={};1e a.3l={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.EN={5h:"o5 ID",8u:"h6",8i:"aP",8p:"h7 3B",7K:"h8",8d:"jL mQ",5u:"aL hS a 3S",5D:"o8",5s:"lw",8v:"il",83:"7A 4q",6W:"6W",No:"No",7B:"aU 3B",7Z:"6f",7E:"jA cc",89:"MM/9D",6S:"6S",7R:"ah 4E",7f:"a8 1C",7H:"ah nx",84:"gU 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(zn 10-dT 3B)",7V:"ah cg",7S:"z8 ck 1Z.",7u:"aL zC.",86:"9r 5X ON",6y:"6y",8f:"mx ID",88:"zg 52",6q:"6q",8k:"lz 1W to h0",6J:"6J...",6e:"6e...",6l:"3u ck z9",7z:"3u 1C",6C:"3u 59",5P:"3u 4Q 3B",8s:"3u hh",8t:"3u 4X 4q 3B",8q:"3u 4X 4q 3B (8G)",8w:"3u 8X 3B",7O:"3u 7a cc",7F:"3u 4w 3B",7C:"3u 4w c7",7N:"3u aa 4q 3B",1E:"1E",8Z:"dM 1E - 9r 5X",7X:"d2 z2, 1b gW zh 6w nJ",7Q:"aa 4q nL zj 2m zi.",6U:"6U",7D:"bd 5X is ON",8l:"5J 1B",8e:"gU 1B zE to i1 a7 gX:

    aL be zl zk mm 4G gW gX zp dl lb, no g9 mn zo zq zt.",6n:"6n",6j:"nE 1E, 9N aT 6w nF, g1, or cB",6k:"i2 zb, 9N aT fZ id, 8W 1C, or zG ib",6p:"No 3S 3Y, 9N aT 4n 1k",6v:"3E 1k 2a 3Y",6X:"3D 1k 2a 3Y",6s:"1T 1k 2a 3Y",6I:"2J 1k 2a 3Y",6G:"3h 1k 2a 3Y",5E:"2i 1k 2a 3Y",6L:"3F 1k 2a 3Y",6r:"3g 1k 2a 3Y",6A:"3u 3g 1k",6B:"2F 1k 2a 3Y",6x:"4l 1k 1I 6O mK 2a 3Y",6u:"ic cg, 9N yY 6D",6b:"nV ie 9k",6Q:"dI ck xM\'t 6g on 1b 3S",6K:"aR 59 ct 9k",6t:"aR lo ct 9k",5N:"4u 1C 2X be 8Q 8N 2 9b",6h:"4u hh 2X be 8Q 8N 4 9b",6Z:"4u 59 2X be 8Q 8N 4 9b",5C:"4u 4Q 2X be 8Q 8N 4 9b",6m:"3u 52"},a.MS={5h:"ID QN",8u:"bA",8i:"aP",8p:"QM QL",7K:"mI xZ",8d:"QK QP",5u:"QQ QR R5",5D:"Rh",5s:"Rk",8v:"Ro",83:"xL Rn mz",6W:"Ya",No:"lJ",7B:"7W xL",7Z:"6f",7E:"xP R7",89:"BB/TT",6S:"i8",7R:"mJ i8",7f:"bA a8",7H:"mJ a8",84:"xN R6 4k (8K = 3H 4k xN)",7G:"7W Ra 4w 8V 43",8a:"(7W 10-dT Rd)",7V:"iq mJ",7S:"xO 1Z dn",7u:"Rc x9",86:"mG hg (QJ)",6y:"QI",8f:"7W Qf",88:"y4 xE",6q:"Qg",8k:"Qk Qj",6J:"xO...",6e:"Qb...",6l:"mI dn 2c 5I",7z:"bA 2c 5I",6C:"Q5 2c 5I",5P:"7W nS y2 2c 5I",8s:"mI 2c 5I",8t:"7W hf d4 2c 5I",8q:"7W hf d4 2c 5I (8G)",8w:"7W 6f 2c 5I",7O:"xP Q7 2c 5I",7F:"7W 4k 2c 5I",7C:"oN 4k 2c 5I",7N:"7W hf aa fY 2c 5I",1E:"iq",8Z:"Qa xK - 8B hg",7X:"xJ 6w, Q9 Q8 gp Ql xK 6w",7Q:"xG hf i6/d4 QC",6U:"yZ",7D:"mG hg -QD",8l:"xm mG QE",8e:"lR QG QF g3 xo i7:

    Qy Qq i7 dk 8B hg xd Qs 5X Qw So (Sn), Sg xA dk Sm fY Sy.",6n:"T8",6j:"xw iq, ir T6 T5 6w, fX SF lB SU SW",6k:"xq xp, ir xF id T3, fX xs, lB Sc xH",6p:"xJ dh 8x, ir xF g2 y5 Rv",6v:"3E 2c 8x",6X:"3D 2c 8x",6s:"1T 2c 8x",6I:"2J 2c 8x",6G:"3h 2c 8x",5E:"2i 2c 8x",6L:"3F 2c 8x",6r:"3g 2c 8x",6A:"3g g2 2c 5I",6B:"2F 2c 8x",6x:"4l g2 g3 y6 Rs 2c RA",6u:"iq S6 S5, ir yG S7",6b:"Sb nV cy",6Q:"xE RV 2c RR RX yK dh gp",6K:"xG e-xR aR cy",6t:"7W xH nS lc cy",5N:"bA xQ iu 9X ip 2 xI-xI",6h:"NY xQ iu 9X ip 4 mk",6Z:"E-xR NM iu 9X ip 4 mk",5C:"xZ Nx nS y2 iu 9X ip 4 mk",6m:"y4 2c 5I"},a.VI={5h:"ID đơn đặt hàng",8u:"Tên người đứng hóa đơn",8i:"ob toán bằng thư điện tử",8p:"ob toán điện duại di động",7K:"Mô tả 8y toán",8d:"Trả xT",5u:"Ob lòng chọn một kênh",5D:"THỰC HIỆN",5s:"GẦN",8v:"il",83:"Thẻ mới",6W:"Vâng",No:"Không",7B:"Số thẻ",7Z:"6f",7E:"Ngày hết hạn",89:"MM/9D",6S:"Quốc xY",7R:"Quốc xY tìm kiếm",7f:"tên ngân hàng",7H:"Ngân hàng tìm kiếm",84:"Sử dụng điểm 4k (8K = 3H điểm 4k)",7G:"Thẻ # 8V 43",8a:"(Số 10 chữ số cuối cùng)",7V:"Lỗi tìm kiếm",7S:"Hoàn xXện trạng thái 8y toán.",7u:"pW chờ.",86:"Chế độ hộp cát",6y:"Dịch vụ",8f:"ID io dịch",88:"Số tiền phải trả",6q:"chú thích",8k:"Lưu ảnh vào xXết bị",6J:"Mtẩn bị...",6e:"Tải...",6l:"Thông Ns 8y toán không hợp lệ",7z:"Tên hóa đơn không hợp lệ",6C:"aP 8y toán không hợp lệ",5P:"Điện duại di động 8y toán không hợp lệ",8s:"Mô tả 8y toán không hợp lệ",8t:"Số thẻ tín dụng không hợp lệ",8q:"Số thẻ tín dụng không hợp lệ (8G)",8w:"Số 8X không hợp lệ",7O:"Ngày hết hạn không hợp lệ",7F:"Số 4w không hợp lệ",7C:"Nq 4w không hợp lệ",7N:"Số thẻ aa không hợp lệ",1E:"lỗi",8Z:"Lỗi mạng - Chế độ bd",7X:"d2 bị ngắt kết nối, io dịch này cần có 6w",7Q:"Kiểm ij thẻ N7 nợ đã bị bỏ xT.",6U:"Nhắc nhở",7D:"Chế độ cát là ON",8l:"Tùy chọn 5J",8e:"Sử dụng các tùy chọn dưới đây để cấu hình kết quả:

    pW dy lòng được thông báo rằng tất cả các kết quả io dịch được 4G đ9z dl mô phỏng, không có quá trình trực Neến sẽ diễn ra.",6n:"Bị làm giả",6j:"Lỗi io tiếp, dy lòng kiểm ij kết nối 6w, tên người dùng hoặc mật khẩu",6k:"Nc cập đã bị từ chối, dy lòng kiểm ij id của người bán, tên ứng dụng hoặc mã xác P9",6p:"Không tìm thấy kênh, dy lòng kiểm ij giá trị tiền tệ",6v:"3E không tìm thấy",6X:"3D không tìm thấy",6s:"1T không tìm thấy",6I:"2J không tìm thấy",6G:"3h không tìm thấy",5E:"2i không tìm thấy",6L:"3F không tìm thấy",6r:"3g không tìm thấy",6A:"3g giá trị không hợp lệ",6B:"2F không tìm thấy",6x:"4l không tìm thấy giá trị Pq yêu cầu nhận",6u:"Lỗi không được xử lý, dy lòng liên hệ với bộ phận hỗ trợ",6b:"Mã hóa an toàn không thành công",6Q:"ob toán định kỳ không thể tiến hành trên kênh này",6K:"Xác thực 59 nâng od không thàXác nhận số điện duại nâng od không thành côPt công",6t:"Xác nhận số điện duại nâng od không thành công",5N:"Tên 8y toán phải dài hơn 2 ký tự",6h:"Mô tả 8y toán phải dài hơn 4 ký tự",6Z:"aP 8y toán phải dài hơn 4 ký tự",5C:"Số điện duại 8y toán phải dài hơn 4 ký tự",6m:"Số tiền không hợp lệ"},a.TH={5h:"รหัสคำสั่งซื้อ",8u:"ชื่อการเรียกเก็บเงิน",8i:"อีเมลการเรียกเก็บเงิน",8p:"การเรียกเก็บเงินมือถือ",7K:"คำอธิบายการเรียกเก็บเงิน",8d:"จ่ายผ่าน",5u:"โปรดเลือกช่อง",5D:"ดำเนินการต่อไป",5s:"ปิด",8v:"ยกเลิก",83:"บัตรใหม่",6W:"ใช่",No:"ไม่",7B:"หมายเลขบัตร",7Z:"6f",7E:"วันหมดอายุ",89:"MM/9D",6S:"ประเทศ",7R:"ค้นหาประเทศ",7f:"ชื่อธนาคาร",7H:"ค้นหาธนาคาร",84:"ใช้คะแนน 4k (8K = 3H 4k dL)",7G:"การ์ดหมายเลข 8V 43",8a:"(ตัวเลขล่าสุด 10 หลัก)",7V:"ข้อผิดพลาดในการค้นหา",7S:"กำลังสรุปสถานะการชำระเงิน",7u:"โปรดรอ.",86:"โหมด 9r ON",6y:"บริการ",8f:"รหัสธุรกรรม",88:"จำนวนเงินที่ต้องชำระ",6q:"บันทึก",8k:"บันทึกรูปภาพลงในอุปกรณ์",6J:"การจัดเตรียม...",6e:"กำลังโหลด...",6l:"ข้อมูลการชำระเงินไม่ถูกต้อง",7z:"ชื่อการเรียกเก็บเงินไม่ถูกต้อง",6C:"อีเมลเรียกเก็บเงินไม่ถูกต้อง",5P:"การเรียกเก็บเงินมือถือไม่ถูกต้อง",8s:"คำอธิบายการเรียกเก็บเงินไม่ถูกต้อง",8t:"หมายเลขบัตรเครดิตไม่ถูกต้อง",8q:"หมายเลขบัตรเครดิตไม่ถูกต้อง (8G)",8w:"หมายเลข 8X ไม่ถูกต้อง",7O:"วันที่มีค่าไม่ถูกต้อง",7F:"หมายเลข 4w ไม่ถูกต้อง",7C:"OA 4w ไม่ถูกต้อง",7N:"หมายเลขบัตรเดบิตไม่ถูกต้อง",1E:"ความผิดพลาด",8Z:"ข้อผิดพลาดเกี่ยวกับเครือข่าย - โหมด 9r",7X:"อินเทอร์เน็ตถูกตัดการเชื่อมต่อรายการนี้ต้องใช้อินเทอร์เน็ต",7Q:"การตรวจสอบบัตรเดบิตถูกข้ามแล้ว",6U:"การแจ้งเตือน",7D:"โหมด bd เปิดอยู่",8l:"ตัวเลือก 5J",8e:"ใช้ตัวเลือกด้านล่างเพื่อกำหนดค่าผลลัพธ์:

    โปรดทราบว่าผลการทำธุรกรรมของ 4G แบบออฟไลน์ทั้งหมดจะไม่มีการดำเนินการออนไลน์",6n:"ดัดแปลง",6j:"ข้อผิดพลาดในการสื่อสารโปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตชื่อผู้ใช้หรือรหัสผ่าน",6k:"การเข้าถึงถูกปฏิเสธโปรดตรวจสอบรหัสร้านค้าชื่อแอปหรือรหัสยืนยัน",6p:"ไม่พบช่องโปรดตรวจสอบสกุลเงิน",6v:"3E ไม่พบ",6X:"3D ไม่พบ",6s:"1T ไม่พบ",6I:"2J ไม่พบ",6G:"3h ไม่พบ",5E:"2i ไม่พบ",6L:"3F ไม่พบ",6r:"3g ไม่พบ",6A:"3g ค่าที่ไม่ถูกต้อง",6B:"2F ไม่พบ",6x:"4l ไม่พบค่าสำหรับใบเสร็จรับเงิน",6u:"เกิดข้อผิดพลาดที่ไม่สามารถจัดการได้โปรดติดต่อฝ่ายสนับสนุน",6b:"การเข้ารหัสลับที่ปลอดภัยล้มเหลว",6Q:"การชำระเงินที่เกิดขึ้นประจำจะไม่สามารถดำเนินการต่อในช่องนี้ได้",6K:"การตรวจสอบอีเมลขั้นสูงล้มเหลว",6t:"การตรวจสอบหมายเลขโทรศัพท์ขั้นสูงล้มเหลว",5N:"ชื่อการเรียกเก็บเงินต้องมีความยาวมากกว่า 2 ตัว",6h:"คำอธิบายการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6Z:"อีเมลสำหรับการเรียกเก็บเงินต้องมีความยาวไม่เกิน 4 ตัว",5C:"หมายเลขโทรศัพท์มือถือการเรียกเก็บเงินต้องมีความยาวมากกว่า 4 ตัว",6m:"จำนวนไม่ถูกต้อง"},a.yq={5h:"ID ng o5",8u:"nG ng o4",8i:"59 o4",8p:"4u aC ng 4Q",7K:"lr ng o4",8d:"OE sa Oo ng",5u:"Oq Tf ng 3S",5D:"o8",5s:"OG",8v:"il",83:"OT 4q",6W:"oo",No:"xU",7B:"OQ ng 4q",7Z:"6f",7E:"7a cc",89:"MM/9D",6S:"xS",7R:"ah xS",7f:"xf ng Yc",7H:"ah nx",84:"xV 4k ny (8K = 3H 4k dL)",7G:"aU# 8V 43",8a:"(WH 10-dT na aC)",7V:"cg WK",7S:"Wq 9z xC WA sa ll.",7u:"WX WW na X1.",86:"9r 5X ON",6y:"yV XL",8f:"ID ng xD",88:"XE dN",6q:"XJ",8k:"I-iF 9z XC sa Xs",6J:"การจัดเตรียม...",6e:"Xq...",6l:"Di-5V XV sa ll",7z:"Di-5V nG ng gT",6C:"xU 5V 59 sa gT",5P:"Di-5V 4Q e6",8s:"Di-5V lr sa gT",8t:"Di-5V aC ng 4X 4q",8q:"Di-5V aC ng 4X 4q (8G)",8w:"Di-5V aC 6f",7O:"Di-5V Wp 7a",7F:"Di-5V aC 4w",7C:"Di-5V 4w c7",7N:"Di-5V aC aa 4q",1E:"X5",8Z:"dM 1E - nH-9P 5X",7X:"d2 X0 9z, sa WY na xj ay X6 ng 6w nJ",7Q:"aa 4q nL ay Xk.",6U:"Xc",7D:"nH-9P na WR",8l:"5J 1B",8e:"xV 9z cf WB sa Ww Wr i-i1 9z cf xW:

    Wu na 9z WI ng nH-9P na cf xW sa xD ay dl Yd, XF Wn ng g9 ay Us sa Ur.",6n:"Ux",6j:"nE 1E, iz lK 6w nF, g1, o cB",6k:"i2 Uw, iz lK fZ id, nG ng 8W, o xC-Up ib",6p:"Ul 3S na xg, iz lK 9z UQ dN",6v:"3E 7L 9n",6X:"3D 7L 9n",6s:"1T 7L 9n",6I:"2J 7L 9n",6G:"3h 7L 9n",5E:"2i 7L 9n",6L:"3F 7L 9n",6r:"3g 7L 9n",6A:"3g di-5V dN",6B:"2F 7L 9n",6x:"4l dN UD sa Tv Ty ay 7L xg",6u:"ic cg, iz Ud-Uc sa U0",6b:"UW ie VY",6Q:"VX na ll ay 7L W2 W1 sa 3S na xj",6K:"xk aR 59 ng xl",6t:"xk 9z 3B aR lo xl",5N:"xf ng gT ay db na i0 sa 2 dS",6h:"4u lr ay db na i0 sa 4 na cf dS",6Z:"4u 59 ay db na i0 sa 4 na cf dS",5C:"4u aC ng 4Q ay db na i0 sa 4 na cf dS",6m:"Di-5V dN"},a.MY={5h:"အမိန့်အိုင်ဒီ",8u:"ငွေတောင်းခံနာမကိုအမှီ",8i:"ငွေတောင်းခံအီးမေးလျ",8p:"ငွေတောင်းခံမိုဘိုင်း",7K:"ငွေတောင်းခံဖော်ပြချက်",8d:"တဆင့်ပေးဆောင်",5u:"တစ်ဦးရုပ်သံလိုင်းကို hS ပေးပါ",5D:"ဆက်လက်ဆောင်ရွက်",5s:"lw",8v:"ပယ်ဖျက်",83:"နယူးကဒ်",6W:"ဟုတ်ကဲ့",No:"အဘယ်သူမျှမ",7B:"ကတ်နံပါတ်",7Z:"6f",7E:"jA နေ့စွဲ",89:"MM/9D",6S:"ပြည်",7R:"ရှာရန်တိုင်းပြည်",7f:"ဘဏ်အမည်",7H:"ရှာရန်ဘဏ်",84:"4k ရမှတ် (8K = 3H ကျော် 4k အမှတ်) ကိုသုံးပါ",7G:"ကဒ် # 8V 43",8a:"(နောက်ဆုံး 10-ဂဏန်းနံပါတ်)",7V:"ရှာရန်အမှား",7S:"ငွေပေးချေမှု 1Z ကိုအပြီးသတ်နေသည်။",7u:"ကျေးဇူးပြုပြီးခဏစောင့်ပါ။",86:"bd 5X ကို ON",6y:"န်ဆောင်မှုများ",8f:"ငွေသွင်းငွေထုတ် ID ကို",88:"ပေးဆောင်ရမည့်ငွေပမာဏကို",6q:"မှတ်စု",8k:"ကိရိယာ 1W ကို lz",6J:"ပြင်ဆင်နေ...",6e:"6e...",6l:"မှားနေသောငွေပေးချေမှုသတင်းအချက်အလက်များ",7z:"မှားနေသောငွေတောင်းခံနာမကိုအမှီ",6C:"မှားနေသောငွေတောင်းခံအီးမေးလျ",5P:"မှားနေသောငွေတောင်းခံမိုဘိုင်း",8s:"မှားနေသောငွေတောင်းခံဖော်ပြချက်",8t:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က",8q:"မှားနေသောခရက်ဒစ်ကဒ်အရေအတွက်က (8G)",8w:"မှားနေသော 8X အရေအတွက်ကို",7O:"မှားနေသော Wf နေ့စွဲ",7F:"မှားနေသော 4w အရေအတွက်ကို",7C:"မှားနေသော 4w c7 ကို",7N:"မှားနေသောမြီစားကတ်နံပါတ်",1E:"အမှား",8Z:"dM မှအမှား - 4G 5X ကို",7X:"အင်တာနက်ကိုအဆက်ပြတ်, ဒီအရောင်းအဝယ်အတွက်အင်တာနက်ရရှိနိုင်မှုလိုအပ်ပြီး",7Q:"i6 4q ကိုစစ်ဆေးခြင်းကိုကျော်သွားခဲ့တာဖြစ်ပါတယ်။",6U:"သတိပေးချက်",7D:"9P 5X ကို ON ဖြစ်ပါသည်",8l:"4G 1B များ",8e:"ရလဒ် i1 ဖို့အောက်က W8 4G ရွေးချယ်စရာ:

    အားလုံး 4G ငွေပေးငွေယူရလဒ်များကိုအော့ဖ်လိုင်း lb နေကြသည်မရှိအွန်လိုင်းဖြစ်စဉ်ကိုရာအရပျယူလိမ့်မည်ဟုအကြောင်းကြားလိမ့်ပေးပါ။",6n:"နှောင့်အယှက်",6j:"ဆက်သွယ်ရေးမှားယွင်းနေသည်, အင်တာနက်ကွန်နက်ရှင်, အသုံးပြုသူအမည်, ဒါမှမဟုတ် cB ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6k:"i2 ကို, ငြင်းပယ်ကုန်သည်အိုင်ဒီ, 8W ကိုအမည်, သို့မဟုတ်စိစစ်အတည်ပြု ib ကိုစစ်ဆေးကျေးဇူးပြုပြီး",6p:"ရုပ်သံလိုင်းတစ်ခုမှမတွေ့, ငွေကြေးတန်ဖိုးကိုစစ်ဆေးကျေးဇူးပြုပြီး",6v:"3E မတွေ့ပါ",6X:"3D မတွေ့ပါ",6s:"1T မတွေ့ပါ",6I:"2J မတွေ့ပါ",6G:"3h မတွေ့ပါ",5E:"2i မတွေ့ပါ",6L:"3F မတွေ့ပါ",6r:"3g မတွေ့ပါ",6A:"3g မမှန်ကန်တဲ့တန်ဖိုးကို",6B:"2F မတွေ့ပါ",6x:"4l မတွေ့ရှိလက်ခံရရှိတောင်းဆိုချက်အတွက်တန်ဖိုးကို",6u:"ic အမှား, ထောက်ခံမှုဆက်သွယ်နိုင်ပါသည်",6b:"လုံခြုံသော ie ကိုပျက်ကွက်",6Q:"ငွေပေးချေမှုထပ်တလဲလဲဤချန်နယ်ပေါ်တွင်ဆက်လက်ဆောင်ရွက်မနိုင်",6K:"အဆင့်မြင့်အီးမေးလ် ct ကိုမအောင်မြင်ခဲ့",6t:"W9 ဖုန်းနံပါတ် ct ကိုမအောင်မြင်ခဲ့",5N:"ငွေတောင်းခံနာမကိုအမှီ 2 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6h:"ငွေတောင်းခံဖော်ပြချက် 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6Z:"ငွေတောင်းခံအီးမေးလ်က 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",5C:"မိုဘိုင်းနံပါတ်ငွေတောင်းခံလွှာပေါ်ရှိ 4 ဇာတ်ကောင်ထက်ပိုရှိရမည်",6m:"မှားနေသောငွေပမာဏ"},a.KM={5h:"លេខ​សម្គាល់​លំដាប់",8u:"ឈ្មោះវិក័យប័ត្រ",8i:"អ៊ីម៉ែលវិក័យប័ត្រ",8p:"ទូរស័ព្ទដៃវិក័យប័ត្រ",7K:"ការរៀបរាប់វិក័យប័ត្រ",8d:"បង់តាមរយៈការ",5u:"សូមជ្រើសឆានែល",5D:"បន្តដំណើរការ",5s:"ជិតស្និទ្ធ",8v:"បដិសេធ",83:"កាតថ្មី",6W:"បាទ",No:"គ្មាន",7B:"លេខ​កាត",7Z:"6f",7E:"កាលបរិច្ឆេទ 7a",89:"MM/9D",6S:"ប្រទេស",7R:"ប្រទេសស្វែងរក",7f:"ឈ្មោះ​របស់​ធនាគារ",7H:"ធនាគារស្វែងរក",84:"ពិន្ទុការប្រើ 4k (8K = 3H 4k ពិន្ទុ)",7G:"កាត # 8V 43",8a:"(ចំនួន 10 ខ្ទង់ចុងក្រោយ)",7V:"កំហុសស្វែងរក",7S:"បញ្ចប់ស្ថានភាពបង់ប្រាក់។",7u:"សូមរង់ចាំ។",86:"លើរបៀប 9P",6y:"សេវាកម្ម",8f:"លេខសម្គាល់ប្រតិបត្តិការ",88:"ចំនួនទឹកប្រាក់ដែលត្រូវបង់",6q:"ចំណាំ",8k:"រក្សាទុករូបភាពទៅកាន់ឧបករណ៍",6J:"ការរៀបចំ...",6e:"កំពុងផ្ទុក...",6l:"ពបង់ប្រាក់គ្មានសុពលភាព",7z:"ឈ្មោះវិក្កយបត្រមិនត្រឹមត្រូវ",6C:"អ៊ីម៉ែលវិក័យប័ត្រមិនត្រឹមត្រូវ",5P:"វិក័យប័ត្រមិនត្រឹមត្រូវចល័ត",8s:"ការរៀបរាប់វិក័យប័ត្រមិនត្រឹមត្រូវ",8t:"លេខកាតឥណទានមិនត្រឹមត្រូវ",8q:"លេខកាតឥណទានមិនត្រឹមត្រូវ (8G)",8w:"ចំនួន 6f មិនត្រឹមត្រូវ",7O:"កាលបរិច្ឆេទ 7a មិនត្រឹមត្រូវ",7F:"ចំនួន 4w មិនត្រឹមត្រូវ",7C:"ម្ជុល 4w មិនត្រឹមត្រូវ",7N:"លេខកាតឥណពន្ធមិនត្រឹមត្រូវ",1E:"កំហុសក្នុងការ",8Z:"កំហុសក្នុងការបណ្តាញ - របៀបសេនបក់",7X:"អ៊ីនធឺណិតបានផ្តាច់, ប្រតិបត្តិការនេះតម្រូវឱ្យមានភាពអាចរកបានអ៊ិនធឺណិ",7Q:"ការត្រួតពិនិត្យកាតឥណពន្ធត្រូវបានរំលង។",6U:"ការ​រំលឹក",7D:"របៀប 9P ត្រូវបានបើក",8l:"ជម្រើសសេនបក់",8e:"ប្រើជម្រើសខាងក្រោមដើម្បីកំណត់រចនាសម្ព័ន្ធលទ្ធផលនេះ:

    សូមជំរាបជូនថាលទ្ធផលនៃការប្រតិបត្តិការទាំងអស់ត្រូវបានក្លែងធ្វើសេនបក់ក្រៅបណ្តាញ, មិនមានដំណើរការលើបណ្តាញនឹងយកកន្លែង។",6n:"បន្លំ",6j:"កំហុសក្នុងការប្រាស្រ័យទាក់ទង, សូមពិនិត្យមើលការតភ្ជាប់អ៊ីធឺណិត, ឈ្មោះអ្នកប្រើឬពាក្យសម្ងាត់",6k:"ការចូលដំណើរការត្រូវបានបដិសេធ, សូមពិនិត្យមើលលេខសម្គាល់អ្នកជំនួញ, ឈ្មោះកម្មវិធីឬកូនសោផ្ទៀងផ្ទាត់",6p:"រកមិនឃើញឆានែល, សូមពិនិត្យមើលតម្លៃរូបិយប័ណ្ណ",6v:"3E រក​មិន​ឃើញ",6X:"3D រក​មិន​ឃើញ",6s:"1T រក​មិន​ឃើញ",6I:"2J រក​មិន​ឃើញ",6G:"3h រក​មិន​ឃើញ",5E:"2i រក​មិន​ឃើញ",6L:"3F រក​មិន​ឃើញ",6r:"3g រក​មិន​ឃើញ",6A:"3g តម្លៃមិនត្រឹមត្រូវ",6B:"2F រក​មិន​ឃើញ",6x:"4l រកមិនឃើញតម្លៃសម្រាប់ការស្នើរសុំវិក័យប័ត្រ",6u:"កំហុសដែលមិនបានដោះស្រាយសូមទាក់ទងបានការគាំទ្រ",6b:"ការអ៊ិនគ្រីបបានបរាជ័យកិច្ចធានា",6Q:"កើតឡើងការទូទាត់មិនអាចបន្តនៅលើឆានែលនេះ",6K:"សុពលភាពអ៊ីមែលកម្រិតខ្ពស់បរាជ័យ",6t:"សុពលភាពលេខទូរស័ព្ទកម្រិតខ្ពស់បរាជ័យ",5N:"ឈ្មោះវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 2",6h:"ការរៀបរាប់វិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",6Z:"អ៊ីម៉ែលវិក័យប័ត្រត្រូវតែមានតួអក្សរច្រើនជាង 4",5C:"វិក័យប័ត្រចំនួនទូរស័ព្ទចល័តត្រូវតែមានតួអក្សរច្រើនជាង 4",6m:"ចំនួនទឹកប្រាក់មិនត្រឹមត្រូវ"},a.ID={5h:"Id VH",8u:"bA Vb",8i:"59 9F",8p:"x8 9F",7K:"yE 9F",8d:"Ve Vf",5u:"xr Vh dh",5D:"V9",5s:"V2",8v:"V3",83:"aV V4",6W:"Mm Ec",No:"lJ",7B:"lZ aV",7Z:"6f",7E:"Eb Ee",89:"MM/9D",6S:"i8",7R:"i8 xe",7f:"fX a8",7H:"a8 xe",84:"Eg lR 4k (8K = 3H 4k dL)",7G:"lZ aV 8V 43",8a:"(Dh lZ 10-dT)",7V:"Dg Df",7S:"Dj 1Z dn.",7u:"xy x9.",86:"Dk 4G ON",6y:"Dn",8f:"ID dk",88:"yB Dm",6q:"D5",8k:"D6 D9 ke Db",6J:"Do...",6e:"DC...",6l:"DA dn 2c 2L",7z:"bA 9F fY 2c 2L",6C:"59 9F 2c 2L",5P:"DD x8 2c 2L",8s:"EI 9F 2c 2L",8t:"d9 aV d4 2c 2L",8q:"d9 aV d4 2c 2L (8G)",8w:"d9 8X 2c 2L",7O:"Fe 7a 2c 5I",7F:"d9 4w 2c 2L",7C:"oN 4w 2c 2L",7N:"d9 aV i6 2c 2L",1E:"m6",8Z:"m6 Fi - Fg 4G",7X:"d2 D1, dk gp F8 F7 6w",7Q:"Cz aV i6 Ao Am.",6U:"yZ",7D:"5X 9P xd ON",8l:"xm bd",8e:"lR AH di A6 g3 xo i7:

    xy C3 Cn Bf i7 dk bd Cb dl Ac, 2c xu xA g9 zV A7.",6n:"Ad",6j:"m6 xw, m0 lW Kz 6w, g1, 3X cB",6k:"xq xp, xr lW fZ id, fX xs, lB JY JA",6p:"lJ xu dh fY 8o, m0 lW g2 y5 Jq",6v:"3E 2c 8o",6X:"3D 2c 8o",6s:"1T 2c 8o",6I:"2J 2c 8o",6G:"3h 2c 8o",5E:"2i 2c 8o",6L:"3F 2c 8o",6r:"3g 2c 8o",6A:"3g 2c 2L",6B:"2F 2c 8o",6x:"4l g3 y6 JU JV 2c 8o",6u:"JG, m0 yG JF",6b:"JL JK cy",6Q:"JJ dn 2c db LO yK dh gp",6K:"yF 59 lc cy",6t:"yF yA lc cy",5N:"bA 9F gH 9X gR 2 gN",6h:"yE 9F gH 9X gR 4 gN",6Z:"59 9F gH 9X gR 4 gN",5C:"Lz yA gH 9X gR 4 gN",6m:"yB 2c 2L"},a.rn={5h:"订单编号",8u:"帐单名称",8i:"帐单电子邮件",8p:"帐单手机号码",7K:"帐单说明",8d:"付款",5u:"请选择一个频道",5D:"继续",5s:"关",8v:"取消",83:"新卡",6W:"是",No:"没有",7B:"卡号",7Z:"6f",7E:"过期日期",89:"MM/9D",6S:"国家",7R:"搜索国家",7f:"银行名",7H:"搜索银行",84:"使用4k积分(8K = 3H 4k积分)",7G:"卡 # 8V 43",8a:"(最后10位数字)",7V:"搜索错误",7S:"完成付款状态。",7u:"请稍候。",86:"沙箱模式开启",6y:"服务",8f:"交易ID",88:"应付金额",6q:"注意",8k:"将图像保存到设备",6J:"准备...",6e:"载入中...",6l:"付款信息无效",7z:"帐单名称无效",6C:"帐单电子邮件无效",5P:"帐单手机无效",8s:"帐单说明无效",8t:"无效的信用卡号码",8q:"无效的信用卡号码 (8G)",8w:"8X号码无效",7O:"7a日期无效",7F:"4w编号无效",7C:"4w引脚无效",7N:"借记卡号码无效",1E:"错误",8Z:"网络错误 - 沙盒模式",7X:"互联网断开连接,此事务需要互联网",7Q:"借记卡检查已被跳过。",6U:"提醒",7D:"沙箱模式为开",8l:"5J选项",8e:"使用以下选项配置结果:

    请注意,所有沙盒交易结果都离线模拟,不会发生在线流程。",6n:"篡改",6j:"通信错误,请检查互联网连接,用户名或密码",6k:"访问被拒绝,请检查商家ID,应用名称或验证密钥",6p:"找不到频道,请检查货币价值",6v:"3E 未找到",6X:"3D 未找到",6s:"1T 未找到",6I:"2J 未找到",6G:"3h 未找到",5E:"2i 未找到",6L:"3F 未找到",6r:"3g 未找到",6A:"3g 无效值",6B:"2F 未找到",6x:"4l 没有找到收据请求的值",6u:"未处理的错误,请联系支持",6b:"安全加密失败",6Q:"此频道无法重复付款",6K:"高级邮件验证失败",6t:"高级电话号码验证失败",5N:"帐单名称必须超过2个字符",6h:"帐单说明必须超过4个字元",6Z:"帐单电子邮件必须超过4个字符",5C:"帐单手机号码必须超过4个字符",6m:"金额无效"},a.4E={},a.4E.EN={AF:"jc",AX:"Åyi 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 2Q jT",AR:"jR",AM:"k6",AW:"dr",AC:"kA 5a",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BQ:"L8, yg L7, 2Q L6",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 2q",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d’jw",HR:"pp",CU:"p2",CW:"L0çao",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"KO",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MA:"yL",MZ:"yD",MM:"jp [KK]",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",QO:"kJ pR",PK:"kj",PW:"fu",PS:"lm ja",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"KQ",PN:"d8 2q",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"KS",RW:"kl",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"São KUé 2Q PríL9",SA:"jP yJ",SN:"kU",RS:"bq",CS:"bq 2Q a5",SC:"kN",SL:"mA mu",SG:"yI",SX:"yg Ll",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q a7 6E d0 2q",KR:"6E 9U",SS:"6E fb",ES:"Lc",LK:"kR k8",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj da fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",UM:"U.S. pH kJ 2q",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",US:"bx yd",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q df",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MS={AF:"jc",9B:"kg f7",AL:"k9",DZ:"Lb",AS:"pO ag",US:"l7 Le",AD:"gb",AO:"iY",AI:"d7",AQ:"yh",AG:"iU 3X jT",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",TD:"Lh",CV:"pY je",KY:"hj 2q",EA:"dP 3X dG",CN:"7Y",CX:"kG 5a",CL:"xh",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG",CD:"bG - kc",CK:"dF 2q",CI:"Côte d’jw",HR:"pp",CU:"p2",DK:"jy",DG:"dw dv",DM:"jq",EC:"oq",SV:"El k4",AE:"Hi cL Hh",GQ:"oB 5A",ER:"k7",EE:"k5",ET:"jY",FK:"j2 2q",FO:"dO 2q",PT:"Hg",FJ:"jX",PH:"y3",FI:"oQ",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl S.A.R., 7Y",HU:"Hj",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"Hn",JM:"zm",JP:"Hm",DE:"za",JE:"dE",DJ:"Hl",JO:"q0",CM:"zr",CA:"zs",KZ:"pG",KH:"Hf",KE:"l9",AX:"3R Åyi",IC:"3R ds",MH:"3R kp",SB:"3R kq",EU:"H6 HE",CY:"HD",KI:"ks",CR:"ze z1",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LB:"HC",LU:"HF",MO:"pS bk 7Y",MK:"pU",MG:"zv",MA:"HG",MW:"kx",MY:"bW",MV:"HJ",ML:"kK",MT:"kF",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"py",MD:"l5",MC:"pv",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",MP:"q3 dJ 2q",NO:"ps",QO:"pR HH",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",FR:"mU",PE:"kB",PN:"d8",PL:"lt",PR:"fs km",AC:"b7 kA",CP:"b7 fy",QA:"ku",CF:"aQ kg rv",CZ:"aQ oi",DO:"aQ ol",RE:"Rékf",RO:"ls",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s lhélf",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 3X l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 3X mv",KR:"f7 9U",SN:"kU",ES:"HB",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"HA Ht",SG:"sV",SK:"l4",SI:"l1",SO:"kS",GS:"6E 9w 2Q a7 6E d0 2q",LK:"kR k8",SD:"fb",SR:"Hs",SJ:"d1 2Q d6 dq",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TJ:"Hr",TW:"j8",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",GB:"bx lO",UM:"bx yd pH kJ 2q",UY:"iM",KP:"nb 9U",UZ:"iS",VU:"iT",VA:"lN",VE:"j0",VN:"j1",WF:"dd 2Q df",9x:"qp",GR:"r9",9u:"iV",9i:"iW"},a.4E.VI={SA:"A-rập Xê-út",AR:"Ác-Hz-ti-na",AM:"Ác-mê-ni-a",EG:"Ai Cập",AZ:"Ai-déc-H4-H3",IE:"Ai-q2",IS:"Ai-xơ-q2",AL:"An-ba-ni",DZ:"An-giê-ri",AG:"An-ti-gu-a và Ba-bu-đa",AD:"gb",AI:"d7",AT:"Áo",AF:"Áp-ga-ni-b9",AW:"dr",AO:"Ăng-gô-la",IN:"Ấn Độ",PL:"Ba bF",BS:"Ba-ha-ma",BH:"Ba-G6",BB:"Bác-ba-đốt",KP:"Bắc ytều Tiên",GL:"Băng Đảo",BD:"Băng-la-đét",BM:"dR",BY:"Bê-la-rút",BZ:"Bê-li-xê",BJ:"Bê-G5",BE:"Bỉ",PT:"Bồ Đào yj",BO:"Bô-li-vi-a",BA:"Bô-G8-a Héc-xê-gô-vi-na",BW:"Bốt-G9-na",CI:"Bờ Biển Ngà",BR:"Gd-Gc",BN:"Gq-nây",BI:"Bu-kC-đi",BT:"Bu-yc (dQ)",BG:"GV-ga-ri",BF:"Buốc-ki-na GZ-xô",CM:"Ca-mơ-kC",CA:"Ca-na-đa",QA:"Ca-ta",UM:"Các đảo nhỏ xa HO tâm a3ộc Mỹ",AE:"Các Tiểu Vương quốc A-rập Thống nhất",KH:"IK",CV:"Cáp-ve",EA:"dP và dG",CL:"IJ-lê",CO:"Cô-lôm-bi-a",KM:"Cô-mô",KW:"Cô-oét",CD:"Cộng hoà dân chủ Côngô",DO:"Cộng hoà Đô-mi-ni-ca",CZ:"Cộng hòa Séc",CF:"Cộng hòa gz gD",CG:"Công-gô",CR:"Cốt-IV Ri-ca",HR:"Crô-a-ti-a",CU:"Cu Ba",KG:"Cư-rơ-gư-b9",9u:"Dăm-bi-a",DG:"dw dv",9i:"Iy-ba-bu-ê",DM:"jq",TW:"Đài Iw",DK:"Đan Mạch",AC:"Đảo kA",BV:"Đảo fx (Na Uy)",CP:"Đảo fy",CX:"Đảo Giáng Iz",GU:"Đảo Gu-am",HM:"Đảo fD và Quần đảo fE",IM:"Đảo bp",NF:"Đảo dK",AS:"Đảo IB a3ộc Mỹ",VG:"Đảo 8A, a3ộc oj",HK:"Đặc y8 hành chính Hồng Kông a3ộc y7 gz pT",MO:"Đặc y8 hành chính IZ a3ộc y7 gz pT",TL:"Đông Ti-mo",DE:"Đức",EE:"E-xtô-ni-a",SV:"En-yb-va-đo",EC:"Ê-cu-a-đo",ER:"Ê-ri-tơ-rê-a",ET:"Ê-ti-ô-pi-a",GA:"Ga-bông",GM:"Găm-bi-a",GH:"J0-na",GN:"g5-nê",GW:"g5-nê Bít-J3",GQ:"g5-nê Xích-đạo",DJ:"Gi-bu-ti",GI:"dz",JO:"Gióc-đa-ni",GT:"Iv-tê-ma-la",GD:"Grê-na-đa",GE:"Iu-di-a",GP:"dD",GG:"dC",GY:"I4-a-na",NL:"Hà bF",HT:"Ha-i-ti",JM:"Ha-I3-ca",KR:"Hàn Quốc",US:"pT Kỳ",HN:"Hôn-đu-rát",HU:"I2-ga-ri",GR:"Hy Lạp",IR:"I-I6",IQ:"I-rắc",IL:"I-I9-en",JE:"dE",KZ:"Ka-dắc-b9",KE:"Kê-ni-a",KI:"Ki-ri-ba-ti",PS:"Lãnh thổ HV",LA:"Lào",LV:"Lát-vi-a",LS:"Lê-xô-thô",LB:"Li-băng",LR:"Li-bê-ri-a",LY:"Li-bi",LT:"Li-tu-a-ni-a",LI:"HZ-HY-xtên",EU:"Liên Ib Châu Âu",LU:"Lúc-xăm-Ip",MG:"Ma-đa-gát-Io",MW:"Ma-la-uy",MY:"Ma-In-xi-a",ML:"Ma-li",MA:"Ma-rốc",MK:"Ma-xê-đô-ni-a",MV:"bp-đi-vơ",MT:"bp-ta",MX:"Mê-hi-cô",MM:"Mi-an-ma",FM:"Mi-crô-nê-xi-a",ME:"a5",MS:"f1",MZ:"Mô-dăm-bích",MC:"Mô-na-cô",MR:"Mô-ri-ta-ni",MU:"Mô-ri-xơ",MD:"Môn-đô-va",MN:"Mông Cổ",NO:"Na Uy",AQ:"aD Cực",ID:"aD Dương",9B:"aD gD",NA:"aD-mi-bi-a",NR:"fv",NC:"7A kt",NP:"Nê-I1",RU:"I7",JP:"Nhật Bản",NI:"Ni-ca-ra-I8",NE:"Ni-giê",NG:"Ni-giê-ri-a",NZ:"y9 Di-lân",NU:"fw",OM:"Ô-J8",PK:"Pa-ki-b9",PA:"Pa-na-ma",PG:"Pa-pu-a y9 g5-nê",PY:"Pa-ra-ys",PW:"fu",PE:"Pê-ru",FR:"Pháp",FI:"Phần bF",FJ:"gD-gi",PH:"gD-Ge-c7",PF:"j6 a3ộc Pháp",PR:"fs km",AX:"Quần đảo n9",MP:"Quần Đảo Bắc dJ",IC:"Quần đảo ds",KY:"Quần Đảo hj",CC:"Quần đảo dx",CK:"Quần Đảo dF",FK:"Quần Đảo j2",FO:"Quần Đảo dO",MH:"Quần đảo Mác-yb",GS:"Quần đảo aD 9w và aD d0",PN:"Quần đảo d8",TC:"Quần Đảo Gm và dm",VI:"Quần đảo 8A, Mỹ",SB:"Quần đảo Xô-lô-mông",GF:"Lk a3ộc Pháp",RW:"Ru-an-đa",RO:"Ru-ma-ni",SH:"3s fz",PM:"3s fp và fo",TD:"Sát",CS:"Séc-L5",CY:"Síp",SJ:"d1 và d6 dq",TZ:"M8-da-ni-a",TJ:"Tát-gi-ki-b9",AN:"Tây Ấn Hà bF",ES:"Tây KJ yj",EH:"Tây fB",TH:"Thái bF",TR:"Thổ Nhĩ Kỳ",IO:"ykộc địa oj tại Ấn Độ Dương",TF:"ykộc Địa aD của Pháp",SE:"Thụy Điển",CH:"Thụy Sĩ",TK:"fk",TG:"Tô-gô",TO:"Tông-ga",TT:"yt-ni-đát và Tô-ba-gô",TA:"fj da fg",CN:"gz Quốc",TV:"Tu-va-lu",TM:"Tuốc-mê-ni-b9",TN:"Ku-ni-di",UA:"U-Kq-na",UZ:"U-dơ-bê-ki-b9",UG:"U-yw-đa",UY:"U-ru-ys",AU:"Úc",VU:"Va-nu-a-tu",VA:"Va-ti-căng",VE:"Vê-nê-zu-ê-la",VN:"Việt aD",QO:"Vùng xa xôi a3ộc Châu Đại Dương",GB:"Vương quốc oj",WF:"dd và df",WS:"Xa-B2",LC:"gS Lu-xi",SM:"gS Ma-ri-nô",VC:"gS F5-F4 và Grê-na-Fc",KN:"gS-kít và Nê-vi",ST:"DB Tô-mê và Ef-xi-pê",SC:"Xây-Vr",RS:"Xéc-bi",SN:"Xê-nê-yw",SL:"Xi-ê-ra Lê-ôn",SY:"Xi-ri",SG:"pW-ga-po",SK:"Xlô-va-ki-a",SI:"Xlô-U2-ni-a",SZ:"U9-di-q2",SO:"Xô-ma-li",LK:"Tp bF-ca",SD:"Xu-đăng",SR:"Xu-ri-N2",IT:"Ý",9x:"Y-ê-S3"},a.4E.TH={GR:"กรีซ",GL:"กรีนแลนด์",GU:"กวม",GP:"กวาเดอลูป",KH:"กัมพูชา",GT:"กัวเตมาลา",QA:"กาตาร์",GH:"กานา",GA:"กาบอง",GY:"กายอานา",GN:"กินี",GW:"กินี-บิสเซา",GD:"เกรเนดา",KR:"เกาหลีใต้",KP:"เกาหลีเหนือ",CX:"เกาะคริสต์มาส",CP:"เกาะคลิปเปอร์ตัน",GS:"เกาะเซาท์จอร์เจียและหมู่เกาะเซาท์แซนด์วิช",NF:"เกาะนอร์ฟอล์ก",BV:"เกาะบูเวต",IM:"เกาะแมน",AC:"เกาะแอสเซนชัน",HM:"เกาะเฮิร์ดและหมู่เกาะแมกดอนัลด์",GG:"เกิร์นซีย์",GM:"แกมเบีย",CD:"คองโก-กินชาซา",CG:"คองโก-บราซซาวิล",KM:"คอโมโรส",CR:"คอสตาริกา",KZ:"คาซัคสถาน",KI:"คิริบาส",CU:"คิวบา",KG:"คีร์กีซสถาน",KW:"คูเวต",KE:"เคนยา",CV:"เคปเวิร์ด",CA:"แคนาดา",CM:"แคเมอรูน",HR:"โครเอเชีย",CO:"โคลอมเบีย",GE:"จอร์เจีย",JO:"จอร์แดน",JM:"จาเมกา",DJ:"จิบูตี",CN:"จีน",JE:"เจอร์ซีย์",TD:"ชาด",CL:"ชิลี",SM:"ซานมารีโน",WS:"ซามัว",SA:"ซาอุดีอาระเบีย",EH:"ซาฮาราตะวันตก",9i:"ซิมบับเว",SY:"ซีเรีย",EA:"ซีโอตาและเมลิลลา",SD:"ซูดาน",SR:"ซูรินาเม",SC:"เซเชลส์",KN:"เซนต์คิตส์และเนวิส",BL:"เซนต์บาร์เธเลมี",MF:"เซนต์มาติน",LC:"เซนต์ลูเซีย",VC:"เซนต์วินเซนต์และเกรนาดีนส์",SH:"เซนต์เฮเลนา",SN:"เซเนกัล",RS:"เซอร์เบีย",CS:"เซอร์เบียและมอนเตเนโกร",ST:"เซาตูเมและปรินซิปี",SL:"เซียร์ราลีโอน",PM:"แซงปีแยร์และมีเกอลง",9u:"แซมเบีย",SO:"โซมาเลีย",CY:"ไซปรัส",JP:"ญี่ปุ่น",DG:"ดิเอโกการ์เซีย",DK:"เดนมาร์ก",DM:"โดมินิกา",TT:"ตรินิแดดและโตเบโก",TO:"ตองกา",TL:"ติมอร์ตะวันออก",TR:"ตุรกี",TN:"ตูนิเซีย",TV:"ตูวาลู",TM:"เติร์กเมนิสถาน",TK:"โตเกเลา",TG:"โตโก",TW:"ไต้หวัน",TA:"ทริสตัน เดอ คูนา",TJ:"ทาจิกิสถาน",TZ:"แทนซาเนีย",TH:"ไทย",NO:"นอร์เวย์",NA:"นามิเบีย",NR:"นาอูรู",NI:"นิการากัว",NC:"นิวแคลิโดเนีย",NZ:"นิวซีแลนด์",NU:"นีอูเอ",NL:"เนเธอร์แลนด์",AN:"เนเธอร์แลนด์แอนทิลลิส",NP:"เนปาล",NG:"ไนจีเรีย",NE:"ไนเจอร์",BR:"บราซิล",IO:"บริติชอินเดียนโอเชียนเทร์ริทอรี",BN:"บรูไน",BW:"บอตสวานา",BA:"บอสเนียและเฮอร์เซโกวีนา",BD:"บังกลาเทศ",BG:"บัลแกเรีย",BB:"บาร์เบโดส",BH:"บาห์เรน",BS:"บาฮามาส",BI:"บุรุนดี",BF:"บูร์กินาฟาโซ",BJ:"เบนิน",BE:"เบลเยียม",BY:"เบลารุส",BZ:"เบลีซ",BM:"เบอร์มิวดา",BO:"โบลิเวีย",PK:"ปากีสถาน",PA:"ปานามา",PG:"ปาปัวนิวกินี",PY:"ปารากวัย",PS:"ปาเลสไตน์",PW:"ปาเลา",PE:"เปรู",PR:"เปอร์โตริโก",PT:"โปรตุเกส",PL:"โปแลนด์",FR:"ฝรั่งเศส",PN:"พิตแคร์น",FJ:"ฟิจิ",FI:"ฟินแลนด์",PH:"ฟิลิปปินส์",GF:"เฟรนช์เกียนา",TF:"เฟรนช์เซาเทิร์นเทร์ริทอรีส์",PF:"เฟรนช์โปลินีเซีย",BT:"ภูฏาน",MN:"มองโกเลีย",MS:"มอนต์เซอร์รัต",ME:"มอนเตเนโกร",MU:"มอริเชียส",MR:"มอริเตเนีย",MD:"มอลโดวา",MT:"มอลตา",MV:"มัลดีฟส์",MO:"มาเก๊า เขตปกครองพิเศษประเทศจีน",MK:"มาซิโดเนีย",MG:"มาดากัสการ์",c8:"มายอต",MQ:"มาร์ตินีก",MW:"มาลาวี",ML:"มาลี",MY:"มาเลเซีย",MX:"เม็กซิโก",MM:"เมียนม่าร์ [พม่า]",MZ:"โมซัมบิก",MC:"โมนาโก",MA:"โมร็อกโก",FM:"ไมโครนีเซีย",GI:"ยิบรอลตาร์",UG:"ยูกันดา",UA:"ยูเครน",9x:"เยเมน",DE:"เยอรมนี",RW:"รวันดา",RU:"รัสเซีย",RE:"เรอูนียง",RO:"โรมาเนีย",LU:"ลักเซมเบิร์ก",LV:"ลัตเวีย",LA:"ลาว",LI:"ลิกเตนสไตน์",LT:"ลิทัวเนีย",LY:"ลิเบีย",LS:"เลโซโท",LB:"เลบานอน",LR:"ไลบีเรีย",VA:"วาติกัน",VU:"วานูอาตู",WF:"วาลลิสและฟุตูนา",VE:"เวเนซุเอลา",VN:"เวียดนาม",LK:"ศรีลังกา",ES:"สเปน",SJ:"สฟาลบาร์และยานไมเอน",SK:"สโลวะเกีย",SI:"สโลวีเนีย",SZ:"สวาซิแลนด์",CH:"สวิตเซอร์แลนด์",SE:"สวีเดน",EU:"สหภาพยุโรป",US:"สหรัฐอเมริกา",AE:"สหรัฐอาหรับเอมิเรตส์",GB:"สหราชอาณาจักร",CZ:"สาธารณรัฐเช็ก",DO:"สาธารณรัฐโดมินิกัน",CF:"สาธารณรัฐแอฟริกากลาง",SG:"สิงคโปร์",IC:"หมู่เกาะคานารี",CK:"หมู่เกาะคุก",KY:"หมู่เกาะเคย์แมน",CC:"หมู่เกาะโคโคส",SB:"หมู่เกาะโซโลมอน",TC:"หมู่เกาะเติกส์และหมู่เกาะเคคอส",MP:"หมู่เกาะนอร์เทิร์นมาเรียนา",VG:"หมู่เกาะบริติชเวอร์จิน",FK:"หมู่เกาะฟอล์กแลนด์",FO:"หมู่เกาะแฟโร",MH:"หมู่เกาะมาร์แชลล์",VI:"หมู่เกาะยูเอสเวอร์จิน",UM:"หมู่เกาะสหรัฐไมเนอร์เอาต์ไลอิง",AX:"หมู่เกาะโอลันด์",AS:"อเมริกันซามัว",AU:"ออสเตรเลีย",AT:"ออสเตรีย",AD:"อันดอร์รา",AF:"อัฟกานิสถาน",AZ:"อาเซอร์ไบจาน",AR:"อาร์เจนตินา",AM:"อาร์เมเนีย",AW:"อารูบา",GQ:"อิเควทอเรียลกินี",IT:"อิตาลี",IN:"อินเดีย",ID:"อินโดนีเซีย",IQ:"อิรัก",IL:"อิสราเอล",IR:"อิหร่าน",EG:"อียิปต์",UZ:"อุซเบกิสถาน",UY:"อุรุกวัย",EC:"เอกวาดอร์",ET:"เอธิโอเปีย",ER:"เอริเทรีย",SV:"เอลซัลวาดอร์",EE:"เอสโตเนีย",QO:"เอาต์ไลอิงโอเชียเนีย",AI:"แองกวิลลา",AO:"แองโกลา",AQ:"แอนตาร์กติกา",AG:"แอนติกาและบาร์บูดา",9B:"แอฟริกาใต้",DZ:"แอลจีเรีย",AL:"แอลเบเนีย",OM:"โอมาน",IS:"ไอซ์แลนด์",IE:"ไอร์แลนด์",CI:"ไอวอรี่โคสต์",HK:"ฮ่องกง เขตปกครองพิเศษประเทศจีน",HN:"ฮอนดูรัส",HU:"ฮังการี",HT:"เฮติ"},a.4E.yq={AC:"Sa RQ",AF:"jc",AX:"n9 2q",AL:"k9",DZ:"lG",AS:"pO ag",AD:"gb",AQ:"RN",AG:"iU 2Q jT",AO:"iY",AI:"d7",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"pN",BH:"k1",BD:"k2",BB:"jN",BY:"pL",BE:"pM",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 2Q jt",BW:"ju",BV:"fx 5a",BR:"pK",IO:"bC pJ pB dg",VG:"bC 8A 2q",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",KH:"ym",CM:"yl",CA:"yn",IC:"ds 5a",CV:"pY je",KY:"hj 2q",CF:"yo yp bL",EA:"dP 2Q dG",TD:"le",CL:"wI",CN:"7Y",CX:"kG 5a",CP:"fy 5a",CC:"dx [qc] 2q",CO:"pz",KM:"pP",CG:"bG - yr",CD:"bG - kc",CK:"dF 2q",CR:"yv yu",CI:"Côte d\'jw",HR:"pp",CU:"p2",CY:"ya",CZ:"oi bL",DK:"jy",DG:"dw dv",DJ:"ye",DM:"jq",DO:"ol bL",EC:"oq",EG:"yf",SV:"El k4",GQ:"oB 5A",ER:"k7",ES:"L2",US:"yU yM",EE:"k5",ET:"jY",EU:"yx oO",FK:"j2 2q",FO:"dO 2q",FJ:"jX",FI:"oQ",FR:"yy",GF:"9C oJ",PF:"9C j6",TF:"9C oD ja",GA:"jQ",GM:"jO",GE:"9w",DE:"yR",GH:"jS",GI:"dz",GR:"yQ",GL:"oI",GD:"jV",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GW:"5A-jh",GY:"dA",HT:"jg",HM:"fD 5a 2Q fE 2q",HN:"jk",HK:"dB jl bk 7Y",HU:"yP",IS:"q7",IN:"jf",ID:"cl",IR:"j7",IQ:"q5",IE:"pZ",IM:"j9 of bp",IL:"jd",IT:"M3",JM:"yN",JP:"yO",JE:"dE",JO:"q0",KZ:"pG",KE:"l9",KI:"ks",KW:"kv",KG:"pC",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"pw",LI:"ky",LT:"pA",LU:"yS",MO:"pS bk 7Y",MK:"pU",MG:"yT",MW:"kx",QO:"Mc Mk ng pR",MY:"bW",MV:"yX",ML:"kK",MT:"kF",MH:"kp 2q",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"yW",UM:"yV pH kJ 5a ng yU yM",FM:"py",MD:"l5",MC:"pv",ME:"a5",MS:"f1",MN:"l0",MA:"yL",MZ:"yD",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NL:"dc",AN:"dc pE",NC:"7A kt",NZ:"7A pF",NI:"pX",NE:"kP",NG:"kb",NU:"fw",NF:"dK 5a",KP:"yC 9U",MP:"q3 dJ 2q",NO:"ps",OM:"kd",PK:"kj",PW:"fu",PS:"lm dg",PA:"kw",PG:"ka 7A 5A",PY:"kz",PE:"kB",PH:"LH",PN:"d8",PL:"lt",PT:"yz",PR:"fs km",QA:"ku",RE:"Rékf",RO:"ls",RU:"Lx LJ",RW:"kl",BL:"3s lhélf",KN:"3s kr 2Q kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 2Q fo",VC:"3s l2 2Q a7 l8",WS:"ag",SM:"l6 kZ",ST:"mP mw 2Q mv",SA:"jP yJ",SN:"kU",RS:"bq",SC:"kN",SL:"mA mu",SG:"yI",SK:"l4",SI:"l1",SB:"kq 2q",SO:"kS",9B:"6E yH",GS:"6E 9w 2Q me 6E d0 2q",KR:"6E 9U",LK:"kR k8",SH:"St. fz",SD:"fb",SR:"ml",SJ:"d1 2Q d6 dq 2q",SZ:"jb",SE:"lH",CH:"lC",SY:"j5",TW:"j8",TJ:"mN",TZ:"jn",TH:"ji",TL:"jj-j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 2Q iO",TA:"fj de fg",TN:"iN",TR:"xv",TM:"lS",TC:"kM 2Q dm 2q",TV:"iJ",VI:"U.S. 8A 2q",UG:"iK",UA:"lU",AE:"bx cL xB",GB:"bx lO",UY:"iM",UZ:"iS",VU:"iT",VA:"lN xz",VE:"j0",VN:"j1",WF:"dd 2Q a7 df 2q",EH:"xx fB",9x:"xc",9u:"iV",9i:"iW"},a.4E.MY={CA:"ကနေဒါ",KZ:"ကာဇက်စတန်",QA:"ကာတာ",KW:"ကူဝိတ်",KY:"ကေမန် ကျွန်းစု",CR:"ကော့စ်တာရီကာ",CC:"ကိုကိုး ကျွန်းစု",CO:"ကိုလံဘီယာ",KE:"ကင်ညာ",CM:"ကင်မရွန်း",KH:"ကမ္ဘောဒီးယား",CU:"ကျူးဘား",CK:"ကွတ် ကျွန်းစု",HR:"ခရိုအေးရှား",CX:"ခရစ်စမတ် ကျွန်း",CL:"ချီလီ",CZ:"ချက် ပြည်ထောင်စု",TD:"ချဒ်",GR:"ဂရိ",GL:"ဂရင်းလန်း",GH:"ဂါနာ",GN:"ဂီရာနာ",GU:"ဂူအမ်",GM:"ဂန်ဘီရာ",JP:"ဂျပန်",JM:"ဂျမေနီကာ",JE:"ဂျာစီ",DE:"ဂျာမဏီ",GI:"ဂျီဘရော်လ်တာ",GE:"ဂျော်ဂျီယာ",JO:"ဂျော်ဒန်",GT:"ဂွာတီမာလာ",ES:"စပိန်",SK:"စလိုဗေးကီးယား",SI:"စလိုဗေးနီးယား",SG:"စင်္ကာပူ",MF:"စိန့်မာတင်",RS:"ဆားဘီးယား",SN:"ဆီနီဂေါ",SY:"ဆီးရီးယား",SD:"ဆူဒန်",SA:"ဆော်ဒီအာရေးဗီးယား",SB:"ဆော်လမွန်ကျွန်းစု",SO:"ဆိုမာလီယာ",CY:"ဆိုက်ပရက်စ်",SE:"ဆွီဒင်",CH:"ဆွစ်ဇလန်",9i:"ဇင်ဘာဘွေ",9u:"ဇမ်ဘီယာ",CN:"တရုတ်",MO:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ မကာအို",HK:"တရုတ်၏ အထူးအုပ်ချုပ်ခွင့်ရ ဟောင်ကောင်",TJ:"တာဂျီကစ္စတန်",TN:"တူနီးရှား",TR:"တူရကီ",KR:"တောင်ကိုရီးယား",9B:"တောင်အာဖရိက",TZ:"တန်ဇန်နီးယား",TO:"တွန်ဂါ",TW:"ထိုင်ဝမ်",TH:"ထိုင်း",DM:"ဒိုမီနီကာ",DO:"ဒိုမီနီကန်",DK:"ဒိန်းမတ်",NC:"နယူး ကယ်လီဒိုနီးယား",NZ:"နယူးဇီလန်",NI:"နီကာရာဂွာ",NP:"နီပေါ",NO:"နော်ဝေ",NE:"နိုင်ဂျာ",NG:"နိုင်ဂျီးရီးယား",NA:"နမ်မီးဘီးယား",NL:"နယ်သာလန်",PA:"ပနားမား",PK:"ပါကစ္စတန်",PG:"ပါပူရာနယူးဂီနီ",PY:"ပါရာဂွေး",PS:"ပါလက်စတိုင်း ပိုင်နက်",PE:"ပီရူး",PT:"ပေါ်တူဂီ",PR:"ပေါ်တူရီကို",PL:"ပိုလန်",FR:"ပြင်သစ်",GF:"ပြင်သစ် ဂီယာနာ",TF:"ပြင်သစ် တောင်ပိုင်း ပိုင်နက်များ",PF:"ပြင်သစ် ပေါ်လီနေးရှား",FO:"ဖာရိုး ကျွန်းစုများ",PH:"ဖိလစ်ပိုင်",FJ:"ဖီဂျီ",FK:"ဖောက်ကလန် ကျွန်းစု",FI:"ဖင်လန်",VA:"ဗာတီကန်",VN:"ဗီယက်နမ်",VE:"ဗင်နီဇွဲလား",VG:"ဗြိတိသျှ ဗာဂျင်း ကျွန်းစု",IO:"ဗြိတိသျှ အိန္ဒြိယ သမုဒ္ဒရာ ပိုင်နက်",BR:"ဘရာဇီး",BN:"ဘရူနိုင်း",BS:"ဘဟားမား",BM:"ဘာမူဒါ",BH:"ဘာရိန်း",BY:"ဘီလာရုစ်",BG:"ဘူဂေးရီးယား",BT:"ဘူတန်",BZ:"ဘေလီဇ်",BA:"ဘော့စနီးယား နှင့် ဟာဇီဂိုဘီးနား",BW:"ဘော့စ်ဝါနာ",BO:"ဘိုလီးဘီးယား",BD:"ဘင်္ဂလားဒေ့ရှ်",BE:"ဘယ်လ်ဂျီယမ်",MG:"မဒဂတ်စကာ",MY:"မလေးရှား",MK:"မာစီဒိုးနီးယား",MH:"မာရှယ် ကျွန်းစု",MW:"မာလာဝီ",ML:"မာလီ",MA:"မော်ရိုကို",MV:"မော်လဒိုက်",MZ:"မိုဇန်ဘစ်",MC:"မိုနကို",MX:"မက္ကဆီကို",KP:"မြောက်ကိုရီးယား",MM:"မြန်မာ",MN:"မွန်ဂိုးလီးယား",ME:"မွန်တီနိဂရိုး",9x:"ယီမင်",UA:"ယူကရိန်း",UG:"ယူဂန္ဒာ",GB:"ယူနိုက်တက်ကင်းဒမ်း",US:"ယူနိုက်တက်စတိတ်",UM:"ယူနိုက်တက်စတိတ် အပြင်ထွက် နေသည့် သေးငယ်သောကျွန်းများ",AE:"ယူအေအီး",VI:"ယူအက်စ် ဗာဂျင်း ကျွန်းစု",RW:"ရဝန်ဒါ",RU:"ရုရှ",RO:"ရိုမေးနီးယား",LA:"လာအို",LU:"လူဇင်ဘတ်",LB:"လက်ဘနွန်",LR:"လိုင်ဘေးရီးယား",LT:"လစ်သူယေးနီးယား",LV:"လတ်ဗီးယား",LK:"သီရိလင်္ကာ",HT:"ဟေတီ",HU:"ဟန်ဂေရီ",HN:"ဟွန်ဒူးရပ်စ်",AZ:"အဇာဘိုင်ဂျန်",EH:"အနောက်ပိုင်း ဆာဟာရ",AS:"အမေရိကန် စမိုအ",TL:"အရှေ့တီမော",CF:"အလယ်ပိုင်း အာဖရိက ပြည်ထောင်စု",AR:"အာဂျင်တီးနား",AF:"အာဖဂန်နစ္စတန်",AM:"အာမေနီးယား",GQ:"အီကွေတာ ဂီရာနာ",EC:"အီကွေဒေါ",EG:"အီဂျစ်",IT:"အီတလီ",IQ:"အီရတ်",IR:"အီရန်",ET:"အီသီယိုးပီးယား",UZ:"ဥဘက်ကစ္စတန်",UY:"ဥရုဂွေး",EU:"ဥရောပသမဂ္ဂ",AT:"ဩစတြီးယား",AU:"ဩစတြေးလျှား",OM:"အိုမန်",EE:"အက်စတိုးနီးယား",IS:"အိုက်စလန်",AO:"အင်ဂိုလာ",ID:"အင်ဒိုနီးရှား",CI:"အိုင်ဗရီကိုစ့်",IE:"အိုင်ယာလန်",IL:"အစ္စရေး",AI:"အန်ကွီလာ",AQ:"အန္တာတိက",IN:"အိန္ဒိယ",DZ:"အယ်လ်ဂျီးရီးယား",SV:"အယ်လ်ဆာဗေးဒိုး"},a.4E.KM={KH:"កម្ពុជា",CA:"កាណាដា",QA:"កាតារ",CV:"កាបវែរ",CM:"កាមេរូន",KZ:"កាហ្សាក់ស្តាង់់",CG:"កុងហ្គោ",CI:"កូដឌីវ័រ",CR:"កូស្តារីកា",CO:"កូឡុំប៊ី",KE:"កេនយ៉ា",KM:"កុំម៉ូរ៉ូស",GR:"ក្រិច",HR:"ក្រូអាស៊ី",KI:"គិរិបាទី",CU:"គុយបា",KW:"គុយវ៉ែត",KG:"គៀរហ្គីស្តង់",CN:"ចិន",TD:"ឆាដ",JP:"ជប៉ុន",CL:"ឈីលី",DK:"ដាណឺម៉ាក",DM:"ដូមីនីកា",NA:"ណាមីប៊ី",TZ:"តង់ហ្សានី",TJ:"តាដហ្ស៉ីគីស្តង់",TO:"តុងហ្គា",TG:"តូហ្គូ",TW:"តៃវ៉ាន់",TH:"ថៃ",TL:"ទីម័រខាងកើត",TN:"ទុយនេស៊ី",TM:"ទួគមេនីស្តង់",TR:"ទួរគី",TT:"ទ្រីនីដាដនឹងតូបាហ្គោ",NO:"ន័រវែស",NI:"នីការ៉ាហ្គ័រ",NE:"នីហ្សេរ",NG:"នីហ្សេរីយ៉ា",NZ:"នូវែលហ្សេឡង់",NP:"នេប៉ាល់",BD:"បង់ក្លាដេស្ហ",PK:"ប៉ាគីស្ថាន",PA:"ប៉ាណាម៉ា",PG:"ប៉ាពូអានូវែលហ្គីណេ",BB:"បារបាដូស",PY:"ប៉ារ៉ាហ្គាយ",BH:"បារ៉ែន",FR:"បារាំង",PS:"ប៉ាលេស្ទីន",BS:"បាហាម៉ា",BW:"បុតស្វាណា",BG:"ប៊ុលហ្គារី",BT:"ប៊ូតាន",BF:"ប៊ូរគីណាហ្វាសូ",BI:"ប៊ូរុនឌី",BO:"បូលីវី",PL:"ប៉ូលូញ",BA:"បូស្ន៉ី",BJ:"បេណាំង",PE:"ប៉េរូ",BZ:"បេលីហ្ស",BY:"បេឡារុស្ស",BE:"បែលហ្ស៉ិក",BN:"ប៊្រុយណេ",BR:"ប្រេស៊ីល",PR:"ព័រតូរីកូ",PT:"ព័រទុយហ្កាល់",MG:"ម៉ាដាហ្កាស្ការ",MA:"ម៉ារ៉ុក",MT:"ម៉ាល់តា",ML:"ម៉ាលី",MY:"ម៉ាលេស៉ី",MK:"ម៉ាសេដន",FM:"មិក្រូនេស៊ី",MX:"ម៉ិចសិក",MM:"មីយ៉ាន់ម៉ា",MN:"ម៉ុងហ្គោលី",MC:"ម៉ូណាកូ",MR:"ម៉ូរីតានី",MU:"ម៉ូរីទុស",MZ:"ម៉ូហ្សាំប៊ិក",9x:"យេមែន",RW:"រវ៉ាន់ដា",RO:"រូម៉ានី",RU:"រូស្ស៊ី",LI:"លិចទេនស្តែន",LT:"លីទុយអានី",LB:"លីបង់",LY:"លីប៊ី",LR:"លីបេរីយ៉ា",LU:"លុចហ្សំបួរ",LS:"លើសូតូ",VA:"វ៉ាទីកង់",VN:"វៀតណាម",VE:"វេនេហ្ស៊ុយឡា",US:"សហរដ្ឋអាមេរិក",KR:"សាធារណរដ្ឋកូរ៉េ",CZ:"សាធារណរដ្ឋឆេក",DO:"សាធារណរដ្ឋដូមីនីកែន",KP:"សាធារណរដ្ឋប្រជាធិបតេយ្យប្រជាមានិតកូរ៉េ",MD:"សាធារណរដ្ឋម៉ុលដាវី",CF:"សាធារណរដ្ឋអាហ្វ្រិកកណ្ដាល",WS:"សាមូអា",EH:"សាហារ៉ាខាងលិច",SG:"សិង្ហបុរី",CY:"ស៉ីពរ៍",SY:"ស៊ីរី",SC:"សីសែល",SE:"ស៊ុយអែដ",SD:"ស៊ូដង់",SO:"សូម៉ាលី",SR:"សូរីណាម",SZ:"សូហ្ស៉ីឡង់",SN:"សេនេហ្កាល់",SL:"សេរ៉ាឡេអូន",LK:"ស្រីលង្កា",SK:"ស្លូវ៉ាគី",SI:"ស្លូវេនី",CH:"ស្វីស",HK:"ហុងកុង",HU:"ហុងគ្រី",HN:"ហុងឌួរ៉ាស់",NL:"ហូល្លង់",HT:"ហៃទី",GH:"ហ្កាណា",GT:"ហ្គាតេម៉ាឡា",GA:"ហ្គាបុង",GN:"ហ្គីណេ",GW:"ហ្គីណេប៊ីសូ",GQ:"ហ្គីណេអេក្វាទ័រ",GY:"ហ្គីយ៉ាណា",GM:"ហ្គាំប៊ី",PH:"ហ្វ៉ីលីពីន",FJ:"ហ្វ៉ីហ្ស៉ី",FI:"ហ្វាំងឡង់",JO:"ហ៊្សកដានី",GE:"ហ្សកហ្ស៉ី",JM:"ហ្សាម៉ាអ៉ិគ",DJ:"ហ្ស៉ីបូទី",9i:"ហ្ស៊ីមបាបវ៉េ",9u:"ហ្សាំប៊ី",LV:"ឡាតវីយ៉ា",LA:"ឡាវ",AO:"អង់ហ្គោឡា",AD:"អានដូរ៉ា",AM:"អារមេនី",SA:"អារ៉ាប៊ីសាអ៊ូឌីត",AL:"អាល់បានី",DZ:"អាល់ហ្សេរី",DE:"អាល្លឺម៉ង់",AF:"អាហ្វហ្គានីស្ថាន",9B:"អាហ្វ្រិកខាងត្បូង",AR:"អាហ្សង់ទីន",AZ:"អាហ៊្សែរបែហ្សង់",IN:"ឥណ្ឌា",ID:"ឥណ្ឌូនេស៊ី",IT:"អ៊ីតាលី",IR:"អ៊ីរ៉ង់",IQ:"អ៊ីរ៉ាក់",IL:"អ៊ីស្រាអែល",IS:"អ៉ីស្លង់",UA:"អ៊ុយក្រែន",UY:"អ៊ុយរុយហ្គាយ",AT:"អូទ្រីស",OM:"អូម៉ង់",AU:"អូស្ត្រាលី",UG:"អ៊ូហ្កង់ដា",UZ:"អ៊ូហ្សបេគីស្តង់",IE:"អៀរឡង់",EC:"អេក្វាឌ័រ",ET:"អេត្យូពី",AE:"អេមីរ៉ែទអារ៉ាប់រួម",ER:"អេរីទ្រា",EE:"អេស្តូនី",ES:"អេស្ប៉ាញ",EG:"អេហ្ស៉ីប",SV:"អែលសាល់វ៉ាឌ័រ"},a.4E.ID={AF:"jc",9B:"kg f7",AL:"k9",DZ:"lG",US:"l7 zF",AD:"F3",AO:"iY",AI:"d7",AQ:"Ff",AG:"iU 3X jT",AN:"DN lv",SA:"cL jP",AR:"jR",AM:"k6",AW:"dr",AU:"k3",AT:"jZ",AZ:"k0",BS:"W7",BH:"k1",BD:"k2",BB:"jN",NL:"lv",BY:"Wl",BE:"Wm",BZ:"jM",BJ:"jz",BM:"dR",BT:"dQ",BO:"jx",BA:"jr 3X jt",BW:"ju",BR:"Wg",BN:"jv",BG:"jB",BF:"jC jK",BI:"jG",EA:"dP 3X dG",TD:"le",CL:"xh",CN:"Xj",CI:"XK d\'jw",DK:"jy",DG:"dw dv",DM:"rx",EC:"OZ",SV:"El k4",ER:"k7",EE:"k5",ET:"jY",FJ:"jX",PH:"y3",FI:"NB",GA:"jQ",GM:"jO",GE:"9w",GH:"jS",GI:"dz",GD:"jV",GL:"Qr",GP:"dD",GU:"iX",GT:"iZ",GG:"dC",GN:"5A",GQ:"5A QU",GW:"5A-jh",GY:"dA",GF:"dA mU",HT:"jg",HN:"jk",HK:"dB jl bk 7Y",HU:"R2",IN:"jf",ID:"cl",GB:"mE QZ",IQ:"QY",IR:"j7",IE:"C7",IS:"R0",IM:"j9 of bp",IL:"jd",IT:"NX",JM:"zm",JP:"My",DE:"za",JE:"dE",DJ:"WJ",NC:"VP mz",KH:"Al",CM:"zr",CA:"zs",KZ:"B6",KE:"l9",AX:"3R n9",IC:"3R ds",CC:"3R dx",CK:"3R dF",FO:"3R dO",KY:"3R Cf",UM:"3R Bb BK l7 zF",FK:"3R zY",MP:"3R dJ nb",MH:"3R kp",NF:"3R dK",PN:"3R d8",SB:"3R kq",GS:"3R 6E d0 3X 6E 9w",SJ:"3R d1 3X d6 dq",TC:"3R kM 3X dm",VI:"3R U.S. 8A",VG:"3R 8A mE",WF:"3R dd 3X df",KG:"KB",KI:"ks",CO:"Kp",KM:"Jy",CD:"zc - kc",CG:"zc - aQ",KR:"9U f7",KP:"9U nb",CR:"ze z1",HR:"Lw",CU:"LD",KW:"kv",LA:"kH",LV:"kI",LB:"nd",LS:"kE",LR:"kD",LY:"LE",LI:"ky",LT:"M0",LU:"M1",MG:"zv",MO:"M2 bk 7Y",MK:"M9",MV:"Lv",MW:"kx",MY:"bW",ML:"kK",MT:"kF",MA:"Vu",MQ:"kn",MR:"kQ",MU:"kO",c8:"kX",MX:"z5",EG:"zf",FM:"Qx",MD:"l5",MC:"QB",MN:"l0",ME:"a5",MS:"f1",MZ:"xb",MM:"jp",NA:"kW",NR:"fv",NP:"kY",NE:"kP",NG:"kb",NI:"JQ",NU:"fw",NO:"KF",PG:"rX ka rX",OM:"kd",QO:"Jc IY",PS:"He Lp",PK:"kj",PW:"fu",PA:"kw",PY:"kz",FR:"mU",PE:"kB",PL:"M4",PF:"Mb sC",PT:"Mh",PR:"fs Mf",AC:"b7 kA",BV:"b7 fx",CX:"b7 kG",CP:"b7 fy",HM:"b7 fD 3X 3R fE",QA:"ku",CF:"aQ kg rv",CZ:"aQ LW",DO:"aQ rx",RE:"Rékf",RO:"JX",RU:"rF",RW:"kl",EH:"fB rO",BL:"3s KA",SH:"3s fz",KN:"3s kr 3X kL",LC:"3s kV",MF:"3s l3",PM:"3s fp 3X fo",VC:"3s l2 3X l8",WS:"ag",AS:"ag l7",SM:"l6 kZ",ST:"mP mw 3X mv",NZ:"Eh mz",SN:"kU",RS:"bq",CS:"bq 3X a5",SC:"kN",SL:"mA mu",SG:"sV",CY:"Uv",SK:"l4",SI:"l1",SO:"kS",ES:"N6",LK:"kR k8",SD:"fb",SR:"ml",SZ:"jb",SE:"RG",CH:"Qm",SY:"j5",TW:"j8",TJ:"mN",CV:"QX je",TZ:"jn",TF:"R3 QV f7 sC",TH:"ji",TL:"jj j4",TG:"j3",TK:"fk",TO:"iP",TT:"iR 3X iO",TA:"fj da fg",TN:"iN",TR:"qy",TM:"Rb",TV:"iJ",UG:"iK",UA:"Qe",AE:"qG Qd cL",EU:"qG Qh",UY:"iM",UZ:"iS",VU:"iT",VA:"Qc",VE:"j0",VN:"j1",IO:"Q4 mE di Q2 Q6",9x:"qp",JO:"Qz",GR:"r9",9u:"iV",9i:"iW"},a.4E.rn={AL:"阿尔巴尼亚",DZ:"阿尔及利亚",AF:"阿富汗",AR:"阿根廷",AE:"阿拉伯联合酋长国",AW:"阿鲁巴",OM:"阿曼",AZ:"阿塞拜疆",AC:"阿森松岛",EG:"埃及",ET:"埃塞俄比亚",IE:"爱尔兰",EE:"爱沙尼亚",AD:"安道尔",AO:"安哥拉",AI:"安圭拉",AG:"安提瓜和巴布达",AT:"奥地利",AX:"奥兰群岛",AU:"澳大利亚",BB:"巴巴多斯",PG:"巴布亚新几内亚",BS:"巴哈马",PK:"巴基斯坦",PY:"巴拉圭",PS:"巴勒斯坦领土",BH:"巴林",PA:"巴拿马",BR:"巴西",BY:"白俄罗斯",BM:"百慕大",BG:"保加利亚",MP:"北马里亚纳群岛",BJ:"贝宁",BE:"比利时",IS:"冰岛",PR:"波多黎各",PL:"波兰",BA:"波斯尼亚和黑塞哥维那",BO:"玻利维亚",BZ:"伯利兹",BW:"博茨瓦纳",BT:"不丹",BF:"布基纳法索",BI:"布隆迪",BV:"布维特岛",KP:"朝鲜",GQ:"赤道几内亚",QO:"大洋洲边远群岛",DK:"丹麦",DE:"德国",DG:"迪戈加西亚岛",TL:"东帝汶",TG:"多哥",DM:"多米尼加",DO:"多米尼加共和国",RU:"俄罗斯",EC:"厄瓜多尔",ER:"厄立特里亚",FR:"法国",FO:"法罗群岛",PF:"法属波利尼西亚",GF:"法属圭亚那",TF:"法属南部领土",VA:"梵蒂冈",PH:"菲律宾",FJ:"斐济",FI:"芬兰",CV:"佛得角",FK:"福克兰群岛",GM:"冈比亚",CG:"刚果(布)",CD:"刚果(金)",CO:"哥伦比亚",CR:"哥斯达黎加",GG:"格恩西岛",GD:"格林纳达",GL:"格陵兰",GE:"格鲁吉亚",CU:"古巴",GP:"瓜德罗普岛",GU:"关岛",GY:"圭亚那",KZ:"哈萨克斯坦",HT:"海地",KR:"韩国",NL:"荷兰",AN:"荷属安的列斯群岛",HM:"赫德与麦克唐纳群岛",ME:"黑山共和国",HN:"洪都拉斯",KI:"基里巴斯",DJ:"吉布提",KG:"吉尔吉斯斯坦",GN:"几内亚",GW:"几内亚比绍",CA:"加拿大",GH:"加纳",IC:"加纳利群岛",GA:"加蓬",KH:"柬埔寨",CZ:"捷克共和国",9i:"津巴布韦",CM:"喀麦隆",QA:"卡塔尔",KY:"开曼群岛",CC:"科科斯群岛",KM:"科摩罗",CI:"科特迪瓦",KW:"科威特",CP:"克利珀顿岛",HR:"克罗地亚",KE:"肯尼亚",CK:"库克群岛",LV:"拉脱维亚",LS:"莱索托",LA:"老挝人民民主共和国",LB:"黎巴嫩",LT:"立陶宛",LR:"利比里亚",LY:"利比亚",LI:"列支敦士登",RE:"留尼汪",LU:"卢森堡",RW:"卢旺达",RO:"罗马尼亚",MG:"马达加斯加",MV:"马尔代夫",MT:"马耳他",MW:"马拉维",MY:"马来西亚",ML:"马里",MK:"马其顿",MH:"马绍尔群岛",MQ:"马提尼克群岛",c8:"马约特",IM:"曼岛",MU:"毛里求斯",MR:"毛里塔尼亚",US:"美国",UM:"美国边远小岛",AS:"美属萨摩亚",VI:"美属维京群岛",MN:"蒙古",MS:"蒙塞拉特群岛",BD:"孟加拉国",PE:"秘鲁",FM:"密克罗尼西亚联邦",MM:"缅甸",MD:"摩尔多瓦",MA:"摩洛哥",MC:"摩纳哥",MZ:"莫桑比克",MX:"墨西哥",NA:"纳米比亚",9B:"南非",AQ:"南极洲",GS:"南乔治亚岛和南桑威齐群岛",NR:"瑙鲁",NI:"尼加拉瓜",NP:"尼泊尔",NE:"尼日尔",NG:"尼日利亚",NU:"纽埃",NO:"挪威",NF:"诺福克岛",EU:"欧盟",PW:"帕劳",PN:"皮特凯恩群岛",PT:"葡萄牙",JP:"日本",SE:"瑞典",CH:"瑞士",SV:"萨尔瓦多",WS:"萨摩亚",RS:"塞尔维亚",CS:"塞尔维亚和黑山",SL:"塞拉利昂",SN:"塞内加尔",CY:"塞浦路斯",SC:"塞舌尔群岛",SA:"沙特阿拉伯",BL:"圣巴泰勒米",CX:"圣诞岛",ST:"圣多美和普林西比",SH:"圣赫勒拿",KN:"圣基茨和尼维斯",LC:"圣卢西亚",MF:"圣马丁",SM:"圣马力诺",PM:"圣皮埃尔和密克隆",VC:"圣文森特和格林纳丁斯",LK:"斯里兰卡",SK:"斯洛伐克",SI:"斯洛文尼亚",SJ:"斯瓦尔巴特和扬马延",SZ:"斯威士兰",SD:"苏丹",SR:"苏里南",SB:"所罗门群岛",SO:"索马里",TJ:"塔吉克斯坦",TW:"台湾",TH:"泰国",TZ:"坦桑尼亚",TO:"汤加",TC:"特克斯和凯科斯群岛",TA:"特里斯坦-达库尼亚群岛",TT:"特立尼达和多巴哥",TN:"突尼斯",TV:"图瓦卢",TR:"土耳其",TM:"土库曼斯坦",TK:"托克劳",WF:"瓦利斯和富图纳",VU:"瓦努阿图",GT:"危地马拉",VE:"委内瑞拉",BN:"文莱",UG:"乌干达",UA:"乌克兰",UY:"乌拉圭",UZ:"乌兹别克斯坦",GR:"希腊",ES:"西班牙",EH:"西撒哈拉",SG:"新加坡",NC:"新喀里多尼亚",NZ:"新西兰",HU:"匈牙利",EA:"休达及梅利利亚",SY:"叙利亚",JM:"牙买加",AM:"亚美尼亚",9x:"也门",IQ:"伊拉克",IR:"伊朗",IL:"以色列",IT:"意大利",IN:"印度",ID:"印度尼西亚",GB:"英国",VG:"英属维京群岛",IO:"英属印度洋领地",JO:"约旦",VN:"越南",9u:"赞比亚",JE:"泽西岛",TD:"乍得",GI:"直布罗陀",CL:"智利",CF:"中非共和国",CN:"中国",MO:"中国澳门特别行政区",HK:"中国香港特别行政区"},a}),2k.4i("5j").kC(["$LN",1a(a){"2r 2g";a.8j("3m/a6.2T",\'<1h 1f="3k-fO">

    {{7J.a1}}

    <1h 1f="3k-2A">
    {{7J.2Z}}
    <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uE.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o !== \\\'MY\\\'"> <1X 1S="1w" ng-2j="1c.7h" 1f="2h-3b" 4x="{{1N.7f}}"> <1r 1f="fa fa-5K-4T-o fa-lg 2N-jW" ng-2O="1c.7h = \\\'\\\'"> <1h 1f="2h-1A 2N-jU" ng-3T="1c.6o === \\\'MY\\\'"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7H}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A" ng-3T="1c.6o === \\\'MY\\\'"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.1C }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uu.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.cv }} ****** {{ 1H.cx }} <1h 1f="1G-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.kT }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uw.2T",\'<1h 1f="3k-2A 3S-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="3S-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H.3W }} <1h 1f="1G-bs-1o-1k-1z"> <7g 1f="3S-iL" ng-3a="{{ 1H.4v }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'"> <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/uz.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7R}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H[1] }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/qe.2T",\'<1h 1f="3k-fO"> <1h 1f="2h-1A 2N-jU"> <1X 1S="1w" ng-2j="2N" 1f="2h-3b" 4x="{{1N.7V}}"> <1r 1f="fa fa-2N 2N-jW"> <1h 1f="3k-2A 4E-1o-3k-2A"> <1h 1f="1o-1A f3-f2"> <1h 1f="1w-1o-8E"> <1h 1f="1y-bs-1o-1k-1z"> <1r 1f="1o-1k">{{ 1H }} <1h 1f="3k-b4"> <2G 1f="44-2G" 1S="2G" ng-2O="44()">{{1N.5s}} \'),a.8j("3m/7r.2T",\'<1h 1f="1w-4j tX-4j">

    {{1N.7S}}

    {{1N.7u}}

    <1h 1f="1w-4j tX-4j" ng-if="1c.4Z">

    {{1N.86}}

    \'),a.8j("3m/KL.2T",\'

    4C X-KV

    <2h 1f="2h-Lf"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">5c <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.5c"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3h <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3h"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3E <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3E"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3I <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3I"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3g <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3g"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3F <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3F"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">1T <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.1T"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3t <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3t"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3r <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3r"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2J <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2J"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">3D <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.3D"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2i <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2i"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">eP <1h 1f="3d-sm-8"> <1X 1S="tO" ng-2j="1c.eP"> <1h 1f="2h-1A"> <1z 1f="3d-sm-4 3b-1z">2b <1h 1f="3d-sm-8"> <1X 1S="1w" 1f="2h-3b" ng-2j="1c.2b"> <1h 1f="2h-1A"> <1h 1f="3d-sm-Jh-2 3d-sm-10"> <2G ng-2O="wo()">jL \'),a.8j("3m/9p.2T",\'<1h 1f="1o-1A"> <1h 1f="1o-1A-1H 3h"> <1r 1f="1y-1z">{{1N.5h}} <1r 1f="1o-1k 1V-1G">{{1c.3h}} <1h 1f="1o-1A-1H 3F 1w-4j"> <1r 1f="1y-1z 1V-1y">{{1c.3F}} <1r 1f="qY-1w">{{1c.bv}} <1h 1f="1o-1A-1H 3I"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3I" 4x="{{1N.8u}}" ng-ce="!1c.4o || 1c.jI"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jI">&6z; <1h 1f="1o-1A-1H 3t"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3t" 4x="{{1N.8i}}" ng-ce="!1c.4o || 1c.jH"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jH">&6z; <1h 1f="1o-1A-1H 3r"> <1X jD 1f="1o-1k e6" 1S="1w" ng-2j="1c.3r" 4x="{{1N.8p}}" ng-ce="!1c.4o || 1c.jE"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jE">&6z; <1h 1f="1o-1A-1H 5c"> <1X 1f="1o-1k e6" 1S="1w" ng-2j="1c.5c" 4x="{{1N.7K}}" ng-ce="!1c.4o || 1c.jF"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.4o && !1c.jF">&6z; <1r 1f="1y-1z">{{1N.8d}} <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H"> <1r 1f="1o-1k 1V-1G" ng-3T="1c.9H">&6z; <1r 1f="1o-1k 1V-1G">{{1c.au}} <1h 1f="Hv-2h" ng-3T="1c.2b===\\\'4X\\\'||1c.2b===\\\'aA\\\'||1c.2b===\\\'Hw\\\'"> <1h 1f="1m-4X-4q-2h" ng-3T="1c.6a.1i>0"> <1r 1f="1m-4q-1z">{{1N.83}} <1h 1f="1o-1A-1H" ng-2O="wW()"> <1r 1f="1y-1z">{{1N.7B}} <1r 1f="1o-1k 1V-1G">&6z; <1X id="vv" 1f="1o-1k 1V-1G 4X-4q-1X" 1S="9t" ng-2j="1c.6d" 4x="jJ jJ jJ jJ" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7E}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1X id="vs" 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.5t" 4x="{{1N.89}}" ng-ce="!1c.3w"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7Z}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1c.5G" 4x="vA"> <1r 1f="1y-1z">{{1N.6S}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.ci}} <1h 1f="1o-1A-1H 7h" ng-2O="t7()"> <1r 1f="1y-1z">{{1N.7f}} <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w"> <1r 1f="1o-1k 1V-1G" ng-5i="!1c.3w">&6z; <1r 1f="1o-1k 1V-1G">{{1c.7h}} <1h 1f="4X-r6"> <1r>{{1c.w1}} <1h 1f="pD-2h" ng-3T="1c.2b===\\\'cq\\\'"> <1h 1f="1o-1A-1H pD-oF-1z"> <1r 1f="1y-1z">{{1N.84}} <1h 1f="1o-1A-1H 1w-4j pD-oF"> <1r 1f="qY-1w">{{1c.oK}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.7G}} <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 4q-3B-1X" 1S="9t" ng-2j="1c.8U" 4x="{{1N.8a}}"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">oN <1r 1f="1o-1k 1V-1G">&6z; <1X 1f="1o-1k 1V-1G 7a-1X" 1S="9t" ng-2j="1c.bt" 4x="(c7)"> <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="qR()" 1f="6g-2G" ng-HP="r3()">&6z;{{1N.5D}} <1h 1f="fN"> <1h 1f="1w-4j bm-r6-8E"> <7g ng-3a="2R/rq.3C" 1f="rq"> <1h 1f="mp-pl"> <1r>V{{1c.cR}} \'),a.8j("3m/6O.2T",\'<1h 1f="1o-1A" id="6O"> <1h 1f="1o-1A-1H 1w-4j"> <7g id="6O-iL" 1f="6O-iL" ng-3a="{{ p3 }}" 7v="1b.7v=\\\'\\\'; 1b.3a=\\\'2R/4h.3C\\\'" ng-5i="!iQ"> <1h ng-5i="iQ">

    {{t6}}

    <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.6y}} <1r 1f="1o-1k 1V-1G">4C {{2I.3S}} <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.8f}} <1r 1f="1o-1k 1V-1G" ng-if="!2I.a9">{{2I.5p}} <1r 1f="1o-1k 1V-1G" ng-if="2I.a9">{{2I.a9}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.5p" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="!2I.a9"> <2k-5g ng-2j="8H.a9" bc-1B="bc" bc-1f="5g" bc-1S="7g" ng-if="2I.a9"> <1h 1f="1o-1A-1H" ng-3T="2I.jo.1i > 0"> <1r 1f="1y-1z">{{2I.jo}} <1r 1f="1o-1k 1V-1G">{{2I.cP}} <1h 1f="5g-8E"> <2k-5g ng-2j="8H.cP" bc-1B="bc" bc-1f="5g" bc-1S="7g"> <1h 1f="1o-1A-1H"> <1r 1f="1y-1z">{{1N.88}} <1r 1f="1o-1k 1V-1G">{{2I.jm}}{{2I.oT}} <1h 1f="1o-1A-1H" ng-3T="2I.ee.1i > 0"> <1r 1f="1y-1z">{{1N.6q}} <1h 1f="1o-1A">
  • {{ 1H }}
  • <1h> <1h 1f="fN 6g-fN"> <1h> <2G ng-2O="sl()" 1f="6g-2G">{{1N.8k}} \'),a.8j("3m/pe.2T",\'<1h 1f="3k-fO">

    {{sL}}

    <1h 1f="3k-2A">

    <1h 1f="1o-1A-1H 1o-1A-1H-4G"> <1r>3e <1h 1f="3N-1A 3N-1A-4G" ng-5i="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'bX\\\'" ng-5i="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">bX <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'11\\\'">11 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'22\\\'" ng-3T="1c.2b === \\\'aH\\\' || 1c.2b === \\\'bN\\\'">22 <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1s\\\'">1s <1z 1f="3N 3N-aJ" ng-2j="1l.3e" aI-3N-9Z="\\\'1E\\\'">1E <1h 1f="3N-1A 3N-1A-4G" ng-3T="1l.8P"> <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'kk\\\'">kk <1z 1f="3N 3N-aJ" ng-2j="1l.1Z" aI-3N-9Z="\\\'9k\\\'">9k <1r>1E: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.1E}} <1r>bK: <1r 1f="1o-1k 1V-1G"> <1r 1f="1o-1k 1V-1G">{{1l.bK}} <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>9m <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.9m" 4x="9m"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.5p" 4x="5p"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 52 <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fH" 4x="52"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-5i="1l.8P"> <1r>{{1N.6n}} 7o <1X 1f="1o-1k 1V-1G" 1S="1w" ng-2j="1l.fS" 4x="7o"> <1h 1f="1o-1A-1H 1o-1A-1H-4G" ng-3T="1l.8P"> <1r>5p <1X 1f="1o-1k 1V-1G" 1S="9t" ng-2j="1l.fm" 4x="fm"> <1h 1f="3k-b4" 2M="1w-VV: 4j"> <2G 1f="44-2G" 1S="2G" ng-2O="q4()" 2M="1n:30%; 6H-3q:#OY">{{1N.8v}} <2G 1f="44-2G" 1S="2G" ng-2O="6g()" 2M="1n:40%; 7w-1y:Qt">{{1N.5D}} \')}]);',62,3734,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|this|sdkData|var|return|class|prototype|div|length|default|value|data|new|width|list|typeof|isInternalDebugging|span|null|toString|Object|height|text|void|left|label|group|options|name|throw|Error|__esModule|right|item|for|document|call|push|mp_language|localizable|255|node|top|Math|type|mp_merchant_ID|case|pull|image|input|CryptoJS|status|||||||||||not|mp_channel|tidak||TypeError|encode|strict|form|mp_amount|model|angular|canvas|been|exports|String|else|Islands|use|setPrototypeOf|window|hasn|fontSize|substring|parent|defineProperty|css|body|replace|break|renderer|filter|mp_verification_key|button|parseInt|C5ResultData|mp_app_name|then|valid|style|search|click|sdkConstants|and|images|catch|html|svg|ctx|BERHAD|must|instanceof|errorDesc|||||||||||src|control|try|col|status_code|commErrorHandler|mp_country|mp_order_ID|object|substr|modal|console|views|create|result|controller|color|mp_bill_mobile|Saint|mp_bill_email|Invalid|BANK|new_credit_card|setAttribute|Cannot|createElement|MPdomain|number|png|mp_password|mp_username|mp_currency|maskname|100|mp_bill_name|mp_request_type|Promise|clip|position|btn|args|forEach|undefined|Kepulauan|channel|show|indexOf|128|title|dan|found|super|||||close|||||constructor|Super|__proto__|configurable|enumerable|either|expression|writable|ImageUnavailable|module|center|BCARD|mp_transaction_id|current_token|currency|mp_editing_enabled|called|card|initialised|ReferenceError|match|Billing|logo_url|BCard|placeholder|resolve|mp_encrypt_credentials|AES|MYR|MOLPay|none|country|switch|sandboxed|documentElement|html2canvas|getContext|appendChild|utils|mp_secured_verified|SandboxedResultData|animation|templateUrl|mobile|log|MALAYSIA|circle|seed|encodings|php|credit|open|mp_sandbox_mode|||amount|displayValue|textAlign|trim|fromCharCode|||email|Island|element|mp_bill_description|available_channel|proxy|max|barcode|OrderID|hide|molpayXsdkApp|token|map|round|API|line|txn_ID|xCF|size|Close|mp_credit_card_expiry|PleaseSelectAChannel|method|Utf8|repeat|borders|enc|Guinea|decrypt|BillingMobileMustBeMoreThan4Characters|Proceed|AmountNotFound|currentActiveModal|mp_credit_card_cvv|JSON|sah|SandBoxed|times|preloadCount|font|BillingNameMustBeMoreThan2Characters|scope|InvalidBillingMobile|D7ResultData|concat|split|SHA256|callNativeWebview|wastong|parseFloat|mode|index|start|||||||rootScope|105|||available_token|SecuredEncryptionFailed|nodeType|mp_credit_card_no_display|Loading|CVV|proceed|BillingDescriptionMustBeMoreThan4Characters|ownerDocument|CommunicationError|AccessDeniedMidAppnameVerificationkey|InvalidPaymentInformation|InvalidAmount|Tampered|mp_credit_card_country|NoChannelFoundCheckCurrencyValue|Note|CountryNotFound|MerchantIdNotFound|AdvancedPhoneValidationFailed|UnhandledErrorContactSupport|UsernameNotFound|internet|TransactionIdForReceiptRequestNotFound|Services|nbsp|InvalidCountryCode|VerificationKeyNotFound|InvalidBillingEmail|support|South|CurrentMsgType|OrderIdNotFound|background|AppNameNotFound|Preparing|AdvancedEmailValidationFailed|CurrencyNotFound|textMargin|mp_ga_category|receipt|dismiss|RecurringPaymentCantProceedOnThisChannel|apply|Country|nodeName|Reminder|path|Yes|PasswordNotFound|250|BillingEmailMustBeMoreThan4Characters||||colorStops||||preloadItems|url||exp|min|HttpPost|xC8|checksum|BankName|img|mp_credit_card_bank|MD5|display|test|101|important|auto|chksum|_renderProperties|bottom|finalizingpayment|marginTop|contentWindow|PleaseWait|onerror|margin|stop|pInstruction|InvalidBillingName|New|CardNumber|InvalidBCardPin|SandboxModeIsOn|ExpDate|InvalidBCardNumber|BCardPrefix|SearchBank|content|alertdata|BillingDescription|hindi|render|InvalidDebitCardNumber|InvalidExpDate|cssInt|DebitCardCheckingHasBeenSkipped|SearchCountry|FinalizingPaymentStatus|base64|before|SearchError|Nombor|InternetDisconnectedThisRequiresInternet|China|Cvv||href||NewCard|UseBCard||SandboxedModeOn||PayableAmount|MMYY|BCardNumberPlaceHolder|errors|promise|PayThrough|SandBoxedUseOptions|TransactionId|GaTrackEvent|205|BillingEmail|put|SaveImageToDevice|SandBoxedOptions|errormsg|onload|ditemukan|BillingMobile|InvalidCreditCardNumberLuhn|stack|InvalidBillingDescription|InvalidCreditCardNumber|BillingName|Cancel|InvalidCvvNumber|ditemui|thanh|stringify|Virgin|mod|mp_credit_card_no|_options|container|toLowerCase|LUHN|receiptData|240|marginLeft|RM1|join|nodecontainer|than|mp_filter|isRecurring|more|getElementById|245|139|bcard_no|6298|app|cvv|contexts|NetworkErrorSandboxedMode||opacity||MerchantID|||||||toUpperCase|characters|msgType|www|Image|subdivide|overflow|Node|ZW|drawImage|failed|format|app_code|mahanap|rectangle|paymentinfo|backgroundClip|Sandboxed|TxnData|tel|ZM|hasOwnProperty|Georgia|YE|defaultView|ang||ZA|French|YY|slice|penagihan|hasTransform|mp_channel_editing|testMerchantCredentialsCallback|allowTaint|MobileNewApiUrl|watch|_|please|230|sandbox|Receipt|SHA1|211|shift|Korea|marginRight|rgba|lebih|AlertModalCtrl|radio|origin|errorTitle|bounds|thu|reasons|Montenegro|alertmodal|the|Bank|payTxnID|Debit||parse|splice|InternalUsed|block|Samoa|Search|in_app_mode|removeChild|translate|preloadStarted||||238|opt|string|||mp_channel_title||Payment|Number||renderQueue|credit3|guardHeight|numero|Nam|device_info|expdate|Date|epay|uib|primary|message|Please|ISLAMIC|floor|uibModalInstance|Email|Republik|Advanced|parseBounds|check|Card|kartu|nextA|api|hidden|arguments|220|01010|x00|setTimeout|footer|getEncoding|x7F|Pulau|112|xtan||nextB||Sandbox||Array|cdomain|month||year|SAR|domain_mode|molpay|marginBottom|textPosition|Man|Serbia||aligned|bcard_pin||mp_amount_display|firstChild|United|CODE128|nativeWebTransactionResults|Nama|169|British|PasswordHash|Payload|Lan|Congo|ApiC5|isStarting|B4ResultData|reason|Republic|Checksum|cash|chevron|RecordType|Token|PAN|mp_bin_lock|location|json|Type|Malaysia|00|RecurringApiUrl|DirectApiUrl|bin_checked|||||multi|application|pin|YT|javascriptEnabled||CanvasRenderer|date||readonly|mga|error||mp_credit_card_country_title|end|payment|Indonesia|bcOptions|nodes||transform|pointbcard||binaryRepresentation|validation||bin|setFillStyle|bin4|gagal|loading|setVariable|password|offsetTop|nextC|x20|charCodeAt|define|offsetWidth|offsetHeight|mp_advanced_email_validation_enabled|isArray|Arab|computedStyles|async|rgb|pcode|now|sdk_version|imageTimeout|encrypt|transactionRequest|buttonClicked|mp_advanced_phone_validation_enabled|fontOptions|zIndex|removeContainer|Sandwich|Svalbard|Internet|GetAvailableChannelByIdUrl|kredit|T1Url|Jan|Anguilla|Pitcairn|Nomor||dapat|Netherlands|Wallis||Futuna|Territory|saluran||GetBankListUrl|transaksi|offline|Caicos|pembayaran|||Mayen|Aruba|Canary||tho|Garcia|Diego|Cocos|vui|Gibraltar|Guyana|Hong|Guernsey|Guadeloupe|Jersey|Cook|Melilla|B4ResultUrl|Recurring|Mariana|Norfolk|Points|Network|halaga|Faroe|Ceuta|Bhutan|Bermuda|character|digit|toFixed|ucs2|createTextNode|barcodePadding|require|children|when|link|fill|darken|bottomRightInner|bottomLeftInner|billing|topRightInner|toggle|border||normal||createRange|notes|backgroundImages|transformData|CIMB|issuer_bank|bank_country|styles||visible||toDataURL|bin_checking_in_progress|ELEMENT_NODE|UPC|lineColor|curveTo|inline|topLeftInner|rect|210|_encodings|with|x5F|fabric|xml|206|200|decode64|getBoundingClientRect|offsetBounds|amd|loaded|224|getBounds|ceil|mod10|topLeftOuter|mp_debug_mode|isPseudoElement|bottomLeftOuter|bottomRightOuter|topRightOuter|getAttribute|className|isTransparent|tainted|matrix|get||Montserrat|listgroup|marginless|randomIntFromInterval|updateSdkData|authData|Selatan|merchant_id|Basic||Sudan|Currency|SubMerchant|mp_express_mode|mp_installmonth|Cunha|ReturnURL|Signature|Tristan|Tokelau|mp_tcctype|tranID||Miquelon|Pierre|verifyChecksum|global|Puerto|Status|Palau|Nauru|Niue|Bouvet|Clipperton|Helena|Amount|Sahara|mp_preferred_token|Heard|McDonald|CustDesc|mp_cash_waittime|tampered_amount|CustContact|ReferenceNo|TxnType|144|view|row|header|bind|https|TxnChannel|tampered_chksum|TxnAmount|CustEmail|TxnCurrency|CustName|nama|yang|merchant|127|username|nilai|untuk|reject|Ghi|ready|xhr|crossOrigin|online||Andorra|some|logging|1023|fontWeight|fontFamily|cssList||lineargradientcontainer|transformMatrix|svgcontainer|143|self|222|ini|248|clone|cloneTo|moz||renderImage|computedStyle|punycode|TEXT_NODE|Trung|fixed|INPUT|isElementVisible|Phi|backgroundColor|transition|taintCtx|harus|asyncRenderer|backgroundRepeatShape|153|padding|192|karakter|gradient|160|TYPES|dari|Xan|pagsingil|Use|http|transaction|results|onrendered|timeout|device|RHB|||||Name|Mobile|Description|isDeploy||addCustomCSS|controllerAs|searchString|0px|kad|percubaan|description||Cayman|nativeWebCloseAllWindows|advancedPhoneValidate|advancedEmailValidate|wrapper_version||BANKING|factory|mp_is_escrow|uibModal|token_status|l_version|replaceAll|merchantID|mp_allowed_channels|innerHTML|RequestData|D7ARequeryRetryIntervalInMs|ApiD7|encodeURIComponent|BCARD_PIN|com|module_id|generate|mp_ga_enabled|CC_PAN|CC_CVV2|BCARD_NO|CC_TOKEN|CC_YEAR|CC_MONTH|getMaximumHeightOfEncodings|getTotalWidthOfEncodings|calculatePair|CODE39|select|guardedEncoding|flatEncoding|CODE128A|CODE128B|EAN8|EAN13|CODE128C|higit|configure|Access|209|204|218|debit|hasil|Negara|lastChar|structure|key|Unhandled||encryption||EAN5|EAN2|fillRect|tra|InvalidInputException|CANCEL|pharmacode||giao|daripada|Ralat|sila||calculateEncodingAttributes|mesti|isNaN|GenericBarcode|MSI|ITF|mangyaring|ITF14|MSI10|MSI11|codabar|MSI1110|save|MSI1010|gradientcontainer|error_message|Tuvalu|Uganda|logo|Uruguay|Tunisia|Tobago|Tonga|receiptLogoCanShow|Trinidad|Uzbekistan|Vanuatu|Antigua|Zambia|Zimbabwe|Guam|Angola|Guatemala|Venezuela|Vietnam|Falkland|Togo|Leste|Syria|Polynesia|Iran|Taiwan|Isle|Territories|Swaziland|Afghanistan|Israel|Verde|India|Haiti|Bissau|Thailand|Timor|Honduras|Kong|cur|Tanzania|pcode_lbl|Myanmar|Dominica|Bosnia||Herzegovina|Botswana|Brunei|Ivoire|Bolivia|Denmark|Benin|Exp|Bulgaria|Burkina|billinginfo|mp_bill_mobile_edit_disabled|mp_bill_description_edit_disabled|Burundi|mp_bill_email_edit_disabled|mp_bill_name_edit_disabled|xxxx|Faso|Pay|Belize|Barbados|Gambia|Saudi|Gabon|Argentina|Ghana|Barbuda|bar|Grenada|icon|Fiji|Ethiopia|Austria|Azerbaijan|Bahrain|Bangladesh|Australia|Salvador|Estonia|Armenia|Eritrea|Lanka|Albania|Papua|Nigeria|Kinshasa|Oman||union|Afrika|||Pakistan|accepted|Rwanda|Rico|Martinique||Marshall|Solomon|Kitts|Kiribati|Caledonia|Qatar|Kuwait|Panama|Malawi|Liechtenstein|Paraguay|Ascension|Peru|run|Liberia|Lesotho|Malta|Christmas|Laos|Latvia|Outlying|Mali|Nevis|Turks|Seychelles|Mauritius|Niger|Mauritania|Sri|Somalia|debit_credit|Senegal|Lucia|Namibia|Mayotte|Nepal|Marino|Mongolia|Slovenia|Vincent|Martin|Slovakia|Moldova|San|Amerika|Grenadines|Kenya||simulated|canggih|middle|Chad|lemy||Barth||anchor|fillStyle|pagbabayad|Palestinian|renderBackgroundRepeat|phone|restore|afterRender|paglalarawan|Romania|Poland||Belanda|CLOSE|available_banklist|createElementNS|Save|removeContentType|atau|Switzerland|parseBackgrounds|linear|smallImage|Algeria|Sweden|createCanvas|Tidak|suriin|LINEAR|122|Vatican|Kingdom|176|bytes|Gunakan|Turkmenistan|supported|Ukraine|_errorHandler|cek|mod11|rangeBounds|nomor|silahkan|wrapBarcodeCall|hasAttribute|getParentStack|HTMLCanvasElement|jsbarcode|Kesalahan|RRRRRR|208|jQuery||NoElementException|hasFabric|complete|The|flat|getStructure|isInline||InvalidElementException|aksara|Suriname|all|process|||Data|urlencoded||BinLockCheck|Leone|Principe|Tome|Transaction||Baru|Sierra|Content|Accept|ApiT1|Inggris|ApiGetAvailableChannelById|Mod|PaymentRecordsLogUrl|Maklumat|Carian|request|headers|POST|Tajikistan|IsDebitCardUrl|Sao|through|RecurringResultData|D7A|DirectApiHandler|Perancis|SandboxedHandler|nativeWebOpenMOLPayWindow|RequestURL|OnApiResponseReceived|Initiate|GetAvailableChannelByIdHandler|T1Handler|GetBankListHandler|ApiD7A|D7ARequeryCurrentAccumulatedRetryInMs|ApiHandlerService|isBelowAndroid44|ErrorlistModalCtrl|ExpiredDate|Aland||Utara|error_code|Lebanon|D7ARequeryActiveNow|unknown||||SandboxedModalCtrl|code|xdk|MPDomainID|mp_dev_mode||MPSecondaryDomain|closemolpay|molpayResultString|MPSandboxDomain|inAppCallback||PaymentInfoCtrl|000000|bank|points|webview_url_prefix|requestPath|mp_custom_css_url|1e4|Android|Communication|connection|pangalan|naka|setCaretPosition|availability|mp_is_recurring|checking|expressProceeded|isLoading|monospace|ffffff|HSBC|MALAYAN|telefon|variables|USD|Secured|random|mp_ga_userid|MOLPayPayment|localStorage|pastExpressMode|Not|MOLPoints|MOLWallet|Pagsingil|Order|pInstructionCaptureData|scrollTo|PROCEED|AuthenticationService|deviceDetector|Thanh|dismissAll|cao|uuid4||Z0|01|Czech|Anh|getPseudoElement|Dominican|130|||216|Ecuador||after|createStyles|loadImage|webkit|decode|addImage|parseBackgroundImages|paintText|TEXTAREA|Equatorial|IFRAME|Southern|135|point|147|paint|Greenland|Guiana|bcard_point|SELECT|180|Pin|Union|235|Finland|isSVG|renderBorders|payable_amt|colors|bottomRight|visibility|bottomLeft|createHTMLDocument|REGEXP_COLORSTOP|prefixedCss|parseTransformMatrix|Cuba|toplogourl|lineWidth|baseline|topRight|topLeft|write|curveToReversed|PSEUDO_HIDE_ELEMENT_CLASS_AFTER|PSEUDO_HIDE_ELEMENT_CLASS_BEFORE|getHideClass|renderIndex|sandboxedmodal|isSameOrigin|getOrigin|||parentNode|cleanDOM|version|querySelector|loadUrlDocument||Croatia|appendToDOM|absolute|Norway|140||Monaco|Libya||Micronesia|Colombia|Lithuania|Ocean|Kyrgyzstan|bcard|Antilles|Zealand|Kazakhstan|Minor|basic|Indian|Brazil|Belarus|Belgium|Bahamas|American|Comoros|sortStackingContexts|Oceania|Macau|Hoa|Macedonia|shape|Xin|Nicaragua|Cape|Ireland|Jordan|getChildren|len|Northern|cancel|Iraq|173|Iceland|newStackingContext|228|range|getOpacity|Keeling|165|errorlistmodal|107|170|cloneNode|replaceChild|stacking|ApiGetBankList|BHD|ApiDirect|calculateOverflowClips|VcodeHash|Yaman|SignatureHash|parseClip|table|bill_email||CHARTERED|ApiB3|STANDARD|Turki|app_name|bill_mobile|SDN|bill_name|orderid|bezierCurve|PUBLIC|Uni|SCRIPT|RAJHI|err_desc|paydate|1e3|pay|expired_at|getElementsByTagName|mpUserId|childNodes|proceedClicked|1111|getHours|tagName|9999999|1e6|1e5|larger|DEBIT|fetch|2112|getChannelNameFromChannelMaskname|proceedDisabled|uid|NASIONAL|disclaimer|createPseudoHideStyles|disableAnimations|Yunani||PreloadData|MAYBANK|createStackingContexts|SIMPANAN|MUAMALAT|CREDIT|statusText||aid|411111|getPseudoElements|1001|ZH|GET|1234345656787890|poweredByMOLPay|SDK|188|102||Tengah|225|Dominika|221|133|196|152|D7ARequeryMaxThresholdInMs|219|onReasonListClicked|Rusia|pageXOffset|innerHeight|pageYOffset|onclone|rendering|innerWidth|154|onErrorListClicked|Barat|191|179|136|119|outerHTML|scrollTop|script|_scrollTop|Nugini|nativeWebOpenBankWindow|invalid|65536|55296|mp_transaction_request_type|56320|scrollLeft|_scrollLeft|namedColor|184|215|178||hex6|DirectApiResultData|nextSibling|fromArray|TxnID|hex3|scrollWidth|clientWidth|REGEXP_DIRECTION|webkitgradientcontainer|capture||cssFloat|contain|svgnodecontainer|proxyimagecontainer|dummyimagecontainer|Authorization|framecontainer|imagecontainer|IsDebitCardCheck|MATRIX_PROPERTY|ChecksumForC5|ApiB4|TEXT_SHADOW_VALUES|CLIP|ChecksumForD7|Prancis|matrix3d|TEXT_SHADOW_PROPERTY|ChecksumForD7A|order_ID|clearTimeout|Finished|Desc|verticalAlign|Title|proxyLoad|core|DummyImageContainer|renderers|scrollHeight|clientHeight|imageloader|nodeparser|hasImageBackground|Singapura|Version|OCBC|findImages|getPromise|Boolean|findBackgroundImage|imageExists|ApiRecurring|mp_bin_lock_err_msg|reduce|LogoReplacementText|onBanklistClicked|01001|11000||10001|00110|LLLLLL||00000000|00101|||10100|00011|10010|reverse|onItemSelected||01100|renderBackgroundRepeating||endBin|parseBackgroundPosition||xCD|parseBackgroundRepeat|JsBarcode|blank|xCE|203|startBin|middleBin|1011|xD3|parseBackgroundSize|1010|11101|insertBefore|drawCanvasText|drawCanvasBarcode|paddingLeft|paddingTop|prepareCanvas|checkbox|ProxyURL|head|base|Proxy|moveCanvasDrawing|fillText|does|paddingRight|vertical|getEncodings|000|111|renderBackgroundImage|_defaults|renderBorder|renderBackground|paddingBottom|SVGElement|renderBackgroundColor|handleCatch|99999|getBarcodePadding|inlineFormatting|shadowColor|testSVG|testCORS|testRangeBounds|123|clearShadow||lowerCanvasEl|beginPath|applyTextTransform|closePath|atob|fontShadow||cors|countryArray|onBankSelected|onChannelSelected|cardlistmodal|onCardSelected|channelmodal|renderBackgroundGradient||countrylistmodal|ownStacking|setOpacity|resizeImage|setTransform|banklistmodal|onCountrySelected|offsetParent|182|400|212|232|142|158|circleStroke|104|isColor|getEncodingHeight|symbology|106|103|134|drawShape|XMLHttpRequest|Lbinary|taints|RADIAL|offsetLeft|getImageData|Gbinary|124|244|164|110|Rbinary|restoreCanvas|back||DEDEDE|paintRadio|A5A5A5||checked|424242|iphone||bold|paintCheckbox|CANVAS|IMG|naturalHeight|naturalWidth|ReceiptCtrl|paintFormValue|getValue|expinput|maybankSuccessString|Production|ccinput|mp_is_secure|cimbAcknowledgeString|hlbCompletedString|html2canvaswrapper|xxx|extend|lineHeight|closeAll|getChannelLogoFromChannelName|getChannelTitleNameFromChannelName|Online|isRootElement|Affin|RMB|Cash|Alipay|isBodyWithTransparentRoot|Credit|ALLIANCE|HONG|AFFIN|IDR|assignStack|Point|splitText|nativeWebPInstructionCapture|paintNode|onCountrylistClicked|parseTransform|paintElement|uibModalStack|credit_disclaimer|getWrapperBounds||ONL|Clicks|FPX|getRangeBounds|userAgent|coreVersion|bcClass|bcType|xmlns|setSvgAttributes|onChannelListClicked|parseBackgroundClip|isBlack|inset|timeoutHttpIntercept|luhn|restrict|directive|keys|box|onPayClicked|org|2000|DOMParser|SVGRenderer|falling|textcontainer|stackingcontext|drawSVGText|fontmetrics|drawSvgBarcode|prepareSVG|pseudoelementcontainer|RegExp|parseBorders|loadingAllDone|offsetY|blur|parseTextBounds|use_direct_api|Chile|onBillingInfoChanged|add|parseTextShadows|checkIfThisIsAValidCountryCode|isString|offsetX|isNumber|fontMetrics|provided|GetAvailableChannelById|textDecoration|recordsLog|MPMainDomain|onCardNumberClicked|GetBankList|IsDebitCard|renderTextDecoration|||getMetrics|seamlesspayment|chips|mobile_new|LEONG|collapse|seluler|tunggu||Mozambik|Yemen|adalah|pencarian|Pangalan|natagpuan|Cile||ito|Nabigo|pagpapatunay|Pilihan||mengkonfigurasi|ditolak|Akses|silakan|aplikasi||ada|Turkey|Komunikasi|Western|Mohon|City|proses|Emirates|pag|transaksyon|Bayaran|periksa|Pengesahan|pengesahan|watak|Tiada|rangkaian|Kad|can|Mata|Memuatkan|Tarikh|bil|mel|bansa|qua|Hindi|Gamitin|resulta|thi|gia|Bil|||bimbit|Filipina|Jumlah|mata|permintaan|CHND|khu|Niu|Cyprus|san|tan|States|Djibouti|Egypt|Sint|Antarctica|land|Nha|Thu|Cameroon|Cambodia|Canada|Central|African|FIL|Brazzaville|goay|Tri|Rica|Costa|gan|European|France|Portugal|ponsel|jumlah|North|Mozambique|deskripsi|validasi|hubungi|Africa|Singapore|Arabia|pada|Morocco|Unidos|Jamaica|Japan|Hungary|Greece|Germany|Luxembourg|Madagascar|Estados|Mga|Mexico|Maldives|contact|Peringatan|CardlistModalCtrl|Rika|disconnected|CountrylistModalCtrl|BanklistModalCtrl|Meksiko|ChannelModalCtrl|updateBCardPoints|Finalizing|information|Jerman|denied|Kongo|C5Handler|Kosta|Mesir|Payable|requires|skipped|has|that|informed|Jamaika|Last|will|are|take|Kamerun|Kanada|place||Madagaskar|FinalizingPaymentCtrl|RecurringHandler|B4Handler|D7Handler||D7AHandler|wait|B3Handler|below|Serikat|verification|960|954|502|740|506|644|512|518|886|692|5379|680|668|966|akan|118|310|Malvinas|940|956|266|608|268|938|758|bawah|berlangsung|974|604|782|638|simulasi|dirusak|1110010|Cleaned|measureText|false||1100110|1101100|Kamboja|dilewati||telah|was|getModule|cloned|removeAttribute|0010111|0001001|encoding|InvalidStartCharacterException|x7E|Initiating|1010000|1000100|1001000||||||opsi||1110100|1001110|||||NodeContainer||||||Resulting|||Cropping||1000010|1011100|moa||crop|508|Kazakstan|496|478|764||Kecil|422|570|464|semua|910|774||880|762|768|678|582|576|672|842|752|734|844||892|836|830|902|590|||about||||||||Terluar|||||652|||||416|||304|||URL|862|614|diperhatikan|Hidden|||Irlandia|412|436||secara|424|554|616|Kayman|572||340|146|978|556|Text|bahwa|818|914|650||890|896||814|628|602|254|Pemeriksaan||292|||328|||||484|||||||260|||930|||||||868|terputus|LLLLL|RRRRR|springgreen|Catatan|Menyimpan|||gambar|RRRR|perangkat|steelblue|snow|10101010101010101010101010101010101010101|kesalahan|cari|Terakhir||Menyelesaikan|Modus|slategrey|hutang|Jasa|Mempersiapkan|LLLL|GLGLL|GLLGL|GLLLG|GGLLL|teal|000000000000|00000|thistle|LGGLL|LLGGL|informasi|Xao|Pemuatan|Penagihan||LLGLG||LLLGG|LGLGL|||LGLLG||Antilla||slategray|1101101101|101100110011|1011001001|1101101011|1101011011|110100101|101001101|101100101|1010010011||1001001011|114|salmon|saddlebrown|sandybrown|seagreen|1010011001|sienna|seashell|100110101|100101101|tanggal|nih|skyblue|kadaluarsa|Prin|poin|Selandia|slateblue|silver|charAt||101101001||110101001|100101011|110010101|101001011|BottomLeft|101010011|101011001|LGGLGL|LGLGGL|turquoise|tomato|20957||violet||mod43||white|||Deskripsi|wheat|29783|23639|29789||23645|29975|20855|||||23669|30485|20951|29813|whitesmoke|yellow|containing|0010001|Andora|xen|Vin|Document|ketersediaan|membutuhkan|each|returns|used|din|yellowgreen|tarikh|Antarktika|Mode|deprecated|Jaringan|23831|30533|18269|17477|17489|29021|17783|17879|29045|18293|17681|20753|LGGLLG|LGGGLL|LGLGLG|LGLLGG|LLGGGL|35770|LLGLGG|LLGGLG|29141|18263|23837|22301|30023||||29981||21623||22295|30149||24005|23879|30545|23921|22385|29015|30065|21959|22343|30161|24017|init|0010011|nanh|ren|underline|xni|xoa||fontVariant|xin|Bra|lip|overline|off|Style||Color|Left|Bottom|Turk|Top|Right|fontStyle|Bru||wordWrap|Parse||Exception|whiteSpace|boxSizing|borderTopStyle|borderLeftWidth|||borderTopWidth|||||||caught|renderFormValue||||letterRendering|||||||Bun||action||Pha|Starting|cvc|textContent|gian|bai|parseFromString|Kesatuan|implementation|callback|html2canvas_||configured|textShadow|delete|Otoritas|Kemboja|Feringgi|Bersatu|Emiriah|Hungari|host|Jibouti|Jepun|Itali||withCredentials|transformOrigin|Tadjikistan|Surinam|Leon|RequestMethod|creditcard|crossborder|Width||hen|Siera|Sepanyol|Lubnan|Kibris|Eropah|Luksembourg|Maghribi|Terpencil||Maldiv||borderLeftStyle|||trung|disabled|alt||html2canvaspseudoelement|||Palestine|endControl|spinner|ten|Lich|startControl|pan|Hung|mai|Guy|sqrt|ran|Nga|goa|xra|spin|Minh|TopRight||TopLeft|letterSpacing|BottomRight|float|Radius|relative|static|HEAD|TITLE|lay|xca|bua|u00ff|u0000|OBJECT|OPTION|Gru|Goa|Loan|clips|Dim|Sinh|YYYY|Somoa||||fetching|Start|arial|Calculate|Chi|Campuchia|||||NodeParser|||||visibile|xta|total|Fetched|Luar|Macao|Gha|queue|Render|xao|created|BODY|items|sort|man|Sorting|starting|Images|Oseania|parsing|Creating|setStart|setEnd|offset|backgroundRepeat|race|searching|XMLSerializer|Timed|out|renderAll|NoChannels|uang|serializeToString|parseSVGDocument|lowercase|capitalize|uppercase|textTransform|Succesfully|Komoros|Failed|verifikasi|groupSVGElements|util|selectNode||dukungan|Tertangani|123px|boundtest|Berulang|dijamin|enkripsi||loadSVGFromString|||Nikaragua|StaticCanvas|setWidth|setHeight|tanda|terima|cannot|Rumania|tombol|gif|0111101|0100011|0110001|royalblue|0011001|anonymous|angularBarcode|0001101|0101111|0111011||0100001|0011101|0111001|0011011|0110011|0110111|||0001011|0100111|send|responseText|port|hostname|Kolombia|crai|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|R0lGODlhAQABAIAAAAAAAP|yH5BAEAAAAALAAAAAABAAEAAAIBRAA7|Tuy|protocol|submit|useCORS|Added|koneksi|Barthelemy|Kirgistan|PEXPLUS|prefix||Norwegia||||Ban|Burma|main|||Italy||Philippines||Russia|backgroundImage|Tom|Platform||401|||Cura|Unknown|Espanya|textBaseline|getComputedStyle|bia|Saba|Eustatius|Bonaire|ncipe|backgroundSize|Aljazair|Spain|backgroundPosition|Syarikat|horizontal|Anonymous|Cad||xdkform|Quiana|Maarten|___html2canvas___pseudoelement_before|cover|___html2canvas___pseudoelement_after|Palestina|AFTER|PSEUDO_HIDE_ELEMENT_CLASS_|BEFORE|Initialized||Maladewa|Kroasia|Russian|createPattern|Tagihan||||Kuba|Libia|globalAlpha||Pilipinas||Federation|||createLinearGradient|templateCache|melanjutkan|Function|addColorStop||||||Ceko|ignore||selectedIndex|Lituania|Luksemburg|Makau|Italya|Polandia|stroke|strokeStyle|arc|Tan|Makedonia||Polinesia|Malayong|shadowOffsetX|shadowBlur|Riko|shadowOffsetY|Portugis||moveTo|bahagi|0000101|iya|transparent|INR|THB|PHP|GBP|EUR|Chu|aliceblue|SGD|HKD|AUD|Jepang|INVESTMENT||CORPORATION|||||||SERVICE|AEON|||||||||||||||||JPY|VND|nam|GoInterpay|antiquewhite|EPG|Spanyol|ghi|affin|beige||alipay|Truy|TWD|tuy|epg||||minAmt|Public|aqua|publicbank|FPX_PBB||aquamarine|Ghim|azure|tin|AMBANK|AMISLAMIC|SYNERGY|CARDS|nombor|UNITED|SAADIQ||Finlandia||scrollX||||scrollY||navigator|OVERSEAS||pengebilan|UOB|||iPad||5234646534754347|iPhone||AGRO|iPod|Italia|Huraian||AMIN|HOUSE|CITIBANK|DINERS|CLUB|AGROBANK|PERTANIAN|ISLAM|KERJASAMA|RAKYAT|AMANAH|Vui|CHINA|KUWAIT|FINANCE|DOCTYPE|COMMERCIAL|adoptNode|INDUSTRIAL|AND|bisque|paymentasia|getPInstructionCapture|cornsilk|pamamagitan|237|Mangyaring|crimson|darkcyan|darkblue|cyan|149|cornflowerblue|coral|chocolate|chartreuse|PIN|filename|jpg|base64ImageUrlData|Magbayad||ISARA|darkgoldenrod|darkorchid|darkorange||darkolivegreen|||darkred|darksalmon|Numero|150|233|bagong|darkmagenta|darkgrey|darkgreen|darkgray|999|Ekuador|183|189|darkkhaki|cadetblue|httpParamSerializer|711|Eleven|blue|AMB|minh||blueviolet|Now|rhb|Petronas|W2W|AmOnline||black|ASIA|CNY|webcash|Webcash|amb|blanchedalmond|WEBCASH|cho||cimb|ngnh|fpx|FPX_BIMB|TPA|Paymex|burlywood|brown||ALB|Islam|bankislam||||||Leong|||||hlb|138|HLB||||226|MB2u||Maybank2u||maybank2u|401288|1881|Samudra|65535|Wilayah|Emel|Hindia|luput|niaga|urus|Masalah|Proses|Vatikan|Emirat|Ukraina|Transaksi|Nota|Eropa|64512|Imej|Simpan|memerlukan|Swiss|1002|1003|HttpGet|segala|Grinlandia|dalam|10px||msg|luar|Mikronesia|Dimaklumkan|Yordania||Monako|diabaikan|Diaktifkan|Percubaan|dibawah|pilihan|ApiRecordsLog|Perkhidmatan|aktif|Bayar|Bimbit|Telefon|Pesanan||Melalui|Pilih|Saluran|bank_name|cardnumber|Khatulistiwa|Kutub|BIN|Tanjung|Irak|Raya|Islandia|find|Hungaria|Teritori|cash_waittime|Pembayaran|penggunaan|Luput|56319|bill_desc|Awalan|Turkimenistan|Sila|terakhir|RangeError|MODULE_NOT_FOUND|tcctype|Teruskan||installmonth|Tutup|is_escrow|vcode|Kredit|Batal|Params|lastIndexOf|order_id|penerimaan|available||wang|copy|M00008|nodeValue|from|dijumpai|Unable|setHours|getMinutes||getSeconds|Swedia|getDate|getFullYear|putImageData|getTime|getMonth||Antartica|||island|boleh||10000px||berulang||meneruskan|scrolling|1808|clearInterval|setInterval|iframe|men|999999|dikendali|tak|sokongan|incorrect|ApiGenBarcode|Acsencion|Penyulitan|kekunci|9999|needs|Overflow|tiada|uFF61|wider|event|cid|integers|sebenar|Offline|talian|analytics|2147483647|collect|google||700|uFF0E|u3002|x2E|berlaku|Illegal||||||pengguna||||||||||toUnicode|1000px||||kata||laluan||||Verification||Code|saudagar|toASCII|sambungan|semak|setItem|Digodam|0x80|getItem|CommError|tid|29894240|darkseagreen|pumili|ngTouch|||lightsalmon|193|ngSanitize|ngRoute|lightskyblue||Xri|lightseagreen||bootstrap|creditCardInput||resibo|lightpink|change|kahilingan|phonenumber||injector|||leodido||||cwill747|||||||lightslategray|append||limegreen||lime|||lightyellow|linen||suporta|magenta|ven|viewBox|ngInject|ngModel|viewValue|lightslategrey|remove|Xoa|lightsteelblue|template|ugnay|makipag|config|routeProvider|onlinepayment|252|secure|lemonchiffon|isValidNumberForRegion|Walang|lightblue|phoneUtils|lawngreen|verify|khaki|lugar|magdadala|lavender|lavenderblush|Siprus|tinanggihan|napakialaman||lightcoral||exec|interceptors|para|cssInjector|redirectTo||otherwise|httpProvider|lightgrey|lightgreen|darkslateblue||FastClick|lightgoldenrodyellow|lightcyan|pera|lightgray||selectionEnd|attach|selectionStart|Ligtas|maroon|||palegoldenrod|214|TUTUP|MEMBATALKAN|baru|251|131070|palegreen|orchid|MEMPROSES||tagihan|querySelectorAll|orange|membayar|melalui|orangered|pilih||HTMLImageElement|11100|paleturquoise|powderblue|plum|pink|purple|rebeccapurple|sen|rosybrown|red|Maroko|peru|papayawhip|palevioletred|175|239||213||185||peachpuff||pemesanan||olivedrab|mediumslateblue|113|mediumseagreen||mediumspringgreen|Kaledonia|199|mediumvioletred|mediumturquoise|mediumpurple||align|mediumaquamarine|Umuulit|nabigo|mediumblue|mediumorchid|magpatuloy|maaaring|186|midnightblue|mintcream|clearRect|Bahama|optionsUse|advanced|oldlace|olive|253|browser|navy|EXP|Brasil|moccasin|mistyrose|181|navajowhite|Belarusia|Belgia|proseso|route|petsa|Tinatapos|upang|honeydew|convertSafeBase64StringBackToOriginalVersion|Tandaan|dimgrey|ibaba|grey|testMerchantCredentials|SALS|katayuan|opsyon|moveToElementText|createTextRange|darkturquoise||setEndOfContent|Huling|lahat|Jibuti|Paghahanap|hotpink|addRange|selection|removeAllRanges|getSelection|selectNodeContents|pagpipilian||darkviolet|gainsboro|gold|lamang|Mangyari|transaksiyon|raw|pagkakakonekta|maghintay|deepskyblue|deeppink|148|pagkakamali|nangangailangan|GenBarcodeHandler|greenyellow|reload||getChannelMasknameFromChannelName|paalaala|dimgray|forestgreen|fuchsia|gray|goldenrod||Cina|malampasan||green|ghostwhite|indianred|transactionRequestWithTransactionId|pagkarga|00000000000|aparato|nativeWebClosePopupAndRunScriptOnMOLPayWindow||mpclosepopupandrunscriptonmolpaywindow|nativeWebRunScriptOnPopup|indigo|mppinstructioncapture|label_loading|mprunscriptonpopup|transactionRequestWithOrderId|imahe|firebrick|mababayarang|walang|closemodal|ivory|mpopenbankwindow|nota|Cote|Serbisyo|mpcloseallwindows|mpopenmolpaywindow|m2uTicketsPaymentConfirmed|mptransactionresults|setCountries|Countries|getDeviceInfo|mp_url_scheme|nativeWebRequestUrlUpdates|impormasyon|mp_authData|label_preparing|label_pleasewait|floralwhite|is_submodule|darkslategrey|500|MainCtrl|ePayment_acknowledge|logout|rib|Unavailable|darkslategray|dodgerblue||enableInAppMode|bangko|simulate'.split('|'),0,{})) diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md index 4e05309..fce2ddb 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md @@ -21,9 +21,9 @@ description: Open an in-app browser window. # under the License. --> -|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-inappbrowser)| +|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-inappbrowser)| # cordova-plugin-inappbrowser diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md index 9f3ddb0..ddd30d5 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md @@ -20,6 +20,12 @@ --> # Release Notes +### 1.7.1 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badges to `README` +* [CB-12266](https://issues.apache.org/jira/browse/CB-12266) (browser platform) loadstop event.url is now a string instead of an object, aligning it with the other platforms. +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder +* [CB-11248](https://issues.apache.org/jira/browse/CB-11248) `InAppBrowser` no focus on input text fields + ### 1.7.0 (Feb 28, 2017) * [CB-12366](https://issues.apache.org/jira/browse/CB-12366) **iOS:** Reduce `tmpWindow` level to prevent overlapping statusbar * [CB-12364](https://issues.apache.org/jira/browse/CB-12364) **Windows:** `Inappbrowser` inject file manual tests are not working diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json index a62b083..2dee291 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-inappbrowser", - "version": "1.7.0", + "version": "1.7.1", "description": "Cordova InAppBrowser Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml index 19e8f47..4f900d3 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.1"> InAppBrowser Cordova InAppBrowser Plugin diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java index c10617e..fefbcec 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java @@ -1046,6 +1046,10 @@ public void onPageFinished(WebView view, String url) { CookieSyncManager.getInstance().sync(); } + // https://issues.apache.org/jira/browse/CB-11248 + view.clearFocus(); + view.requestFocus(); + try { JSONObject obj = new JSONObject(); obj.put("type", LOAD_STOP_EVENT); diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js index da7dacd..cc1de19 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js @@ -31,15 +31,15 @@ var browserWrap, function attachNavigationEvents(element, callback) { var onError = function () { - callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true}); + callback({ type: "loaderror", url: this.contentWindow.location.href}, {keepCallback: true}); }; element.addEventListener("pageshow", function () { - callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true}); + callback({ type: "loadstart", url: this.contentWindow.location.href}, {keepCallback: true}); }); element.addEventListener("load", function () { - callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true}); + callback({ type: "loadstop", url: this.contentWindow.location.href}, {keepCallback: true}); }); element.addEventListener("error", onError); diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/package.json b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/package.json new file mode 100644 index 0000000..7c05778 --- /dev/null +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-inappbrowser-tests", + "version": "1.7.1-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-inappbrowser-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} diff --git a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml index 90525ce..b7de65f 100644 --- a/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml +++ b/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.7.1"> Cordova InAppBrowser Plugin Tests Apache 2.0 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/config.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/config.xml new file mode 100644 index 0000000..1ed12d0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/config.xml @@ -0,0 +1,30 @@ + + + MOLPayExample + + A sample Apache Cordova application that implements MOLPay XDK Cordova Plugin. + + + MOLPay Mobile Tech Team + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md new file mode 100644 index 0000000..39378f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md @@ -0,0 +1,64 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! + +The notes on [Commit Workflow](https://github.com/apache/cordova-coho/blob/master/docs/committer-workflow.md#commit-workflow) can be helpful even if you are not a committer. + +## Running plugin tests + +* clone and install [cordova-plugin-test-framework](https://github.com/apache/cordova-plugin-test-framework) +``` +git clone git@github.com:apache/cordova-plugin-test-framework.git +``` +* edit ```cordova-plugin-test-framework/www/assets/index.html``` and add the following line +``` + +``` +* create test project +``` +cordova create plugintest +cd plugintest +cordova platform add android +cordova plugin add ../cordova-plugin-inappbrowser +cordova plugin add ../cordova-plugin-inappbrowser/tests +cordova plugin add ../cordova-plugin-test-framework +``` +* edit ```config.xml``` and replace `````` with `````` +* run application +``` +cordova run +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/LICENSE new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/NOTICE new file mode 100644 index 0000000..8ec56a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/README.md new file mode 100644 index 0000000..8e8f5f4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/README.md @@ -0,0 +1,394 @@ + + +# cordova-plugin-inappbrowser + +This plugin provides a web browser view that displays when calling `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + +The `cordova.InAppBrowser.open()` function is defined to be a drop-in replacement +for the `window.open()` function. Existing `window.open()` calls can use the +InAppBrowser window, by replacing window.open: + + window.open = cordova.InAppBrowser.open; + +The InAppBrowser window behaves like a standard web browser, +and can't access Cordova APIs. For this reason, the InAppBrowser is recommended +if you need to load third-party (untrusted) content, instead of loading that +into the main Cordova webview. The InAppBrowser is not subject to the +whitelist, nor is opening links in the system browser. + +The InAppBrowser provides by default its own GUI controls for the user (back, +forward, done). + +For backwards compatibility, this plugin also hooks `window.open`. +However, the plugin-installed hook of `window.open` can have unintended side +effects (especially if this plugin is included only as a dependency of another +plugin). The hook of `window.open` will be removed in a future major release. +Until the hook is removed from the plugin, apps can manually restore the default +behaviour: + + delete window.open // Reverts the call back to it's prototype's default + +Although `window.open` is in the global scope, InAppBrowser is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + +:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20InAppBrowser%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + +If you want all page loads in your app to go through the InAppBrowser, you can +simply hook `window.open` during initialization. For example: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + +## cordova.InAppBrowser.open + +Opens a URL in a new `InAppBrowser` instance, the current browser +instance, or the system browser. + + var ref = cordova.InAppBrowser.open(url, target, options); + +- __ref__: Reference to the `InAppBrowser` window. _(InAppBrowser)_ + +- __url__: The URL to load _(String)_. Call `encodeURI()` on this if the URL contains Unicode characters. + +- __target__: The target in which to load the URL, an optional parameter that defaults to `_self`. _(String)_ + + - `_self`: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the `InAppBrowser`. + - `_blank`: Opens in the `InAppBrowser`. + - `_system`: Opens in the system's web browser. + +- __options__: Options for the `InAppBrowser`. Optional, defaulting to: `location=yes`. _(String)_ + + The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive. All platforms support the value below: + + - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off. + + Android only: + + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened + - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __zoom__: set to `yes` to show Android browser's zoom controls, set to `no` to hide them. Default value is `yes`. + - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. + - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). + + iOS only: + + - __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself. + - __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property. + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened + - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`) + - __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`). + - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). + - __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`) + - __keyboardDisplayRequiresUserAction__: Set to `yes` or `no` to open the keyboard when form elements receive focus via JavaScript's `focus()` call (defaults to `yes`). + - __suppressesIncrementalRendering__: Set to `yes` or `no` to wait until all new view content is received before being rendered (defaults to `no`). + - __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`). + - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`). + - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window. + + Windows only: + + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __fullscreen__: set to `yes` to create the browser control without a border around it. Please note that if __location=no__ is also specified, there will be no control presented to user to close IAB window. + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- Firefox OS +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + +### Firefox OS Quirks + +As plugin doesn't enforce any design there is a need to add some CSS rules if +opened with `target='_blank'`. The rules might look like these + +``` css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows Quirks + +Windows 8.0, 8.1 and Windows Phone 8.1 don't support remote urls to be opened in the Cordova WebView so remote urls are always showed in the system's web browser if opened with `target='_self'`. + +On Windows 10 if the URL is NOT in the white list and is opened with `target='_self'` it will be showed in the system's web browser instead of InAppBrowser popup. + +Similar to Firefox OS IAB window visual behaviour can be overridden via `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` CSS classes + +### Browser Quirks + +- Plugin is implemented via iframe, + +- Navigation history (`back` and `forward` buttons in LocationBar) is not implemented. + +## InAppBrowser + +The object returned from a call to `cordova.InAppBrowser.open`. + +### Methods + +- addEventListener +- removeEventListener +- close +- show +- executeScript +- insertCSS + +## addEventListener + +> Adds a listener for an event from the `InAppBrowser`. + + ref.addEventListener(eventname, callback); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +- __eventname__: the event to listen for _(String)_ + + - __loadstart__: event fires when the `InAppBrowser` starts to load a URL. + - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL. + - __loaderror__: event fires when the `InAppBrowser` encounters an error when loading a URL. + - __exit__: event fires when the `InAppBrowser` window is closed. + +- __callback__: the function that executes when the event fires. The function is passed an `InAppBrowserEvent` object as a parameter. + +### InAppBrowserEvent Properties + +- __type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, or `exit`. _(String)_ + +- __url__: the URL that was loaded. _(String)_ + +- __code__: the error code, only in the case of `loaderror`. _(Number)_ + +- __message__: the error message, only in the case of `loaderror`. _(String)_ + + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Browser Quirks + +`loadstart` and `loaderror` events are not being fired. + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + +## removeEventListener + +> Removes a listener for an event from the `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + +- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_ + +- __eventname__: the event to stop listening for. _(String)_ + + - __loadstart__: event fires when the `InAppBrowser` starts to load a URL. + - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL. + - __loaderror__: event fires when the `InAppBrowser` encounters an error loading a URL. + - __exit__: event fires when the `InAppBrowser` window is closed. + +- __callback__: the function to execute when the event fires. +The function is passed an `InAppBrowserEvent` object. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + +## close + +> Closes the `InAppBrowser` window. + + ref.close(); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +### Supported Platforms + +- Amazon Fire OS +- Android +- Firefox OS +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + +## show + +> Displays an InAppBrowser window that was opened hidden. Calling this has no effect if the InAppBrowser was already visible. + + ref.show(); + +- __ref__: reference to the InAppBrowser window (`InAppBrowser`) + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + +## executeScript + +> Injects JavaScript code into the `InAppBrowser` window + + ref.executeScript(details, callback); + +- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_ + +- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_ + - __file__: URL of the script to inject. + - __code__: Text of the script to inject. + +- __callback__: the function that executes after the JavaScript code is injected. + - If the injected script is of type `code`, the callback executes + with a single parameter, which is the return value of the + script, wrapped in an `Array`. For multi-line scripts, this is + the return value of the last statement, or the last expression + evaluated. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + +### Browser Quirks + +- only __code__ key is supported. + +### Windows Quirks + +Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) the invoked script can return only string values, otherwise the parameter, passed to __callback__ will be `[null]`. + +## insertCSS + +> Injects CSS into the `InAppBrowser` window. + + ref.insertCSS(details, callback); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_ + - __file__: URL of the stylesheet to inject. + - __code__: Text of the stylesheet to inject. + +- __callback__: the function that executes after the CSS is injected. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md new file mode 100644 index 0000000..e93f73f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md @@ -0,0 +1,237 @@ + +# Release Notes + +### 1.3.0 (Feb 09, 2016) +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android +* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue +* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android +* Edit package.json license to match SPDX id +* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS +* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android +* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android + +### 1.2.1 (Feb 02, 2016) +* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) InAppBrowser not firing loadstart event on android +* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin +* handle app store urls in system browser +* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance +* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android +* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows +* [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows +* [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows +* [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows +* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin + +### 1.2.0 (Jan 15, 2016) +* CB-8180: Changing methods of interception in `WebViewClient` class +* CB-10009 Improve `InAppBrowser` toolbar look and feel on **Windows** +* Open a new window on the **Browser** platform + +### 1.1.1 (Dec 10, 2015) + +* CB-9445 Improves executeScript callbacks on iOS +* CB-10035 Incremented plugin version. +* CB-10040 - re-fix: backwards compatible with cordova-ios < 4.0 +* CB-8534: Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 +* CB-3750: Fixes spinner on iOS. This closes #89 +* CB-7696 Document target=_self behavior for Windows +* CB-10040 - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' + +### 1.1.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Invoke webview if using local file +* Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. +* fix `async` self usage +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser `executeScript` crash on **Windows** if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on **Windows** +* Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. +* [CB-9167](https://issues.apache.org/jira/browse/CB-9167) Fix crash on **browser** window close +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed `javaDoc` errors. +* Fixing contribute link. +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default `window.open` behavior on **Ripple** +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on **Windows** +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser `zoomControls` are always set to true + +### 1.0.1 (Jun 17, 2015) +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* Keep external android pages in a single tab. (close #61) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` + +### 0.6.0 (Feb 04, 2015) +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement `inject*` functions +* ubuntu: port to oxide +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) ios, android: Update to work with whilelist plugins in Cordova 4.x + +### 0.5.4 (Dec 02, 2014) +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after `InAppBrowser` closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add `locationBar` support to `InAppBrowser` **Windows** platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) `InAppBrowser` `loadstart/loadstop` events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) `InAppBrowser` local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) `Alert` is not supported in `InAppBrowser` on **Windows** platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to `closebuttoncaption` +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser + +### 0.5.3 (Oct 03, 2014) +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview + +### 0.5.2 (Sep 17, 2014) +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android +* Add just a bit more logging +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework +* phonegap events supported for \_blank target +* inappbrowser \_blank target position is fixed +* amazon-fireos related changes. + +### 0.5.1 (Aug 06, 2014) +* ubuntu: support qt 5.2 +* **FFOS** update InAppBrowserProxy.js +* **FFOS** app needs to be privileged +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ + +### 0.5.0 (Jun 05, 2014) +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 +* Clean up whitespace (mainly due to no newline at eof warning) +* Adding permission info +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Add necessary capability so the plugin works on its own +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 +* Fixed use of iOS 6 deprecated methods +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation +* refactoring fixed +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support + +### 0.4.0 (Apr 17, 2014) +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360): [ios] Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324): [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* [WP] await async calls, resolve warnings +* [WP] Make InAppBrowser work with embedded files, using system behavior +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402): [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617): Add clearcache and clearsessioncache options to iOS (like Android) +* Doc update: event name and example param (closes #31) +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253): [WP] Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218): Update docs for BB10 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers + +### 0.3.3 (Mar 5, 2014) +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Fix video/audio does not stop playing when browser is closed +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix broken install on case-sensitive file-systems + +### 0.3.2 (Feb 26, 2014) +* Validate that callbackId is correctly formed +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) Move js-module so it is not loaded on unsupported platforms +* Removed some iOS6 Deprecations + +### 0.3.1 (Feb 05, 2014) +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* add ubuntu platform +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done + +### 0.2.5 (Dec 4, 2013) +* Remove merge conflict tag +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException +* add ubuntu platform +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times + +### 0.2.3 (Oct 9, 2013) +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 + +### 0.2.2 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* [CB-4864](https://issues.apache.org/jira/browse/CB-4864), [CB-4865](https://issues.apache.org/jira/browse/CB-4865): Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/README.md new file mode 100644 index 0000000..2ee92f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Dieses Plugin bietet eine Web-Browser-Ansicht, die beim Aufruf von `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Die `cordova.InAppBrowser.open()` Funktion ist definiert als Ersatz für die `window.open()` Funktion. InAppBrowser Fenster, können vorhandene `window.open()` Aufrufe durch window.open ersetzen: + + window.open = cordova.InAppBrowser.open; + + +Das InAppBrowser-Fenster verhält sich wie einen standard-Webbrowser und Cordova APIs kann nicht zugegriffen werden kann. Aus diesem Grund empfiehlt sich die InAppBrowser Wenn Sie von Drittanbietern (nicht vertrauenswürdige) Inhalte, statt zu laden, die in den wichtigsten Cordova Webview laden müssen. Die InAppBrowser unterliegt nicht der weißen Liste, noch ist Links in der Systembrowser öffnen. + +Die InAppBrowser bietet standardmäßig eine eigene GUI-Steuerelemente für den Benutzer (zurück, vor, erledigt). + +Für rückwärts Kompatibilität, dieses Plugin auch `window.open` Haken. Jedoch kann der Plugin installiert Haken der `window.open` haben unbeabsichtigte Nebenwirkungen (vor allem, wenn dieses Plugin nur als eine Abhängigkeit von einem anderen Plugin enthalten ist). Der Haken der `window.open` wird in einer zukünftigen Version entfernt. Bis der Haken aus dem Plugin entfernt wird, können die Vorgabe von apps manuell wiederherstellen: + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` im globalen Gültigkeitsbereich ist zwar InAppBrowser nicht verfügbar bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Wenn Sie alle Seite Lasten in Ihrer Anwendung durch die InAppBrowser gehen möchten, können Sie einfach `window.open` während der Initialisierung Haken. Zum Beispiel: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Öffnet eine URL in eine neue `InAppBrowser`-Instanz, die aktuelle Browserinstanz oder der Systembrowser. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **Ref**: Bezugnahme auf das `InAppBrowser` Fenster. *(InAppBrowser)* + + * **URL**: die URL um den *(String)* zu laden. Rufen Sie `encodeURI()` auf, wenn die URL Unicode-Zeichen enthält. + + * **target**: das Ziel in welchem die URL geladen werden soll. Standardmäßig entspricht dieser Wert `_self` . *(String)* + + * `_self`: Öffnet sich in der Cordova WebView wenn der URL in der Whitelist ist, andernfalls es öffnet sich in der`InAppBrowser`. + * `_blank`: Öffnet den`InAppBrowser`. + * `_system`: Öffnet in den System-Web-Browser. + + * **options**: Optionen für die `InAppBrowser` . Optional, säumige an: `location=yes` . *(String)* + + Die `options` Zeichenfolge muss keine Leerstelle enthalten, und jede Funktion Name/Wert-Paare müssen durch ein Komma getrennt werden. Featurenamen Groß-/Kleinschreibung. Alle Plattformen unterstützen die anderen Werte: + + * **location**: Legen Sie auf `yes` oder `no` , machen die `InAppBrowser` der Adressleiste ein- oder ausschalten. + + Nur Android: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **zoom**: Legen Sie auf `yes` zu zeigen Android Browser-Zoom-Steuerelementen, die auf `no` festlegen, um sie zu verbergen. Standardwert ist `yes`. + * **hardwareback**: auf `yes` festlegen, um die Zurück-Taste verwenden, um die `InAppBrowser`Geschichte rückwärts navigieren. Wenn es keine vorherige Seite, wird der `InAppBrowser` geschlossen. Der Standardwert ist `yes`, so dass Sie es auf `no` festlegen müssen, wenn Sie die Schaltfläche "zurück", die InAppBrowser einfach zu schließen möchten. + + iOS nur: + + * **closebuttoncaption**: Legen Sie auf eine Zeichenfolge als Beschriftung der **fertig** -Schaltfläche verwenden. Beachten Sie, dass Sie diesen Wert selbst zu lokalisieren müssen. + * **disallowoverscroll**: Legen Sie auf `yes` oder `no` (Standard ist `no` ). Aktiviert/deaktiviert die UIWebViewBounce-Eigenschaft. + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **toolbar**: Legen Sie auf `yes` oder `no` Aktivieren Sie die Symbolleiste ein- oder Ausschalten für InAppBrowser (Standard:`yes`) + * **enableViewportScale**: Legen Sie auf `yes` oder `no` , Viewport Skalierung durch ein Meta-Tag (standardmäßig zu verhindern`no`). + * **mediaPlaybackRequiresUserAction**: Legen Sie auf `yes` oder `no` , HTML5 audio oder video von automatisches Abspielen (standardmäßig zu verhindern`no`). + * **allowInlineMediaPlayback**: Legen Sie auf `yes` oder `no` Inline-HTML5-Media-Wiedergabe, Darstellung im Browser-Fenster, sondern in eine gerätespezifische Wiedergabe-Schnittstelle ermöglichen. Des HTML `video` Element muss auch die `webkit-playsinline` Attribut (Standard:`no`) + * **keyboardDisplayRequiresUserAction**: Legen Sie auf `yes` oder `no` um die Tastatur zu öffnen, wenn Formularelemente Fokus per JavaScript erhalten `focus()` Anruf (Standard:`yes`). + * **suppressesIncrementalRendering**: Legen Sie auf `yes` oder `no` zu warten, bis alle neuen anzeigen-Inhalte empfangen wird, bevor Sie wiedergegeben wird (standardmäßig`no`). + * **presentationstyle**: Legen Sie auf `pagesheet` , `formsheet` oder `fullscreen` [Präsentationsstil](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (standardmäßig fest`fullscreen`). + * **transitionstyle**: Legen Sie auf `fliphorizontal` , `crossdissolve` oder `coververtical` [Übergangsstil](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (standardmäßig fest`coververtical`). + * **toolbarposition**: Legen Sie auf `top` oder `bottom` (Standard ist `bottom` ). Bewirkt, dass die Symbolleiste am oberen oder unteren Rand des Fensters sein. + + Nur Windows: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **fullscreen**: auf `yes` festlegen, um das WebBrowser-Steuerelement ohne Rahmen drumherum zu erstellen. Bitte beachten Sie, dass bei **location=no** wird auch angegeben, gibt es keine Kontrolle, die Benutzer zum IAB-Fenster schließen. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Macken + +Als Plugin jedes Design erzwingen nicht besteht die Notwendigkeit, einige CSS-Regeln hinzuzufügen, wenn bei `target='_blank'`. Die Regeln könnte wie diese aussehen. + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows-Eigenheiten + +Ähnlich wie Firefox OS IAB Fenster visuelle Verhalten kann überschrieben werden, über `InAppBrowserWrap`/`InAppBrowserWrapFullscreen` -CSS-Klassen + +### Browser-Eigenheiten + + * Plugin wird per Iframe implementiert, + + * Navigationsverlauf (Schaltflächen`zurück` und `Vorwärts` in LocationBar) ist nicht implementiert. + +## InAppBrowser + +Bei einem Aufruf von `cordova.InAppBrowser.open` zurückgegebene Objekt.. + +### Methoden + + * addEventListener + * removeEventListener + * Schließen + * Karte + * executeScript + * insertCSS + +## addEventListener + +> Fügt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn der `InAppBrowser` ein Fehler auftritt, wenn Sie eine URL zu laden. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion, die ausgeführt wird, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` -Objekt als Parameter. + +### InAppBrowserEvent Eigenschaften + + * **Typ**: Eventname, entweder `loadstart` , `loadstop` , `loaderror` , oder `exit` . *(String)* + + * **URL**: die URL, die geladen wurde. *(String)* + + * **Code**: der Fehler-Code, nur im Fall von `loaderror` . *(Anzahl)* + + * **Nachricht**: die Fehlermeldung angezeigt, nur im Fall von `loaderror` . *(String)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Browser-Eigenheiten + +`loadstart` und `loaderror` Ereignisse werden nicht ausgelöst wird. + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Entfernt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten. *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn die `InAppBrowser` trifft einen Fehler beim Laden einer URLs. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion ausgeführt, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` Objekt. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Schließen + +> Schließt die `InAppBrowser` Fenster. + + ref.close(); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Karte + +> Zeigt ein InAppBrowser-Fenster, das geöffnet wurde, versteckt. Aufrufen, dies hat keine Auswirkungen, wenn die InAppBrowser schon sichtbar war. + + ref.show(); + + + * **Ref**: Verweis auf die (InAppBrowser) Fenster`InAppBrowser`) + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Fügt JavaScript-Code in das `InAppBrowser` Fenster + + ref.executeScript(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Skripts zu injizieren. + * **Code**: Text des Skripts zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem der JavaScript-Code injiziert wird. + + * Wenn das eingefügte Skript vom Typ ist `code` , der Rückruf führt mit einen einzelnen Parameter, der der Rückgabewert des Skripts ist, umwickelt ein `Array` . Bei Multi-Line-Skripten ist der Rückgabewert von der letzten Anweisung oder den letzten Ausdruck ausgewertet. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Browser-Eigenheiten + + * **code** -Schlüssel wird unterstützt. + +### Windows-Eigenheiten + +Aufgrund der [MSDN-Dokumentation](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) das aufgerufene Skript kehren nur Zeichenfolgenwerte, andernfalls des Parameters, an **Rückruf** übergeben werden `[null]`. + +## insertCSS + +> Injiziert CSS in der `InAppBrowser` Fenster. + + ref.insertCSS(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Stylesheets zu injizieren. + * **Code**: Text des Stylesheets zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem die CSS injiziert wird. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/index.md new file mode 100644 index 0000000..d2b29d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/de/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Dieses Plugin bietet eine Web-Browser-Ansicht, die beim Aufruf von `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Die `cordova.InAppBrowser.open()` Funktion ist definiert als Ersatz für die `window.open()` Funktion. InAppBrowser Fenster, können vorhandene `window.open()` Aufrufe durch window.open ersetzen: + + window.open = cordova.InAppBrowser.open; + + +Das InAppBrowser-Fenster verhält sich wie einen standard-Webbrowser und Cordova APIs kann nicht zugegriffen werden kann. Aus diesem Grund empfiehlt sich die InAppBrowser Wenn Sie von Drittanbietern (nicht vertrauenswürdige) Inhalte, statt zu laden, die in den wichtigsten Cordova Webview laden müssen. Die InAppBrowser unterliegt nicht der weißen Liste, noch ist Links in der Systembrowser öffnen. + +Die InAppBrowser bietet standardmäßig eine eigene GUI-Steuerelemente für den Benutzer (zurück, vor, erledigt). + +Für rückwärts Kompatibilität, dieses Plugin auch `window.open` Haken. Jedoch kann der Plugin installiert Haken der `window.open` haben unbeabsichtigte Nebenwirkungen (vor allem, wenn dieses Plugin nur als eine Abhängigkeit von einem anderen Plugin enthalten ist). Der Haken der `window.open` wird in einer zukünftigen Version entfernt. Bis der Haken aus dem Plugin entfernt wird, können die Vorgabe von apps manuell wiederherstellen: + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` im globalen Gültigkeitsbereich ist zwar InAppBrowser nicht verfügbar bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Wenn Sie alle Seite Lasten in Ihrer Anwendung durch die InAppBrowser gehen möchten, können Sie einfach `window.open` während der Initialisierung Haken. Zum Beispiel: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Öffnet eine URL in eine neue `InAppBrowser`-Instanz, die aktuelle Browserinstanz oder der Systembrowser. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **Ref**: Bezugnahme auf das `InAppBrowser` Fenster. *(InAppBrowser)* + +* **URL**: die URL um den *(String)* zu laden. Rufen Sie `encodeURI()` auf, wenn die URL Unicode-Zeichen enthält. + +* **target**: das Ziel in welchem die URL geladen werden soll. Standardmäßig entspricht dieser Wert `_self` . *(String)* + + * `_self`: Öffnet sich in der Cordova WebView wenn der URL in der Whitelist ist, andernfalls es öffnet sich in der`InAppBrowser`. + * `_blank`: Öffnet den`InAppBrowser`. + * `_system`: Öffnet in den System-Web-Browser. + +* **options**: Optionen für die `InAppBrowser` . Optional, säumige an: `location=yes` . *(String)* + + Die `options` Zeichenfolge muss keine Leerstelle enthalten, und jede Funktion Name/Wert-Paare müssen durch ein Komma getrennt werden. Featurenamen Groß-/Kleinschreibung. Alle Plattformen unterstützen die anderen Werte: + + * **location**: Legen Sie auf `yes` oder `no` , machen die `InAppBrowser` der Adressleiste ein- oder ausschalten. + + Nur Android: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + + iOS nur: + + * **closebuttoncaption**: Legen Sie auf eine Zeichenfolge als Beschriftung der **fertig** -Schaltfläche verwenden. Beachten Sie, dass Sie diesen Wert selbst zu lokalisieren müssen. + * **disallowoverscroll**: Legen Sie auf `yes` oder `no` (Standard ist `no` ). Aktiviert/deaktiviert die UIWebViewBounce-Eigenschaft. + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **toolbar**: Legen Sie auf `yes` oder `no` Aktivieren Sie die Symbolleiste ein- oder Ausschalten für InAppBrowser (Standard:`yes`) + * **enableViewportScale**: Legen Sie auf `yes` oder `no` , Viewport Skalierung durch ein Meta-Tag (standardmäßig zu verhindern`no`). + * **mediaPlaybackRequiresUserAction**: Legen Sie auf `yes` oder `no` , HTML5 audio oder video von automatisches Abspielen (standardmäßig zu verhindern`no`). + * **allowInlineMediaPlayback**: Legen Sie auf `yes` oder `no` Inline-HTML5-Media-Wiedergabe, Darstellung im Browser-Fenster, sondern in eine gerätespezifische Wiedergabe-Schnittstelle ermöglichen. Des HTML `video` Element muss auch die `webkit-playsinline` Attribut (Standard:`no`) + * **keyboardDisplayRequiresUserAction**: Legen Sie auf `yes` oder `no` um die Tastatur zu öffnen, wenn Formularelemente Fokus per JavaScript erhalten `focus()` Anruf (Standard:`yes`). + * **suppressesIncrementalRendering**: Legen Sie auf `yes` oder `no` zu warten, bis alle neuen anzeigen-Inhalte empfangen wird, bevor Sie wiedergegeben wird (standardmäßig`no`). + * **presentationstyle**: Legen Sie auf `pagesheet` , `formsheet` oder `fullscreen` [Präsentationsstil][1] (standardmäßig fest`fullscreen`). + * **transitionstyle**: Legen Sie auf `fliphorizontal` , `crossdissolve` oder `coververtical` [Übergangsstil][2] (standardmäßig fest`coververtical`). + * **toolbarposition**: Legen Sie auf `top` oder `bottom` (Standard ist `bottom` ). Bewirkt, dass die Symbolleiste am oberen oder unteren Rand des Fensters sein. + + Nur Windows: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Macken + +Als Plugin jedes Design erzwingen nicht besteht die Notwendigkeit, einige CSS-Regeln hinzuzufügen, wenn bei `target='_blank'`. Die Regeln könnte wie diese aussehen. + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +Bei einem Aufruf von `cordova.InAppBrowser.open` zurückgegebene Objekt.. + +### Methoden + +* addEventListener +* removeEventListener +* Schließen +* Karte +* executeScript +* insertCSS + +## addEventListener + +> Fügt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +* **EventName**: das Ereignis zu warten *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn der `InAppBrowser` ein Fehler auftritt, wenn Sie eine URL zu laden. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + +* **Rückruf**: die Funktion, die ausgeführt wird, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` -Objekt als Parameter. + +### InAppBrowserEvent Eigenschaften + +* **Typ**: Eventname, entweder `loadstart` , `loadstop` , `loaderror` , oder `exit` . *(String)* + +* **URL**: die URL, die geladen wurde. *(String)* + +* **Code**: der Fehler-Code, nur im Fall von `loaderror` . *(Anzahl)* + +* **Nachricht**: die Fehlermeldung angezeigt, nur im Fall von `loaderror` . *(String)* + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Entfernt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + +* **EventName**: das Ereignis zu warten. *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn die `InAppBrowser` trifft einen Fehler beim Laden einer URLs. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + +* **Rückruf**: die Funktion ausgeführt, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` Objekt. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Schließen + +> Schließt die `InAppBrowser` Fenster. + + ref.close(); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Karte + +> Zeigt ein InAppBrowser-Fenster, das geöffnet wurde, versteckt. Aufrufen, dies hat keine Auswirkungen, wenn die InAppBrowser schon sichtbar war. + + ref.show(); + + +* **Ref**: Verweis auf die (InAppBrowser) Fenster`InAppBrowser`) + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Fügt JavaScript-Code in das `InAppBrowser` Fenster + + ref.executeScript(details, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + +* **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Skripts zu injizieren. + * **Code**: Text des Skripts zu injizieren. + +* **Rückruf**: die Funktion, die ausgeführt wird, nachdem der JavaScript-Code injiziert wird. + + * Wenn das eingefügte Skript vom Typ ist `code` , der Rückruf führt mit einen einzelnen Parameter, der der Rückgabewert des Skripts ist, umwickelt ein `Array` . Bei Multi-Line-Skripten ist der Rückgabewert von der letzten Anweisung oder den letzten Ausdruck ausgewertet. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Injiziert CSS in der `InAppBrowser` Fenster. + + ref.insertCSS(details, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +* **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Stylesheets zu injizieren. + * **Code**: Text des Stylesheets zu injizieren. + +* **Rückruf**: die Funktion, die ausgeführt wird, nachdem die CSS injiziert wird. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/README.md new file mode 100644 index 0000000..811439a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Este plugin proporciona una vista de navegador web que se muestra cuando se llama a `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +El `cordova.InAppBrowser.open()` función se define como un reemplazo de sobreponer para la función `window.Open ()`. Llamadas existentes `window.Open ()` pueden utilizar la ventana InAppBrowser, mediante la sustitución de window.open: + + window.open = cordova.InAppBrowser.open; + + +La ventana de InAppBrowser se comporta como un navegador web estándar y no puede acceder a Cordova APIs. Por este motivo, se recomienda la InAppBrowser si necesita cargar contenido de terceros (confianza), en lugar de que cargar en el principal webview Cordova. El InAppBrowser no está sujeta a la lista blanca, ni va a abrir enlaces en el navegador del sistema. + +El InAppBrowser proporciona por defecto sus propios controles GUI para el usuario (atras, adelante, hacer). + +Para atrás compatibilidad, este plugin también ganchos `window.open`. Sin embargo, el gancho de `window.open` plugin instalado puede tener efectos secundarios no deseados (especialmente si este plugin está incluido únicamente como una dependencia de otro plugin). El gancho de `window.open` se quitará en una versión futura de principal. Hasta que el gancho se ha extraído el plugin, aplicaciones pueden restaurar manualmente el comportamiento por defecto: + + delete window.open // Reverts the call back to it's prototype's default + + +Aunque `window.open` es en el ámbito global, InAppBrowser no está disponible hasta después del evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalación + + cordova plugin add cordova-plugin-inappbrowser + + +Si quieres todas las cargas de página en su aplicación para ir a través de la InAppBrowser, simplemente puedes conectar `window.open` durante la inicialización. Por ejemplo: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Se abre una dirección URL en una nueva instancia de `InAppBrowser`, en la instancia actual del navegador o el navegador del sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: referencia a la `InAppBrowser` ventana. *(InAppBrowser)* + + * **url**: el URL para cargar *(String)*. Llame a `encodeURI()` en esto si la URL contiene caracteres Unicode. + + * **target**: el objetivo en el que se carga la URL, un parámetro opcional que se utiliza de forma predeterminada `_self`. *(String)* + + * `_self`: se abre en el Cordova WebView si la URL está en la lista blanca, de lo contrario se abre en el `InAppBrowser`. + * `_blank`: abre en el `InAppBrowser`. + * `_system`: se abre en el navegador del sistema. + + * **options**: opciones para el `InAppBrowser`. Opcional, contumaz a: `location=yes`. *(String)* + + La cadena de `options` no debe contener ningún espacio en blanco, y los pares de nombre y valor de cada característica deben estar separados por una coma. Los nombres de función son minúsculas. Todas las plataformas admiten el valor siguiente: + + * **location**: se establece en `yes` o `no` para activar o desactivar la barra de ubicación de la `InAppBrowser`. + + Sólo Android: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **zoom**: establezca en `sí` para mostrar los controles de zoom del navegador de Android, a `no` para ocultarlas. El valor predeterminado es `sí`. + * **hardwareback**: se establece en `sí` para utilizar el botón back de hardware para navegar hacia atrás a través de la historia de la `InAppBrowser`. Si no hay ninguna página anterior, se cerrará el `InAppBrowser` . El valor predeterminado es `sí`, por lo que se debe establecer en `no` si desea que el botón back para simplemente cerrar el InAppBrowser. + + Sólo iOS: + + * **closebuttoncaption**: establecer una cadena para usar como título del botón **hecho** . Tenga en cuenta que necesitas localizar este valor por sí mismo. + * **disallowoverscroll**: A `yes` o `no` (valor por defecto es `no` ). Activa/desactiva la propiedad UIWebViewBounce. + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **barra de herramientas**: a `yes` o `no` para activar la barra de herramientas on u off para el InAppBrowser (por defecto`yes`) + * **enableViewportScale**: Set a `yes` o `no` para evitar viewport escalar a través de una etiqueta meta (por defecto a `no`). + * **mediaPlaybackRequiresUserAction**: Set a `yes` o `no` para evitar HTML5 audio o vídeo de reproducción automática (por defecto a `no`). + * **allowInlineMediaPlayback**: A `yes` o `no` para permitir la reproducción de los medios de comunicación en línea HTML5, mostrando en la ventana del navegador en lugar de una interfaz específica del dispositivo de reproducción. Elemento `video` de HTML también debe incluir el atributo de `webkit-playsinline` (por defecto a `no`) + * **keyboardDisplayRequiresUserAction**: se establece en `yes` o `no` para abrir el teclado cuando elementos de formulario reciben el foco mediante llamada de JavaScript de `focus()` (por defecto a `yes`). + * **suppressesIncrementalRendering**: se establece en `yes` o `no` para esperar hasta que todos los nuevos contenidos de vista se recibieron antes de ser prestados (por defecto a `no`). + * **presentationstyle**: se establece en `pagesheet`, `formsheet` o `fullscreen` para definir el [estilo de la presentación](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (por defecto a `fullscreen`). + * **transitionstyle**: se establece en `fliphorizontal`, `crossdissolve` o `coververtical` para definir el [estilo de transición](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (por defecto `coververtical`). + * **toolbarposition**: A `top` o `bottom` (valor por defecto es `bottom` ). Hace que la barra de herramientas en la parte superior o inferior de la ventana. + + Sólo Windows: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **fullscreen**: se establece en `sí` para crear el control del navegador sin un borde alrededor de él. Por favor tenga en cuenta que si **location=no** también se especifica, no habrá ningún control presentado al usuario para cerrar la ventana IAB. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS rarezas + +Como plugin no cumplir cualquier diseño es necesario añadir algunas reglas CSS si abre con `target = '_blank'`. Las reglas pueden parecerse a estos + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows rarezas + +Similar al comportamiento visual de la ventana de Firefox OS IAB puede anularse mediante `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` clases CSS + +### Navegador rarezas + + * Plugin se implementa mediante iframe, + + * Historial de navegación (botones`atrás` y `adelante` en LocationBar) no está implementado. + +## InAppBrowser + +El objeto devuelto desde una llamada a `cordova.InAppBrowser.open`. + +### Métodos + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Añade un detector para un evento de la `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **eventName**: el evento para escuchar *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` encuentra un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función que se ejecuta cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent` como un parámetro. + +### InAppBrowserEvent propiedades + + * **type**: eventname, `loadstart`, `loadstop`, `loaderror` o `exit`. *(String)* + + * **url**: la URL que se cargó. *(String)* + + * **code**: el código de error, sólo en el caso de `loaderror`. *(Número)* + + * **message**: el mensaje de error, sólo en el caso de `loaderror`. *(String)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Navegador rarezas + +eventos `loadstart` y `loaderror` no son alimentados. + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Elimina un detector para un evento de la `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **eventName**: dejar de escuchar para el evento. *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` se encuentra con un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función a ejecutar cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent`. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Cierra la ventana de `InAppBrowser`. + + ref.close(); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Muestra una ventana InAppBrowser que abrió sus puertas ocultada. Esto no tiene efecto si el InAppBrowser ya era visible. + + ref.show(); + + + * **ref**: referencia a la (ventana) InAppBrowser`InAppBrowser`) + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inyecta código JavaScript en la ventana de `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL del script para inyectar. + * **code**: texto de la escritura para inyectar. + + * **devolución de llamada**: la función que se ejecuta después de inyecta el código JavaScript. + + * Si el script inyectado es del tipo de `code`, la devolución de llamada se ejecuta con un solo parámetro, que es el valor devuelto del guión, envuelto en una `Array`. Para scripts multilíneas, este es el valor devuelto de la última declaración, o la última expresión evaluada. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Navegador rarezas + + * sólo **code** es compatible. + +### Windows rarezas + +Debido a la [documentación MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) el script invocado puede devolver únicamente valores de cadena, de lo contrario el parámetro, pasa al **callback** será `[null]`. + +## insertCSS + +> Inyecta CSS en la ventana de `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL de la hoja de estilos para inyectar. + * **code**: texto de la hoja de estilos para inyectar. + + * **callback**: la función que se ejecuta después de inyectar el CSS. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/index.md new file mode 100644 index 0000000..fc5b7b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/es/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Este plugin proporciona una vista de navegador web que se muestra cuando se llama a `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +El `cordova.InAppBrowser.open()` función se define como un reemplazo de sobreponer para la función `window.Open ()`. Llamadas existentes `window.Open ()` pueden utilizar la ventana InAppBrowser, mediante la sustitución de window.open: + + window.open = cordova.InAppBrowser.open; + + +La ventana de InAppBrowser se comporta como un navegador web estándar y no puede acceder a Cordova APIs. Por este motivo, se recomienda la InAppBrowser si necesita cargar contenido de terceros (confianza), en lugar de que cargar en el principal webview Cordova. El InAppBrowser no está sujeta a la lista blanca, ni va a abrir enlaces en el navegador del sistema. + +El InAppBrowser proporciona por defecto sus propios controles GUI para el usuario (atras, adelante, hacer). + +Para atrás compatibilidad, este plugin también ganchos `window.open`. Sin embargo, el gancho de `window.open` plugin instalado puede tener efectos secundarios no deseados (especialmente si este plugin está incluido únicamente como una dependencia de otro plugin). El gancho de `window.open` se quitará en una versión futura de principal. Hasta que el gancho se ha extraído el plugin, aplicaciones pueden restaurar manualmente el comportamiento por defecto: + + delete window.open // Reverts the call back to it's prototype's default + + +Aunque `window.open` es en el ámbito global, InAppBrowser no está disponible hasta después del evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalación + + cordova plugin add cordova-plugin-inappbrowser + + +Si quieres todas las cargas de página en su aplicación para ir a través de la InAppBrowser, simplemente puedes conectar `window.open` durante la inicialización. Por ejemplo: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Se abre una dirección URL en una nueva instancia de `InAppBrowser`, en la instancia actual del navegador o el navegador del sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: referencia a la `InAppBrowser` ventana. *(InAppBrowser)* + +* **url**: el URL para cargar *(String)*. Llame a `encodeURI()` en esto si la URL contiene caracteres Unicode. + +* **target**: el objetivo en el que se carga la URL, un parámetro opcional que se utiliza de forma predeterminada `_self`. *(String)* + + * `_self`: se abre en el Cordova WebView si la URL está en la lista blanca, de lo contrario se abre en el `InAppBrowser`. + * `_blank`: abre en el `InAppBrowser`. + * `_system`: se abre en el navegador del sistema. + +* **options**: opciones para el `InAppBrowser`. Opcional, contumaz a: `location=yes`. *(String)* + + La cadena de `options` no debe contener ningún espacio en blanco, y los pares de nombre y valor de cada característica deben estar separados por una coma. Los nombres de función son minúsculas. Todas las plataformas admiten el valor siguiente: + + * **location**: se establece en `yes` o `no` para activar o desactivar la barra de ubicación de la `InAppBrowser`. + + Sólo Android: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o establecer en `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + + Sólo iOS: + + * **closebuttoncaption**: establecer una cadena para usar como título del botón **hecho** . Tenga en cuenta que necesitas localizar este valor por sí mismo. + * **disallowoverscroll**: A `yes` o `no` (valor por defecto es `no` ). Activa/desactiva la propiedad UIWebViewBounce. + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **barra de herramientas**: a `yes` o `no` para activar la barra de herramientas on u off para el InAppBrowser (por defecto`yes`) + * **enableViewportScale**: Set a `yes` o `no` para evitar viewport escalar a través de una etiqueta meta (por defecto a `no`). + * **mediaPlaybackRequiresUserAction**: Set a `yes` o `no` para evitar HTML5 audio o vídeo de reproducción automática (por defecto a `no`). + * **allowInlineMediaPlayback**: A `yes` o `no` para permitir la reproducción de los medios de comunicación en línea HTML5, mostrando en la ventana del navegador en lugar de una interfaz específica del dispositivo de reproducción. Elemento `video` de HTML también debe incluir el atributo de `webkit-playsinline` (por defecto a `no`) + * **keyboardDisplayRequiresUserAction**: se establece en `yes` o `no` para abrir el teclado cuando elementos de formulario reciben el foco mediante llamada de JavaScript de `focus()` (por defecto a `yes`). + * **suppressesIncrementalRendering**: se establece en `yes` o `no` para esperar hasta que todos los nuevos contenidos de vista se recibieron antes de ser prestados (por defecto a `no`). + * **presentationstyle**: se establece en `pagesheet`, `formsheet` o `fullscreen` para definir el [estilo de la presentación][1] (por defecto a `fullscreen`). + * **transitionstyle**: se establece en `fliphorizontal`, `crossdissolve` o `coververtical` para definir el [estilo de transición][2] (por defecto `coververtical`). + * **toolbarposition**: A `top` o `bottom` (valor por defecto es `bottom` ). Hace que la barra de herramientas en la parte superior o inferior de la ventana. + + Sólo Windows: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS rarezas + +Como plugin no cumplir cualquier diseño es necesario añadir algunas reglas CSS si abre con `target = '_blank'`. Las reglas pueden parecerse a estos + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +El objeto devuelto desde una llamada a `cordova.InAppBrowser.open`. + +### Métodos + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Añade un detector para un evento de la `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +* **eventName**: el evento para escuchar *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` encuentra un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + +* **callback**: la función que se ejecuta cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent` como un parámetro. + +### InAppBrowserEvent propiedades + +* **type**: eventname, `loadstart`, `loadstop`, `loaderror` o `exit`. *(String)* + +* **url**: la URL que se cargó. *(String)* + +* **code**: el código de error, sólo en el caso de `loaderror`. *(Número)* + +* **message**: el mensaje de error, sólo en el caso de `loaderror`. *(String)* + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Elimina un detector para un evento de la `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + +* **eventName**: dejar de escuchar para el evento. *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` se encuentra con un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + +* **callback**: la función a ejecutar cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent`. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Cierra la ventana de `InAppBrowser`. + + ref.close(); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +### Plataformas soportadas + +* Amazon fire OS +* Android +* Firefox OS +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Muestra una ventana InAppBrowser que abrió sus puertas ocultada. Esto no tiene efecto si el InAppBrowser ya era visible. + + ref.show(); + + +* **ref**: referencia a la (ventana) InAppBrowser`InAppBrowser`) + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inyecta código JavaScript en la ventana de `InAppBrowser` + + ref.executeScript(details, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + +* **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL del script para inyectar. + * **code**: texto de la escritura para inyectar. + +* **devolución de llamada**: la función que se ejecuta después de inyecta el código JavaScript. + + * Si el script inyectado es del tipo de `code`, la devolución de llamada se ejecuta con un solo parámetro, que es el valor devuelto del guión, envuelto en una `Array`. Para scripts multilíneas, este es el valor devuelto de la última declaración, o la última expresión evaluada. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Inyecta CSS en la ventana de `InAppBrowser`. + + ref.insertCSS(details, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +* **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL de la hoja de estilos para inyectar. + * **code**: texto de la hoja de estilos para inyectar. + +* **callback**: la función que se ejecuta después de inyectar el CSS. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/README.md new file mode 100644 index 0000000..73812fe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Ce module fournit une vue de navigateur web qui s'affiche lorsque vous appelez `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Le `cordova.InAppBrowser.open()` fonction est définie pour être un remplacement rapide de la fonction `window.open()`. Les appels existants `window.open()` peuvent utiliser la fenêtre de InAppBrowser, en remplaçant window.open : + + window.open = cordova.InAppBrowser.open; + + +La fenêtre de InAppBrowser se comporte comme un navigateur web standard et ne peut pas accéder aux APIs Cordova. Pour cette raison, le InAppBrowser est recommandé si vous devez charger le contenu de tiers (non approuvé), au lieu de chargement que dans le principaux webview Cordova. Le InAppBrowser n'est pas soumis à la liste blanche, ni s'ouvre les liens dans le navigateur de système. + +Le InAppBrowser fournit par défaut ses propres contrôles de GUI pour l'utilisateur (arrière, avant, fait). + +Pour vers l'arrière la compatibilité, ce plugin crochets également `window.open`. Cependant, le plugin installé crochet de `window.open` peut avoir des effets secondaires involontaires (surtout si ce plugin est inclus uniquement comme une dépendance d'un autre plugin). Le crochet de `window.open` sera supprimé dans une future version majeure. Jusqu'à ce que le crochet est supprimé de la plugin, apps peuvent restaurer manuellement le comportement par défaut : + + delete window.open // Reverts the call back to it's prototype's default + + +Bien que `window.open` est dans la portée globale, InAppBrowser n'est pas disponible jusqu'à ce qu'après l'événement `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Si vous souhaitez que toutes les charges de la page dans votre application de passer par le InAppBrowser, vous pouvez simplement accrocher `window.open` pendant l'initialisation. Par exemple : + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Ouvre une URL dans une nouvelle instance de `InAppBrowser`, l'instance de navigateur actuelle ou dans l'Explorateur du système. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **url** : l'URL à charger *(String)*. À encoder au préalable via `encodeURI()` si celle-ci contient des caractères Unicode. + + * **target** : la cible du chargement de l'URL, ce paramètre est optionnel, sa valeur par défaut est `_self`. *(String)* + + * `_self` : dirige le chargement vers la WebView Cordova si l'URL figure dans la liste blanche, sinon dans une fenêtre `InAppBrowser`. + * `_blank` : dirige le chargement vers une fenêtre `InAppBrowser`. + * `_system` : dirige le chargement vers le navigateur Web du système. + + * **options** : permet de personnaliser la fenêtre `InAppBrowser`. Paramètre facultatif dont la valeur par défaut est `location=yes`. *(String)* + + La chaîne `options` ne doit contenir aucun caractère vide, chaque paire nom/valeur représentant une fonctionnalité doit être séparée de la précédente par une virgule. Les noms de fonctionnalités sont sensibles à la casse. Toutes les plates-formes prennent en charge la valeur ci-dessous : + + * **location** : régler à `yes` ou `no` afin d'afficher ou masquer la barre d'adresse de la fenêtre `InAppBrowser`. + + Android uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **zoom**: la valeur `yes` pour afficher les commandes de zoom du navigateur Android, affectez `no` de les cacher. Valeur par défaut est `yes`. + * **hardwareback**: utilisez le bouton de retour de matériel pour naviguer vers l'arrière à travers l'histoire de `InAppBrowser`de la valeur `Oui` . S'il n'y a aucune page précédente, `InAppBrowser` fermera. La valeur par défaut est `yes`, alors vous devez le définir à `no` si vous souhaitez que le bouton back de simplement fermer la InAppBrowser. + + iOS uniquement : + + * **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même. + * **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce. + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`) + * **enableViewportScale**: la valeur `yes` ou `no` pour empêcher la fenêtre de mise à l'échelle par une balise meta (par défaut,`no`). + * **mediaPlaybackRequiresUserAction**: la valeur `yes` ou `no` pour empêcher le HTML5 audio ou vidéo de la lecture automatique (par défaut,`no`). + * **allowInlineMediaPlayback**: la valeur `yes` ou `no` pour permettre la lecture du média en ligne HTML5, affichage dans la fenêtre du navigateur plutôt que d'une interface de lecture spécifique au périphérique. L'HTML `video` élément doit également inclure la `webkit-playsinline` attribut (par défaut,`no`) + * **keyboardDisplayRequiresUserAction**: la valeur `yes` ou `no` pour ouvrir le clavier lorsque les éléments reçoivent le focus par l'intermédiaire de JavaScript `focus()` appel (par défaut,`yes`). + * **suppressesIncrementalRendering**: la valeur `yes` ou `no` d'attendre que toutes les nouveautés de vue sont reçue avant d'être restitué (par défaut,`no`). + * **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (par défaut,`fullscreen`). + * **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (par défaut,`coververtical`). + * **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre. + + Windows uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **fullscreen**: défini à `yes` pour créer le contrôle de navigateur sans bordure autour d'elle. Veuillez noter que si **location=no** est également spécifiée, il n'y n'aura aucun contrôle a présenté à l'utilisateur de fermer la fenêtre du CCI. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Quirks + +Comme plugin n'est pas appliquer n'importe quelle conception il est nécessaire d'ajouter quelques règles CSS si ouvert avec `target= _blank`. Les règles pourraient ressembler à ces + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Bizarreries de Windows + +Semblable à un comportement visuel fenêtre Firefox OS CCI peut être substituée par l'intermédiaire de `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` des classes CSS + +### Bizarreries navigateur + + * Plugin est implémentée via iframe, + + * Historique de navigation (boutons`back` et `forward` dans LocationBar) n'est pas implémentée. + +## InAppBrowser + +L'objet retourné par un appel à `cordova.InAppBrowser.open`. + +### Méthodes + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Ajoute un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement à écouter *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Propriétés de InAppBrowserEvent + + * **type** : le nom de l'évènement, soit `loadstart`, `loadstop`, `loaderror` ou `exit`. *(String)* + + * **url** : l'URL ayant été chargée. *(String)* + + * **code** : le code d'erreur, seulement pour `loaderror`. *(Number)* + + * **message** : un message d'erreur, seulement pour `loaderror`. *(String)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Bizarreries navigateur + +les événements `loadstart` et `loaderror` ne sont pas déclenchés. + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Supprime un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement pour lequel arrêter l'écoute. *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Ferme la fenêtre `InAppBrowser`. + + ref.close(); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Affiche une fenêtre InAppBrowser qui a été ouverte cachée. Appeler cette méthode n'a aucun effet si la fenêtre en question est déjà visible. + + ref.show(); + + + * **Réf**: référence à la fenêtre () InAppBrowser`InAppBrowser`) + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Injecte du code JavaScript dans la fenêtre `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL du script à injecter. + * **code** : texte du script à injecter. + + * **callback** : une fonction exécutée après l'injection du code JavaScript. + + * Si le script injecté est de type `code`, un seul paramètre est transmis à la fonction callback, correspondant à la valeur de retour du script enveloppée dans un `Array`. Pour les scripts multilignes, il s'agit de la valeur renvoyée par la dernière instruction ou la dernière expression évaluée. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Bizarreries navigateur + + * clef de **code** uniquement est pris en charge. + +### Bizarreries de Windows + +En raison de la [documentation MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) le script appelé peut retourner uniquement les valeurs de chaîne, sinon le paramètre, passé au **rappel** sera `[null]`. + +## insertCSS + +> Injecte des règles CSS dans la fenêtre `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL de la feuille de style à injecter. + * **code** : contenu de la feuille de style à injecter. + + * **callback** : une fonction exécutée après l'injection du fichier CSS. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/index.md new file mode 100644 index 0000000..4f22d13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/fr/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Ce module fournit une vue de navigateur web qui s'affiche lorsque vous appelez `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Le `cordova.InAppBrowser.open()` fonction est définie pour être un remplacement rapide de la fonction `window.open()`. Les appels existants `window.open()` peuvent utiliser la fenêtre de InAppBrowser, en remplaçant window.open : + + window.open = cordova.InAppBrowser.open; + + +La fenêtre de InAppBrowser se comporte comme un navigateur web standard et ne peut pas accéder aux APIs Cordova. Pour cette raison, le InAppBrowser est recommandé si vous devez charger le contenu de tiers (non approuvé), au lieu de chargement que dans le principaux webview Cordova. Le InAppBrowser n'est pas soumis à la liste blanche, ni s'ouvre les liens dans le navigateur de système. + +Le InAppBrowser fournit par défaut ses propres contrôles de GUI pour l'utilisateur (arrière, avant, fait). + +Pour vers l'arrière la compatibilité, ce plugin crochets également `window.open`. Cependant, le plugin installé crochet de `window.open` peut avoir des effets secondaires involontaires (surtout si ce plugin est inclus uniquement comme une dépendance d'un autre plugin). Le crochet de `window.open` sera supprimé dans une future version majeure. Jusqu'à ce que le crochet est supprimé de la plugin, apps peuvent restaurer manuellement le comportement par défaut : + + delete window.open // Reverts the call back to it's prototype's default + + +Bien que `window.open` est dans la portée globale, InAppBrowser n'est pas disponible jusqu'à ce qu'après l'événement `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Si vous souhaitez que toutes les charges de la page dans votre application de passer par le InAppBrowser, vous pouvez simplement accrocher `window.open` pendant l'initialisation. Par exemple : + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Ouvre une URL dans une nouvelle instance de `InAppBrowser`, l'instance de navigateur actuelle ou dans l'Explorateur du système. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **url** : l'URL à charger *(String)*. À encoder au préalable via `encodeURI()` si celle-ci contient des caractères Unicode. + +* **target** : la cible du chargement de l'URL, ce paramètre est optionnel, sa valeur par défaut est `_self`. *(String)* + + * `_self` : dirige le chargement vers la WebView Cordova si l'URL figure dans la liste blanche, sinon dans une fenêtre `InAppBrowser`. + * `_blank` : dirige le chargement vers une fenêtre `InAppBrowser`. + * `_system` : dirige le chargement vers le navigateur Web du système. + +* **options** : permet de personnaliser la fenêtre `InAppBrowser`. Paramètre facultatif dont la valeur par défaut est `location=yes`. *(String)* + + La chaîne `options` ne doit contenir aucun caractère vide, chaque paire nom/valeur représentant une fonctionnalité doit être séparée de la précédente par une virgule. Les noms de fonctionnalités sont sensibles à la casse. Toutes les plates-formes prennent en charge la valeur ci-dessous : + + * **location** : régler à `yes` ou `no` afin d'afficher ou masquer la barre d'adresse de la fenêtre `InAppBrowser`. + + Android uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + + iOS uniquement : + + * **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même. + * **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce. + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`) + * **enableViewportScale**: la valeur `yes` ou `no` pour empêcher la fenêtre de mise à l'échelle par une balise meta (par défaut,`no`). + * **mediaPlaybackRequiresUserAction**: la valeur `yes` ou `no` pour empêcher le HTML5 audio ou vidéo de la lecture automatique (par défaut,`no`). + * **allowInlineMediaPlayback**: la valeur `yes` ou `no` pour permettre la lecture du média en ligne HTML5, affichage dans la fenêtre du navigateur plutôt que d'une interface de lecture spécifique au périphérique. L'HTML `video` élément doit également inclure la `webkit-playsinline` attribut (par défaut,`no`) + * **keyboardDisplayRequiresUserAction**: la valeur `yes` ou `no` pour ouvrir le clavier lorsque les éléments reçoivent le focus par l'intermédiaire de JavaScript `focus()` appel (par défaut,`yes`). + * **suppressesIncrementalRendering**: la valeur `yes` ou `no` d'attendre que toutes les nouveautés de vue sont reçue avant d'être restitué (par défaut,`no`). + * **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation][1] (par défaut,`fullscreen`). + * **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition][2] (par défaut,`coververtical`). + * **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre. + + Windows uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Quirks + +Comme plugin n'est pas appliquer n'importe quelle conception il est nécessaire d'ajouter quelques règles CSS si ouvert avec `target= _blank`. Les règles pourraient ressembler à ces + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +L'objet retourné par un appel à `cordova.InAppBrowser.open`. + +### Méthodes + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Ajoute un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **eventname** : l'évènement à écouter *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + +* **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Propriétés de InAppBrowserEvent + +* **type** : le nom de l'évènement, soit `loadstart`, `loadstop`, `loaderror` ou `exit`. *(String)* + +* **url** : l'URL ayant été chargée. *(String)* + +* **code** : le code d'erreur, seulement pour `loaderror`. *(Number)* + +* **message** : un message d'erreur, seulement pour `loaderror`. *(String)* + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Supprime un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **eventname** : l'évènement pour lequel arrêter l'écoute. *(String)* + + * **loadstart**: événement déclenche quand le `InAppBrowser` commence à charger une URL. + * **loadstop**: événement déclenche lorsque la `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **sortie**: événement déclenche quand le `InAppBrowser` fenêtre est fermée. + +* **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Ferme la fenêtre `InAppBrowser`. + + ref.close(); + + +* **Réf**: référence à la `InAppBrowser` fenêtre *(InAppBrowser)* + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Affiche une fenêtre InAppBrowser qui a été ouverte cachée. Appeler cette méthode n'a aucun effet si la fenêtre en question est déjà visible. + + ref.show(); + + +* **Réf**: référence à la fenêtre () InAppBrowser`InAppBrowser`) + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Injecte du code JavaScript dans la fenêtre `InAppBrowser` + + ref.executeScript(details, callback); + + +* **Réf**: référence à la `InAppBrowser` fenêtre. *(InAppBrowser)* + +* **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL du script à injecter. + * **code** : texte du script à injecter. + +* **callback** : une fonction exécutée après l'injection du code JavaScript. + + * Si le script injecté est de type `code`, un seul paramètre est transmis à la fonction callback, correspondant à la valeur de retour du script enveloppée dans un `Array`. Pour les scripts multilignes, il s'agit de la valeur renvoyée par la dernière instruction ou la dernière expression évaluée. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Injecte des règles CSS dans la fenêtre `InAppBrowser`. + + ref.insertCSS(details, callback); + + +* **Réf**: référence à la `InAppBrowser` fenêtre *(InAppBrowser)* + +* **injectDetails**: Détails du script à exécuter, spécifiant soit un `file` ou `code` clés. *(Objet)* + + * **file** : URL de la feuille de style à injecter. + * **code** : contenu de la feuille de style à injecter. + +* **callback** : une fonction exécutée après l'injection du fichier CSS. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/README.md new file mode 100644 index 0000000..4e06888 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open(): + + window.open = cordova.InAppBrowser.open; + + +La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema. + +La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto). + +Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito: + + delete window.open // Reverts the call back to it's prototype's default + + +Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installazione + + cordova plugin add cordova-plugin-inappbrowser + + +Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode. + + * **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)* + + * `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`. + * `_blank`: Apre il`InAppBrowser`. + * `_system`: Si apre nel browser web del sistema. + + * **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)* + + Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito: + + * **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off. + + Solo su Android: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **zoom**: impostare su `yes` per mostrare i controlli di zoom del browser Android, impostata su `no` per nasconderli. Valore predefinito è `yes`. + * **hardwareback**: impostare `yes` per utilizzare il pulsante Indietro hardware per spostarsi all'indietro tra il `InAppBrowser`di storia. Se esiste una pagina precedente, si chiuderà il `InAppBrowser` . Il valore predefinito è `yes`, quindi è necessario impostare a `no` , se si desidera che il pulsante indietro per chiudere semplicemente il InAppBrowser. + + solo iOS: + + * **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso. + * **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce. + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`) + * **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`). + * **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`). + * **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`) + * **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`). + * **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`). + * **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (default`fullscreen`). + * **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (default`coververtical`). + * **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra. + + Solo per Windows: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **fullscreen**: impostata su `yes` per creare il controllo browser senza un bordo attorno ad esso. Siete pregati di notare che se **location=no** viene specificato, non ci sarà nessun controllo presentato all'utente per chiudere la finestra IAB. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS stranezze + +Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Stranezze di Windows + +Simile al comportamento visivo finestra di Firefox OS IAB può essere sottoposto a override tramite `inAppBrowserWrap`/ classi CSS`inAppBrowserWrapFullscreen` + +### Stranezze browser + + * Plugin viene implementato tramite iframe, + + * Cronologia di navigazione (pulsanti`indietro` e `Avanti` in LocationBar) non è implementato. + +## InAppBrowser + +L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`. + +### Metodi + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Aggiunge un listener per un evento dal`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **EventName**: l'evento per l'ascolto *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro. + +### Proprietà InAppBrowserEvent + + * **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)* + + * **URL**: l'URL che è stato caricato. *(String)* + + * **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)* + + * **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Stranezze browser + +eventi `onloadstart` e `loaderror` non sono stati licenziati. + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Rimuove un listener per un evento dal`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **EventName**: interrompere l'attesa per l'evento. *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Chiude la `InAppBrowser` finestra. + + ref.close(); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile. + + ref.show(); + + + * **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`) + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inserisce il codice JavaScript nella `InAppBrowser` finestra + + ref.executeScript(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL dello script da iniettare. + * **codice**: testo dello script da iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato. + + * Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Stranezze browser + + * è supportato solo il **code** chiave. + +### Stranezze di Windows + +A causa di [documenti MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) lo script richiamato può restituire solo i valori di stringa, altrimenti il parametro, passato al **callback** sarà `[null]`. + +## insertCSS + +> Inietta CSS nella `InAppBrowser` finestra. + + ref.insertCSS(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL del foglio di stile per iniettare. + * **codice**: testo del foglio di stile per iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/index.md new file mode 100644 index 0000000..7365462 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/it/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open(): + + window.open = cordova.InAppBrowser.open; + + +La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema. + +La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto). + +Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito: + + delete window.open // Reverts the call back to it's prototype's default + + +Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installazione + + cordova plugin add cordova-plugin-inappbrowser + + +Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode. + +* **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)* + + * `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`. + * `_blank`: Apre il`InAppBrowser`. + * `_system`: Si apre nel browser web del sistema. + +* **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)* + + Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito: + + * **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off. + + Solo su Android: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + + solo iOS: + + * **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso. + * **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce. + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`) + * **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`). + * **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`). + * **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`) + * **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`). + * **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`). + * **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione][1] (default`fullscreen`). + * **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione][2] (default`coververtical`). + * **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra. + + Solo per Windows: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS stranezze + +Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`. + +### Metodi + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Aggiunge un listener per un evento dal`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +* **EventName**: l'evento per l'ascolto *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + +* **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro. + +### Proprietà InAppBrowserEvent + +* **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)* + +* **URL**: l'URL che è stato caricato. *(String)* + +* **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)* + +* **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)* + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Rimuove un listener per un evento dal`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **EventName**: interrompere l'attesa per l'evento. *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + +* **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Chiude la `InAppBrowser` finestra. + + ref.close(); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* Firefox OS +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile. + + ref.show(); + + +* **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`) + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inserisce il codice JavaScript nella `InAppBrowser` finestra + + ref.executeScript(details, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL dello script da iniettare. + * **codice**: testo dello script da iniettare. + +* **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato. + + * Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Inietta CSS nella `InAppBrowser` finestra. + + ref.insertCSS(details, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL del foglio di stile per iniettare. + * **codice**: testo del foglio di stile per iniettare. + +* **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/README.md new file mode 100644 index 0000000..40f631b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +このプラグインは `コルドバを呼び出すときに表示される web ブラウザーのビューを提供します。InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`コルドバ。InAppBrowser.open()` `window.open()` 関数との交換を定義する関数。 既存の `window.open()` 呼び出しは、window.open を置き換えることによって InAppBrowser ウィンドウを使用できます。 + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser ウィンドウは標準的な web ブラウザーのように動作し、コルドバ Api にアクセスできません。 この理由から、InAppBrowser お勧めする場合はメインのコルドバの webview を読み込むのではなくサード パーティ (信頼されていない) コンテンツをロードする必要があります。 InAppBrowser、ホワイト リストの対象ではないも、システムのブラウザーでリンクを開くです。 + +InAppBrowser を提供しますデフォルトで GUI コントロール (戻る、進む、行う)。 + +後方互換性、このプラグインは、また `window.open` をフックのため。 ただし、`window.open` のプラグイン インストール フックを持つことができます意図しない副作用 (特に場合は、このプラグインは別のプラグインの依存関係としてのみ含まれています)。 `window.open` のフックは、将来のメジャー リリースで削除されます。 プラグインから、フックが削除されるまでアプリはデフォルトの動作を手動で復元できます。 + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` はグローバル スコープでは、InAppBrowser は、`deviceready` イベントの後まで利用できません。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## インストール + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser を通過するアプリですべてのページの読み込みをする場合は初期化中に `window.open` を単にフックできます。たとえば。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +新しい `InAppBrowser` インスタンスを現在のブラウザー インスタンスまたはシステムのブラウザーで URL を開きます。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。 + + * **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)* + + * `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`. + * `_blank`: で開きます、`InAppBrowser`. + * `_system`: システムの web ブラウザーで開きます。 + + * **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)* + + `options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。 + + * **場所**: に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。 + + アンドロイドのみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **zoom**:`yes`Android ブラウザーのズーム コントロールの表示を`no`に設定すると、それらを非表示に設定します。 既定値は`yes`. + * **hardwareback**: `InAppBrowser`の履歴を後方に移動するのにハードウェアの戻るボタンを使用して`yes`に設定します。 前のページがない場合は、 `InAppBrowser`が終了します。 既定値は`はい`、ため場合は、単に、InAppBrowser を閉じる戻るボタン`なし`を設定する必要があります。 + + iOS のみ: + + * **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。 + * **disallowoverscroll**: に設定されている `yes` または `no` (既定値は `no` )。/UIWebViewBounce プロパティをオフにします。 + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **ツールバー**: に設定されている `yes` または `no` InAppBrowser (デフォルトのツールバーのオンまたはオフを有効にするには`yes`) + * **enableViewportScale**: に設定されている `yes` または `no` を (デフォルトではメタタグを介してスケーリング ビューポートを防ぐために`no`). + * **mediaPlaybackRequiresUserAction**: に設定されている `yes` または `no` を HTML5 オーディオまたはビデオを自動再生 (初期設定から防ぐために`no`). + * **allowInlineMediaPlayback**: に設定されている `yes` または `no` ラインで HTML5 メディア再生には、デバイス固有再生インターフェイスではなく、ブラウザー ウィンドウ内に表示するようにします。 HTML の `video` 要素を含める必要がありますまた、 `webkit-playsinline` 属性 (デフォルトは`no`) + * **keyboardDisplayRequiresUserAction**: に設定されている `yes` または `no` をフォーム要素の JavaScript を介してフォーカスを受け取るときに、キーボードを開く `focus()` コール (デフォルトは`yes`). + * **suppressesIncrementalRendering**: に設定されている `yes` または `no` (デフォルトでは表示される前にビューのすべての新しいコンテンツを受信するまで待機するには`no`). + * **presentationstyle**: に設定されている `pagesheet` 、 `formsheet` または `fullscreen` (デフォルトでは、[プレゼンテーション スタイル](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)を設定するには`fullscreen`). + * **transitionstyle**: に設定されている `fliphorizontal` 、 `crossdissolve` または `coververtical` (デフォルトでは、[トランジションのスタイル](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)を設定するには`coververtical`). + * **toolbarposition**: に設定されている `top` または `bottom` (既定値は `bottom` )。上部またはウィンドウの下部にツールバーが発生します。 + + Windows のみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **fullscreen**: 周りに境界線なしブラウザー コントロールを作成する`[yes]`に設定します。 その場合に注意してください**location=no**指定また、IAB ウィンドウを閉じるためにユーザーに提示はコントロールされます。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * ブラックベリー 10 + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS 癖 + +開かれた場合にいくつかの CSS ルールを追加する必要があるプラグインは任意のデザインを適用しないと `target ='_blank'`。これらのような規則になります。 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows の癖 + +`InAppBrowserWrap`経由で Firefox OS IAB ウィンドウの視覚的動作に似ていますをオーバーライドできます/`inAppBrowserWrapFullscreen` CSS クラス + +### ブラウザーの癖 + + * Iframe を介してプラグインを実装します。 + + * ナビゲーション履歴 (LocationBar の`進む`と`戻る`ボタン) は実装されていません。 + +## InAppBrowser + +`コルドバへの呼び出しから返されるオブジェクト。InAppBrowser.open`. + +### メソッド + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> イベントのリスナーを追加します、`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **eventname**: *(文字列)*をリッスンするイベント + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。 + +### InAppBrowserEvent プロパティ + + * **タイプ**: eventname どちらか `loadstart` 、 `loadstop` 、 `loaderror` 、または `exit` 。*(文字列)* + + * **url**: URL が読み込まれました。*(文字列)* + + * **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)* + + * **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### ブラウザーの癖 + +`loadstart` `loaderror`イベントが発生していません。 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> イベントのリスナーを削除します、`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **eventname**: イベントのリッスンを停止します。*(文字列)* + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 閉じる、 `InAppBrowser` ウィンドウ。 + + ref.close(); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。 + + ref.show(); + + + * **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`) + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ + + ref.executeScript(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: スクリプトの URL を注入します。 + * **コード**: スクリプトのテキストを挿入します。 + + * **コールバック**: JavaScript コードを注入した後に実行される関数。 + + * 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### ブラウザーの癖 + + * **code**キーのみをサポートします。 + +### Windows の癖 + +[MSDN ドキュメント](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)のため呼び出されたスクリプト パラメーターを返す文字列値のみそれ以外の場合は、**コールバック**に渡される`[null]`になります. + +## insertCSS + +> CSS に注入する、 `InAppBrowser` ウィンドウ。 + + ref.insertCSS(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: 注入するスタイル シートの URL。 + * **コード**: 注入するスタイル シートのテキスト。 + + * **コールバック**: CSS の注入後に実行される関数。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/index.md new file mode 100644 index 0000000..a1b6854 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ja/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +このプラグインは `コルドバを呼び出すときに表示される web ブラウザーのビューを提供します。InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`コルドバ。InAppBrowser.open()` `window.open()` 関数との交換を定義する関数。 既存の `window.open()` 呼び出しは、window.open を置き換えることによって InAppBrowser ウィンドウを使用できます。 + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser ウィンドウは標準的な web ブラウザーのように動作し、コルドバ Api にアクセスできません。 この理由から、InAppBrowser お勧めする場合はメインのコルドバの webview を読み込むのではなくサード パーティ (信頼されていない) コンテンツをロードする必要があります。 InAppBrowser、ホワイト リストの対象ではないも、システムのブラウザーでリンクを開くです。 + +InAppBrowser を提供しますデフォルトで GUI コントロール (戻る、進む、行う)。 + +後方互換性、このプラグインは、また `window.open` をフックのため。 ただし、`window.open` のプラグイン インストール フックを持つことができます意図しない副作用 (特に場合は、このプラグインは別のプラグインの依存関係としてのみ含まれています)。 `window.open` のフックは、将来のメジャー リリースで削除されます。 プラグインから、フックが削除されるまでアプリはデフォルトの動作を手動で復元できます。 + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` はグローバル スコープでは、InAppBrowser は、`deviceready` イベントの後まで利用できません。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## インストール + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser を通過するアプリですべてのページの読み込みをする場合は初期化中に `window.open` を単にフックできます。たとえば。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +新しい `InAppBrowser` インスタンスを現在のブラウザー インスタンスまたはシステムのブラウザーで URL を開きます。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。 + +* **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)* + + * `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`. + * `_blank`: で開きます、`InAppBrowser`. + * `_system`: システムの web ブラウザーで開きます。 + +* **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)* + + `options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。 + + * **場所**: に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。 + + アンドロイドのみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + + iOS のみ: + + * **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。 + * **disallowoverscroll**: に設定されている `yes` または `no` (既定値は `no` )。/UIWebViewBounce プロパティをオフにします。 + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **ツールバー**: に設定されている `yes` または `no` InAppBrowser (デフォルトのツールバーのオンまたはオフを有効にするには`yes`) + * **enableViewportScale**: に設定されている `yes` または `no` を (デフォルトではメタタグを介してスケーリング ビューポートを防ぐために`no`). + * **mediaPlaybackRequiresUserAction**: に設定されている `yes` または `no` を HTML5 オーディオまたはビデオを自動再生 (初期設定から防ぐために`no`). + * **allowInlineMediaPlayback**: に設定されている `yes` または `no` ラインで HTML5 メディア再生には、デバイス固有再生インターフェイスではなく、ブラウザー ウィンドウ内に表示するようにします。 HTML の `video` 要素を含める必要がありますまた、 `webkit-playsinline` 属性 (デフォルトは`no`) + * **keyboardDisplayRequiresUserAction**: に設定されている `yes` または `no` をフォーム要素の JavaScript を介してフォーカスを受け取るときに、キーボードを開く `focus()` コール (デフォルトは`yes`). + * **suppressesIncrementalRendering**: に設定されている `yes` または `no` (デフォルトでは表示される前にビューのすべての新しいコンテンツを受信するまで待機するには`no`). + * **presentationstyle**: に設定されている `pagesheet` 、 `formsheet` または `fullscreen` (デフォルトでは、[プレゼンテーション スタイル][1]を設定するには`fullscreen`). + * **transitionstyle**: に設定されている `fliphorizontal` 、 `crossdissolve` または `coververtical` (デフォルトでは、[トランジションのスタイル][2]を設定するには`coververtical`). + * **toolbarposition**: に設定されている `top` または `bottom` (既定値は `bottom` )。上部またはウィンドウの下部にツールバーが発生します。 + + Windows のみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* Firefox の OS +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS 癖 + +開かれた場合にいくつかの CSS ルールを追加する必要があるプラグインは任意のデザインを適用しないと `target ='_blank'`。これらのような規則になります。 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +`コルドバへの呼び出しから返されるオブジェクト。InAppBrowser.open`. + +### メソッド + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> イベントのリスナーを追加します、`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +* **eventname**: *(文字列)*をリッスンするイベント + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + +* **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。 + +### InAppBrowserEvent プロパティ + +* **タイプ**: eventname どちらか `loadstart` 、 `loadstop` 、 `loaderror` 、または `exit` 。*(文字列)* + +* **url**: URL が読み込まれました。*(文字列)* + +* **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)* + +* **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)* + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> イベントのリスナーを削除します、`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **eventname**: イベントのリッスンを停止します。*(文字列)* + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + +* **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 閉じる、 `InAppBrowser` ウィンドウ。 + + ref.close(); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* Firefox の OS +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。 + + ref.show(); + + +* **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`) + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ + + ref.executeScript(details, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: スクリプトの URL を注入します。 + * **コード**: スクリプトのテキストを挿入します。 + +* **コールバック**: JavaScript コードを注入した後に実行される関数。 + + * 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> CSS に注入する、 `InAppBrowser` ウィンドウ。 + + ref.insertCSS(details, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +* **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: 注入するスタイル シートの URL。 + * **コード**: 注入するスタイル シートのテキスト。 + +* **コールバック**: CSS の注入後に実行される関数。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/README.md new file mode 100644 index 0000000..13511ad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +이 플러그인 `코르도바를 호출할 때 표시 하는 웹 브라우저 보기를 제공 합니다.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`코르도바입니다.InAppBrowser.open()` 함수 `window.open ()` 함수에 대 한 대체품 정의 됩니다. 기존의 `window.open ()` 호출 window.open을 대체 하 여 InAppBrowser 윈도우를 사용할 수 있습니다. + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 창 표준 웹 브라우저 처럼 동작 및 코르도바 Api에 액세스할 수 없습니다. 이 이유는 InAppBrowser는 것이 좋습니다는 주요 코르도바 webview로 로드 하는 대신 제 3 자 (신뢰할 수 없는) 콘텐츠를 로드 해야 할 경우. InAppBrowser는 허용 될 수도 시스템 브라우저에서 링크를 여는. + +사용자에 대 한 자체 GUI 컨트롤에서 기본적으로 제공 된 InAppBrowser (뒤로, 앞으로, 완료). + +대 한 뒤 호환성,이 플러그인도 `window.open` 후크. 그러나, `window.open`의 플러그인 설치 후크를 가질 수 있습니다 의도 하지 않은 부작용 (특히 경우이 플러그인이 다른 플러그인 종속성 으로만 포함). `window.open` 후크 주요 릴리스에서 제거 됩니다. 후크 플러그인에서 제거 될 때까지 애플 리 케이 션 수 있습니다 수동으로 기본 동작을 복원 하 게 됩니다. + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` 전역 범위에 있지만 InAppBrowser 제공 되지 않습니다 때까지 `deviceready` 이벤트 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 설치 + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser를 통해가 서 당신의 애플 리 케이 션에서 모든 페이지를 로드 하려는 경우 초기화 하는 동안 `window.open` 간단 하 게 연결할 수 있습니다. 예를 들어: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +새 `InAppBrowser` 인스턴스, 현재 브라우저 인스턴스 또는 시스템 브라우저에서 URL을 엽니다. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **url**: *(문자열)를*로드 하는 URL. 전화 `encodeURI()` 이 경우에는 URL 유니코드 문자를 포함 합니다. + + * **대상**: 대상 URL, 기본적으로 선택적 매개 변수를 로드 하는 `_self` . *(문자열)* + + * `_self`: URL 화이트 리스트에 있으면 코르도바 WebView에서 열리고, 그렇지 않으면 열에`InAppBrowser`. + * `_blank`: 준공에`InAppBrowser`. + * `_system`: 시스템의 웹 브라우저에서 엽니다. + + * **옵션**: 옵션은 `InAppBrowser` . 선택적, 디폴트에: `location=yes` . *(문자열)* + + `options`문자열 텅 빈 어떤 스페이스 포함 해서는 안 그리고 쉼표 각 기능의 이름/값 쌍을 구분 합니다. 기능 이름은 대/소문자입니다. 모든 플랫폼 지원 아래 값: + + * **위치**: 설정 `yes` 또는 `no` 설정 하는 `InAppBrowser` 의 위치 표시줄 켜거나 끕니다. + + 안 드 로이드만: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **zoom/축소**: `네` 안 드 로이드 브라우저의 확대/축소 컨트롤을 표시, 그들을 숨길 수 `없는` 로 설정으로 설정. 기본값은 `네`. + * **hardwareback**: 하드웨어 뒤로 버튼을 사용 하 여 `InAppBrowser`의 역사를 통해 뒤로 이동 하려면 `예` 로 설정. 이전 페이지 없음이 있는 경우에, `InAppBrowser` 닫힙니다. 기본 값 이므로 `yes`, 뒤로 버튼을 간단 하 게는 InAppBrowser를 하려면 `no` 로 설정 해야 합니다. + + iOS만: + + * **closebuttoncaption**: **수행** 하는 단추의 캡션으로 사용할 문자열을 설정 합니다. 참고 직접이 값을 지역화 해야 합니다. + * **disallowoverscroll**: 설정 `yes` 또는 `no` (기본값은 `no` ). 회전 온/오프 UIWebViewBounce 속성입니다. + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **도구 모음**: 설정 `yes` 또는 `no` InAppBrowser (기본값:에 대 한 도구 모음 온 / 오프를 돌기 위하여`yes`) + * **enableViewportScale**: 설정 `yes` 또는 `no` 뷰포트 메타 태그 (기본값:를 통해 확장을 방지 하기 위해`no`). + * **mediaPlaybackRequiresUserAction**: 설정 `yes` 또는 `no` HTML5 오디오 또는 비디오 자동 재생 (기본값에서에서 방지 하기 위해`no`). + * **allowInlineMediaPlayback**: 설정 `yes` 또는 `no` 인라인 HTML5 미디어 재생, 장치 전용 재생 인터페이스 보다는 브라우저 창 내에서 표시할 수 있도록 합니다. HTML의 `video` 요소가 포함 되어야 합니다는 `webkit-playsinline` 특성 (기본값:`no`) + * **keyboardDisplayRequiresUserAction**: 설정 `yes` 또는 `no` 양식 요소는 자바 스크립트를 통해 포커스를 받을 때 키보드를 열고 `focus()` 전화 (기본값:`yes`). + * **suppressesIncrementalRendering**: 설정 `yes` 또는 `no` (기본값을 렌더링 하기 전에 모든 새로운 보기 콘텐츠를 받을 때까지 기다려야`no`). + * **presentationstyle**: 설정 `pagesheet` , `formsheet` 또는 `fullscreen` [프레 젠 테이 션 스타일](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (기본값을 설정 하려면`fullscreen`). + * **transitionstyle**: 설정 `fliphorizontal` , `crossdissolve` 또는 `coververtical` [전환 스타일](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (기본값을 설정 하려면`coververtical`). + * **toolbarposition**: 설정 `top` 또는 `bottom` (기본값은 `bottom` ). 위쪽 또는 아래쪽 창에 도구 모음을 발생 합니다. + + Windows에만 해당: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **fullscreen**: 주위 테두리 없이 브라우저 컨트롤을 만드는 `yes` 를 설정. 참고로 만약 **location=no** 지정, 통제 내 사 창 닫기를 사용자에 게 표시 될 것입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * 블랙베리 10 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 예를 들어 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 파이어 폭스 OS 단점 + +플러그인 어떤 디자인을 적용 하지 않는 경우 열 일부 CSS의 규칙을 추가할 필요가 있다 `target='_blank'`. 이 같이 규칙 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### 윈도우 특수 + +파이어 폭스 OS 내 사 창 시각적 행동 비슷한 `inAppBrowserWrap`통해 재정의할 수 /`inAppBrowserWrapFullscreen` CSS 클래스 + +### 브라우저 만지면 + + * 플러그인은 iframe을 통해 구현 + + * 탐색 기록 (LocationBar에서`뒤로` 및 `앞으로` 단추)은 구현 되지 않습니다. + +## InAppBrowser + +`Cordova에 대 한 호출에서 반환 하는 개체.InAppBrowser.open`. + +### 메서드 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 이벤트에 대 한 수신기를 추가 합니다`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **eventname**: *(문자열)를* 수신 하도록 이벤트 + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL을 로드할 때 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 될 때 실행 되는 함수. 함수는 전달 된 `InAppBrowserEvent` 개체를 매개 변수로 합니다. + +### InAppBrowserEvent 속성 + + * **유형**: eventname, 중 `loadstart` , `loadstop` , `loaderror` , 또는 `exit` . *(문자열)* + + * **url**: URL 로드 된. *(문자열)* + + * **코드**: 오류 코드의 경우에만 `loaderror` . *(수)* + + * **메시지**: 오류 메시지의 경우에만 `loaderror` . *(문자열)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 브라우저 만지면 + +`loadstart` 및 `loaderror` 이벤트 해 고는 되 고. + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 이벤트에 대 한 수신기를 제거 합니다`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **eventname**: 이벤트 수신 대기를 중지 합니다. *(문자열)* + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL 로드 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 하면 실행할 함수. 함수는 전달 된 `InAppBrowserEvent` 개체. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 종료는 `InAppBrowser` 창. + + ref.close(); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 숨겨진 열은 한 InAppBrowser 창을 표시 합니다. 전화는 InAppBrowser가 이미 보이는 경우는 효과가 없습니다. + + ref.show(); + + + * **ref**: InAppBrowser 창 (참조`InAppBrowser`) + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 에 자바 스크립트 코드를 삽입는 `InAppBrowser` 창 + + ref.executeScript(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스크립트의 URL. + * **코드**: 스크립트 텍스트를 삽입 합니다. + + * **콜백**: 자바 스크립트 코드를 주입 후 실행 기능. + + * 삽입 된 스크립트 유형의 경우 `code` , 스크립트의 반환 값은 단일 매개 변수는 콜백 실행에 싸여 있는 `Array` . 여러 줄 스크립트에 대 한 마지막 문 또는 평가 마지막 식의 반환 값입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 브라우저 만지면 + + * **code** 키만 지원 됩니다. + +### 윈도우 특수 + +[MSDN 문서](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) 인해 호출된 스크립트 반환할 수 있습니다 문자열 값만 그렇지 않으면 매개 변수, **콜백** 전달 `[null]` 될 것입니다.. + +## insertCSS + +> 주사로 CSS는 `InAppBrowser` 창. + + ref.insertCSS(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스타일 시트의 URL. + * **코드**: 삽입 하는 스타일 시트의 텍스트. + + * **콜백**: CSS 주입 후 실행 기능. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/index.md new file mode 100644 index 0000000..d1b3ddb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ko/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +이 플러그인 `코르도바를 호출할 때 표시 하는 웹 브라우저 보기를 제공 합니다.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`코르도바입니다.InAppBrowser.open()` 함수 `window.open ()` 함수에 대 한 대체품 정의 됩니다. 기존의 `window.open ()` 호출 window.open을 대체 하 여 InAppBrowser 윈도우를 사용할 수 있습니다. + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 창 표준 웹 브라우저 처럼 동작 및 코르도바 Api에 액세스할 수 없습니다. 이 이유는 InAppBrowser는 것이 좋습니다는 주요 코르도바 webview로 로드 하는 대신 제 3 자 (신뢰할 수 없는) 콘텐츠를 로드 해야 할 경우. InAppBrowser는 허용 될 수도 시스템 브라우저에서 링크를 여는. + +사용자에 대 한 자체 GUI 컨트롤에서 기본적으로 제공 된 InAppBrowser (뒤로, 앞으로, 완료). + +대 한 뒤 호환성,이 플러그인도 `window.open` 후크. 그러나, `window.open`의 플러그인 설치 후크를 가질 수 있습니다 의도 하지 않은 부작용 (특히 경우이 플러그인이 다른 플러그인 종속성 으로만 포함). `window.open` 후크 주요 릴리스에서 제거 됩니다. 후크 플러그인에서 제거 될 때까지 애플 리 케이 션 수 있습니다 수동으로 기본 동작을 복원 하 게 됩니다. + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` 전역 범위에 있지만 InAppBrowser 제공 되지 않습니다 때까지 `deviceready` 이벤트 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 설치 + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser를 통해가 서 당신의 애플 리 케이 션에서 모든 페이지를 로드 하려는 경우 초기화 하는 동안 `window.open` 간단 하 게 연결할 수 있습니다. 예를 들어: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +새 `InAppBrowser` 인스턴스, 현재 브라우저 인스턴스 또는 시스템 브라우저에서 URL을 엽니다. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **url**: *(문자열)를*로드 하는 URL. 전화 `encodeURI()` 이 경우에는 URL 유니코드 문자를 포함 합니다. + +* **대상**: 대상 URL, 기본적으로 선택적 매개 변수를 로드 하는 `_self` . *(문자열)* + + * `_self`: URL 화이트 리스트에 있으면 코르도바 WebView에서 열리고, 그렇지 않으면 열에`InAppBrowser`. + * `_blank`: 준공에`InAppBrowser`. + * `_system`: 시스템의 웹 브라우저에서 엽니다. + +* **옵션**: 옵션은 `InAppBrowser` . 선택적, 디폴트에: `location=yes` . *(문자열)* + + `options`문자열 텅 빈 어떤 스페이스 포함 해서는 안 그리고 쉼표 각 기능의 이름/값 쌍을 구분 합니다. 기능 이름은 대/소문자입니다. 모든 플랫폼 지원 아래 값: + + * **위치**: 설정 `yes` 또는 `no` 설정 하는 `InAppBrowser` 의 위치 표시줄 켜거나 끕니다. + + 안 드 로이드만: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + + iOS만: + + * **closebuttoncaption**: **수행** 하는 단추의 캡션으로 사용할 문자열을 설정 합니다. 참고 직접이 값을 지역화 해야 합니다. + * **disallowoverscroll**: 설정 `yes` 또는 `no` (기본값은 `no` ). 회전 온/오프 UIWebViewBounce 속성입니다. + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **도구 모음**: 설정 `yes` 또는 `no` InAppBrowser (기본값:에 대 한 도구 모음 온 / 오프를 돌기 위하여`yes`) + * **enableViewportScale**: 설정 `yes` 또는 `no` 뷰포트 메타 태그 (기본값:를 통해 확장을 방지 하기 위해`no`). + * **mediaPlaybackRequiresUserAction**: 설정 `yes` 또는 `no` HTML5 오디오 또는 비디오 자동 재생 (기본값에서에서 방지 하기 위해`no`). + * **allowInlineMediaPlayback**: 설정 `yes` 또는 `no` 인라인 HTML5 미디어 재생, 장치 전용 재생 인터페이스 보다는 브라우저 창 내에서 표시할 수 있도록 합니다. HTML의 `video` 요소가 포함 되어야 합니다는 `webkit-playsinline` 특성 (기본값:`no`) + * **keyboardDisplayRequiresUserAction**: 설정 `yes` 또는 `no` 양식 요소는 자바 스크립트를 통해 포커스를 받을 때 키보드를 열고 `focus()` 전화 (기본값:`yes`). + * **suppressesIncrementalRendering**: 설정 `yes` 또는 `no` (기본값을 렌더링 하기 전에 모든 새로운 보기 콘텐츠를 받을 때까지 기다려야`no`). + * **presentationstyle**: 설정 `pagesheet` , `formsheet` 또는 `fullscreen` [프레 젠 테이 션 스타일][1] (기본값을 설정 하려면`fullscreen`). + * **transitionstyle**: 설정 `fliphorizontal` , `crossdissolve` 또는 `coververtical` [전환 스타일][2] (기본값을 설정 하려면`coververtical`). + * **toolbarposition**: 설정 `top` 또는 `bottom` (기본값은 `bottom` ). 위쪽 또는 아래쪽 창에 도구 모음을 발생 합니다. + + Windows에만 해당: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* Firefox 운영 체제 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 예를 들어 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 파이어 폭스 OS 단점 + +플러그인 어떤 디자인을 적용 하지 않는 경우 열 일부 CSS의 규칙을 추가할 필요가 있다 `target='_blank'`. 이 같이 규칙 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +`Cordova에 대 한 호출에서 반환 하는 개체.InAppBrowser.open`. + +### 메서드 + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> 이벤트에 대 한 수신기를 추가 합니다`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +* **eventname**: *(문자열)를* 수신 하도록 이벤트 + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL을 로드할 때 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + +* **콜백**: 이벤트가 발생 될 때 실행 되는 함수. 함수는 전달 된 `InAppBrowserEvent` 개체를 매개 변수로 합니다. + +### InAppBrowserEvent 속성 + +* **유형**: eventname, 중 `loadstart` , `loadstop` , `loaderror` , 또는 `exit` . *(문자열)* + +* **url**: URL 로드 된. *(문자열)* + +* **코드**: 오류 코드의 경우에만 `loaderror` . *(수)* + +* **메시지**: 오류 메시지의 경우에만 `loaderror` . *(문자열)* + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 이벤트에 대 한 수신기를 제거 합니다`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **eventname**: 이벤트 수신 대기를 중지 합니다. *(문자열)* + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL 로드 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + +* **콜백**: 이벤트가 발생 하면 실행할 함수. 함수는 전달 된 `InAppBrowserEvent` 개체. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 종료는 `InAppBrowser` 창. + + ref.close(); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* Firefox 운영 체제 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 숨겨진 열은 한 InAppBrowser 창을 표시 합니다. 전화는 InAppBrowser가 이미 보이는 경우는 효과가 없습니다. + + ref.show(); + + +* **ref**: InAppBrowser 창 (참조`InAppBrowser`) + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 에 자바 스크립트 코드를 삽입는 `InAppBrowser` 창 + + ref.executeScript(details, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스크립트의 URL. + * **코드**: 스크립트 텍스트를 삽입 합니다. + +* **콜백**: 자바 스크립트 코드를 주입 후 실행 기능. + + * 삽입 된 스크립트 유형의 경우 `code` , 스크립트의 반환 값은 단일 매개 변수는 콜백 실행에 싸여 있는 `Array` . 여러 줄 스크립트에 대 한 마지막 문 또는 평가 마지막 식의 반환 값입니다. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> 주사로 CSS는 `InAppBrowser` 창. + + ref.insertCSS(details, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +* **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스타일 시트의 URL. + * **코드**: 삽입 하는 스타일 시트의 텍스트. + +* **콜백**: CSS 주입 후 실행 기능. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/README.md new file mode 100644 index 0000000..5ff58ad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Plugin daje widok przeglądarki sieci web, które są wyświetlane podczas wywoływania `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` funkcja jest definiowana jako zamiennik dla funkcji `window.open()`. Istniejące wywołania `window.open()` służy okno InAppBrowser, zastępując window.open: + + window.open = cordova.InAppBrowser.open; + + +Okna InAppBrowser zachowuje się jak standardowe przeglądarki i nie ma dostępu do API Cordova. Z tego powodu zaleca się InAppBrowser jeśli ty potrzebować wobec ciężar (niezaufanej) treści osób trzecich, a nie że wczytywanie głównym webview Cordova. InAppBrowser nie jest biała, ani nie jest otwieranie linków w przeglądarce systemu. + +InAppBrowser zawiera domyślnie kontrole GUI dla użytkownika (tył, przód, zrobić). + +Do tyłu zgodności, ten plugin również haki `window.open`. Jednak może mieć zainstalowane wtyczki haka `window.open` niezamierzone skutki uboczne (zwłaszcza, jeśli ten plugin jest włączone tylko jako część innej wtyczki). Hak `window.open` zostaną usunięte w przyszłej wersji głównych. Dopóki hak jest usuwany z wtyczki, aplikacje można ręcznie przywrócić domyślne zachowanie: + + delete window.open // Reverts the call back to it's prototype's default + + +Chociaż `window.open` w globalnym zasięgu, InAppBrowser nie jest dostępne dopiero po zdarzeniu `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalacja + + cordova plugin add cordova-plugin-inappbrowser + + +Jeśli chcesz wszystko stronica ładunki w swojej aplikacji, aby przejść przez InAppBrowser, można po prostu podłączyć `window.open` podczas inicjowania. Na przykład: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Otwiera URL w nowe wystąpienie `InAppBrowser`, bieżące wystąpienie przeglądarki lub przeglądarki systemu. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **adres**: adres URL do ładowania *(ciąg)*. Wywołanie `encodeURI()` na to, czy adres URL zawiera znaki Unicode. + + * **miejsce docelowe**: miejsce docelowe, w którym wobec ciężar ten URL parametr opcjonalny, który domyślnie `_self` . *(String)* + + * `_self`: Otwiera w Cordova WebView, jeśli adres URL jest na białej liście, inaczej ono otwiera w`InAppBrowser`. + * `_blank`: Otwiera w`InAppBrowser`. + * `_system`: Otwiera w przeglądarce internetowej systemu. + + * **Opcje**: opcje dla `InAppBrowser` . Opcjonalnie, nie stawiła się: `location=yes` . *(String)* + + `options`Ciąg nie może zawierać żadnych spacji, i pary nazwa/wartość każdej funkcji muszą być oddzielone przecinkami. Nazwy funkcji jest rozróżniana. Wszystkich platform obsługuje wartości poniżej: + + * **Lokalizacja**: zestaw `yes` lub `no` Aby włączyć `InAppBrowser` na pasek lub wyłączyć. + + Android: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **zoom**: `yes` aby pokazać formantami powiększania Android przeglądarka, ustawiona na `nie` aby je ukryć. Wartość domyślna to `tak`. + * **hardwareback**: zestaw do `yes` , aby użyć przycisk Wstecz sprzętu do nawigacji wstecz historii `InAppBrowser`. Jeśli nie ma żadnej poprzedniej strony, `InAppBrowser` zostanie zamknięta. Wartością domyślną jest `yes`, więc należy ustawić ją na `no` jeśli chcesz przycisk Wstecz, aby po prostu zamknąć InAppBrowser. + + tylko iOS: + + * **closebuttoncaption**: aby użyć jak **zrobić** przycisk Podpis ustawiona na ciąg. Należy pamiętać, że trzeba zlokalizować tę wartość siebie. + * **disallowoverscroll**: zestaw `yes` lub `no` (domyślnie `no` ). Włącza/wyłącza właściwość UIWebViewBounce. + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **pasek narzędzi**: zestaw `yes` lub `no` Aby włączyć pasek narzędzi lub wyłączyć dla InAppBrowser (domyślnie`yes`) + * **enableViewportScale**: zestaw `yes` lub `no` Aby zapobiec rzutni skalowanie za pomocą tagu meta (domyślnie`no`). + * **mediaPlaybackRequiresUserAction**: zestaw `yes` lub `no` Aby zapobiec HTML5 audio lub wideo z Autoodtwarzanie (domyślnie`no`). + * **allowInlineMediaPlayback**: zestaw `yes` lub `no` Aby w linii HTML5 odtwarzanie, wyświetlanie w oknie przeglądarki, a nie interfejs odtwarzanie specyficzne dla urządzenia. HTML `video` również musi zawierać element `webkit-playsinline` atrybut (domyślnie`no`) + * **keyboardDisplayRequiresUserAction**: zestaw `yes` lub `no` Aby otworzyć klawiaturę ekranową, gdy elementy formularza ostrości za pomocą JavaScript `focus()` połączenia (domyślnie`yes`). + * **suppressesIncrementalRendering**: zestaw `yes` lub `no` czekać, aż wszystkie nowe widok zawartości jest otrzymane przed renderowany (domyślnie`no`). + * **presentationstyle**: zestaw `pagesheet` , `formsheet` lub `fullscreen` Aby ustawić [styl prezentacji](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (domyślnie`fullscreen`). + * **transitionstyle**: zestaw `fliphorizontal` , `crossdissolve` lub `coververtical` Aby ustawić [styl przejścia](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (domyślnie`coververtical`). + * **toolbarposition**: zestaw `top` lub `bottom` (domyślnie `bottom` ). Powoduje, że pasek ma być na górze lub na dole okna. + + Windows tylko: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **fullscreen**: zestaw do `yes` , aby utworzyć formant przeglądarki bez obramowania wokół niego. Należy pamiętać, że jeśli **location=no** również jest określony, nie będzie żadnej kontroli przedstawione do użytkownika, aby zamknąć okno IAB. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS dziwactwa + +Jak plugin nie wymuszać każdy projekt to trzeba dodać pewne reguły CSS jeśli otwarty z `target = "_blank"`. Zasady może wyglądać jak te + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows dziwactwa + +Podobne do Firefox OS IAB okno wizualne zachowanie może być zastąpiona przez `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` klas CSS + +### Quirks przeglądarki + + * Plugin jest realizowane za pośrednictwem iframe, + + * Historia nawigacji (przyciski`wstecz` i `do przodu` w LocationBar) nie jest zaimplementowana. + +## InAppBrowser + +Obiekt zwrócony z wywołania `cordova.InAppBrowser.open`. + +### Metody + + * metody addEventListener + * removeEventListener + * Zamknij + * Pokaż + * executeScript + * insertCSS + +## metody addEventListener + +> Dodaje detektor zdarzenia z`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **EventName**: zdarzenie słuchać *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd podczas ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja, która wykonuje, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu jako parametr. + +### Właściwości InAppBrowserEvent + + * **Typ**: eventname, albo `loadstart` , `loadstop` , `loaderror` , lub `exit` . *(String)* + + * **adres**: adres URL, który został załadowany. *(String)* + + * **Kod**: kod błędu, tylko w przypadku `loaderror` . *(Liczba)* + + * **wiadomość**: komunikat o błędzie, tylko w przypadku `loaderror` . *(String)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Quirks przeglądarki + +wydarzenia `loadstart` i `loaderror` nie są być opalane. + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Usuwa detektor zdarzenia z`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **EventName**: zdarzenie przestanie słuchać. *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja do wykonania, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Zamknij + +> Zamyka `InAppBrowser` okna. + + ref.close(); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Pokaż + +> Wyświetla InAppBrowser okno, który został otwarty ukryte. Zawód ten jest ignorowany, jeśli InAppBrowser już był widoczny. + + ref.show(); + + + * **ref**: odwołanie do InAppBrowser (okno`InAppBrowser`) + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Wstrzykuje kod JavaScript w `InAppBrowser` okna + + ref.executeScript(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: adres URL skryptu, aby wstrzyknąć. + * **Kod**: tekst skryptu, aby wstrzyknąć. + + * **wywołania zwrotnego**: funkcja, która wykonuje po kod JavaScript jest wstrzykiwany. + + * Jeśli taki skrypt jest typu `code` , wykonuje wywołanie zwrotne z pojedynczym parametrem, który jest wartość zwracana przez skrypt, owinięte w `Array` . Dla wielu linii skrypty to wartość zwracana ostatniej instrukcja, lub ostatni wyrażenie oceniane. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Quirks przeglądarki + + * obsługiwany jest tylko **code** klucza. + +### Windows dziwactwa + +Ze względu na [MSDN dokumenty](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) wywołany skrypt może zwracać tylko wartości ciągów, inaczej parametr, przekazywany do **wywołania zwrotnego** będzie `[null]`. + +## insertCSS + +> Wstrzykuje CSS w `InAppBrowser` okna. + + ref.insertCSS(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: URL arkusza stylów do wsuwania. + * **Kod**: tekst z arkusza stylów do wstrzykiwania. + + * **wywołania zwrotnego**: funkcja, która wykonuje po CSS jest wstrzykiwany. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/index.md new file mode 100644 index 0000000..dff9bf0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/pl/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Plugin daje widok przeglądarki sieci web, które są wyświetlane podczas wywoływania `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` funkcja jest definiowana jako zamiennik dla funkcji `window.open()`. Istniejące wywołania `window.open()` służy okno InAppBrowser, zastępując window.open: + + window.open = cordova.InAppBrowser.open; + + +Okna InAppBrowser zachowuje się jak standardowe przeglądarki i nie ma dostępu do API Cordova. Z tego powodu zaleca się InAppBrowser jeśli ty potrzebować wobec ciężar (niezaufanej) treści osób trzecich, a nie że wczytywanie głównym webview Cordova. InAppBrowser nie jest biała, ani nie jest otwieranie linków w przeglądarce systemu. + +InAppBrowser zawiera domyślnie kontrole GUI dla użytkownika (tył, przód, zrobić). + +Do tyłu zgodności, ten plugin również haki `window.open`. Jednak może mieć zainstalowane wtyczki haka `window.open` niezamierzone skutki uboczne (zwłaszcza, jeśli ten plugin jest włączone tylko jako część innej wtyczki). Hak `window.open` zostaną usunięte w przyszłej wersji głównych. Dopóki hak jest usuwany z wtyczki, aplikacje można ręcznie przywrócić domyślne zachowanie: + + delete window.open // Reverts the call back to it's prototype's default + + +Chociaż `window.open` w globalnym zasięgu, InAppBrowser nie jest dostępne dopiero po zdarzeniu `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalacja + + cordova plugin add cordova-plugin-inappbrowser + + +Jeśli chcesz wszystko stronica ładunki w swojej aplikacji, aby przejść przez InAppBrowser, można po prostu podłączyć `window.open` podczas inicjowania. Na przykład: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Otwiera URL w nowe wystąpienie `InAppBrowser`, bieżące wystąpienie przeglądarki lub przeglądarki systemu. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **adres**: adres URL do ładowania *(ciąg)*. Wywołanie `encodeURI()` na to, czy adres URL zawiera znaki Unicode. + +* **miejsce docelowe**: miejsce docelowe, w którym wobec ciężar ten URL parametr opcjonalny, który domyślnie `_self` . *(String)* + + * `_self`: Otwiera w Cordova WebView, jeśli adres URL jest na białej liście, inaczej ono otwiera w`InAppBrowser`. + * `_blank`: Otwiera w`InAppBrowser`. + * `_system`: Otwiera w przeglądarce internetowej systemu. + +* **Opcje**: opcje dla `InAppBrowser` . Opcjonalnie, nie stawiła się: `location=yes` . *(String)* + + `options`Ciąg nie może zawierać żadnych spacji, i pary nazwa/wartość każdej funkcji muszą być oddzielone przecinkami. Nazwy funkcji jest rozróżniana. Wszystkich platform obsługuje wartości poniżej: + + * **Lokalizacja**: zestaw `yes` lub `no` Aby włączyć `InAppBrowser` na pasek lub wyłączyć. + + Android: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + + tylko iOS: + + * **closebuttoncaption**: aby użyć jak **zrobić** przycisk Podpis ustawiona na ciąg. Należy pamiętać, że trzeba zlokalizować tę wartość siebie. + * **disallowoverscroll**: zestaw `yes` lub `no` (domyślnie `no` ). Włącza/wyłącza właściwość UIWebViewBounce. + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **pasek narzędzi**: zestaw `yes` lub `no` Aby włączyć pasek narzędzi lub wyłączyć dla InAppBrowser (domyślnie`yes`) + * **enableViewportScale**: zestaw `yes` lub `no` Aby zapobiec rzutni skalowanie za pomocą tagu meta (domyślnie`no`). + * **mediaPlaybackRequiresUserAction**: zestaw `yes` lub `no` Aby zapobiec HTML5 audio lub wideo z Autoodtwarzanie (domyślnie`no`). + * **allowInlineMediaPlayback**: zestaw `yes` lub `no` Aby w linii HTML5 odtwarzanie, wyświetlanie w oknie przeglądarki, a nie interfejs odtwarzanie specyficzne dla urządzenia. HTML `video` również musi zawierać element `webkit-playsinline` atrybut (domyślnie`no`) + * **keyboardDisplayRequiresUserAction**: zestaw `yes` lub `no` Aby otworzyć klawiaturę ekranową, gdy elementy formularza ostrości za pomocą JavaScript `focus()` połączenia (domyślnie`yes`). + * **suppressesIncrementalRendering**: zestaw `yes` lub `no` czekać, aż wszystkie nowe widok zawartości jest otrzymane przed renderowany (domyślnie`no`). + * **presentationstyle**: zestaw `pagesheet` , `formsheet` lub `fullscreen` Aby ustawić [styl prezentacji][1] (domyślnie`fullscreen`). + * **transitionstyle**: zestaw `fliphorizontal` , `crossdissolve` lub `coververtical` Aby ustawić [styl przejścia][2] (domyślnie`coververtical`). + * **toolbarposition**: zestaw `top` lub `bottom` (domyślnie `bottom` ). Powoduje, że pasek ma być na górze lub na dole okna. + + Windows tylko: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS dziwactwa + +Jak plugin nie wymuszać każdy projekt to trzeba dodać pewne reguły CSS jeśli otwarty z `target = "_blank"`. Zasady może wyglądać jak te + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +Obiekt zwrócony z wywołania `cordova.InAppBrowser.open`. + +### Metody + +* metody addEventListener +* removeEventListener +* Zamknij +* Pokaż +* executeScript +* insertCSS + +## metody addEventListener + +> Dodaje detektor zdarzenia z`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +* **EventName**: zdarzenie słuchać *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd podczas ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + +* **wywołania zwrotnego**: funkcja, która wykonuje, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu jako parametr. + +### Właściwości InAppBrowserEvent + +* **Typ**: eventname, albo `loadstart` , `loadstop` , `loaderror` , lub `exit` . *(String)* + +* **adres**: adres URL, który został załadowany. *(String)* + +* **Kod**: kod błędu, tylko w przypadku `loaderror` . *(Liczba)* + +* **wiadomość**: komunikat o błędzie, tylko w przypadku `loaderror` . *(String)* + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Usuwa detektor zdarzenia z`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **EventName**: zdarzenie przestanie słuchać. *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + +* **wywołania zwrotnego**: funkcja do wykonania, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Zamknij + +> Zamyka `InAppBrowser` okna. + + ref.close(); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Pokaż + +> Wyświetla InAppBrowser okno, który został otwarty ukryte. Zawód ten jest ignorowany, jeśli InAppBrowser już był widoczny. + + ref.show(); + + +* **ref**: odwołanie do InAppBrowser (okno`InAppBrowser`) + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Wstrzykuje kod JavaScript w `InAppBrowser` okna + + ref.executeScript(details, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: adres URL skryptu, aby wstrzyknąć. + * **Kod**: tekst skryptu, aby wstrzyknąć. + +* **wywołania zwrotnego**: funkcja, która wykonuje po kod JavaScript jest wstrzykiwany. + + * Jeśli taki skrypt jest typu `code` , wykonuje wywołanie zwrotne z pojedynczym parametrem, który jest wartość zwracana przez skrypt, owinięte w `Array` . Dla wielu linii skrypty to wartość zwracana ostatniej instrukcja, lub ostatni wyrażenie oceniane. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Wstrzykuje CSS w `InAppBrowser` okna. + + ref.insertCSS(details, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +* **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: URL arkusza stylów do wsuwania. + * **Kod**: tekst z arkusza stylów do wstrzykiwania. + +* **wywołania zwrotnego**: funkcja, która wykonuje po CSS jest wstrzykiwany. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ru/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ru/index.md new file mode 100644 index 0000000..3b4e967 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/ru/index.md @@ -0,0 +1,330 @@ + + +# cordova-plugin-inappbrowser + +Этот плагин обеспечивает представление веб-браузера, что показывает при вызове`window.open()`. + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + + +**Примечание**: InAppBrowser окно ведет себя как стандартный веб-браузер и не может доступ API Cordova. + +## Установка + + cordova plugin add cordova-plugin-inappbrowser + + +## window.open + +Открывает URL-адрес в новом `InAppBrowser` например, текущий экземпляр браузера или браузера системы. + + var ref = window.open(url, target, options); + + +* **ссылка**: ссылка для `InAppBrowser` окно. *(InAppBrowser)* + +* **URL**: URL-адрес для загрузки *(String)*. Вызвать `encodeURI()` на это, если URL-адрес содержит символы Unicode. + +* **Цель**: цель для загрузки URL-адреса, необязательный параметр, по умолчанию `_self` . *(Строка)* + + * `_self`: Открывается в Cordova WebView, если URL-адрес в белый список, в противном случае он открывается в`InAppBrowser`. + * `_blank`: Открывает в`InAppBrowser`. + * `_system`: Открывается в веб-браузера системы. + +* **опции**: параметры для `InAppBrowser` . Необязательный параметр, виновная в: `location=yes` . *(Строка)* + + `options`Строка не должна содержать каких-либо пустое пространство, и каждая функция пар имя/значение должны быть разделены запятой. Функция имена нечувствительны к регистру. Все платформы поддерживают исходное значение: + + * **Расположение**: равным `yes` или `no` превратить `InAppBrowser` в адресную строку или выключить. + + Только андроид: + + * **closebuttoncaption**: задайте строку для использования в качестве заголовка кнопки **сделали** . + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + * **ClearCache**: набор `yes` иметь браузера куки кэш очищен перед открытием нового окна + * **clearsessioncache**: значение `yes` иметь кэш cookie сеанса очищается перед открытием нового окна + + только iOS: + + * **closebuttoncaption**: задайте строку для использования в качестве заголовка кнопки **сделали** . Обратите внимание, что вам нужно самостоятельно локализовать это значение. + * **disallowoverscroll**: значение `yes` или `no` (по умолчанию `no` ). Включает/отключает свойство UIWebViewBounce. + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + * **ClearCache**: набор `yes` иметь браузера куки кэш очищен перед открытием нового окна + * **clearsessioncache**: значение `yes` иметь кэш cookie сеанса очищается перед открытием нового окна + * **панели инструментов**: набор `yes` или `no` для включения панели инструментов или выключить InAppBrowser (по умолчанию`yes`) + * **enableViewportScale**: значение `yes` или `no` для предотвращения просмотра, масштабирования через тег meta (по умолчанию`no`). + * **mediaPlaybackRequiresUserAction**: значение `yes` или `no` для предотвращения HTML5 аудио или видео от Автовоспроизведение (по умолчанию`no`). + * **allowInlineMediaPlayback**: значение `yes` или `no` чтобы разрешить воспроизведение мультимедиа HTML5 в строки, отображения в окне браузера, а не конкретного устройства воспроизведения интерфейс. HTML `video` элемент должен также включать `webkit-playsinline` атрибут (по умолчанию`no`) + * **keyboardDisplayRequiresUserAction**: значение `yes` или `no` чтобы открыть клавиатуру, когда формы элементы получают фокус через JavaScript в `focus()` вызов (по умолчанию`yes`). + * **suppressesIncrementalRendering**: значение `yes` или `no` ждать, пока все новое содержание представление получено до визуализации (по умолчанию`no`). + * **presentationstyle**: набор `pagesheet` , `formsheet` или `fullscreen` чтобы задать [стиль презентации][1] (по умолчанию`fullscreen`). + * **transitionstyle**: набор `fliphorizontal` , `crossdissolve` или `coververtical` чтобы задать [стиль перехода][2] (по умолчанию`coververtical`). + * **toolbarposition**: значение `top` или `bottom` (по умолчанию `bottom` ). Вызывает панели инструментов, чтобы быть в верхней или нижней части окна. + + Windows только: + + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Особенности Firefox OS + +Как плагин не применять любой дизайн есть необходимость добавить некоторые правила CSS, если открыт с `target='_blank'` . Правила может выглядеть как эти + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## Внутренний браузер + +Объект, возвращаемый из вызова`window.open`. + +### Методы + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Добавляет прослушиватель для события от`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ссылка**: ссылка для `InAppBrowser` окно *(InAppBrowser)* + +* **EventName**: событие для прослушивания *(String)* + + * **loadstart**: событие возникает, когда `InAppBrowser` начинает для загрузки URL-адреса. + * **loadstop**: событие возникает, когда `InAppBrowser` завершит загрузку URL-адреса. + * **loaderror**: событие возникает, когда `InAppBrowser` обнаруживает ошибку при загрузке URL-адреса. + * **выход**: возникает событие, когда `InAppBrowser` окно закрыто. + +* **обратного вызова**: функция, которая выполняется, когда возникает событие. Функция передается `InAppBrowserEvent` объект в качестве параметра. + +### InAppBrowserEvent свойства + +* **тип**: eventname, либо `loadstart` , `loadstop` , `loaderror` , или `exit` . *(Строка)* + +* **URL**: URL-адрес, который был загружен. *(Строка)* + +* **код**: код ошибки, только в случае `loaderror` . *(Число)* + +* **сообщение**: сообщение об ошибке, только в случае `loaderror` . *(Строка)* + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## метод removeEventListener + +> Удаляет прослушиватель для события от`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ссылка**: ссылка для `InAppBrowser` окно. *(InAppBrowser)* + +* **EventName**: событие прекратить прослушивание. *(Строка)* + + * **loadstart**: событие возникает, когда `InAppBrowser` начинает для загрузки URL-адреса. + * **loadstop**: событие возникает, когда `InAppBrowser` завершит загрузку URL-адреса. + * **loaderror**: событие возникает, когда `InAppBrowser` обнаруживает ошибку загрузки URL-адреса. + * **выход**: возникает событие, когда `InAppBrowser` окно закрывается. + +* **обратного вызова**: функция, выполняемая когда это событие наступает. Функция передается `InAppBrowserEvent` объект. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Закрывает `InAppBrowser` окно. + + Ref.Close(); + + +* **ссылка**: ссылка на `InAppBrowser` окно *(InAppBrowser)* + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Отображается окно InAppBrowser, был открыт скрытые. Вызов это не имеет эффекта при InAppBrowser уже был виден. + + Ref.Show(); + + +* **ссылка**: ссылка на окно (InAppBrowser`InAppBrowser`) + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Вставляет код JavaScript в `InAppBrowser` окно + + ref.executeScript(details, callback); + + +* **ссылка**: ссылка на `InAppBrowser` окно. *(InAppBrowser)* + +* **injectDetails**: подробности сценария для запуска, указав либо `file` или `code` ключ. *(Объект)* + + * **файл**: URL-адрес сценария вставки. + * **код**: текст сценария для вставки. + +* **обратного вызова**: функция, которая выполняет после вводят JavaScript-код. + + * Если введенный скрипт имеет тип `code` , обратный вызов выполняется с одним параметром, который является возвращаемое значение сценария, завернутые в `Array` . Для многострочных сценариев это возвращаемое значение последнего оператора, или последнее вычисленное выражение. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Внедряет CSS в `InAppBrowser` окно. + + ref.insertCSS(details, callback); + + +* **ссылка**: ссылка на `InAppBrowser` окно *(InAppBrowser)* + +* **injectDetails**: детали сценария для запуска, указав либо `file` или `code` ключ. *(Объект)* + + * **файл**: URL-адрес таблицы стилей для вставки. + * **код**: текст таблицы стилей для вставки. + +* **обратного вызова**: функция, которая выполняет после вводят CSS. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/README.md new file mode 100644 index 0000000..7d33d89 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +這個外掛程式提供了一個 web 瀏覽器視圖,顯示在調用 `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` 函數被定義為一個臨時替代 `window.open ()` 函數。 現有 `window.open ()` 調用,可以通過替換 window.open 使用 InAppBrowser 視窗: + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 視窗像一個標準的 web 瀏覽器中,並且無法訪問科爾多瓦 Api。 為此,建議 InAppBrowser 如果您需要載入協力廠商 (不可信) 的內容,而不是載入,進入主要的科爾多瓦 web 視圖。 InAppBrowser 是不受白名單中,也不在系統瀏覽器中打開的連結。 + +InAppBrowser 預設情況下它自己的 GUI 控制項為使用者提供 (後退、 前進、 完成)。 + +為向後相容性,此外掛程式還鉤 `window.open`。 然而,`window.open` 外掛程式安裝鉤子可以有副作用 (尤其是如果這個外掛程式是只列為另一個外掛程式的依賴項)。 在未來的主要發行版本中,將刪除 `window.open` 鉤。 一直至從該外掛程式鉤子後,應用程式可以手動還原預設行為: + + delete window.open // Reverts the call back to it's prototype's default + + +雖然 `window.open` 在全球範圍內,InAppBrowser 不可用直到 `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 安裝 + + cordova plugin add cordova-plugin-inappbrowser + + +如果您希望所有頁面載入中您的應用程式要通過 InAppBrowser,你可以簡單地在初始化過程中鉤 `window.open`。舉個例子: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +在新的 `InAppBrowser` 實例,當前的瀏覽器實例或系統瀏覽器中打開的 URL。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **url**: 要載入*(字串)*的 URL。調用 `encodeURI()` 這個如果 URL 包含 Unicode 字元。 + + * **target**: 目標在其中載入的 URL,可選參數,預設值為 `_self` 。*(字串)* + + * `_self`: 打開在科爾多瓦 web 視圖如果 URL 是在白名單中,否則它在打開`InAppBrowser`. + * `_blank`: 在打開`InAppBrowser`. + * `_system`: 在該系統的 web 瀏覽器中打開。 + + * **options**: 選項為 `InAppBrowser` 。可選,拖欠到: `location=yes` 。*(字串)* + + `options`字串必須不包含任何空白的空間,和必須用逗號分隔每個功能的名稱/值對。 功能名稱區分大小寫。 所有平臺都支援下面的值: + + * **location**: 設置為 `yes` 或 `no` ,打開 `InAppBrowser` 的位置欄打開或關閉。 + + Android 系統只有: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **zoom**: 設置為`yes`,顯示 Android 瀏覽器的縮放控制項,設置為`no`,以隱藏它們。 `預設值是`. + * **hardwareback**: 設置為`yes`要使用硬體後退按鈕通過`InAppBrowser`的歷史向後導航。 如果沒有前一頁, `InAppBrowser`將會關閉。 預設值是的`yes`所以你必須將其設置為`no`,如果你想要的後退按鈕,只需關閉 InAppBrowser。 + + 只有 iOS: + + * **closebuttoncaption**: 設置為一個字串,以用作**做**按鈕的標題。請注意您需要對此值進行當地語系化你自己。 + * **disallowoverscroll**: 將設置為 `yes` 或 `no` (預設值是 `no` )。打開/關閉的 UIWebViewBounce 屬性。 + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **toolbar**: 設置為 `yes` 或 `no` ,為 InAppBrowser (預設為打開或關閉工具列`yes`) + * **enableViewportScale**: 將設置為 `yes` 或 `no` ,防止通過 meta 標記 (預設為縮放的視區`no`). + * **mediaPlaybackRequiresUserAction**: 將設置為 `yes` 或 `no` ,防止 HTML5 音訊或視頻從 autoplaying (預設為`no`). + * **allowInlineMediaPlayback**: 將設置為 `yes` 或 `no` ,讓線在 HTML5 播放媒體,在瀏覽器視窗中,而不是特定于設備播放介面內顯示。 HTML 的 `video` 元素還必須包括 `webkit-playsinline` 屬性 (預設為`no`) + * **keyboardDisplayRequiresUserAction**: 將設置為 `yes` 或 `no` 時,要打開鍵盤表單元素接收焦點通過 JavaScript 的 `focus()` 調用 (預設為`yes`). + * **suppressesIncrementalRendering**: 將設置為 `yes` 或 `no` 等待,直到所有新查看的內容正在呈現 (預設為前收到`no`). + * **presentationstyle**: 將設置為 `pagesheet` , `formsheet` 或 `fullscreen` 來設置[演示文稿樣式](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)(預設為`fullscreen`). + * **transitionstyle**: 將設置為 `fliphorizontal` , `crossdissolve` 或 `coververtical` 設置[過渡樣式](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)(預設為`coververtical`). + * **toolbarposition**: 將設置為 `top` 或 `bottom` (預設值是 `bottom` )。使工具列,則在頂部或底部的視窗。 + + 僅限 Windows: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **fullscreen**: 設置為`yes`,以創建無邊框的瀏覽器控制項。 請注意,如果**location=no**同時指定,則將呈現給使用者到密切 IAB 視窗沒有控制。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 黑莓 10 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 火狐瀏覽器作業系統的怪癖 + +外掛程式不會強制任何設計是需要添加一些 CSS 規則,如果打開與 `target=_blank`。規則 》 可能看起來像這些 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows 的怪癖 + +類似于 Firefox OS IAB 視窗視覺行為可以重寫通過`inAppBrowserWrap`/`inAppBrowserWrapFullscreen`的 CSS 類 + +### 瀏覽器的怪癖 + + * 外掛程式是通過 iframe,執行 + + * 未實現導航歷史記錄 (在 LocationBar 的`回顧`與`展望`按鈕)。 + +## InAppBrowser + +對 `科爾多瓦的調用返回的物件。InAppBrowser.open`. + +### 方法 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 為事件添加一個攔截器`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **eventname**: 事件偵聽*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 載入 URL 時遇到錯誤。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 執行時觸發該事件的函數。該函數通過 `InAppBrowserEvent` 物件作為參數。 + +### InAppBrowserEvent 屬性 + + * **type**: eventname,或者 `loadstart` , `loadstop` , `loaderror` ,或 `exit` 。*(字串)* + + * **url**: 已載入的 URL。*(字串)* + + * **code**: 僅中的情況的錯誤代碼 `loaderror` 。*(人數)* + + * **message**: 該錯誤訊息,只有在的情況下 `loaderror` 。*(字串)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 瀏覽器的怪癖 + +`loadstart`和`loaderror`的事件不會被觸發。 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 移除的事件攔截器`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **eventname**: 要停止偵聽的事件。*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 遇到錯誤載入一個 URL。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 要在事件觸發時執行的函數。該函數通過 `InAppBrowserEvent` 物件。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 關閉 `InAppBrowser` 視窗。 + + ref.close(); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 顯示打開了隱藏的 InAppBrowser 視窗。調用這沒有任何影響,如果 InAppBrowser 是已經可見。 + + ref.show(); + + + * **ref**: InAppBrowser 視窗 (參考`InAppBrowser`) + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 注入到 JavaScript 代碼 `InAppBrowser` 視窗 + + ref.executeScript(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **檔**: 腳本的 URL 來注入。 + * **代碼**: 要注入腳本的文本。 + + * **回檔**: 執行後注入的 JavaScript 代碼的函數。 + + * 如果插入的腳本的類型 `code` ,回檔執行使用單個參數,這是該腳本的傳回值,裹在 `Array` 。 對於多行腳本,這是最後一條語句或最後計算的運算式的傳回值。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 瀏覽器的怪癖 + + * 只有**code**關鍵被支援。 + +### Windows 的怪癖 + +由於[MSDN 文檔](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)調用的腳本可以返回唯一字串值,否則該參數,傳遞給**回檔**將是`[null]`. + +## insertCSS + +> 注入到 CSS `InAppBrowser` 視窗。 + + ref.insertCSS(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **file**: 樣式表的 URL 來注入。 + * **code**: 文本樣式表的注入。 + + * **callback**: 在 CSS 注射後執行的函數。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/index.md new file mode 100644 index 0000000..c12c046 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/doc/zh/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +這個外掛程式提供了一個 web 瀏覽器視圖,顯示在調用 `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` 函數被定義為一個臨時替代 `window.open ()` 函數。 現有 `window.open ()` 調用,可以通過替換 window.open 使用 InAppBrowser 視窗: + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 視窗像一個標準的 web 瀏覽器中,並且無法訪問科爾多瓦 Api。 為此,建議 InAppBrowser 如果您需要載入協力廠商 (不可信) 的內容,而不是載入,進入主要的科爾多瓦 web 視圖。 InAppBrowser 是不受白名單中,也不在系統瀏覽器中打開的連結。 + +InAppBrowser 預設情況下它自己的 GUI 控制項為使用者提供 (後退、 前進、 完成)。 + +為向後相容性,此外掛程式還鉤 `window.open`。 然而,`window.open` 外掛程式安裝鉤子可以有副作用 (尤其是如果這個外掛程式是只列為另一個外掛程式的依賴項)。 在未來的主要發行版本中,將刪除 `window.open` 鉤。 一直至從該外掛程式鉤子後,應用程式可以手動還原預設行為: + + delete window.open // Reverts the call back to it's prototype's default + + +雖然 `window.open` 在全球範圍內,InAppBrowser 不可用直到 `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 安裝 + + cordova plugin add cordova-plugin-inappbrowser + + +如果您希望所有頁面載入中您的應用程式要通過 InAppBrowser,你可以簡單地在初始化過程中鉤 `window.open`。舉個例子: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +在新的 `InAppBrowser` 實例,當前的瀏覽器實例或系統瀏覽器中打開的 URL。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **url**: 要載入*(字串)*的 URL。調用 `encodeURI()` 這個如果 URL 包含 Unicode 字元。 + +* **target**: 目標在其中載入的 URL,可選參數,預設值為 `_self` 。*(字串)* + + * `_self`: 打開在科爾多瓦 web 視圖如果 URL 是在白名單中,否則它在打開`InAppBrowser`. + * `_blank`: 在打開`InAppBrowser`. + * `_system`: 在該系統的 web 瀏覽器中打開。 + +* **options**: 選項為 `InAppBrowser` 。可選,拖欠到: `location=yes` 。*(字串)* + + `options`字串必須不包含任何空白的空間,和必須用逗號分隔每個功能的名稱/值對。 功能名稱區分大小寫。 所有平臺都支援下面的值: + + * **location**: 設置為 `yes` 或 `no` ,打開 `InAppBrowser` 的位置欄打開或關閉。 + + Android 系統只有: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + + 只有 iOS: + + * **closebuttoncaption**: 設置為一個字串,以用作**做**按鈕的標題。請注意您需要對此值進行當地語系化你自己。 + * **disallowoverscroll**: 將設置為 `yes` 或 `no` (預設值是 `no` )。打開/關閉的 UIWebViewBounce 屬性。 + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **toolbar**: 設置為 `yes` 或 `no` ,為 InAppBrowser (預設為打開或關閉工具列`yes`) + * **enableViewportScale**: 將設置為 `yes` 或 `no` ,防止通過 meta 標記 (預設為縮放的視區`no`). + * **mediaPlaybackRequiresUserAction**: 將設置為 `yes` 或 `no` ,防止 HTML5 音訊或視頻從 autoplaying (預設為`no`). + * **allowInlineMediaPlayback**: 將設置為 `yes` 或 `no` ,讓線在 HTML5 播放媒體,在瀏覽器視窗中,而不是特定于設備播放介面內顯示。 HTML 的 `video` 元素還必須包括 `webkit-playsinline` 屬性 (預設為`no`) + * **keyboardDisplayRequiresUserAction**: 將設置為 `yes` 或 `no` 時,要打開鍵盤表單元素接收焦點通過 JavaScript 的 `focus()` 調用 (預設為`yes`). + * **suppressesIncrementalRendering**: 將設置為 `yes` 或 `no` 等待,直到所有新查看的內容正在呈現 (預設為前收到`no`). + * **presentationstyle**: 將設置為 `pagesheet` , `formsheet` 或 `fullscreen` 來設置[演示文稿樣式][1](預設為`fullscreen`). + * **transitionstyle**: 將設置為 `fliphorizontal` , `crossdissolve` 或 `coververtical` 設置[過渡樣式][2](預設為`coververtical`). + * **toolbarposition**: 將設置為 `top` 或 `bottom` (預設值是 `bottom` )。使工具列,則在頂部或底部的視窗。 + + 僅限 Windows: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器並載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或被設置為 `no` (預設值),有的瀏覽器打開,以正常方式載入。 + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* 火狐瀏覽器的作業系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 火狐瀏覽器作業系統的怪癖 + +外掛程式不會強制任何設計是需要添加一些 CSS 規則,如果打開與 `target=_blank`。規則 》 可能看起來像這些 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +對 `科爾多瓦的調用返回的物件。InAppBrowser.open`. + +### 方法 + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> 為事件添加一個攔截器`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +* **eventname**: 事件偵聽*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 載入 URL 時遇到錯誤。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + +* **callback**: 執行時觸發該事件的函數。該函數通過 `InAppBrowserEvent` 物件作為參數。 + +### InAppBrowserEvent 屬性 + +* **type**: eventname,或者 `loadstart` , `loadstop` , `loaderror` ,或 `exit` 。*(字串)* + +* **url**: 已載入的 URL。*(字串)* + +* **code**: 僅中的情況的錯誤代碼 `loaderror` 。*(人數)* + +* **message**: 該錯誤訊息,只有在的情況下 `loaderror` 。*(字串)* + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 移除的事件攔截器`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **eventname**: 要停止偵聽的事件。*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 遇到錯誤載入一個 URL。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + +* **callback**: 要在事件觸發時執行的函數。該函數通過 `InAppBrowserEvent` 物件。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 關閉 `InAppBrowser` 視窗。 + + ref.close(); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 火狐瀏覽器的作業系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 顯示打開了隱藏的 InAppBrowser 視窗。調用這沒有任何影響,如果 InAppBrowser 是已經可見。 + + ref.show(); + + +* **ref**: InAppBrowser 視窗 (參考`InAppBrowser`) + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 注入到 JavaScript 代碼 `InAppBrowser` 視窗 + + ref.executeScript(details, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **檔**: 腳本的 URL 來注入。 + * **代碼**: 要注入腳本的文本。 + +* **回檔**: 執行後注入的 JavaScript 代碼的函數。 + + * 如果插入的腳本的類型 `code` ,回檔執行使用單個參數,這是該腳本的傳回值,裹在 `Array` 。 對於多行腳本,這是最後一條語句或最後計算的運算式的傳回值。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> 注入到 CSS `InAppBrowser` 視窗。 + + ref.insertCSS(details, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +* **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **file**: 樣式表的 URL 來注入。 + * **code**: 文本樣式表的注入。 + +* **callback**: 在 CSS 注射後執行的函數。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/package.json new file mode 100644 index 0000000..160902e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/package.json @@ -0,0 +1,48 @@ +{ + "name": "cordova-plugin-inappbrowser", + "version": "1.3.0", + "description": "Cordova InAppBrowser Plugin", + "cordova": { + "id": "cordova-plugin-inappbrowser", + "platforms": [ + "android", + "amazon-fireos", + "ubuntu", + "ios", + "wp7", + "wp8", + "windows8", + "windows", + "firefoxos" + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/apache/cordova-plugin-inappbrowser" + }, + "keywords": [ + "cordova", + "in", + "app", + "browser", + "inappbrowser", + "ecosystem:cordova", + "cordova-android", + "cordova-amazon-fireos", + "cordova-ubuntu", + "cordova-ios", + "cordova-wp7", + "cordova-wp8", + "cordova-windows8", + "cordova-windows", + "cordova-firefoxos" + ], + "engines": [ + { + "name": "cordova", + "version": ">=3.1.0" + } + ], + "author": "Apache Software Foundation", + "license": "Apache-2.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/plugin.xml new file mode 100644 index 0000000..c3f5cc9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/plugin.xml @@ -0,0 +1,227 @@ + + + + + + InAppBrowser + Cordova InAppBrowser Plugin + Apache 2.0 + cordova,in,app,browser,inappbrowser + https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git + https://issues.apache.org/jira/browse/CB/component/12320641 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java new file mode 100644 index 0000000..0263ea2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java @@ -0,0 +1,846 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.annotation.SuppressLint; +import org.apache.cordova.inappbrowser.InAppBrowserDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.Log; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import com.amazon.android.webkit.AmazonWebChromeClient; +import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; +import com.amazon.android.webkit.AmazonJsPromptResult; +import com.amazon.android.webkit.AmazonWebSettings; +import com.amazon.android.webkit.AmazonWebStorage; +import com.amazon.android.webkit.AmazonWebView; +import com.amazon.android.webkit.AmazonWebViewClient; +import com.amazon.android.webkit.AmazonCookieManager; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.Config; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.apache.cordova.CordovaActivity; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.HashMap; +import java.util.StringTokenizer; + +@SuppressLint("SetJavaScriptEnabled") +public class InAppBrowser extends CordovaPlugin { + + private static final String NULL = "null"; + protected static final String LOG_TAG = "InAppBrowser"; + private static final String SELF = "_self"; + private static final String SYSTEM = "_system"; + // private static final String BLANK = "_blank"; + private static final String EXIT_EVENT = "exit"; + private static final String LOCATION = "location"; + private static final String HIDDEN = "hidden"; + private static final String ZOOM = "zoom"; + private static final String LOAD_START_EVENT = "loadstart"; + private static final String LOAD_STOP_EVENT = "loadstop"; + private static final String LOAD_ERROR_EVENT = "loaderror"; + private static final String CLEAR_ALL_CACHE = "clearcache"; + private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; + + private InAppBrowserDialog dialog; + private AmazonWebView inAppWebView; + private EditText edittext; + private CallbackContext callbackContext; + private boolean showLocationBar = true; + private boolean showZoomControls = true; + private boolean openWindowHidden = false; + private boolean clearAllCache= false; + private boolean clearSessionCache=false; + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackId The callback id used when calling back into JavaScript. + * @return A PluginResult object with a status and message. + */ + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("open")) { + this.callbackContext = callbackContext; + final String url = args.getString(0); + String t = args.optString(1); + if (t == null || t.equals("") || t.equals(NULL)) { + t = SELF; + } + final String target = t; + final HashMap features = parseFeature(args.optString(2)); + + Log.d(LOG_TAG, "target = " + target); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + String result = ""; + // SELF + if (SELF.equals(target)) { + Log.d(LOG_TAG, "in self"); + // load in webview + if (url.startsWith("file://") || url.startsWith("javascript:") + || Config.isUrlWhiteListed(url)) { + Log.d(LOG_TAG, "loading in webview"); + webView.loadUrl(url); + } + //Load the dialer + else if (url.startsWith(AmazonWebView.SCHEME_TEL)) + { + try { + Log.d(LOG_TAG, "loading in dialer"); + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + // load in InAppBrowser + else { + Log.d(LOG_TAG, "loading in InAppBrowser"); + result = showWebPage(url, features); + } + } + // SYSTEM + else if (SYSTEM.equals(target)) { + Log.d(LOG_TAG, "in system"); + result = openExternal(url); + } + // BLANK - or anything else + else { + Log.d(LOG_TAG, "in blank"); + result = showWebPage(url, features); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + } + }); + } + else if (action.equals("close")) { + closeDialog(); + } + else if (action.equals("injectScriptCode")) { + String jsWrapper = null; + if (args.getBoolean(1)) { + jsWrapper = String.format("prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')", callbackContext.getCallbackId()); + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectScriptFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleCode")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("show")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.show(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else { + return false; + } + return true; + } + + /** + * Called when the view navigates. + */ + @Override + public void onReset() { + closeDialog(); + } + + /** + * Called by AccelBroker when listener is to be shut down. + * Stop listener. + */ + public void onDestroy() { + closeDialog(); + } + + /** + * Inject an object (script or style) into the InAppBrowser AmazonWebView. + * + * This is a helper method for the inject{Script|Style}{Code|File} API calls, which + * provides a consistent method for injecting JavaScript code into the document. + * + * If a wrapper string is supplied, then the source string will be JSON-encoded (adding + * quotes) and wrapped using string formatting. (The wrapper string should have a single + * '%s' marker) + * + * @param source The source object (filename or script/style text) to inject into + * the document. + * @param jsWrapper A JavaScript string to wrap the source string in, so that the object + * is properly injected, or null if the source string is JavaScript text + * which should be executed directly. + */ + private void injectDeferredObject(String source, String jsWrapper) { + final String scriptToInject; + if (jsWrapper != null) { + org.json.JSONArray jsonEsc = new org.json.JSONArray(); + jsonEsc.put(source); + String jsonRepr = jsonEsc.toString(); + String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); + scriptToInject = String.format(jsWrapper, jsonSourceString); + } else { + scriptToInject = source; + } + final String finalScriptToInject = scriptToInject; + this.cordova.getActivity().runOnUiThread(new Runnable() { + @SuppressLint("NewApi") + @Override + public void run() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // This action will have the side-effect of blurring the currently focused element + inAppWebView.loadUrl("javascript:" + finalScriptToInject); + } /*else { + inAppWebView.evaluateJavascript(finalScriptToInject, null); + }*/ + } + }); + } + + /** + * Put the list of features into a hash map + * + * @param optString + * @return + */ + private HashMap parseFeature(String optString) { + if (optString.equals(NULL)) { + return null; + } else { + HashMap map = new HashMap(); + StringTokenizer features = new StringTokenizer(optString, ","); + StringTokenizer option; + while(features.hasMoreElements()) { + option = new StringTokenizer(features.nextToken(), "="); + if (option.hasMoreElements()) { + String key = option.nextToken(); + Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + map.put(key, value); + } + } + return map; + } + } + + /** + * Display a new browser with the specified URL. + * + * @param url The url to load. + * @param usePhoneGap Load url in PhoneGap webview + * @return "" if ok, or error message. + */ + public String openExternal(String url) { + try { + Intent intent = null; + intent = new Intent(Intent.ACTION_VIEW); + // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". + // Adding the MIME type to http: URLs causes them to not be handled by the downloader. + Uri uri = Uri.parse(url); + if ("file".equals(uri.getScheme())) { + intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); + } else { + intent.setData(uri); + } + this.cordova.getActivity().startActivity(intent); + return ""; + } catch (android.content.ActivityNotFoundException e) { + Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); + return e.toString(); + } + } + + /** + * Closes the dialog + */ + public void closeDialog() { + final AmazonWebView childView = this.inAppWebView; + // The JS protects against multiple calls, so this should happen only when + // closeDialog() is called by other native code. + if (childView == null) { + return; + } + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + childView.setWebViewClient(new AmazonWebViewClient() { + // NB: wait for about:blank before dismissing + public void onPageFinished(AmazonWebView view, String url) { + if (dialog != null) { + dialog.dismiss(); + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread + // other than your app's UI thread, it can cause unexpected results." + // http://developer.android.com/guide/webapps/migrating.html#Threads + childView.loadUrl("about:blank"); + } + }); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", EXIT_EVENT); + sendUpdate(obj, false); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + /** + * Checks to see if it is possible to go back one page in history, then does so. + */ + private void goBack() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (InAppBrowser.this.inAppWebView.canGoBack()) { + InAppBrowser.this.inAppWebView.goBack(); + } + } + }); + } + + /** + * Checks to see if it is possible to go forward one page in history, then does so. + */ + private void goForward() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (InAppBrowser.this.inAppWebView.canGoForward()) { + InAppBrowser.this.inAppWebView.goForward(); + } + } + }); + } + + /** + * Navigate to the new page + * + * @param url to load + */ + private void navigate(final String url) { + InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (!url.startsWith("http") && !url.startsWith("file:")) { + InAppBrowser.this.inAppWebView.loadUrl("http://" + url); + } else { + InAppBrowser.this.inAppWebView.loadUrl(url); + } + InAppBrowser.this.inAppWebView.requestFocus(); + } + }); + } + + + /** + * Should we show the location bar? + * + * @return boolean + */ + private boolean getShowLocationBar() { + return this.showLocationBar; + } + + /** + * Should we show the zoom controls? + * + * @return boolean + */ + private boolean getShowZoomControls() { + return this.showZoomControls; + } + + private InAppBrowser getInAppBrowser(){ + return this; + } + + /** + * Display a new browser with the specified URL. + * + * @param url The url to load. + * @param jsonObject + */ + public String showWebPage(final String url, HashMap features) { + // Determine if we should hide the location bar. + showLocationBar = true; + showZoomControls = true; + openWindowHidden = false; + if (features != null) { + Boolean show = features.get(LOCATION); + if (show != null) { + showLocationBar = show.booleanValue(); + } + Boolean zoom = features.get(ZOOM); + if (zoom != null) { + showZoomControls = zoom.booleanValue(); + } + Boolean hidden = features.get(HIDDEN); + if (hidden != null) { + openWindowHidden = hidden.booleanValue(); + } + Boolean cache = features.get(CLEAR_ALL_CACHE); + if (cache != null) { + clearAllCache = cache.booleanValue(); + } else { + cache = features.get(CLEAR_SESSION_CACHE); + if (cache != null) { + clearSessionCache = cache.booleanValue(); + } + } + } + + final CordovaWebView thatWebView = this.webView; + + // Create dialog in new thread + Runnable runnable = new Runnable() { + /** + * Convert our DIP units to Pixels + * + * @return int + */ + private int dpToPixels(int dipValue) { + int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() + ); + + return value; + } + + @SuppressLint("NewApi") + public void run() { + // Let's create the main dialog + dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); + dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setCancelable(true); + dialog.setInAppBroswer(getInAppBrowser()); + + // Main container layout + LinearLayout main = new LinearLayout(cordova.getActivity()); + main.setOrientation(LinearLayout.VERTICAL); + + // Toolbar layout + RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); + //Please, no more black! + toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); + toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); + toolbar.setHorizontalGravity(Gravity.LEFT); + toolbar.setVerticalGravity(Gravity.TOP); + + // Action Button Container layout + RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); + actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + actionButtonContainer.setHorizontalGravity(Gravity.LEFT); + actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); + actionButtonContainer.setId(1); + + // Back button + Button back = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); + back.setLayoutParams(backLayoutParams); + back.setContentDescription("Back Button"); + back.setId(2); + Resources activityRes = cordova.getActivity().getResources(); + int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); + Drawable backIcon = activityRes.getDrawable(backResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + back.setBackgroundDrawable(backIcon); + } + else + { + back.setBackground(backIcon); + } + + back.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goBack(); + } + }); + + // Forward button + Button forward = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); + forward.setLayoutParams(forwardLayoutParams); + forward.setContentDescription("Forward Button"); + forward.setId(3); + int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); + Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + forward.setBackgroundDrawable(fwdIcon); + } + else + { + forward.setBackground(fwdIcon); + } + forward.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goForward(); + } + }); + + // Edit Text Box + edittext = new EditText(cordova.getActivity()); + RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); + textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); + edittext.setLayoutParams(textLayoutParams); + edittext.setId(4); + edittext.setSingleLine(true); + edittext.setText(url); + edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + edittext.setImeOptions(EditorInfo.IME_ACTION_GO); + edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE + edittext.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + navigate(edittext.getText().toString()); + return true; + } + return false; + } + }); + + // Close/Done button + Button close = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + forward.setContentDescription("Close Button"); + close.setId(5); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + close.setBackgroundDrawable(closeIcon); + } + else + { + close.setBackground(closeIcon); + } + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + // WebView + inAppWebView = new AmazonWebView(cordova.getActivity()); + + CordovaActivity app = (CordovaActivity) cordova.getActivity(); + cordova.getFactory().initializeWebView(inAppWebView, 0x00FF00, false, null); + + inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView)); + AmazonWebViewClient client = new InAppBrowserClient(thatWebView, edittext); + inAppWebView.setWebViewClient(client); + AmazonWebSettings settings = inAppWebView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setBuiltInZoomControls(getShowZoomControls()); + settings.setPluginState(com.amazon.android.webkit.AmazonWebSettings.PluginState.ON); + + //Toggle whether this is enabled or not! + Bundle appSettings = cordova.getActivity().getIntent().getExtras(); + boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); + if (enableDatabase) { + String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); + settings.setDatabasePath(databasePath); + settings.setDatabaseEnabled(true); + } + settings.setDomStorageEnabled(true); + + if (clearAllCache) { + AmazonCookieManager.getInstance().removeAllCookie(); + } else if (clearSessionCache) { + AmazonCookieManager.getInstance().removeSessionCookie(); + } + + inAppWebView.loadUrl(url); + inAppWebView.setId(6); + inAppWebView.getSettings().setLoadWithOverviewMode(true); + inAppWebView.getSettings().setUseWideViewPort(true); + inAppWebView.requestFocus(); + inAppWebView.requestFocusFromTouch(); + + // Add the back and forward buttons to our action button container layout + actionButtonContainer.addView(back); + actionButtonContainer.addView(forward); + + // Add the views to our toolbar + toolbar.addView(actionButtonContainer); + toolbar.addView(edittext); + toolbar.addView(close); + + // Don't add the toolbar if its been disabled + if (getShowLocationBar()) { + // Add our toolbar to our main view/layout + main.addView(toolbar); + } + + // Add our webview to our main view/layout + main.addView(inAppWebView); + + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); + lp.copyFrom(dialog.getWindow().getAttributes()); + lp.width = WindowManager.LayoutParams.MATCH_PARENT; + lp.height = WindowManager.LayoutParams.MATCH_PARENT; + + dialog.setContentView(main); + dialog.show(); + dialog.getWindow().setAttributes(lp); + // the goal of openhidden is to load the url and not display it + // Show() needs to be called to cause the URL to be loaded + if(openWindowHidden) { + dialog.hide(); + } + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + return ""; + } + + /** + * Create a new plugin success result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + */ + private void sendUpdate(JSONObject obj, boolean keepCallback) { + sendUpdate(obj, keepCallback, PluginResult.Status.OK); + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + * @param status the status code to return to the JavaScript environment + */ + private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { + if (callbackContext != null) { + PluginResult result = new PluginResult(status, obj); + result.setKeepCallback(keepCallback); + callbackContext.sendPluginResult(result); + if (!keepCallback) { + callbackContext = null; + } + } + } + + /** + * The webview client receives notifications about appView + */ + public class InAppBrowserClient extends AmazonWebViewClient { + EditText edittext; + CordovaWebView webView; + + /** + * Constructor. + * + * @param mContext + * @param edittext + */ + public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { + this.webView = webView; + this.edittext = mEditText; + } + + /** + * Notify the host application that a page has started loading. + * + * @param view The webview initiating the callback. + * @param url The url of the page. + */ + @Override + public void onPageStarted(AmazonWebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String newloc = ""; + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { + newloc = url; + } + // If dialing phone (tel:5551212) + else if (url.startsWith(AmazonWebView.SCHEME_TEL)) { + try { + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + + else if (url.startsWith("geo:") || url.startsWith(AmazonWebView.SCHEME_MAILTO) || url.startsWith("market:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); + } + } + // If sms:5551212?body=This is the message + else if (url.startsWith("sms:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + + // Get address + String address = null; + int parmIndex = url.indexOf('?'); + if (parmIndex == -1) { + address = url.substring(4); + } + else { + address = url.substring(4, parmIndex); + + // If body, then set sms body + Uri uri = Uri.parse(url); + String query = uri.getQuery(); + if (query != null) { + if (query.startsWith("body=")) { + intent.putExtra("sms_body", query.substring(5)); + } + } + } + intent.setData(Uri.parse("sms:" + address)); + intent.putExtra("address", address); + intent.setType("vnd.android-dir/mms-sms"); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); + } + } + else { + newloc = "http://" + url; + } + + if (!newloc.equals(edittext.getText().toString())) { + edittext.setText(newloc); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_START_EVENT); + obj.put("url", newloc); + + sendUpdate(obj, true); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + public void onPageFinished(AmazonWebView view, String url) { + super.onPageFinished(view, url); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_STOP_EVENT); + obj.put("url", url); + + sendUpdate(obj, true); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + public void onReceivedError(AmazonWebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_ERROR_EVENT); + obj.put("url", failingUrl); + obj.put("code", errorCode); + obj.put("message", description); + + sendUpdate(obj, true, PluginResult.Status.ERROR); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java new file mode 100644 index 0000000..37cf101 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java @@ -0,0 +1,146 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; + +import com.amazon.android.webkit.AmazonWebChromeClient; +import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; +import com.amazon.android.webkit.AmazonJsPromptResult; +import com.amazon.android.webkit.AmazonWebStorage; +import com.amazon.android.webkit.AmazonWebView; +import com.amazon.android.webkit.AmazonWebViewClient; + +public class InAppChromeClient extends AmazonWebChromeClient { + + private CordovaWebView webView; + private String LOG_TAG = "InAppChromeClient"; + private long MAX_QUOTA = 100 * 1024 * 1024; + + public InAppChromeClient(CordovaWebView webView) { + super(); + this.webView = webView; + } + /** + * Handle database quota exceeded notification. + * + * @param url + * @param databaseIdentifier + * @param currentQuota + * @param estimatedSize + * @param totalUsedQuota + * @param quotaUpdater + */ + @Override + public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, + long totalUsedQuota, AmazonWebStorage.QuotaUpdater quotaUpdater) + { + LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); + + if (estimatedSize < MAX_QUOTA) + { + //increase for 1Mb + long newQuota = estimatedSize; + LOG.d(LOG_TAG, "calling quotaUpdater.updateQuota newQuota: %d", newQuota); + quotaUpdater.updateQuota(newQuota); + } + else + { + // Set the quota to whatever it is and force an error + // TODO: get docs on how to handle this properly + quotaUpdater.updateQuota(currentQuota); + } + } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * The prompt bridge provided for the InAppBrowser is capable of executing any + * oustanding callback belonging to the InAppBrowser plugin. Care has been + * taken that other callbacks cannot be triggered, and that no other code + * execution is possible. + * + * To trigger the bridge, the prompt default value should be of the form: + * + * gap-iab:// + * + * where is the string id of the callback to trigger (something + * like "InAppBrowser0123456789") + * + * If present, the prompt message is expected to be a JSON-encoded value to + * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. + * + * @param view + * @param url + * @param message + * @param defaultValue + * @param result + */ + @Override + public boolean onJsPrompt(AmazonWebView view, String url, String message, String defaultValue, AmazonJsPromptResult result) { + // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. + if (defaultValue != null && defaultValue.startsWith("gap")) { + if(defaultValue.startsWith("gap-iab://")) { + PluginResult scriptResult; + String scriptCallbackId = defaultValue.substring(10); + if (scriptCallbackId.startsWith("InAppBrowser")) { + if(message == null || message.length() == 0) { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); + } else { + try { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); + } catch(JSONException e) { + scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); + } + } + this.webView.sendPluginResult(scriptResult, scriptCallbackId); + result.confirm(""); + return true; + } + } + else + { + // Anything else with a gap: prefix should get this message + LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); + result.cancel(); + return true; + } + } + return false; + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java new file mode 100644 index 0000000..3a4a6a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java @@ -0,0 +1,963 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.annotation.SuppressLint; +import org.apache.cordova.inappbrowser.InAppBrowserDialog; +import android.content.Context; +import android.content.Intent; +import android.provider.Browser; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.Log; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import android.webkit.CookieManager; +import android.webkit.CookieSyncManager; +import android.webkit.HttpAuthHandler; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.Config; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaHttpAuthHandler; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginManager; +import org.apache.cordova.PluginResult; +import org.json.JSONException; +import org.json.JSONObject; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.StringTokenizer; + +@SuppressLint("SetJavaScriptEnabled") +public class InAppBrowser extends CordovaPlugin { + + private static final String NULL = "null"; + protected static final String LOG_TAG = "InAppBrowser"; + private static final String SELF = "_self"; + private static final String SYSTEM = "_system"; + private static final String EXIT_EVENT = "exit"; + private static final String LOCATION = "location"; + private static final String ZOOM = "zoom"; + private static final String HIDDEN = "hidden"; + private static final String LOAD_START_EVENT = "loadstart"; + private static final String LOAD_STOP_EVENT = "loadstop"; + private static final String LOAD_ERROR_EVENT = "loaderror"; + private static final String CLEAR_ALL_CACHE = "clearcache"; + private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; + private static final String HARDWARE_BACK_BUTTON = "hardwareback"; + private static final String MEDIA_PLAYBACK_REQUIRES_USER_ACTION = "mediaPlaybackRequiresUserAction"; + + private InAppBrowserDialog dialog; + private WebView inAppWebView; + private EditText edittext; + private CallbackContext callbackContext; + private boolean showLocationBar = true; + private boolean showZoomControls = true; + private boolean openWindowHidden = false; + private boolean clearAllCache = false; + private boolean clearSessionCache = false; + private boolean hadwareBackButton = true; + private boolean mediaPlaybackRequiresUserGesture = false; + + /** + * Executes the request and returns PluginResult. + * + * @param action the action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext the callbackContext used when calling back into JavaScript. + * @return A PluginResult object with a status and message. + */ + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("open")) { + this.callbackContext = callbackContext; + final String url = args.getString(0); + String t = args.optString(1); + if (t == null || t.equals("") || t.equals(NULL)) { + t = SELF; + } + final String target = t; + final HashMap features = parseFeature(args.optString(2)); + + Log.d(LOG_TAG, "target = " + target); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + String result = ""; + // SELF + if (SELF.equals(target)) { + Log.d(LOG_TAG, "in self"); + /* This code exists for compatibility between 3.x and 4.x versions of Cordova. + * Previously the Config class had a static method, isUrlWhitelisted(). That + * responsibility has been moved to the plugins, with an aggregating method in + * PluginManager. + */ + Boolean shouldAllowNavigation = null; + if (url.startsWith("javascript:")) { + shouldAllowNavigation = true; + } + if (shouldAllowNavigation == null) { + try { + Method iuw = Config.class.getMethod("isUrlWhiteListed", String.class); + shouldAllowNavigation = (Boolean)iuw.invoke(null, url); + } catch (NoSuchMethodException e) { + } catch (IllegalAccessException e) { + } catch (InvocationTargetException e) { + } + } + if (shouldAllowNavigation == null) { + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + PluginManager pm = (PluginManager)gpm.invoke(webView); + Method san = pm.getClass().getMethod("shouldAllowNavigation", String.class); + shouldAllowNavigation = (Boolean)san.invoke(pm, url); + } catch (NoSuchMethodException e) { + } catch (IllegalAccessException e) { + } catch (InvocationTargetException e) { + } + } + // load in webview + if (Boolean.TRUE.equals(shouldAllowNavigation)) { + Log.d(LOG_TAG, "loading in webview"); + webView.loadUrl(url); + } + //Load the dialer + else if (url.startsWith(WebView.SCHEME_TEL)) + { + try { + Log.d(LOG_TAG, "loading in dialer"); + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + // load in InAppBrowser + else { + Log.d(LOG_TAG, "loading in InAppBrowser"); + result = showWebPage(url, features); + } + } + // SYSTEM + else if (SYSTEM.equals(target)) { + Log.d(LOG_TAG, "in system"); + result = openExternal(url); + } + // BLANK - or anything else + else { + Log.d(LOG_TAG, "in blank"); + result = showWebPage(url, features); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + } + }); + } + else if (action.equals("close")) { + closeDialog(); + } + else if (action.equals("injectScriptCode")) { + String jsWrapper = null; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(){prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')})()", callbackContext.getCallbackId()); + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectScriptFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleCode")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("show")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.show(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else { + return false; + } + return true; + } + + /** + * Called when the view navigates. + */ + @Override + public void onReset() { + closeDialog(); + } + + /** + * Called by AccelBroker when listener is to be shut down. + * Stop listener. + */ + public void onDestroy() { + closeDialog(); + } + + /** + * Inject an object (script or style) into the InAppBrowser WebView. + * + * This is a helper method for the inject{Script|Style}{Code|File} API calls, which + * provides a consistent method for injecting JavaScript code into the document. + * + * If a wrapper string is supplied, then the source string will be JSON-encoded (adding + * quotes) and wrapped using string formatting. (The wrapper string should have a single + * '%s' marker) + * + * @param source The source object (filename or script/style text) to inject into + * the document. + * @param jsWrapper A JavaScript string to wrap the source string in, so that the object + * is properly injected, or null if the source string is JavaScript text + * which should be executed directly. + */ + private void injectDeferredObject(String source, String jsWrapper) { + String scriptToInject; + if (jsWrapper != null) { + org.json.JSONArray jsonEsc = new org.json.JSONArray(); + jsonEsc.put(source); + String jsonRepr = jsonEsc.toString(); + String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); + scriptToInject = String.format(jsWrapper, jsonSourceString); + } else { + scriptToInject = source; + } + final String finalScriptToInject = scriptToInject; + this.cordova.getActivity().runOnUiThread(new Runnable() { + @SuppressLint("NewApi") + @Override + public void run() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // This action will have the side-effect of blurring the currently focused element + inAppWebView.loadUrl("javascript:" + finalScriptToInject); + } else { + inAppWebView.evaluateJavascript(finalScriptToInject, null); + } + } + }); + } + + /** + * Put the list of features into a hash map + * + * @param optString + * @return + */ + private HashMap parseFeature(String optString) { + if (optString.equals(NULL)) { + return null; + } else { + HashMap map = new HashMap(); + StringTokenizer features = new StringTokenizer(optString, ","); + StringTokenizer option; + while(features.hasMoreElements()) { + option = new StringTokenizer(features.nextToken(), "="); + if (option.hasMoreElements()) { + String key = option.nextToken(); + Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + map.put(key, value); + } + } + return map; + } + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @return "" if ok, or error message. + */ + public String openExternal(String url) { + try { + Intent intent = null; + intent = new Intent(Intent.ACTION_VIEW); + // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". + // Adding the MIME type to http: URLs causes them to not be handled by the downloader. + Uri uri = Uri.parse(url); + if ("file".equals(uri.getScheme())) { + intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); + } else { + intent.setData(uri); + } + intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); + this.cordova.getActivity().startActivity(intent); + return ""; + } catch (android.content.ActivityNotFoundException e) { + Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); + return e.toString(); + } + } + + /** + * Closes the dialog + */ + public void closeDialog() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + final WebView childView = inAppWebView; + // The JS protects against multiple calls, so this should happen only when + // closeDialog() is called by other native code. + if (childView == null) { + return; + } + + childView.setWebViewClient(new WebViewClient() { + // NB: wait for about:blank before dismissing + public void onPageFinished(WebView view, String url) { + if (dialog != null) { + dialog.dismiss(); + dialog = null; + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread + // other than your app's UI thread, it can cause unexpected results." + // http://developer.android.com/guide/webapps/migrating.html#Threads + childView.loadUrl("about:blank"); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", EXIT_EVENT); + sendUpdate(obj, false); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + }); + } + + /** + * Checks to see if it is possible to go back one page in history, then does so. + */ + public void goBack() { + if (this.inAppWebView.canGoBack()) { + this.inAppWebView.goBack(); + } + } + + /** + * Can the web browser go back? + * @return boolean + */ + public boolean canGoBack() { + return this.inAppWebView.canGoBack(); + } + + /** + * Has the user set the hardware back button to go back + * @return boolean + */ + public boolean hardwareBack() { + return hadwareBackButton; + } + + /** + * Checks to see if it is possible to go forward one page in history, then does so. + */ + private void goForward() { + if (this.inAppWebView.canGoForward()) { + this.inAppWebView.goForward(); + } + } + + /** + * Navigate to the new page + * + * @param url to load + */ + private void navigate(String url) { + InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); + + if (!url.startsWith("http") && !url.startsWith("file:")) { + this.inAppWebView.loadUrl("http://" + url); + } else { + this.inAppWebView.loadUrl(url); + } + this.inAppWebView.requestFocus(); + } + + + /** + * Should we show the location bar? + * + * @return boolean + */ + private boolean getShowLocationBar() { + return this.showLocationBar; + } + + private InAppBrowser getInAppBrowser(){ + return this; + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @param features jsonObject + */ + public String showWebPage(final String url, HashMap features) { + // Determine if we should hide the location bar. + showLocationBar = true; + showZoomControls = true; + openWindowHidden = false; + mediaPlaybackRequiresUserGesture = false; + + if (features != null) { + Boolean show = features.get(LOCATION); + if (show != null) { + showLocationBar = show.booleanValue(); + } + Boolean zoom = features.get(ZOOM); + if (zoom != null) { + showZoomControls = zoom.booleanValue(); + } + Boolean hidden = features.get(HIDDEN); + if (hidden != null) { + openWindowHidden = hidden.booleanValue(); + } + Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); + if (hardwareBack != null) { + hadwareBackButton = hardwareBack.booleanValue(); + } + Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION); + if (mediaPlayback != null) { + mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue(); + } + Boolean cache = features.get(CLEAR_ALL_CACHE); + if (cache != null) { + clearAllCache = cache.booleanValue(); + } else { + cache = features.get(CLEAR_SESSION_CACHE); + if (cache != null) { + clearSessionCache = cache.booleanValue(); + } + } + } + + final CordovaWebView thatWebView = this.webView; + + // Create dialog in new thread + Runnable runnable = new Runnable() { + /** + * Convert our DIP units to Pixels + * + * @return int + */ + private int dpToPixels(int dipValue) { + int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() + ); + + return value; + } + + @SuppressLint("NewApi") + public void run() { + + // CB-6702 InAppBrowser hangs when opening more than one instance + if (dialog != null) { + dialog.dismiss(); + }; + + // Let's create the main dialog + dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); + dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setCancelable(true); + dialog.setInAppBroswer(getInAppBrowser()); + + // Main container layout + LinearLayout main = new LinearLayout(cordova.getActivity()); + main.setOrientation(LinearLayout.VERTICAL); + + // Toolbar layout + RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); + //Please, no more black! + toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); + toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); + toolbar.setHorizontalGravity(Gravity.LEFT); + toolbar.setVerticalGravity(Gravity.TOP); + + // Action Button Container layout + RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); + actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + actionButtonContainer.setHorizontalGravity(Gravity.LEFT); + actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); + actionButtonContainer.setId(Integer.valueOf(1)); + + // Back button + Button back = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); + back.setLayoutParams(backLayoutParams); + back.setContentDescription("Back Button"); + back.setId(Integer.valueOf(2)); + Resources activityRes = cordova.getActivity().getResources(); + int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); + Drawable backIcon = activityRes.getDrawable(backResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + back.setBackgroundDrawable(backIcon); + } + else + { + back.setBackground(backIcon); + } + back.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goBack(); + } + }); + + // Forward button + Button forward = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); + forward.setLayoutParams(forwardLayoutParams); + forward.setContentDescription("Forward Button"); + forward.setId(Integer.valueOf(3)); + int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); + Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + forward.setBackgroundDrawable(fwdIcon); + } + else + { + forward.setBackground(fwdIcon); + } + forward.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goForward(); + } + }); + + // Edit Text Box + edittext = new EditText(cordova.getActivity()); + RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); + textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); + edittext.setLayoutParams(textLayoutParams); + edittext.setId(Integer.valueOf(4)); + edittext.setSingleLine(true); + edittext.setText(url); + edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + edittext.setImeOptions(EditorInfo.IME_ACTION_GO); + edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE + edittext.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + navigate(edittext.getText().toString()); + return true; + } + return false; + } + }); + + // Close/Done button + Button close = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + forward.setContentDescription("Close Button"); + close.setId(Integer.valueOf(5)); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + close.setBackgroundDrawable(closeIcon); + } + else + { + close.setBackground(closeIcon); + } + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + // WebView + inAppWebView = new WebView(cordova.getActivity()); + inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + inAppWebView.setId(Integer.valueOf(6)); + inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView)); + WebViewClient client = new InAppBrowserClient(thatWebView, edittext); + inAppWebView.setWebViewClient(client); + WebSettings settings = inAppWebView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setBuiltInZoomControls(showZoomControls); + settings.setPluginState(android.webkit.WebSettings.PluginState.ON); + + if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { + settings.setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture); + } + + String overrideUserAgent = preferences.getString("OverrideUserAgent", null); + String appendUserAgent = preferences.getString("AppendUserAgent", null); + + if (overrideUserAgent != null) { + settings.setUserAgentString(overrideUserAgent); + } + if (appendUserAgent != null) { + settings.setUserAgentString(settings.getUserAgentString() + appendUserAgent); + } + + //Toggle whether this is enabled or not! + Bundle appSettings = cordova.getActivity().getIntent().getExtras(); + boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); + if (enableDatabase) { + String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); + settings.setDatabasePath(databasePath); + settings.setDatabaseEnabled(true); + } + settings.setDomStorageEnabled(true); + + if (clearAllCache) { + CookieManager.getInstance().removeAllCookie(); + } else if (clearSessionCache) { + CookieManager.getInstance().removeSessionCookie(); + } + + inAppWebView.loadUrl(url); + inAppWebView.setId(Integer.valueOf(6)); + inAppWebView.getSettings().setLoadWithOverviewMode(true); + inAppWebView.getSettings().setUseWideViewPort(true); + inAppWebView.requestFocus(); + inAppWebView.requestFocusFromTouch(); + + // Add the back and forward buttons to our action button container layout + actionButtonContainer.addView(back); + actionButtonContainer.addView(forward); + + // Add the views to our toolbar + toolbar.addView(actionButtonContainer); + toolbar.addView(edittext); + toolbar.addView(close); + + // Don't add the toolbar if its been disabled + if (getShowLocationBar()) { + // Add our toolbar to our main view/layout + main.addView(toolbar); + } + + // Add our webview to our main view/layout + main.addView(inAppWebView); + + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); + lp.copyFrom(dialog.getWindow().getAttributes()); + lp.width = WindowManager.LayoutParams.MATCH_PARENT; + lp.height = WindowManager.LayoutParams.MATCH_PARENT; + + dialog.setContentView(main); + dialog.show(); + dialog.getWindow().setAttributes(lp); + // the goal of openhidden is to load the url and not display it + // Show() needs to be called to cause the URL to be loaded + if(openWindowHidden) { + dialog.hide(); + } + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + return ""; + } + + /** + * Create a new plugin success result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + */ + private void sendUpdate(JSONObject obj, boolean keepCallback) { + sendUpdate(obj, keepCallback, PluginResult.Status.OK); + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + * @param status the status code to return to the JavaScript environment + */ + private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { + if (callbackContext != null) { + PluginResult result = new PluginResult(status, obj); + result.setKeepCallback(keepCallback); + callbackContext.sendPluginResult(result); + if (!keepCallback) { + callbackContext = null; + } + } + } + + /** + * The webview client receives notifications about appView + */ + public class InAppBrowserClient extends WebViewClient { + EditText edittext; + CordovaWebView webView; + + /** + * Constructor. + * + * @param webView + * @param mEditText + */ + public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { + this.webView = webView; + this.edittext = mEditText; + } + + /** + * Override the URL that should be loaded + * + * This handles a small subset of all the URIs that would be encountered. + * + * @param webView + * @param url + */ + @Override + public boolean shouldOverrideUrlLoading(WebView webView, String url) { + if (url.startsWith(WebView.SCHEME_TEL)) { + try { + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } else if (url.startsWith("geo:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith("market:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); + } + } + // If sms:5551212?body=This is the message + else if (url.startsWith("sms:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + + // Get address + String address = null; + int parmIndex = url.indexOf('?'); + if (parmIndex == -1) { + address = url.substring(4); + } else { + address = url.substring(4, parmIndex); + + // If body, then set sms body + Uri uri = Uri.parse(url); + String query = uri.getQuery(); + if (query != null) { + if (query.startsWith("body=")) { + intent.putExtra("sms_body", query.substring(5)); + } + } + } + intent.setData(Uri.parse("sms:" + address)); + intent.putExtra("address", address); + intent.setType("vnd.android-dir/mms-sms"); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); + } + } + return false; + } + + + /* + * onPageStarted fires the LOAD_START_EVENT + * + * @param view + * @param url + * @param favicon + */ + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String newloc = ""; + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { + newloc = url; + } + else + { + // Assume that everything is HTTP at this point, because if we don't specify, + // it really should be. Complain loudly about this!!! + LOG.e(LOG_TAG, "Possible Uncaught/Unknown URI"); + newloc = "http://" + url; + } + + // Update the UI if we haven't already + if (!newloc.equals(edittext.getText().toString())) { + edittext.setText(newloc); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_START_EVENT); + obj.put("url", newloc); + sendUpdate(obj, true); + } catch (JSONException ex) { + LOG.e(LOG_TAG, "URI passed in has caused a JSON error."); + } + } + + + + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + + // CB-10395 InAppBrowser's WebView not storing cookies reliable to local device storage + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { + CookieManager.getInstance().flush(); + } else { + CookieSyncManager.getInstance().sync(); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_STOP_EVENT); + obj.put("url", url); + + sendUpdate(obj, true); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_ERROR_EVENT); + obj.put("url", failingUrl); + obj.put("code", errorCode); + obj.put("message", description); + + sendUpdate(obj, true, PluginResult.Status.ERROR); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + /** + * On received http auth request. + */ + @Override + public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { + + // Check if there is some plugin which can resolve this auth challenge + PluginManager pluginManager = null; + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + pluginManager = (PluginManager)gpm.invoke(webView); + } catch (NoSuchMethodException e) { + } catch (IllegalAccessException e) { + } catch (InvocationTargetException e) { + } + + if (pluginManager == null) { + try { + Field pmf = webView.getClass().getField("pluginManager"); + pluginManager = (PluginManager)pmf.get(webView); + } catch (NoSuchFieldException e) { + } catch (IllegalAccessException e) { + } + } + + if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(webView, new CordovaHttpAuthHandler(handler), host, realm)) { + return; + } + + // By default handle 401 like we'd normally do! + super.onReceivedHttpAuthRequest(view, handler, host, realm); + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java new file mode 100644 index 0000000..d701720 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java @@ -0,0 +1,58 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.Context; +import android.util.Log; + +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Created by Oliver on 22/11/2013. + */ +public class InAppBrowserDialog extends Dialog { + Context context; + InAppBrowser inAppBrowser = null; + + public InAppBrowserDialog(Context context, int theme) { + super(context, theme); + this.context = context; + } + + public void setInAppBroswer(InAppBrowser browser) { + this.inAppBrowser = browser; + } + + public void onBackPressed () { + if (this.inAppBrowser == null) { + this.dismiss(); + } else { + // better to go through the in inAppBrowser + // because it does a clean up + if (this.inAppBrowser.hardwareBack() && this.inAppBrowser.canGoBack()) { + this.inAppBrowser.goBack(); + } else { + this.inAppBrowser.closeDialog(); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java new file mode 100644 index 0000000..a2145e6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java @@ -0,0 +1,133 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; + +import android.webkit.JsPromptResult; +import android.webkit.WebChromeClient; +import android.webkit.WebStorage; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.webkit.GeolocationPermissions.Callback; + +public class InAppChromeClient extends WebChromeClient { + + private CordovaWebView webView; + private String LOG_TAG = "InAppChromeClient"; + private long MAX_QUOTA = 100 * 1024 * 1024; + + public InAppChromeClient(CordovaWebView webView) { + super(); + this.webView = webView; + } + /** + * Handle database quota exceeded notification. + * + * @param url + * @param databaseIdentifier + * @param currentQuota + * @param estimatedSize + * @param totalUsedQuota + * @param quotaUpdater + */ + @Override + public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, + long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) + { + LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); + quotaUpdater.updateQuota(MAX_QUOTA); + } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * The prompt bridge provided for the InAppBrowser is capable of executing any + * oustanding callback belonging to the InAppBrowser plugin. Care has been + * taken that other callbacks cannot be triggered, and that no other code + * execution is possible. + * + * To trigger the bridge, the prompt default value should be of the form: + * + * gap-iab:// + * + * where is the string id of the callback to trigger (something + * like "InAppBrowser0123456789") + * + * If present, the prompt message is expected to be a JSON-encoded value to + * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. + * + * @param view + * @param url + * @param message + * @param defaultValue + * @param result + */ + @Override + public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) { + // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. + if (defaultValue != null && defaultValue.startsWith("gap")) { + if(defaultValue.startsWith("gap-iab://")) { + PluginResult scriptResult; + String scriptCallbackId = defaultValue.substring(10); + if (scriptCallbackId.startsWith("InAppBrowser")) { + if(message == null || message.length() == 0) { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); + } else { + try { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); + } catch(JSONException e) { + scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); + } + } + this.webView.sendPluginResult(scriptResult, scriptCallbackId); + result.confirm(""); + return true; + } + } + else + { + // Anything else with a gap: prefix should get this message + LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); + result.cancel(); + return true; + } + } + return false; + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png new file mode 100644 index 0000000..fa469d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png new file mode 100644 index 0000000..e861ecc Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png new file mode 100644 index 0000000..f889617 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png new file mode 100644 index 0000000..47365a3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png new file mode 100644 index 0000000..4ad2df4 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png new file mode 100644 index 0000000..e84853e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png new file mode 100644 index 0000000..5f30474 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..ed8ac91 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png new file mode 100644 index 0000000..4cd0458 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png new file mode 100644 index 0000000..51479d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..bc8ff12 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png new file mode 100644 index 0000000..331c545 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md new file mode 100644 index 0000000..f0fa860 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md @@ -0,0 +1,43 @@ + +# BlackBerry 10 In-App-Browser Plugin + +The in app browser functionality is entirely contained within common js. There is no native implementation required. +To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). +./cordova-plugin-battery-status/README.md +./cordova-plugin-camera/README.md +./cordova-plugin-console/README.md +./cordova-plugin-contacts/README.md +./cordova-plugin-device/README.md +./cordova-plugin-device-motion/README.md +./cordova-plugin-device-orientation/README.md +./cordova-plugin-device-orientation/src/blackberry10/README.md +./cordova-plugin-file/README.md +./cordova-plugin-file-transfer/README.md +./cordova-plugin-geolocation/README.md +./cordova-plugin-globalization/README.md +./cordova-plugin-inappbrowser/README.md +./cordova-plugin-inappbrowser/src/blackberry10/README.md +./cordova-plugin-media/README.md +./cordova-plugin-media-capture/README.md +./cordova-plugin-network-information/README.md +./cordova-plugin-splashscreen/README.md +./cordova-plugin-vibration/README.md diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md new file mode 100644 index 0000000..e394487 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10-In-App-Browser-Plugin + +Die Funktionalität ist im app-Browser vollständig in gemeinsamen Js enthalten. Es gibt keine native Implementierung benötigt. Um dieses Plugin zu installieren, folgen Sie dem [Command-Line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Wenn Sie nicht die Cordova-Befehlszeilenschnittstelle verwenden, folgen Sie [Verwenden Plugman zu Plugins verwalten](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md new file mode 100644 index 0000000..7530336 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +El en el navegador de aplicación funcionalidad está enteramente dentro de js común. No hay ninguna aplicación nativa necesaria. Para instalar este plugin, siga la [Guía de la interfaz de línea de comandos](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si no utiliza la interfaz de línea de comandos de Cordova, siga [Usando Plugman para gestionar Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md new file mode 100644 index 0000000..179bd48 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Le dans le navigateur de l'application, la fonctionnalité est entièrement contenue dans js commun. Il n'y a aucune implémentation native requise. Pour installer ce plugin, suivez le [Guide de l'Interface de ligne de commande](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si vous n'utilisez pas l'Interface de ligne de commande de Cordova, suivez [Les Plugman à l'aide à gérer les Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md new file mode 100644 index 0000000..8f0623d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Il browser app funzionalità è interamente contenuta nel comune js. Non esiste alcuna implementazione nativa richiesto. Per installare questo plugin, seguire la [Guida per l'interfaccia della riga di comando](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Se non si utilizza l'interfaccia della riga di comando di Cordova, seguire [Utilizzando Plugman per gestire i plugin](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md new file mode 100644 index 0000000..b9e4b7b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +アプリケーション ブラウザーの機能は全く一般的な js に含まれています。 ネイティブ実装する必要はありません。 このプラグインをインストールするには[コマンド ライン インターフェイス ガイド](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +コルドバのコマンド ライン インターフェイスを使用していない場合は場合、[管理のプラグインを使用して Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)に従ってください。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md new file mode 100644 index 0000000..67fb8de --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md @@ -0,0 +1,24 @@ + + +# 블랙베리 10 애플 리 케이 션-브라우저 플러그인 + +응용 프로그램 브라우저에서 기능은 완전히 포함 된 일반적인 js. 필요 없는 기본 구현이입니다. 이 플러그인을 설치 하려면 [명령줄 인터페이스 가이드](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) 를 따라합니다. + +코르도바 명령줄 인터페이스를 사용 하지 않는 경우 [관리 플러그인을 사용 하 여 Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)를 따르십시오. ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md new file mode 100644 index 0000000..ef199ee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +W aplikacji Przeglądarka funkcjonalność jest całkowicie zawarty w wspólnej js. Tam jest nie native wdrażania wymagane. Aby zainstalować ten plugin, następować po ten [Przewodnik interfejsu wiersza polecenia](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Jeśli nie używasz interfejsu wiersza polecenia Cordova, następować po [Przy użyciu Plugman do zarządzania wtyczki](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md new file mode 100644 index 0000000..241fb55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md @@ -0,0 +1,24 @@ + + +# 黑莓 10 的應用程式瀏覽器外掛程式 + +在應用程式瀏覽器功能完全包含在常見的 js。 還有沒有本機的實施所需。 若要安裝此外掛程式,請按照[命令列介面指南](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +如果你不使用的科爾多瓦命令列介面,請按照[使用 Plugman 管理外掛程式](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js new file mode 100644 index 0000000..a9926f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js @@ -0,0 +1,224 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var cordova = require('cordova'), + channel = require('cordova/channel'), + modulemapper = require('cordova/modulemapper'), + urlutil = require('cordova/urlutil'); + +var browserWrap, + popup, + navigationButtonsDiv, + navigationButtonsDivInner, + backButton, + forwardButton, + closeButton; + +function attachNavigationEvents(element, callback) { + var onError = function () { + callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true}); + }; + + element.addEventListener("pageshow", function () { + callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("load", function () { + callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("error", onError); + element.addEventListener("abort", onError); +} + +var IAB = { + close: function (win, lose) { + if (browserWrap) { + if (win) win({ type: "exit" }); + + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + popup = null; + } + }, + + show: function (win, lose) { + if (browserWrap) { + browserWrap.style.display = "block"; + } + }, + + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features = args[2], + url; + + if (target === "_self" || !target) { + window.location = strUrl; + } else if (target === "_system") { + modulemapper.getOriginalSymbol(window, 'window.open').call(window, strUrl, "_blank"); + } else { + // "_blank" or anything else + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.width = "calc(100% - 80px)"; + browserWrap.style.height = "calc(100% - 80px)"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(win); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + + if (features.indexOf("hidden=yes") !== -1) { + browserWrap.style.display = "none"; + } + + popup = document.createElement("iframe"); + popup.style.borderWidth = "0px"; + popup.style.width = "100%"; + + browserWrap.appendChild(popup); + + if (features.indexOf("location=yes") !== -1 || features.indexOf("location") === -1) { + popup.style.height = "calc(100% - 60px)"; + + navigationButtonsDiv = document.createElement("div"); + navigationButtonsDiv.style.height = "60px"; + navigationButtonsDiv.style.backgroundColor = "#404040"; + navigationButtonsDiv.style.zIndex = "999"; + navigationButtonsDiv.onclick = function (e) { + e.cancelBubble = true; + }; + + navigationButtonsDivInner = document.createElement("div"); + navigationButtonsDivInner.style.paddingTop = "10px"; + navigationButtonsDivInner.style.height = "50px"; + navigationButtonsDivInner.style.width = "160px"; + navigationButtonsDivInner.style.margin = "0 auto"; + navigationButtonsDivInner.style.backgroundColor = "#404040"; + navigationButtonsDivInner.style.zIndex = "999"; + navigationButtonsDivInner.onclick = function (e) { + e.cancelBubble = true; + }; + + + backButton = document.createElement("button"); + backButton.style.width = "40px"; + backButton.style.height = "40px"; + backButton.style.borderRadius = "40px"; + + backButton.innerHTML = "←"; + backButton.addEventListener("click", function (e) { + if (popup.canGoBack) + popup.goBack(); + }); + + forwardButton = document.createElement("button"); + forwardButton.style.marginLeft = "20px"; + forwardButton.style.width = "40px"; + forwardButton.style.height = "40px"; + forwardButton.style.borderRadius = "40px"; + + forwardButton.innerHTML = "→"; + forwardButton.addEventListener("click", function (e) { + if (popup.canGoForward) + popup.goForward(); + }); + + closeButton = document.createElement("button"); + closeButton.style.marginLeft = "20px"; + closeButton.style.width = "40px"; + closeButton.style.height = "40px"; + closeButton.style.borderRadius = "40px"; + + closeButton.innerHTML = "✖"; + closeButton.addEventListener("click", function (e) { + setTimeout(function () { + IAB.close(win); + }, 0); + }); + + // iframe navigation is not yet supported + backButton.disabled = true; + forwardButton.disabled = true; + + navigationButtonsDivInner.appendChild(backButton); + navigationButtonsDivInner.appendChild(forwardButton); + navigationButtonsDivInner.appendChild(closeButton); + navigationButtonsDiv.appendChild(navigationButtonsDivInner); + + browserWrap.appendChild(navigationButtonsDiv); + } else { + popup.style.height = "100%"; + } + + // start listening for navigation events + attachNavigationEvents(popup, win); + + popup.src = strUrl; + } + }, + + injectScriptCode: function (win, fail, args) { + var code = args[0], + hasCallback = args[1]; + + if (browserWrap && popup) { + try { + popup.contentWindow.eval(code); + hasCallback && win([]); + } catch(e) { + console.error('Error occured while trying to injectScriptCode: ' + JSON.stringify(e)); + } + } + }, + + injectScriptFile: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectScriptFile is not yet implemented'; + console.warn(msg); + fail && fail(msg); + }, + + injectStyleCode: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectStyleCode is not yet implemented'; + console.warn(msg); + fail && fail(msg); + }, + + injectStyleFile: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectStyleFile is not yet implemented'; + console.warn(msg); + fail && fail(msg); + } +}; + +module.exports = IAB; + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js new file mode 100644 index 0000000..f0d44c1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js @@ -0,0 +1,191 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// https://developer.mozilla.org/en-US/docs/WebAPI/Browser + +var cordova = require('cordova'), + channel = require('cordova/channel'), + modulemapper = require('cordova/modulemapper'); + +var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open'); +var browserWrap; + +var IABExecs = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + if (typeof(win) == "function") win({type:'exit'}); + } + }, + + /* + * Reveal browser if opened hidden + */ + show: function (win, lose) { + console.error('[FirefoxOS] show not implemented'); + }, + + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features_string = args[2] || "location=yes", //location=yes is default + features = {}, + url, + elem; + + var features_list = features_string.split(','); + features_list.forEach(function(feature) { + var tup = feature.split('='); + if (tup[1] == 'yes') { + tup[1] = true; + } else if (tup[1] == 'no') { + tup[1] = false; + } else { + var number = parseInt(tup[1]); + if (!isNaN(number)) { + tup[1] = number; + } + } + features[tup[0]] = tup[1]; + }); + + function updateIframeSizeNoLocation() { + browserWrap.style.width = window.innerWidth + 'px'; + browserWrap.style.height = window.innerHeight + 'px'; + browserWrap.style.zIndex = '999999999'; + browserWrap.browser.style.height = (window.innerHeight - 60) + 'px'; + browserWrap.browser.style.width = browserWrap.style.width; + } + + if (target === '_system') { + origOpenFunc.apply(window, [strUrl, '_blank']); + } else if (target === '_blank') { + var browserElem = document.createElement('iframe'); + browserElem.setAttribute('mozbrowser', true); + // make this loaded in its own child process + browserElem.setAttribute('remote', true); + browserElem.setAttribute('src', strUrl); + if (browserWrap) { + document.body.removeChild(browserWrap); + } + browserWrap = document.createElement('div'); + // assign browser element to browserWrap for future reference + browserWrap.browser = browserElem; + + browserWrap.classList.add('inAppBrowserWrap'); + // position fixed so that it works even when page is scrolled + browserWrap.style.position = 'fixed'; + browserElem.style.position = 'absolute'; + browserElem.style.border = 0; + browserElem.style.top = '60px'; + browserElem.style.left = '0px'; + updateIframeSizeNoLocation(); + + var menu = document.createElement('menu'); + menu.setAttribute('type', 'toolbar'); + var close = document.createElement('li'); + var back = document.createElement('li'); + var forward = document.createElement('li'); + + close.appendChild(document.createTextNode('×')); + back.appendChild(document.createTextNode('<')); + forward.appendChild(document.createTextNode('>')); + + close.classList.add('inAppBrowserClose'); + back.classList.add('inAppBrowserBack'); + forward.classList.add('inAppBrowserForward'); + + function checkForwardBackward() { + var backReq = browserElem.getCanGoBack(); + backReq.onsuccess = function() { + if (this.result) { + back.classList.remove('disabled'); + } else { + back.classList.add('disabled'); + } + } + var forwardReq = browserElem.getCanGoForward(); + forwardReq.onsuccess = function() { + if (this.result) { + forward.classList.remove('disabled'); + } else { + forward.classList.add('disabled'); + } + } + }; + + browserElem.addEventListener('mozbrowserloadend', checkForwardBackward); + + close.addEventListener('click', function () { + setTimeout(function () { + IABExecs.close(win, lose); + }, 0); + }, false); + + back.addEventListener('click', function () { + browserElem.goBack(); + }, false); + + forward.addEventListener('click', function () { + browserElem.goForward(); + }, false); + + menu.appendChild(back); + menu.appendChild(forward); + menu.appendChild(close); + + browserWrap.appendChild(menu); + browserWrap.appendChild(browserElem); + document.body.appendChild(browserWrap); + + //we use mozbrowserlocationchange instead of mozbrowserloadstart to get the url + browserElem.addEventListener('mozbrowserlocationchange', function(e){ + win({ + type:'loadstart', + url : e.detail + }) + }, false); + browserElem.addEventListener('mozbrowserloadend', function(e){ + win({type:'loadstop'}) + }, false); + browserElem.addEventListener('mozbrowsererror', function(e){ + win({type:'loaderror'}) + }, false); + browserElem.addEventListener('mozbrowserclose', function(e){ + win({type:'exit'}) + }, false); + } else { + window.location = strUrl; + } + }, + injectScriptCode: function (code, bCB) { + console.error('[FirefoxOS] injectScriptCode not implemented'); + }, + injectScriptFile: function (file, bCB) { + console.error('[FirefoxOS] injectScriptFile not implemented'); + } +}; + +module.exports = IABExecs; + +require('cordova/exec/proxy').add('InAppBrowser', module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h new file mode 100644 index 0000000..6bb0ec1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h @@ -0,0 +1,112 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import + +#ifdef __CORDOVA_4_0_0 + #import +#else + #import +#endif + +@class CDVInAppBrowserViewController; + +@interface CDVInAppBrowser : CDVPlugin { +} + +@property (nonatomic, retain) CDVInAppBrowserViewController* inAppBrowserViewController; +@property (nonatomic, copy) NSString* callbackId; +@property (nonatomic, copy) NSRegularExpression *callbackIdPattern; + +- (void)open:(CDVInvokedUrlCommand*)command; +- (void)close:(CDVInvokedUrlCommand*)command; +- (void)injectScriptCode:(CDVInvokedUrlCommand*)command; +- (void)show:(CDVInvokedUrlCommand*)command; + +@end + +@interface CDVInAppBrowserOptions : NSObject {} + +@property (nonatomic, assign) BOOL location; +@property (nonatomic, assign) BOOL toolbar; +@property (nonatomic, copy) NSString* closebuttoncaption; +@property (nonatomic, copy) NSString* toolbarposition; +@property (nonatomic, assign) BOOL clearcache; +@property (nonatomic, assign) BOOL clearsessioncache; + +@property (nonatomic, copy) NSString* presentationstyle; +@property (nonatomic, copy) NSString* transitionstyle; + +@property (nonatomic, assign) BOOL enableviewportscale; +@property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction; +@property (nonatomic, assign) BOOL allowinlinemediaplayback; +@property (nonatomic, assign) BOOL keyboarddisplayrequiresuseraction; +@property (nonatomic, assign) BOOL suppressesincrementalrendering; +@property (nonatomic, assign) BOOL hidden; +@property (nonatomic, assign) BOOL disallowoverscroll; + ++ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options; + +@end + +@interface CDVInAppBrowserViewController : UIViewController { + @private + NSString* _userAgent; + NSString* _prevUserAgent; + NSInteger _userAgentLockToken; + CDVInAppBrowserOptions *_browserOptions; + +#ifdef __CORDOVA_4_0_0 + CDVUIWebViewDelegate* _webViewDelegate; +#else + CDVWebViewDelegate* _webViewDelegate; +#endif + +} + +@property (nonatomic, strong) IBOutlet UIWebView* webView; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* closeButton; +@property (nonatomic, strong) IBOutlet UILabel* addressLabel; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* backButton; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* forwardButton; +@property (nonatomic, strong) IBOutlet UIActivityIndicatorView* spinner; +@property (nonatomic, strong) IBOutlet UIToolbar* toolbar; + +@property (nonatomic, weak) id orientationDelegate; +@property (nonatomic, weak) CDVInAppBrowser* navigationDelegate; +@property (nonatomic) NSURL* currentURL; + +- (void)close; +- (void)navigateTo:(NSURL*)url; +- (void)showLocationBar:(BOOL)show; +- (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition; +- (void)setCloseButtonTitle:(NSString*)title; + +- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions; + +@end + +@interface CDVInAppBrowserNavigationController : UINavigationController + +@property (nonatomic, weak) id orientationDelegate; + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m new file mode 100644 index 0000000..8b2c90c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m @@ -0,0 +1,1058 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVInAppBrowser.h" +#import +#import + +#define kInAppBrowserTargetSelf @"_self" +#define kInAppBrowserTargetSystem @"_system" +#define kInAppBrowserTargetBlank @"_blank" + +#define kInAppBrowserToolbarBarPositionBottom @"bottom" +#define kInAppBrowserToolbarBarPositionTop @"top" + +#define TOOLBAR_HEIGHT 44.0 +#define LOCATIONBAR_HEIGHT 21.0 +#define FOOTER_HEIGHT ((TOOLBAR_HEIGHT) + (LOCATIONBAR_HEIGHT)) + +#pragma mark CDVInAppBrowser + +@interface CDVInAppBrowser () { + NSInteger _previousStatusBarStyle; +} +@end + +@implementation CDVInAppBrowser + +- (void)pluginInitialize +{ + _previousStatusBarStyle = -1; + _callbackIdPattern = nil; +} + +- (void)onReset +{ + [self close:nil]; +} + +- (void)close:(CDVInvokedUrlCommand*)command +{ + if (self.inAppBrowserViewController == nil) { + NSLog(@"IAB.close() called but it was already closed."); + return; + } + // Things are cleaned up in browserExit. + [self.inAppBrowserViewController close]; +} + +- (BOOL) isSystemUrl:(NSURL*)url +{ + if ([[url host] isEqualToString:@"itunes.apple.com"]) { + return YES; + } + + return NO; +} + +- (void)open:(CDVInvokedUrlCommand*)command +{ + CDVPluginResult* pluginResult; + + NSString* url = [command argumentAtIndex:0]; + NSString* target = [command argumentAtIndex:1 withDefault:kInAppBrowserTargetSelf]; + NSString* options = [command argumentAtIndex:2 withDefault:@"" andClass:[NSString class]]; + + self.callbackId = command.callbackId; + + if (url != nil) { +#ifdef __CORDOVA_4_0_0 + NSURL* baseUrl = [self.webViewEngine URL]; +#else + NSURL* baseUrl = [self.webView.request URL]; +#endif + NSURL* absoluteUrl = [[NSURL URLWithString:url relativeToURL:baseUrl] absoluteURL]; + + if ([self isSystemUrl:absoluteUrl]) { + target = kInAppBrowserTargetSystem; + } + + if ([target isEqualToString:kInAppBrowserTargetSelf]) { + [self openInCordovaWebView:absoluteUrl withOptions:options]; + } else if ([target isEqualToString:kInAppBrowserTargetSystem]) { + [self openInSystem:absoluteUrl]; + } else { // _blank or anything else + [self openInInAppBrowser:absoluteUrl withOptions:options]; + } + + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"incorrect number of arguments"]; + } + + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options +{ + CDVInAppBrowserOptions* browserOptions = [CDVInAppBrowserOptions parseOptions:options]; + + if (browserOptions.clearcache) { + NSHTTPCookie *cookie; + NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + for (cookie in [storage cookies]) + { + if (![cookie.domain isEqual: @".^filecookies^"]) { + [storage deleteCookie:cookie]; + } + } + } + + if (browserOptions.clearsessioncache) { + NSHTTPCookie *cookie; + NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + for (cookie in [storage cookies]) + { + if (![cookie.domain isEqual: @".^filecookies^"] && cookie.isSessionOnly) { + [storage deleteCookie:cookie]; + } + } + } + + if (self.inAppBrowserViewController == nil) { + NSString* originalUA = [CDVUserAgentUtil originalUserAgent]; + self.inAppBrowserViewController = [[CDVInAppBrowserViewController alloc] initWithUserAgent:originalUA prevUserAgent:[self.commandDelegate userAgent] browserOptions: browserOptions]; + self.inAppBrowserViewController.navigationDelegate = self; + + if ([self.viewController conformsToProtocol:@protocol(CDVScreenOrientationDelegate)]) { + self.inAppBrowserViewController.orientationDelegate = (UIViewController *)self.viewController; + } + } + + [self.inAppBrowserViewController showLocationBar:browserOptions.location]; + [self.inAppBrowserViewController showToolBar:browserOptions.toolbar :browserOptions.toolbarposition]; + if (browserOptions.closebuttoncaption != nil) { + [self.inAppBrowserViewController setCloseButtonTitle:browserOptions.closebuttoncaption]; + } + // Set Presentation Style + UIModalPresentationStyle presentationStyle = UIModalPresentationFullScreen; // default + if (browserOptions.presentationstyle != nil) { + if ([[browserOptions.presentationstyle lowercaseString] isEqualToString:@"pagesheet"]) { + presentationStyle = UIModalPresentationPageSheet; + } else if ([[browserOptions.presentationstyle lowercaseString] isEqualToString:@"formsheet"]) { + presentationStyle = UIModalPresentationFormSheet; + } + } + self.inAppBrowserViewController.modalPresentationStyle = presentationStyle; + + // Set Transition Style + UIModalTransitionStyle transitionStyle = UIModalTransitionStyleCoverVertical; // default + if (browserOptions.transitionstyle != nil) { + if ([[browserOptions.transitionstyle lowercaseString] isEqualToString:@"fliphorizontal"]) { + transitionStyle = UIModalTransitionStyleFlipHorizontal; + } else if ([[browserOptions.transitionstyle lowercaseString] isEqualToString:@"crossdissolve"]) { + transitionStyle = UIModalTransitionStyleCrossDissolve; + } + } + self.inAppBrowserViewController.modalTransitionStyle = transitionStyle; + + // prevent webView from bouncing + if (browserOptions.disallowoverscroll) { + if ([self.inAppBrowserViewController.webView respondsToSelector:@selector(scrollView)]) { + ((UIScrollView*)[self.inAppBrowserViewController.webView scrollView]).bounces = NO; + } else { + for (id subview in self.inAppBrowserViewController.webView.subviews) { + if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { + ((UIScrollView*)subview).bounces = NO; + } + } + } + } + + // UIWebView options + self.inAppBrowserViewController.webView.scalesPageToFit = browserOptions.enableviewportscale; + self.inAppBrowserViewController.webView.mediaPlaybackRequiresUserAction = browserOptions.mediaplaybackrequiresuseraction; + self.inAppBrowserViewController.webView.allowsInlineMediaPlayback = browserOptions.allowinlinemediaplayback; + if (IsAtLeastiOSVersion(@"6.0")) { + self.inAppBrowserViewController.webView.keyboardDisplayRequiresUserAction = browserOptions.keyboarddisplayrequiresuseraction; + self.inAppBrowserViewController.webView.suppressesIncrementalRendering = browserOptions.suppressesincrementalrendering; + } + + [self.inAppBrowserViewController navigateTo:url]; + if (!browserOptions.hidden) { + [self show:nil]; + } +} + +- (void)show:(CDVInvokedUrlCommand*)command +{ + if (self.inAppBrowserViewController == nil) { + NSLog(@"Tried to show IAB after it was closed."); + return; + } + if (_previousStatusBarStyle != -1) { + NSLog(@"Tried to show IAB while already shown"); + return; + } + + _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; + + __block CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] + initWithRootViewController:self.inAppBrowserViewController]; + nav.orientationDelegate = self.inAppBrowserViewController; + nav.navigationBarHidden = YES; + + __weak CDVInAppBrowser* weakSelf = self; + + // Run later to avoid the "took a long time" log message. + dispatch_async(dispatch_get_main_queue(), ^{ + if (weakSelf.inAppBrowserViewController != nil) { + [weakSelf.viewController presentViewController:nav animated:YES completion:nil]; + } + }); +} + +- (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options +{ + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + +#ifdef __CORDOVA_4_0_0 + // the webview engine itself will filter for this according to policy + // in config.xml for cordova-ios-4.0 + [self.webViewEngine loadRequest:request]; +#else + if ([self.commandDelegate URLIsWhitelisted:url]) { + [self.webView loadRequest:request]; + } else { // this assumes the InAppBrowser can be excepted from the white-list + [self openInInAppBrowser:url withOptions:options]; + } +#endif +} + +- (void)openInSystem:(NSURL*)url +{ + if ([[UIApplication sharedApplication] canOpenURL:url]) { + [[UIApplication sharedApplication] openURL:url]; + } else { // handle any custom schemes to plugins + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + } +} + +// This is a helper method for the inject{Script|Style}{Code|File} API calls, which +// provides a consistent method for injecting JavaScript code into the document. +// +// If a wrapper string is supplied, then the source string will be JSON-encoded (adding +// quotes) and wrapped using string formatting. (The wrapper string should have a single +// '%@' marker). +// +// If no wrapper is supplied, then the source string is executed directly. + +- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper +{ + // Ensure an iframe bridge is created to communicate with the CDVInAppBrowserViewController + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:@"(function(d){_cdvIframeBridge=d.getElementById('_cdvIframeBridge');if(!_cdvIframeBridge) {var e = _cdvIframeBridge = d.createElement('iframe');e.id='_cdvIframeBridge'; e.style.display='none';d.body.appendChild(e);}})(document)"]; + + if (jsWrapper != nil) { + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil]; + NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + if (sourceArrayString) { + NSString* sourceString = [sourceArrayString substringWithRange:NSMakeRange(1, [sourceArrayString length] - 2)]; + NSString* jsToInject = [NSString stringWithFormat:jsWrapper, sourceString]; + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:jsToInject]; + } + } else { + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:source]; + } +} + +- (void)injectScriptCode:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper = nil; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"_cdvIframeBridge.src='gap-iab://%@/'+encodeURIComponent(JSON.stringify([eval(%%@)]));", command.callbackId]; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectScriptFile:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('script'); c.src = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectStyleCode:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('style'); c.innerHTML = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('style'); c.innerHTML = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectStyleFile:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('link'); c.rel='stylesheet', c.type='text/css'; c.href = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (BOOL)isValidCallbackId:(NSString *)callbackId +{ + NSError *err = nil; + // Initialize on first use + if (self.callbackIdPattern == nil) { + self.callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"^InAppBrowser[0-9]{1,10}$" options:0 error:&err]; + if (err != nil) { + // Couldn't initialize Regex; No is safer than Yes. + return NO; + } + } + if ([self.callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) { + return YES; + } + return NO; +} + +/** + * The iframe bridge provided for the InAppBrowser is capable of executing any oustanding callback belonging + * to the InAppBrowser plugin. Care has been taken that other callbacks cannot be triggered, and that no + * other code execution is possible. + * + * To trigger the bridge, the iframe (or any other resource) should attempt to load a url of the form: + * + * gap-iab:/// + * + * where is the string id of the callback to trigger (something like "InAppBrowser0123456789") + * + * If present, the path component of the special gap-iab:// url is expected to be a URL-escaped JSON-encoded + * value to pass to the callback. [NSURL path] should take care of the URL-unescaping, and a JSON_EXCEPTION + * is returned if the JSON is invalid. + */ +- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL* url = request.URL; + BOOL isTopLevelNavigation = [request.URL isEqual:[request mainDocumentURL]]; + + // See if the url uses the 'gap-iab' protocol. If so, the host should be the id of a callback to execute, + // and the path, if present, should be a JSON-encoded value to pass to the callback. + if ([[url scheme] isEqualToString:@"gap-iab"]) { + NSString* scriptCallbackId = [url host]; + CDVPluginResult* pluginResult = nil; + + if ([self isValidCallbackId:scriptCallbackId]) { + NSString* scriptResult = [url path]; + NSError* __autoreleasing error = nil; + + // The message should be a JSON-encoded array of the result of the script which executed. + if ((scriptResult != nil) && ([scriptResult length] > 1)) { + scriptResult = [scriptResult substringFromIndex:1]; + NSData* decodedResult = [NSJSONSerialization JSONObjectWithData:[scriptResult dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error]; + if ((error == nil) && [decodedResult isKindOfClass:[NSArray class]]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:(NSArray*)decodedResult]; + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_JSON_EXCEPTION]; + } + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:@[]]; + } + [self.commandDelegate sendPluginResult:pluginResult callbackId:scriptCallbackId]; + return NO; + } + } + //if is an app store link, let the system handle it, otherwise it fails to load it + else if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) { + [theWebView stopLoading]; + [self openInSystem:url]; + return NO; + } + else if ((self.callbackId != nil) && isTopLevelNavigation) { + // Send a loadstart event for each top-level navigation (includes redirects). + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"loadstart", @"url":[url absoluteString]}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } + + return YES; +} + +- (void)webViewDidStartLoad:(UIWebView*)theWebView +{ +} + +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + if (self.callbackId != nil) { + // TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected). + NSString* url = [self.inAppBrowserViewController.currentURL absoluteString]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"loadstop", @"url":url}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } +} + +- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + if (self.callbackId != nil) { + NSString* url = [self.inAppBrowserViewController.currentURL absoluteString]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR + messageAsDictionary:@{@"type":@"loaderror", @"url":url, @"code": [NSNumber numberWithInteger:error.code], @"message": error.localizedDescription}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } +} + +- (void)browserExit +{ + if (self.callbackId != nil) { + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"exit"}]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + self.callbackId = nil; + } + // Set navigationDelegate to nil to ensure no callbacks are received from it. + self.inAppBrowserViewController.navigationDelegate = nil; + // Don't recycle the ViewController since it may be consuming a lot of memory. + // Also - this is required for the PDF/User-Agent bug work-around. + self.inAppBrowserViewController = nil; + + if (IsAtLeastiOSVersion(@"7.0")) { + if (_previousStatusBarStyle != -1) { + [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + } + } + + _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7 +} + +@end + +#pragma mark CDVInAppBrowserViewController + +@implementation CDVInAppBrowserViewController + +@synthesize currentURL; + +- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions +{ + self = [super init]; + if (self != nil) { + _userAgent = userAgent; + _prevUserAgent = prevUserAgent; + _browserOptions = browserOptions; +#ifdef __CORDOVA_4_0_0 + _webViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:self]; +#else + _webViewDelegate = [[CDVWebViewDelegate alloc] initWithDelegate:self]; +#endif + + [self createViews]; + } + + return self; +} + +// Prevent crashes on closing windows +-(void)dealloc { + self.webView.delegate = nil; +} + +- (void)createViews +{ + // We create the views in code for primarily for ease of upgrades and not requiring an external .xib to be included + + CGRect webViewBounds = self.view.bounds; + BOOL toolbarIsAtBottom = ![_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]; + webViewBounds.size.height -= _browserOptions.location ? FOOTER_HEIGHT : TOOLBAR_HEIGHT; + self.webView = [[UIWebView alloc] initWithFrame:webViewBounds]; + + self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + + [self.view addSubview:self.webView]; + [self.view sendSubviewToBack:self.webView]; + + self.webView.delegate = _webViewDelegate; + self.webView.backgroundColor = [UIColor whiteColor]; + + self.webView.clearsContextBeforeDrawing = YES; + self.webView.clipsToBounds = YES; + self.webView.contentMode = UIViewContentModeScaleToFill; + self.webView.multipleTouchEnabled = YES; + self.webView.opaque = YES; + self.webView.scalesPageToFit = NO; + self.webView.userInteractionEnabled = YES; + + self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; + self.spinner.alpha = 1.000; + self.spinner.autoresizesSubviews = YES; + self.spinner.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin); + self.spinner.clearsContextBeforeDrawing = NO; + self.spinner.clipsToBounds = NO; + self.spinner.contentMode = UIViewContentModeScaleToFill; + self.spinner.frame = CGRectMake(CGRectGetMidX(self.webView.frame), CGRectGetMidY(self.webView.frame), 20.0, 20.0); + self.spinner.hidden = NO; + self.spinner.hidesWhenStopped = YES; + self.spinner.multipleTouchEnabled = NO; + self.spinner.opaque = NO; + self.spinner.userInteractionEnabled = NO; + [self.spinner stopAnimating]; + + self.closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; + self.closeButton.enabled = YES; + + UIBarButtonItem* flexibleSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; + + UIBarButtonItem* fixedSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; + fixedSpaceButton.width = 20; + + float toolbarY = toolbarIsAtBottom ? self.view.bounds.size.height - TOOLBAR_HEIGHT : 0.0; + CGRect toolbarFrame = CGRectMake(0.0, toolbarY, self.view.bounds.size.width, TOOLBAR_HEIGHT); + + self.toolbar = [[UIToolbar alloc] initWithFrame:toolbarFrame]; + self.toolbar.alpha = 1.000; + self.toolbar.autoresizesSubviews = YES; + self.toolbar.autoresizingMask = toolbarIsAtBottom ? (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin) : UIViewAutoresizingFlexibleWidth; + self.toolbar.barStyle = UIBarStyleBlackOpaque; + self.toolbar.clearsContextBeforeDrawing = NO; + self.toolbar.clipsToBounds = NO; + self.toolbar.contentMode = UIViewContentModeScaleToFill; + self.toolbar.hidden = NO; + self.toolbar.multipleTouchEnabled = NO; + self.toolbar.opaque = NO; + self.toolbar.userInteractionEnabled = YES; + + CGFloat labelInset = 5.0; + float locationBarY = toolbarIsAtBottom ? self.view.bounds.size.height - FOOTER_HEIGHT : self.view.bounds.size.height - LOCATIONBAR_HEIGHT; + + self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(labelInset, locationBarY, self.view.bounds.size.width - labelInset, LOCATIONBAR_HEIGHT)]; + self.addressLabel.adjustsFontSizeToFitWidth = NO; + self.addressLabel.alpha = 1.000; + self.addressLabel.autoresizesSubviews = YES; + self.addressLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; + self.addressLabel.backgroundColor = [UIColor clearColor]; + self.addressLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; + self.addressLabel.clearsContextBeforeDrawing = YES; + self.addressLabel.clipsToBounds = YES; + self.addressLabel.contentMode = UIViewContentModeScaleToFill; + self.addressLabel.enabled = YES; + self.addressLabel.hidden = NO; + self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail; + + if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) { + [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"]; + } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) { + [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"]; + } + + self.addressLabel.multipleTouchEnabled = NO; + self.addressLabel.numberOfLines = 1; + self.addressLabel.opaque = NO; + self.addressLabel.shadowOffset = CGSizeMake(0.0, -1.0); + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); + self.addressLabel.textAlignment = NSTextAlignmentLeft; + self.addressLabel.textColor = [UIColor colorWithWhite:1.000 alpha:1.000]; + self.addressLabel.userInteractionEnabled = NO; + + NSString* frontArrowString = NSLocalizedString(@"►", nil); // create arrow from Unicode char + self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)]; + self.forwardButton.enabled = YES; + self.forwardButton.imageInsets = UIEdgeInsetsZero; + + NSString* backArrowString = NSLocalizedString(@"◄", nil); // create arrow from Unicode char + self.backButton = [[UIBarButtonItem alloc] initWithTitle:backArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goBack:)]; + self.backButton.enabled = YES; + self.backButton.imageInsets = UIEdgeInsetsZero; + + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; + + self.view.backgroundColor = [UIColor grayColor]; + [self.view addSubview:self.toolbar]; + [self.view addSubview:self.addressLabel]; + [self.view addSubview:self.spinner]; +} + +- (void) setWebViewFrame : (CGRect) frame { + NSLog(@"Setting the WebView's frame to %@", NSStringFromCGRect(frame)); + [self.webView setFrame:frame]; +} + +- (void)setCloseButtonTitle:(NSString*)title +{ + // the advantage of using UIBarButtonSystemItemDone is the system will localize it for you automatically + // but, if you want to set this yourself, knock yourself out (we can't set the title for a system Done button, so we have to create a new one) + self.closeButton = nil; + self.closeButton = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStyleBordered target:self action:@selector(close)]; + self.closeButton.enabled = YES; + self.closeButton.tintColor = [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; + + NSMutableArray* items = [self.toolbar.items mutableCopy]; + [items replaceObjectAtIndex:0 withObject:self.closeButton]; + [self.toolbar setItems:items]; +} + +- (void)showLocationBar:(BOOL)show +{ + CGRect locationbarFrame = self.addressLabel.frame; + + BOOL toolbarVisible = !self.toolbar.hidden; + + // prevent double show/hide + if (show == !(self.addressLabel.hidden)) { + return; + } + + if (show) { + self.addressLabel.hidden = NO; + + if (toolbarVisible) { + // toolBar at the bottom, leave as is + // put locationBar on top of the toolBar + + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= FOOTER_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } else { + // no toolBar, so put locationBar at the bottom + + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= LOCATIONBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } + } else { + self.addressLabel.hidden = YES; + + if (toolbarVisible) { + // locationBar is on top of toolBar, hide locationBar + + // webView take up whole height less toolBar height + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= TOOLBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + } else { + // no toolBar, expand webView to screen dimensions + [self setWebViewFrame:self.view.bounds]; + } + } +} + +- (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition +{ + CGRect toolbarFrame = self.toolbar.frame; + CGRect locationbarFrame = self.addressLabel.frame; + + BOOL locationbarVisible = !self.addressLabel.hidden; + + // prevent double show/hide + if (show == !(self.toolbar.hidden)) { + return; + } + + if (show) { + self.toolbar.hidden = NO; + CGRect webViewBounds = self.view.bounds; + + if (locationbarVisible) { + // locationBar at the bottom, move locationBar up + // put toolBar at the bottom + webViewBounds.size.height -= FOOTER_HEIGHT; + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + self.toolbar.frame = toolbarFrame; + } else { + // no locationBar, so put toolBar at the bottom + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= TOOLBAR_HEIGHT; + self.toolbar.frame = toolbarFrame; + } + + if ([toolbarPosition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { + toolbarFrame.origin.y = 0; + webViewBounds.origin.y += toolbarFrame.size.height; + [self setWebViewFrame:webViewBounds]; + } else { + toolbarFrame.origin.y = (webViewBounds.size.height + LOCATIONBAR_HEIGHT); + } + [self setWebViewFrame:webViewBounds]; + + } else { + self.toolbar.hidden = YES; + + if (locationbarVisible) { + // locationBar is on top of toolBar, hide toolBar + // put locationBar at the bottom + + // webView take up whole height less locationBar height + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= LOCATIONBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + // move locationBar down + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } else { + // no locationBar, expand webView to screen dimensions + [self setWebViewFrame:self.view.bounds]; + } + } +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; +} + +- (void)viewDidUnload +{ + [self.webView loadHTMLString:nil baseURL:nil]; + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + [super viewDidUnload]; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return UIStatusBarStyleDefault; +} + +- (BOOL)prefersStatusBarHidden { + return NO; +} + +- (void)close +{ + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + self.currentURL = nil; + + if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserExit)]) { + [self.navigationDelegate browserExit]; + } + + __weak UIViewController* weakSelf = self; + + // Run later to avoid the "took a long time" log message. + dispatch_async(dispatch_get_main_queue(), ^{ + if ([weakSelf respondsToSelector:@selector(presentingViewController)]) { + [[weakSelf presentingViewController] dismissViewControllerAnimated:YES completion:nil]; + } else { + [[weakSelf parentViewController] dismissViewControllerAnimated:YES completion:nil]; + } + }); +} + +- (void)navigateTo:(NSURL*)url +{ + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + + if (_userAgentLockToken != 0) { + [self.webView loadRequest:request]; + } else { + __weak CDVInAppBrowserViewController* weakSelf = self; + [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { + _userAgentLockToken = lockToken; + [CDVUserAgentUtil setUserAgent:_userAgent lockToken:lockToken]; + [weakSelf.webView loadRequest:request]; + }]; + } +} + +- (void)goBack:(id)sender +{ + [self.webView goBack]; +} + +- (void)goForward:(id)sender +{ + [self.webView goForward]; +} + +- (void)viewWillAppear:(BOOL)animated +{ + if (IsAtLeastiOSVersion(@"7.0")) { + [[UIApplication sharedApplication] setStatusBarStyle:[self preferredStatusBarStyle]]; + } + [self rePositionViews]; + + [super viewWillAppear:animated]; +} + +// +// On iOS 7 the status bar is part of the view's dimensions, therefore it's height has to be taken into account. +// The height of it could be hardcoded as 20 pixels, but that would assume that the upcoming releases of iOS won't +// change that value. +// +- (float) getStatusBarOffset { + CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; + float statusBarOffset = IsAtLeastiOSVersion(@"7.0") ? MIN(statusBarFrame.size.width, statusBarFrame.size.height) : 0.0; + return statusBarOffset; +} + +- (void) rePositionViews { + if ([_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { + [self.webView setFrame:CGRectMake(self.webView.frame.origin.x, TOOLBAR_HEIGHT, self.webView.frame.size.width, self.webView.frame.size.height)]; + [self.toolbar setFrame:CGRectMake(self.toolbar.frame.origin.x, [self getStatusBarOffset], self.toolbar.frame.size.width, self.toolbar.frame.size.height)]; + } +} + +#pragma mark UIWebViewDelegate + +- (void)webViewDidStartLoad:(UIWebView*)theWebView +{ + // loading url, start spinner, update back/forward + + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + + [self.spinner startAnimating]; + + return [self.navigationDelegate webViewDidStartLoad:theWebView]; +} + +- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + BOOL isTopLevelNavigation = [request.URL isEqual:[request mainDocumentURL]]; + + if (isTopLevelNavigation) { + self.currentURL = request.URL; + } + return [self.navigationDelegate webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; +} + +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + // update url, stop spinner, update back/forward + + self.addressLabel.text = [self.currentURL absoluteString]; + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + + [self.spinner stopAnimating]; + + // Work around a bug where the first time a PDF is opened, all UIWebViews + // reload their User-Agent from NSUserDefaults. + // This work-around makes the following assumptions: + // 1. The app has only a single Cordova Webview. If not, then the app should + // take it upon themselves to load a PDF in the background as a part of + // their start-up flow. + // 2. That the PDF does not require any additional network requests. We change + // the user-agent here back to that of the CDVViewController, so requests + // from it must pass through its white-list. This *does* break PDFs that + // contain links to other remote PDF/websites. + // More info at https://issues.apache.org/jira/browse/CB-2225 + BOOL isPDF = [@"true" isEqualToString :[theWebView stringByEvaluatingJavaScriptFromString:@"document.body==null"]]; + if (isPDF) { + [CDVUserAgentUtil setUserAgent:_prevUserAgent lockToken:_userAgentLockToken]; + } + + [self.navigationDelegate webViewDidFinishLoad:theWebView]; +} + +- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + // log fail message, stop spinner, update back/forward + NSLog(@"webView:didFailLoadWithError - %ld: %@", (long)error.code, [error localizedDescription]); + + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + [self.spinner stopAnimating]; + + self.addressLabel.text = NSLocalizedString(@"Load Error", nil); + + [self.navigationDelegate webView:theWebView didFailLoadWithError:error]; +} + +#pragma mark CDVScreenOrientationDelegate + +- (BOOL)shouldAutorotate +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) { + return [self.orientationDelegate shouldAutorotate]; + } + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { + return [self.orientationDelegate supportedInterfaceOrientations]; + } + + return 1 << UIInterfaceOrientationPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) { + return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + + return YES; +} + +@end + +@implementation CDVInAppBrowserOptions + +- (id)init +{ + if (self = [super init]) { + // default values + self.location = YES; + self.toolbar = YES; + self.closebuttoncaption = nil; + self.toolbarposition = kInAppBrowserToolbarBarPositionBottom; + self.clearcache = NO; + self.clearsessioncache = NO; + + self.enableviewportscale = NO; + self.mediaplaybackrequiresuseraction = NO; + self.allowinlinemediaplayback = NO; + self.keyboarddisplayrequiresuseraction = YES; + self.suppressesincrementalrendering = NO; + self.hidden = NO; + self.disallowoverscroll = NO; + } + + return self; +} + ++ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options +{ + CDVInAppBrowserOptions* obj = [[CDVInAppBrowserOptions alloc] init]; + + // NOTE: this parsing does not handle quotes within values + NSArray* pairs = [options componentsSeparatedByString:@","]; + + // parse keys and values, set the properties + for (NSString* pair in pairs) { + NSArray* keyvalue = [pair componentsSeparatedByString:@"="]; + + if ([keyvalue count] == 2) { + NSString* key = [[keyvalue objectAtIndex:0] lowercaseString]; + NSString* value = [keyvalue objectAtIndex:1]; + NSString* value_lc = [value lowercaseString]; + + BOOL isBoolean = [value_lc isEqualToString:@"yes"] || [value_lc isEqualToString:@"no"]; + NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; + [numberFormatter setAllowsFloats:YES]; + BOOL isNumber = [numberFormatter numberFromString:value_lc] != nil; + + // set the property according to the key name + if ([obj respondsToSelector:NSSelectorFromString(key)]) { + if (isNumber) { + [obj setValue:[numberFormatter numberFromString:value_lc] forKey:key]; + } else if (isBoolean) { + [obj setValue:[NSNumber numberWithBool:[value_lc isEqualToString:@"yes"]] forKey:key]; + } else { + [obj setValue:value forKey:key]; + } + } + } + } + + return obj; +} + +@end + +@implementation CDVInAppBrowserNavigationController : UINavigationController + +- (void) viewDidLoad { + + CGRect frame = [UIApplication sharedApplication].statusBarFrame; + + // simplified from: http://stackoverflow.com/a/25669695/219684 + + UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:[self invertFrameIfNeeded:frame]]; + bgToolbar.barStyle = UIBarStyleDefault; + [bgToolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; + [self.view addSubview:bgToolbar]; + + [super viewDidLoad]; +} + +- (CGRect) invertFrameIfNeeded:(CGRect)rect { + // We need to invert since on iOS 7 frames are always in Portrait context + if (!IsAtLeastiOSVersion(@"8.0")) { + if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { + CGFloat temp = rect.size.width; + rect.size.width = rect.size.height; + rect.size.height = temp; + rect.origin = CGPointZero; + } + } + return rect; +} + +#pragma mark CDVScreenOrientationDelegate + +- (BOOL)shouldAutorotate +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) { + return [self.orientationDelegate shouldAutorotate]; + } + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { + return [self.orientationDelegate supportedInterfaceOrientations]; + } + + return 1 << UIInterfaceOrientationPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) { + return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + + return YES; +} + + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml new file mode 100644 index 0000000..781e8a6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml @@ -0,0 +1,92 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +import QtQuick 2.0 +import Ubuntu.Components.Popups 0.1 +import Ubuntu.Components 0.1 +import com.canonical.Oxide 1.0 + +Rectangle { + anchors.fill: parent + id: inappbrowser + property string url1 + Rectangle { + border.color: "black" + width: parent.width + height: urlEntry.height + color: "gray" + TextInput { + id: urlEntry + width: parent.width - closeButton.width + text: url1 + activeFocusOnPress: false + } + Image { + id: closeButton + width: height + x: parent.width - width + height: parent.height + source: "close.png" + MouseArea { + anchors.fill: parent + onClicked: { + root.exec("InAppBrowser", "close", [0, 0]) + } + } + } + } + + property string usContext: "oxide://main-world/2" + + function executeJS(scId, code) { + var req = _view.rootFrame.sendMessage(usContext, "EXECUTE", {code: code}); + + req.onreply = function(response) { + var code = 'cordova.callback(' + scId + ', JSON.parse(\'' + JSON.stringify(response.result) + '\'))'; + console.warn(code); + cordova.javaScriptExecNeeded(code); + console.warn("RESP:" + JSON.stringify(response)); + }; + } + + WebView { + width: parent.width + y: urlEntry.height + height: parent.height - y + url: url1 + id: _view + onLoadingStateChanged: { + root.exec("InAppBrowser", "loadFinished", [_view.loading]) + } + context: WebContext { + id: webcontext + + userScripts: [ + UserScript { + context: usContext + emulateGreasemonkey: true + url: "InAppBrowser_escapeScript.js" + } + ] + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js new file mode 100644 index 0000000..07661bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js @@ -0,0 +1,29 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +oxide.addMessageHandler("EXECUTE", function(msg) { + var code = msg.args.code; + try { + msg.reply({result: eval(code)}); + } catch(e) { + msg.error("Code threw exception: \"" + e + "\""); + } +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png new file mode 100644 index 0000000..56373d1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp new file mode 100644 index 0000000..c5a9e64 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp @@ -0,0 +1,105 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +#include +#include + +#include "inappbrowser.h" +#include + +Inappbrowser::Inappbrowser(Cordova *cordova): CPlugin(cordova), _eventCb(0) { +} + +const char code[] = "\ +var component; \ +function createObject() { \ + component = Qt.createComponent(%1); \ + if (component.status == Component.Ready) \ + finishCreation(); \ + else \ + component.statusChanged.connect(finishCreation); \ +} \ +function finishCreation() { \ + CordovaWrapper.global.inappbrowser = component.createObject(root, \ + {root: root, cordova: cordova, url1: %2}); \ +} \ +createObject()"; + +const char EXIT_EVENT[] = "{type: 'exit'}"; +const char LOADSTART_EVENT[] = "{type: 'loadstart'}"; +const char LOADSTOP_EVENT[] = "{type: 'loadstop'}"; +const char LOADERROR_EVENT[] = "{type: 'loaderror'}"; + +void Inappbrowser::open(int cb, int, const QString &url, const QString &, const QString &) { + assert(_eventCb == 0); + + _eventCb = cb; + + QString path = m_cordova->get_app_dir() + "/../qml/InAppBrowser.qml"; + QString qml = QString(code) + .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(url)); + m_cordova->execQML(qml); +} + +void Inappbrowser::show(int, int) { + m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = true"); +} + +void Inappbrowser::close(int, int) { + m_cordova->execQML("CordovaWrapper.global.inappbrowser.destroy()"); + this->callbackWithoutRemove(_eventCb, EXIT_EVENT); + _eventCb = 0; +} + +void Inappbrowser::injectStyleFile(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %1; d.head.appendChild(c);})(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectStyleCode(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('style'); c.innerHTML = %1; d.body.appendChild(c); })(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectScriptFile(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('script'); c.src = %1; d.body.appendChild(c);})(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectScriptCode(int scId, int, const QString& code, bool) { + m_cordova->execQML(QString("CordovaWrapper.global.inappbrowser.executeJS(%2, %1)").arg(CordovaInternal::format(code)).arg(scId)); +} + +void Inappbrowser::loadFinished(bool status) { + if (!status) { + this->callbackWithoutRemove(_eventCb, LOADSTOP_EVENT); + } else { + this->callbackWithoutRemove(_eventCb, LOADSTART_EVENT); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h new file mode 100644 index 0000000..1da4e03 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h @@ -0,0 +1,61 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +#ifndef INAPPBROWSER_H +#define INAPPBROWSER_H + +#include +#include + +class Inappbrowser: public CPlugin { + Q_OBJECT +public: + Inappbrowser(Cordova *cordova); + + virtual const QString fullName() override { + return Inappbrowser::fullID(); + } + + virtual const QString shortName() override { + return "InAppBrowser"; + } + + static const QString fullID() { + return "InAppBrowser"; + } + +public slots: + void open(int cb, int, const QString &url, const QString &windowName, const QString &windowFeatures); + void show(int, int); + void close(int, int); + void injectStyleFile(int cb, int, const QString&, bool); + void injectStyleCode(int cb, int, const QString&, bool); + void injectScriptFile(int cb, int, const QString&, bool); + void injectScriptCode(int cb, int, const QString&, bool); + + void loadFinished(bool status); + +private: + int _eventCb; +}; + +#endif diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js new file mode 100644 index 0000000..f6d1da6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js @@ -0,0 +1,340 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/*jslint sloppy:true */ +/*global Windows:true, require, document, setTimeout, window, module */ + + + +var cordova = require('cordova'), + urlutil = require('cordova/urlutil'); + +var browserWrap, + popup, + navigationButtonsDiv, + navigationButtonsDivInner, + backButton, + forwardButton, + closeButton, + bodyOverflowStyle, + navigationEventsCallback; + +// x-ms-webview is available starting from Windows 8.1 (platformId is 'windows') +// http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx +var isWebViewAvailable = cordova.platformId === 'windows'; + +function attachNavigationEvents(element, callback) { + if (isWebViewAvailable) { + element.addEventListener("MSWebViewNavigationStarting", function (e) { + callback({ type: "loadstart", url: e.uri}, {keepCallback: true} ); + }); + + element.addEventListener("MSWebViewNavigationCompleted", function (e) { + if (e.isSuccess) { + callback({ type: "loadstop", url: e.uri }, { keepCallback: true }); + } else { + callback({ type: "loaderror", url: e.uri, code: e.webErrorStatus, message: "Navigation failed with error code " + e.webErrorStatus}, { keepCallback: true }); + } + }); + + element.addEventListener("MSWebViewUnviewableContentIdentified", function (e) { + // WebView found the content to be not HTML. + // http://msdn.microsoft.com/en-us/library/windows/apps/dn609716.aspx + callback({ type: "loaderror", url: e.uri, code: e.webErrorStatus, message: "Navigation failed with error code " + e.webErrorStatus}, { keepCallback: true }); + }); + + element.addEventListener("MSWebViewContentLoading", function (e) { + if (navigationButtonsDiv && popup) { + if (popup.canGoBack) { + backButton.removeAttribute("disabled"); + } else { + backButton.setAttribute("disabled", "true"); + } + + if (popup.canGoForward) { + forwardButton.removeAttribute("disabled"); + } else { + forwardButton.setAttribute("disabled", "true"); + } + } + }); + } else { + var onError = function () { + callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true}); + }; + + element.addEventListener("unload", function () { + callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("load", function () { + callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("error", onError); + element.addEventListener("abort", onError); + } +} + +var IAB = { + close: function (win, lose) { + setImmediate(function () { + if (browserWrap) { + if (navigationEventsCallback) { + navigationEventsCallback({ type: "exit" }); + } + + browserWrap.parentNode.removeChild(browserWrap); + // Reset body overflow style to initial value + document.body.style.msOverflowStyle = bodyOverflowStyle; + browserWrap = null; + popup = null; + } + }); + }, + show: function (win, lose) { + setImmediate(function () { + if (browserWrap) { + browserWrap.style.display = "block"; + } + }); + }, + open: function (win, lose, args) { + // make function async so that we can add navigation events handlers before view is loaded and navigation occured + setImmediate(function () { + var strUrl = args[0], + target = args[1], + features = args[2], + url; + + navigationEventsCallback = win; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_self" || !target) { + window.location = strUrl; + } else { + // "_blank" or anything else + if (!browserWrap) { + var browserWrapStyle = document.createElement('link'); + browserWrapStyle.rel = "stylesheet"; + browserWrapStyle.type = "text/css"; + browserWrapStyle.href = urlutil.makeAbsolute("/www/css/inappbrowser.css"); + + document.head.appendChild(browserWrapStyle); + + browserWrap = document.createElement("div"); + browserWrap.className = "inAppBrowserWrap"; + + if (features.indexOf("fullscreen=yes") > -1) { + browserWrap.classList.add("inAppBrowserWrapFullscreen"); + } + + // Save body overflow style to be able to reset it back later + bodyOverflowStyle = document.body.style.msOverflowStyle; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(navigationEventsCallback); + }, 0); + }; + + document.body.appendChild(browserWrap); + // Hide scrollbars for the whole body while inappbrowser's window is open + document.body.style.msOverflowStyle = "none"; + } + + if (features.indexOf("hidden=yes") !== -1) { + browserWrap.style.display = "none"; + } + + popup = document.createElement(isWebViewAvailable ? "x-ms-webview" : "iframe"); + if (popup instanceof HTMLIFrameElement) { + // For iframe we need to override bacground color of parent element here + // otherwise pages without background color set will have transparent background + popup.style.backgroundColor = "white"; + } + popup.style.borderWidth = "0px"; + popup.style.width = "100%"; + + browserWrap.appendChild(popup); + + if (features.indexOf("location=yes") !== -1 || features.indexOf("location") === -1) { + popup.style.height = "calc(100% - 70px)"; + + navigationButtonsDiv = document.createElement("div"); + navigationButtonsDiv.className = "inappbrowser-app-bar"; + navigationButtonsDiv.onclick = function (e) { + e.cancelBubble = true; + }; + + navigationButtonsDivInner = document.createElement("div"); + navigationButtonsDivInner.className = "inappbrowser-app-bar-inner" + navigationButtonsDivInner.onclick = function (e) { + e.cancelBubble = true; + }; + + backButton = document.createElement("div"); + backButton.innerText = "back"; + backButton.className = "app-bar-action action-back"; + backButton.addEventListener("click", function (e) { + if (popup.canGoBack) + popup.goBack(); + }); + + forwardButton = document.createElement("div"); + forwardButton.innerText = "forward"; + forwardButton.className = "app-bar-action action-forward"; + forwardButton.addEventListener("click", function (e) { + if (popup.canGoForward) + popup.goForward(); + }); + + closeButton = document.createElement("div"); + closeButton.innerText = "close"; + closeButton.className = "app-bar-action action-close"; + closeButton.addEventListener("click", function (e) { + setTimeout(function () { + IAB.close(navigationEventsCallback); + }, 0); + }); + + if (!isWebViewAvailable) { + // iframe navigation is not yet supported + backButton.setAttribute("disabled", "true"); + forwardButton.setAttribute("disabled", "true"); + } + + navigationButtonsDivInner.appendChild(backButton); + navigationButtonsDivInner.appendChild(forwardButton); + navigationButtonsDivInner.appendChild(closeButton); + navigationButtonsDiv.appendChild(navigationButtonsDivInner); + + browserWrap.appendChild(navigationButtonsDiv); + } else { + popup.style.height = "100%"; + } + + // start listening for navigation events + attachNavigationEvents(popup, navigationEventsCallback); + + if (isWebViewAvailable) { + strUrl = strUrl.replace("ms-appx://", "ms-appx-web://"); + } + popup.src = strUrl; + } + }); + }, + + injectScriptCode: function (win, fail, args) { + setImmediate(function () { + var code = args[0], + hasCallback = args[1]; + + if (isWebViewAvailable && browserWrap && popup) { + var op = popup.invokeScriptAsync("eval", code); + op.oncomplete = function (e) { + // return null if event target is unavailable by some reason + var result = (e && e.target) ? [e.target.result] : [null]; + hasCallback && win(result); + }; + op.onerror = function () { }; + op.start(); + } + }); + }, + + injectScriptFile: function (win, fail, args) { + setImmediate(function () { + var filePath = args[0], + hasCallback = args[1]; + + if (!!filePath) { + filePath = urlutil.makeAbsolute(filePath); + } + + if (isWebViewAvailable && browserWrap && popup) { + var uri = new Windows.Foundation.Uri(filePath); + Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done(function (file) { + Windows.Storage.FileIO.readTextAsync(file).done(function (code) { + var op = popup.invokeScriptAsync("eval", code); + op.oncomplete = function(e) { + var result = [e.target.result]; + hasCallback && win(result); + }; + op.onerror = function () { }; + op.start(); + }); + }); + } + }); + }, + + injectStyleCode: function (win, fail, args) { + setImmediate(function () { + var code = args[0], + hasCallback = args[1]; + + if (isWebViewAvailable && browserWrap && popup) { + injectCSS(popup, code, hasCallback && win); + } + }); + }, + + injectStyleFile: function (win, fail, args) { + setImmediate(function () { + var filePath = args[0], + hasCallback = args[1]; + + filePath = filePath && urlutil.makeAbsolute(filePath); + + if (isWebViewAvailable && browserWrap && popup) { + var uri = new Windows.Foundation.Uri(filePath); + Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).then(function (file) { + return Windows.Storage.FileIO.readTextAsync(file); + }).done(function (code) { + injectCSS(popup, code, hasCallback && win); + }, function () { + // no-op, just catch an error + }); + } + }); + } +}; + +function injectCSS (webView, cssCode, callback) { + // This will automatically escape all thing that we need (quotes, slashes, etc.) + var escapedCode = JSON.stringify(cssCode); + var evalWrapper = "(function(d){var c=d.createElement('style');c.innerHTML=%s;d.head.appendChild(c);})(document)" + .replace('%s', escapedCode); + + var op = webView.invokeScriptAsync("eval", evalWrapper); + op.oncomplete = function() { + callback && callback([]); + }; + op.onerror = function () { }; + op.start(); +} + +module.exports = IAB; + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs new file mode 100644 index 0000000..ddb5122 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs @@ -0,0 +1,515 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; +using System.Diagnostics; +using System.IO; +using System.Runtime.Serialization; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; + +#if WP8 +using System.Threading.Tasks; +using Windows.ApplicationModel; +using Windows.Storage; +using Windows.System; + +//Use alias in case Cordova File Plugin is enabled. Then the File class will be declared in both and error will occur. +using IOFile = System.IO.File; +#else +using Microsoft.Phone.Tasks; +#endif + +namespace WPCordovaClassLib.Cordova.Commands +{ + [DataContract] + public class BrowserOptions + { + [DataMember] + public string url; + + [DataMember] + public bool isGeolocationEnabled; + } + + public class InAppBrowser : BaseCommand + { + + private static WebBrowser browser; + private static ApplicationBarIconButton backButton; + private static ApplicationBarIconButton fwdButton; + + protected ApplicationBar AppBar; + + protected bool ShowLocation {get;set;} + protected bool StartHidden {get;set;} + + protected string NavigationCallbackId { get; set; } + + public void open(string options) + { + // reset defaults on ShowLocation + StartHidden features + ShowLocation = true; + StartHidden = false; + + string[] args = JSON.JsonHelper.Deserialize(options); + //BrowserOptions opts = JSON.JsonHelper.Deserialize(options); + string urlLoc = args[0]; + string target = args[1]; + string featString = args[2]; + this.NavigationCallbackId = args[3]; + + if (!string.IsNullOrEmpty(featString)) + { + string[] features = featString.Split(','); + foreach (string str in features) + { + try + { + string[] split = str.Split('='); + switch (split[0]) + { + case "location": + ShowLocation = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); + break; + case "hidden": + StartHidden = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); + break; + } + } + catch (Exception) + { + // some sort of invalid param was passed, moving on ... + } + } + } + /* + _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser + _blank - always open in the InAppBrowser + _system - always open in the system web browser + */ + switch (target) + { + case "_blank": + ShowInAppBrowser(urlLoc); + break; + case "_self": + ShowCordovaBrowser(urlLoc); + break; + case "_system": + ShowSystemBrowser(urlLoc); + break; + } + } + + public void show(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + + + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + browser.Visibility = Visibility.Visible; + AppBar.IsVisible = true; + }); + } + } + + public void injectScriptCode(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + + bool bCallback = false; + if (bool.TryParse(args[1], out bCallback)) { }; + + string callbackId = args[2]; + + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + var res = browser.InvokeScript("eval", new string[] { args[0] }); + + if (bCallback) + { + PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); + result.KeepCallback = false; + this.DispatchCommandResult(result); + } + + }); + } + } + + public void injectScriptFile(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support executeScript"); + string[] args = JSON.JsonHelper.Deserialize(options); + // throw new NotImplementedException("Windows Phone does not currently support 'executeScript'"); + } + + public void injectStyleCode(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); + return; + + //string[] args = JSON.JsonHelper.Deserialize(options); + //bool bCallback = false; + //if (bool.TryParse(args[1], out bCallback)) { }; + + //string callbackId = args[2]; + + //if (browser != null) + //{ + //Deployment.Current.Dispatcher.BeginInvoke(() => + //{ + // if (bCallback) + // { + // string cssInsertString = "try{(function(doc){var c = ''; doc.head.innerHTML += c;})(document);}catch(ex){alert('oops : ' + ex.message);}"; + // //cssInsertString = cssInsertString.Replace("_VALUE_", args[0]); + // Debug.WriteLine("cssInsertString = " + cssInsertString); + // var res = browser.InvokeScript("eval", new string[] { cssInsertString }); + // if (bCallback) + // { + // PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); + // result.KeepCallback = false; + // this.DispatchCommandResult(result); + // } + // } + + //}); + //} + } + + public void injectStyleFile(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); + return; + + //string[] args = JSON.JsonHelper.Deserialize(options); + //throw new NotImplementedException("Windows Phone does not currently support 'insertCSS'"); + } + + private void ShowCordovaBrowser(string url) + { + Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + if (page != null) + { + CordovaView cView = page.FindName("CordovaView") as CordovaView; + if (cView != null) + { + WebBrowser br = cView.Browser; + br.Navigate2(loc); + } + } + + } + }); + } + +#if WP8 + private async void ShowSystemBrowser(string url) + { + var pathUri = new Uri(url, UriKind.Absolute); + if (pathUri.Scheme == Uri.UriSchemeHttp || pathUri.Scheme == Uri.UriSchemeHttps) + { + await Launcher.LaunchUriAsync(pathUri); + return; + } + + var file = await GetFile(pathUri.AbsolutePath.Replace('/', Path.DirectorySeparatorChar)); + if (file != null) + { + await Launcher.LaunchFileAsync(file); + } + else + { + Debug.WriteLine("File not found."); + } + } + + private async Task GetFile(string fileName) + { + //first try to get the file from the isolated storage + var localFolder = ApplicationData.Current.LocalFolder; + if (IOFile.Exists(Path.Combine(localFolder.Path, fileName))) + { + return await localFolder.GetFileAsync(fileName); + } + + //if file is not found try to get it from the xap + var filePath = Path.Combine(Package.Current.InstalledLocation.Path, fileName); + if (IOFile.Exists(filePath)) + { + return await StorageFile.GetFileFromPathAsync(filePath); + } + + return null; + } +#else + private void ShowSystemBrowser(string url) + { + WebBrowserTask webBrowserTask = new WebBrowserTask(); + webBrowserTask.Uri = new Uri(url, UriKind.Absolute); + webBrowserTask.Show(); + } +#endif + + private void ShowInAppBrowser(string url) + { + Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (browser != null) + { + //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; + browser.Navigate2(loc); + } + else + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + + string baseImageUrl = "Images/"; + + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + browser = new WebBrowser(); + browser.IsScriptEnabled = true; + browser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(browser_LoadCompleted); + + browser.Navigating += new EventHandler(browser_Navigating); + browser.NavigationFailed += new System.Windows.Navigation.NavigationFailedEventHandler(browser_NavigationFailed); + browser.Navigated += new EventHandler(browser_Navigated); + browser.Navigate2(loc); + + if (StartHidden) + { + browser.Visibility = Visibility.Collapsed; + } + + //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; + grid.Children.Add(browser); + } + + ApplicationBar bar = new ApplicationBar(); + bar.BackgroundColor = Colors.Gray; + bar.IsMenuEnabled = false; + + backButton = new ApplicationBarIconButton(); + backButton.Text = "Back"; + + backButton.IconUri = new Uri(baseImageUrl + "appbar.back.rest.png", UriKind.Relative); + backButton.Click += new EventHandler(backButton_Click); + bar.Buttons.Add(backButton); + + + fwdButton = new ApplicationBarIconButton(); + fwdButton.Text = "Forward"; + fwdButton.IconUri = new Uri(baseImageUrl + "appbar.next.rest.png", UriKind.Relative); + fwdButton.Click += new EventHandler(fwdButton_Click); + bar.Buttons.Add(fwdButton); + + ApplicationBarIconButton closeBtn = new ApplicationBarIconButton(); + closeBtn.Text = "Close"; + closeBtn.IconUri = new Uri(baseImageUrl + "appbar.close.rest.png", UriKind.Relative); + closeBtn.Click += new EventHandler(closeBtn_Click); + bar.Buttons.Add(closeBtn); + + page.ApplicationBar = bar; + bar.IsVisible = !StartHidden; + AppBar = bar; + + page.BackKeyPress += page_BackKeyPress; + + } + + } + } + }); + } + + void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) + { +#if WP8 + if (browser.CanGoBack) + { + browser.GoBack(); + } + else + { + close(); + } + e.Cancel = true; +#else + browser.InvokeScript("execScript", "history.back();"); +#endif + } + + void browser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) + { + + } + + void fwdButton_Click(object sender, EventArgs e) + { + if (browser != null) + { + try + { +#if WP8 + browser.GoForward(); +#else + browser.InvokeScript("execScript", "history.forward();"); +#endif + } + catch (Exception) + { + + } + } + } + + void backButton_Click(object sender, EventArgs e) + { + if (browser != null) + { + try + { +#if WP8 + browser.GoBack(); +#else + browser.InvokeScript("execScript", "history.back();"); +#endif + } + catch (Exception) + { + + } + } + } + + void closeBtn_Click(object sender, EventArgs e) + { + this.close(); + } + + + public void close(string options = "") + { + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(browser); + } + page.ApplicationBar = null; + page.BackKeyPress -= page_BackKeyPress; + } + } + + browser = null; + string message = "{\"type\":\"exit\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = false; + this.DispatchCommandResult(result, NavigationCallbackId); + }); + } + } + + void browser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) + { +#if WP8 + if (browser != null) + { + backButton.IsEnabled = browser.CanGoBack; + fwdButton.IsEnabled = browser.CanGoForward; + + } +#endif + string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e) + { + string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.ERROR, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + void browser_Navigating(object sender, NavigatingEventArgs e) + { + string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + } + + internal static class WebBrowserExtensions + { + /// + /// Improved method to initiate request to the provided URI. Supports 'data:text/html' urls. + /// + /// The browser instance + /// The requested uri + internal static void Navigate2(this WebBrowser browser, Uri uri) + { + // IE10 does not support data uri so we use NavigateToString method instead + if (uri.Scheme == "data") + { + // we should remove the scheme identifier and unescape the uri + string uriString = Uri.UnescapeDataString(uri.AbsoluteUri); + // format is 'data:text/html, ...' + string html = new System.Text.RegularExpressions.Regex("^data:text/html,").Replace(uriString, ""); + browser.NavigateToString(html); + } + else + { + browser.Navigate(uri); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/plugin.xml new file mode 100644 index 0000000..212da9a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/plugin.xml @@ -0,0 +1,33 @@ + + + + + Cordova InAppBrowser Plugin Tests + Apache 2.0 + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css new file mode 100644 index 0000000..3f6e41c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +#style-update-file { + display: block !important; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html new file mode 100644 index 0000000..3004b35 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html @@ -0,0 +1,44 @@ + + + + + + + + + Cordova Mobile Spec + + + +

    InAppBrowser - Script / Style Injection Test

    + + +
    User-Agent:
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js new file mode 100644 index 0000000..6f25493 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +var d = document.getElementById("header") +d.innerHTML = "Script file successfully injected"; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html new file mode 100644 index 0000000..d23a714 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html @@ -0,0 +1,67 @@ + + + + + + + + + IAB test page + + + + + +

    Local URL

    +
    + You have successfully loaded a local URL: + +
    +
    +
    User-Agent =
    +
    +
    Likely running inAppBrowser: Device version from Cordova=not found, Back link should not work, toolbar may be present, logcat should show failed 'gap:' calls.
    +
    +
    Visit Google (whitelisted)
    +
    Visit Yahoo (not whitelisted)
    + + +

    Back +

    + +

    tall div with border
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf new file mode 100644 index 0000000..b54f1b7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html new file mode 100644 index 0000000..4f167f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html @@ -0,0 +1,45 @@ + + + + + + + + + Cordova Mobile Spec + + + + +
    + + +
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js new file mode 100644 index 0000000..03e3e12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js @@ -0,0 +1,632 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var cordova = require('cordova'); +var isWindows = cordova.platformId == 'windows'; + +window.alert = window.alert || navigator.notification.alert; + +exports.defineAutoTests = function () { + + describe('cordova.InAppBrowser', function () { + + it("inappbrowser.spec.1 should exist", function () { + expect(cordova.InAppBrowser).toBeDefined(); + }); + + it("inappbrowser.spec.2 should contain open function", function () { + expect(cordova.InAppBrowser.open).toBeDefined(); + expect(cordova.InAppBrowser.open).toEqual(jasmine.any(Function)); + }); + }); + + describe('open method', function () { + + var iabInstance; + var originalTimeout; + var url = 'https://dist.apache.org/repos/dist/dev/cordova/'; + var badUrl = 'http://bad-uri/'; + + beforeEach(function () { + // increase timeout to ensure test url could be loaded within test time + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000; + + iabInstance = null; + }); + + afterEach(function (done) { + // restore original timeout + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + + if (iabInstance !== null && iabInstance.close) { + iabInstance.close(); + } + iabInstance = null; + // add some extra time so that iab dialog is closed + setTimeout(done, 2000); + }); + + function verifyEvent(evt, type) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual(type); + if (type !== 'exit') { // `exit` event does not have url field + expect(evt.url).toEqual(url); + } + } + + function verifyLoadErrorEvent(evt) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual('loaderror'); + expect(evt.url).toEqual(badUrl); + expect(evt.code).toEqual(jasmine.any(Number)); + expect(evt.message).toEqual(jasmine.any(String)); + } + + it("inappbrowser.spec.3 should retun InAppBrowser instance with required methods", function () { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + + expect(iabInstance).toBeDefined(); + + expect(iabInstance.addEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.removeEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.close).toEqual(jasmine.any(Function)); + expect(iabInstance.show).toEqual(jasmine.any(Function)); + expect(iabInstance.executeScript).toEqual(jasmine.any(Function)); + expect(iabInstance.insertCSS).toEqual(jasmine.any(Function)); + }); + + it("inappbrowser.spec.4 should support loadstart and loadstop events", function (done) { + var onLoadStart = jasmine.createSpy('loadstart event callback').and.callFake(function (evt) { + verifyEvent(evt, 'loadstart'); + }); + + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('loadstart', onLoadStart); + iabInstance.addEventListener('loadstop', function (evt) { + verifyEvent(evt, 'loadstop'); + expect(onLoadStart).toHaveBeenCalled(); + done(); + }); + }); + + it("inappbrowser.spec.5 should support exit event", function (done) { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('exit', function (evt) { + verifyEvent(evt, 'exit'); + done(); + }); + iabInstance.close(); + iabInstance = null; + }); + + it("inappbrowser.spec.6 should support loaderror event", function (done) { + iabInstance = cordova.InAppBrowser.open(badUrl, '_blank'); + iabInstance.addEventListener('loaderror', function (evt) { + verifyLoadErrorEvent(evt); + done(); + }); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + + function doOpen(url, target, params, numExpectedRedirects, useWindowOpen) { + numExpectedRedirects = numExpectedRedirects || 0; + useWindowOpen = useWindowOpen || false; + console.log("Opening " + url); + + var counts; + var lastLoadStartURL; + var wasReset = false; + function reset() { + counts = { + 'loaderror': 0, + 'loadstart': 0, + 'loadstop': 0, + 'exit': 0 + }; + lastLoadStartURL = ''; + } + reset(); + + var iab; + var callbacks = { + loaderror: logEvent, + loadstart: logEvent, + loadstop: logEvent, + exit: logEvent + }; + if (useWindowOpen) { + console.log('Use window.open() for url'); + iab = window.open(url, target, params, callbacks); + } + else { + iab = cordova.InAppBrowser.open(url, target, params, callbacks); + } + if (!iab) { + alert('open returned ' + iab); + return; + } + + function logEvent(e) { + console.log('IAB event=' + JSON.stringify(e)); + counts[e.type]++; + // Verify that event.url gets updated on redirects. + if (e.type == 'loadstart') { + if (e.url == lastLoadStartURL) { + alert('Unexpected: loadstart fired multiple times for the same URL.'); + } + lastLoadStartURL = e.url; + } + // Verify the right number of loadstart events were fired. + if (e.type == 'loadstop' || e.type == 'loaderror') { + if (e.url != lastLoadStartURL) { + alert('Unexpected: ' + e.type + ' event.url != loadstart\'s event.url'); + } + if (numExpectedRedirects === 0 && counts['loadstart'] !== 1) { + // Do allow a loaderror without a loadstart (e.g. in the case of an invalid URL). + if (!(e.type == 'loaderror' && counts['loadstart'] === 0)) { + alert('Unexpected: got multiple loadstart events. (' + counts['loadstart'] + ')'); + } + } else if (numExpectedRedirects > 0 && counts['loadstart'] < (numExpectedRedirects + 1)) { + alert('Unexpected: should have got at least ' + (numExpectedRedirects + 1) + ' loadstart events, but got ' + counts['loadstart']); + } + wasReset = true; + numExpectedRedirects = 0; + reset(); + } + // Verify that loadend / loaderror was called. + if (e.type == 'exit') { + var numStopEvents = counts['loadstop'] + counts['loaderror']; + if (numStopEvents === 0 && !wasReset) { + alert('Unexpected: browser closed without a loadstop or loaderror.'); + } else if (numStopEvents > 1) { + alert('Unexpected: got multiple loadstop/loaderror events.'); + } + } + } + + return iab; + } + + function doHookOpen(url, target, params, numExpectedRedirects) { + var originalFunc = window.open; + var wasClobbered = window.hasOwnProperty('open'); + window.open = cordova.InAppBrowser.open; + + try { + doOpen(url, target, params, numExpectedRedirects, true); + } + finally { + if (wasClobbered) { + window.open = originalFunc; + } + else { + console.log('just delete, to restore open from prototype'); + delete window.open; + } + } + } + + function openWithStyle(url, cssUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + var callback = function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }; + if (cssUrl) { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ file: cssUrl }, useCallback && callback); + }); + } else { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ code: '#style-update-literal { \ndisplay: block !important; \n}' }, + useCallback && callback); + }); + } + } + + function openWithScript(url, jsUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + if (jsUrl) { + iab.addEventListener('loadstop', function (event) { + iab.executeScript({ file: jsUrl }, useCallback && function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } else { + iab.addEventListener('loadstop', function (event) { + var code = '(function(){\n' + + ' var header = document.getElementById("header");\n' + + ' header.innerHTML = "Script literal successfully injected";\n' + + ' return "abc";\n' + + '})()'; + iab.executeScript({ code: code }, useCallback && function (results) { + if (results && results.length === 1 && results[0] === 'abc') { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } + } + var hiddenwnd = null; + var loadlistener = function (event) { alert('background window loaded '); }; + function openHidden(url, startHidden) { + var shopt = (startHidden) ? 'hidden=yes' : ''; + hiddenwnd = cordova.InAppBrowser.open(url, 'random_string', shopt); + if (!hiddenwnd) { + alert('cordova.InAppBrowser.open returned ' + hiddenwnd); + return; + } + if (startHidden) hiddenwnd.addEventListener('loadstop', loadlistener); + } + function showHidden() { + if (!!hiddenwnd) { + hiddenwnd.show(); + } + } + function closeHidden() { + if (!!hiddenwnd) { + hiddenwnd.removeEventListener('loadstop', loadlistener); + hiddenwnd.close(); + hiddenwnd = null; + } + } + + var info_div = '

    InAppBrowser

    ' + + '
    ' + + 'Make sure http://cordova.apache.org and http://google.co.uk and https://www.google.co.uk are white listed.
    ' + + 'Make sure http://www.apple.com is not in the white list.
    ' + + 'In iOS, starred * tests will put the app in a state with no way to return.
    ' + + '

    User-Agent: ' + + '

    '; + + var local_tests = '

    Local URL

    ' + + '
    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView (using hook of window.open()).' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: fails to open' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar at top.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser without locationBar.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the bottom.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the top.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with no locationBar. On iOS the toolbar is at the top.'; + + var white_listed_tests = '

    White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org (using hook of window.open())' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in system browser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org with no location bar.'; + + var non_white_listed_tests = '

    Non White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (using hook of window.open()).' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).' + + '

    ' + + 'Expected result: open successfully in system browser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com without locationBar.'; + + var page_with_redirects_tests = '

    Page with redirect

    ' + + '
    ' + + 'Expected result: should 301 and open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.'; + + var pdf_url_tests = '

    PDF URL

    ' + + '
    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.' + + '

    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.'; + + var invalid_url_tests = '

    Invalid URL

    ' + + '
    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser (404).'; + + var css_js_injection_tests = '

    CSS / JS Injection

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser without text "Style updated from..."' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected" and alert dialog with the text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" .' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" and alert dialog with the text "Results verified".'; + + var open_hidden_tests = '

    Open Hidden

    ' + + '
    ' + + 'Expected result: no additional browser window. Alert appears with the text "background window loaded".' + + '

    ' + + 'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: no output. But click on "show hidden" again and nothing should be shown.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to https://www.google.co.uk'; + + var clearing_cache_tests = '

    Clearing Cache

    ' + + '
    ' + + 'Expected result: ?' + + '

    ' + + 'Expected result: ?'; + + var video_tag_tests = '

    Video tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video does not play automatically on iOS and Android but rather works after clicking the "play" button.'; + + var local_with_anchor_tag_tests = '

    Local with anchor tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the top as normal.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the beginning of the tall div with border.'; + + // CB-7490 We need to wrap this code due to Windows security restrictions + // see http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences for details + if (window.MSApp && window.MSApp.execUnsafeLocalFunction) { + MSApp.execUnsafeLocalFunction(function() { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + }); + } else { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + } + + document.getElementById("user-agent").textContent = navigator.userAgent; + + // we are already in cdvtests directory + var basePath = 'iab-resources/'; + var localhtml = basePath + 'local.html', + localpdf = basePath + 'local.pdf', + injecthtml = basePath + 'inject.html', + injectjs = isWindows ? basePath + 'inject.js' : 'inject.js', + injectcss = isWindows ? basePath + 'inject.css' : 'inject.css', + videohtml = basePath + 'video.html'; + + //Local + createActionButton('target=Default', function () { + doOpen(localhtml); + }, 'openLocal'); + createActionButton('target=Default (window.open)', function () { + doHookOpen(localhtml); + }, 'openLocalHook'); + createActionButton('target=_self', function () { + doOpen(localhtml, '_self'); + }, 'openLocalSelf'); + createActionButton('target=_system', function () { + doOpen(localhtml, '_system'); + }, 'openLocalSystem'); + createActionButton('target=_blank', function () { + doOpen(localhtml, '_blank'); + }, 'openLocalBlank'); + createActionButton('target=Random, location=no, disallowoverscroll=yes', function () { + doOpen(localhtml, 'random_string', 'location=no, disallowoverscroll=yes'); + }, 'openLocalRandomNoLocation'); + createActionButton('target=Random, toolbarposition=bottom', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=bottom'); + }, 'openLocalRandomToolBarBottom'); + createActionButton('target=Random, toolbarposition=top', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top'); + }, 'openLocalRandomToolBarTop'); + createActionButton('target=Random, toolbarposition=top, location=no', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top,location=no'); + }, 'openLocalRandomToolBarTopNoLocation'); + + //White Listed + createActionButton('* target=Default', function () { + doOpen('http://cordova.apache.org'); + }, 'openWhiteListed'); + createActionButton('* target=Default (window.open)', function () { + doHookOpen('http://cordova.apache.org'); + }, 'openWhiteListedHook'); + createActionButton('* target=_self', function () { + doOpen('http://cordova.apache.org', '_self'); + }, 'openWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://cordova.apache.org', '_system'); + }, 'openWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://cordova.apache.org', '_blank'); + }, 'openWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://cordova.apache.org', 'random_string'); + }, 'openWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://cordova.apache.org', 'random_string', 'location=no'); + }, 'openWhiteListedRandomNoLocation'); + + //Non White Listed + createActionButton('target=Default', function () { + doOpen('http://www.apple.com'); + }, 'openNonWhiteListed'); + createActionButton('target=Default (window.open)', function () { + doHookOpen('http://www.apple.com'); + }, 'openNonWhiteListedHook'); + createActionButton('target=_self', function () { + doOpen('http://www.apple.com', '_self'); + }, 'openNonWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://www.apple.com', '_system'); + }, 'openNonWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://www.apple.com', '_blank'); + }, 'openNonWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://www.apple.com', 'random_string'); + }, 'openNonWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://www.apple.com', 'random_string', 'location=no'); + }, 'openNonWhiteListedRandomNoLocation'); + + //Page with redirect + createActionButton('http://google.co.uk', function () { + doOpen('http://google.co.uk', 'random_string', '', 1); + }, 'openRedirect301'); + createActionButton('http://goo.gl/pUFqg', function () { + doOpen('http://goo.gl/pUFqg', 'random_string', '', 2); + }, 'openRedirect302'); + + //PDF URL + createActionButton('Remote URL', function () { + doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf'); + }, 'openPDF'); + createActionButton('Local URL', function () { + doOpen(localpdf, '_blank'); + }, 'openPDFBlank'); + + //Invalid URL + createActionButton('Invalid Scheme', function () { + doOpen('x-ttp://www.invalid.com/', '_blank'); + }, 'openInvalidScheme'); + createActionButton('Invalid Host', function () { + doOpen('http://www.inv;alid.com/', '_blank'); + }, 'openInvalidHost'); + createActionButton('Missing Local File', function () { + doOpen('nonexistent.html', '_blank'); + }, 'openInvalidMissing'); + + //CSS / JS injection + createActionButton('Original Document', function () { + doOpen(injecthtml, '_blank'); + }, 'openOriginalDocument'); + createActionButton('CSS File Injection', function () { + openWithStyle(injecthtml, injectcss); + }, 'openCSSInjection'); + createActionButton('CSS File Injection (callback)', function () { + openWithStyle(injecthtml, injectcss, true); + }, 'openCSSInjectionCallback'); + createActionButton('CSS Literal Injection', function () { + openWithStyle(injecthtml); + }, 'openCSSLiteralInjection'); + createActionButton('CSS Literal Injection (callback)', function () { + openWithStyle(injecthtml, null, true); + }, 'openCSSLiteralInjectionCallback'); + createActionButton('Script File Injection', function () { + openWithScript(injecthtml, injectjs); + }, 'openScriptInjection'); + createActionButton('Script File Injection (callback)', function () { + openWithScript(injecthtml, injectjs, true); + }, 'openScriptInjectionCallback'); + createActionButton('Script Literal Injection', function () { + openWithScript(injecthtml); + }, 'openScriptLiteralInjection'); + createActionButton('Script Literal Injection (callback)', function () { + openWithScript(injecthtml, null, true); + }, 'openScriptLiteralInjectionCallback'); + + //Open hidden + createActionButton('Create Hidden', function () { + openHidden('https://www.google.co.uk', true); + }, 'openHidden'); + createActionButton('Show Hidden', function () { + showHidden(); + }, 'showHidden'); + createActionButton('Close Hidden', function () { + closeHidden(); + }, 'closeHidden'); + createActionButton('google.co.uk Not Hidden', function () { + openHidden('https://www.google.co.uk', false); + }, 'openHiddenShow'); + + //Clearing cache + createActionButton('Clear Browser Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearcache=yes'); + }, 'openClearCache'); + createActionButton('Clear Session Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearsessioncache=yes'); + }, 'openClearSessionCache'); + + //Video tag + createActionButton('Remote Video', function () { + doOpen(videohtml, '_blank'); + }, 'openRemoteVideo'); + createActionButton('Remote Need User No Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=no'); + }, 'openRemoteNeedUserNoVideo'); + createActionButton('Remote Need User Yes Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=yes'); + }, 'openRemoteNeedUserYesVideo'); + + //Local With Anchor Tag + createActionButton('Anchor1', function () { + doOpen(localhtml + '#bogusanchor', '_blank'); + }, 'openAnchor1'); + createActionButton('Anchor2', function () { + doOpen(localhtml + '#anchor2', '_blank'); + }, 'openAnchor2'); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css new file mode 100644 index 0000000..5762c74 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.inAppBrowserWrap { + margin: 0; + padding: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: 0 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9999999; + box-sizing: border-box; + border: 40px solid #bfbfbf; + border: 40px solid rgba(0, 0, 0, 0.25); +} + +.inAppBrowserWrapFullscreen { + border: 0; +} + +.inappbrowser-app-bar { + height: 70px; + background-color: #404040; + z-index: 9999999; +} + +.inappbrowser-app-bar-inner { + padding-top: 10px; + height: 60px; + width: 155px; + margin: 0 auto; + background-color: #404040; + z-index: 9999999; +} + +.app-bar-action { + width: auto; + height: 40px; + margin-left: 20px; + font-family: "Segoe UI Symbol"; + float: left; + color: white; + font-size: 12px; + text-transform: lowercase; + text-align: center; + cursor: default; +} + +.app-bar-action[disabled] { + color: gray; + /*disable click*/ + pointer-events: none; +} + +.app-bar-action::before { + font-size: 28px; + display: block; + height: 36px; +} + +/* Back */ +.action-back { + margin-left: 0px; +} + +.action-back::before { + content: "\E0BA"; +} + +.action-back:not([disabled]):hover::before { + content: "\E0B3"; +} + +/* Forward */ +.action-forward::before { + content: "\E0AC"; +} + +.action-forward:not([disabled]):hover::before { + content: "\E0AF"; +} + +/* Close */ +.action-close::before { + content: "\E0C7"; + /* close icon is larger so we re-size it to fit other icons */ + font-size: 20px; + line-height: 40px; +} + +.action-close:not([disabled]):hover::before { + content: "\E0CA"; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..25f6271 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,111 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js new file mode 100644 index 0000000..42d15d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -0,0 +1,129 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +/*jslint sloppy:true */ +/*global Windows:true, require, document, setTimeout, window, module */ + + +var cordova = require('cordova'), + channel = require('cordova/channel'); + +var browserWrap; + +var IAB = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + } + }, + show: function (win, lose) { + /* empty block, ran out of bacon? + if (browserWrap) { + + }*/ + }, + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features = args[2], + url, + elem; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_blank") { + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.width = (window.innerWidth - 80) + "px"; + browserWrap.style.height = (window.innerHeight - 80) + "px"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + browserWrap.style.zIndex = "9999999"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + var localFile = (strUrl.indexOf('ms-appdata:///') > -1); + if (localFile) { + elem = document.createElement("x-ms-webview"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + + } else { + elem = document.createElement("iframe"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + } + + browserWrap.appendChild(elem); + } else { + window.location = strUrl; + } + + //var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl }); + + }, + + injectScriptCode: function (code, bCB) { + + // "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)" + }, + + injectScriptFile: function (file, bCB) { + + } +}; + +module.exports = IAB; + + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/fetch.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/fetch.json new file mode 100644 index 0000000..2987041 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/fetch.json @@ -0,0 +1,18 @@ +{ + "molpay-mobile-xdk-cordova": { + "source": { + "type": "local", + "path": "../molpay-mobile-xdk-cordova" + }, + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-inappbrowser": { + "source": { + "type": "registry", + "id": "cordova-plugin-inappbrowser" + }, + "is_top_level": false, + "variables": {} + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d05688e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png new file mode 100644 index 0000000..16f1bde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html new file mode 100644 index 0000000..9272260 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +
    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js new file mode 100644 index 0000000..f62b4ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('"6V 7S";1u.1z("1w",["8b","7p","7o","7h-3p","r.4e","89.7w","7x","7v.7u","3i-20","2w"]).4w("6q",q(){W{3Z:q(a){W a.4U=7s,a}}}).7t(["$7y","$7z",q(a,b){a.3L("/",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2p",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2s",{2b:"1g/2s.1c",1h:"6p",3s:"2s"}).3L("/27",{2b:"1g/27.1c",1h:"6f",3s:"27"}).7E({7F:"/"}),b.7D.7C("6q")}]).6H(["$2k","$31","$4T","3p","4j","4e","5Y","$1A","4x",q(a,b,c,d,e,f,g,h,i){7A.7B(7r.2l),a.z=!1,a.5E="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7q",a.3W="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7g",a.47="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7f",a.1Q="2O://2a.2S.2R.2E/28/2x/7e/2V.2F",a.4c="2O://2a.2S.2R.2E/28/2x/7c/2V.2F",a.2U="",a.1s="",a.2y="",a.7d="7i://",a.6J="7j://",a.4E="7n://",a.6r="7m://",a.2W="7k://",a.6M="2O://2a.2S.2R.2E/28/1x.2F",a.7G="#7H",a.6o="#1i",a.2u=!1,a.6Q=["82","83","81","80","7Y","7Z","6u-84","6u-85"],a.14={3X:"8a 1k",41:"7b 88, 50 4X 86 87, 7X 1Z, 7W 7M 7N",4u:"65 1b 1F, 50 4X 5H w",6t:"2K w 1H 1F",6x:"2L w 1H 1F",6y:"Y w 1H 1F",6E:"1K w 1H 1F",6L:"1G w 1H 1F",6P:"17 w 1H 1F",5a:"1R w 1H 1F",5G:"1X w 1H 1F",5L:"2d 1X w",5R:"1v w 1H 1F",5M:"1J w 7L 2s 3Z 1H 1F"},a.7={2K:"",2L:"",Y:"",1K:"",1G:"",17:"",1R:"7I",1X:"2o",1v:"",36:!1,O:"",2j:!0,1f:"",1E:"",1S:"",1P:"",2m:"",5C:!1,3k:!1,7J:"",1J:"",1j:"",34:"",2B:"2",7O:"",48:"",37:"",2Q:"",1r:"",1m:"",1I:"",2z:"",2t:"",1O:"",U:!0,1D:"2o",3c:"4y",23:"",1d:"",2g:"",4t:"",2C:"1",26:"",2M:"",3r:"",2i:""},a.$2I("7.1D",q(){v b=g.4D(),c=h("1A")(b,a.7.1D,!0);c.J?a.7.3c=c[0][1]:a.7.1D=""}),a.$2I("7.1m",q(){v b=a.7.1m;b=b.3F(/\\//g,"");v c="";b.J>4&&(b=b.Q(0,4)),1===b.J&&(c=5O(b.Q(0,1)),c>1&&(b="")),2===b.J&&(c=5O(b.Q(0,2)),c>12&&(b=b.Q(0,1))),b.J>2&&(b=b.Q(0,2)+"/"+b.Q(2,b.J)),a.7.1m=b,5===a.7.1m.J&&(a.7.2z=a.7.1m.Q(0,2),a.7.2t=a.7.1m.Q(3,5))}),a.$2I("7.1d",q(){v b=a.7.1d;b.J>10&&(b=b.Q(0,10)),a.7.1d=b}),a.$2I("7.U",q(){1l(a.7.U)a.7.23="",a.7.1r="",a.7.1m="",a.7.1I="",a.7.1D="2o",a.7.3c="4y",a.7.2z="",a.7.2t="",a.7.1O="";21{v b=a.7.2M[0];1q 0!==b&&(a.7.23=b.7P+"******"+b.7U,a.7.1r="",a.7.1m=b.5N.Q(2,4)+"/"+b.5N.Q(0,2),a.7.1I=b.7V,a.7.1D=b.7T,a.7.1O=b.1O)}}),a.$2I("7.23",q(){v b=a.7.23;b=b.3F(/ /g,""),b.J>16&&(b=b.Q(0,16)),b.J>4&&b.J<=8?b=b.Q(0,4)+" "+b.Q(4,b.J):b.J>8&&b.J<=12?b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,b.J):b.J>12&&b.J<16&&(b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,b.J)),16===b.J&&(a.7.2Q=b,b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,16)),a.7.23=b}),a.$2I("7.1r",q(){v b=a.7.1r;b.J>4&&(b=b.Q(0,4)),a.7.1r=b}),a.5w=q(a){v b=!1,c=g.4D(),d=h("1A")(c,a,!0);W d.J&&(b=!0),b},a.5A=q(b){a.z&&A.B("5A: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].4F),c},a.6d=q(){v b=a.7.17,c=7R(b);c=5U*c,a.7.4t=c.5v(0)},a.3y=q(){W a.7.17?(1u.8c(a.7.17)&&(a.7.17=a.7.17.5v(2)),a.7.2K?a.7.2L?a.7.Y?a.7.1K?a.7.1G?a.7.1R?a.7.1X?a.5w(a.7.1X)?a.7.1v?(a.7.5P="70 "+d.2A(a.7.2K+":"+a.7.2L),a.7.48="6X 1.0.0",a.7.37=f.7a.77,a.7.2B="2",a.7.2C="1",a.7.5C=!1,a.7.36=!1,a.7.2j||(a.7.2j=!1),a.7.O?"2N"===a.7.O&&(a.7.2j=!0,a.7.2i="(2H 38 a 1b)"):(a.7.O="2N",a.7.2j=!0,a.7.2i="(2H 38 a 1b)"),a.7.1f||(a.7.1f=!1),a.7.1E&&a.7.1S&&a.7.1P&&a.7.2m&&a.7.1E||(a.7.1f=!0),a.7.3k||(a.7.3k=!1),a.7.1D="2o",a.7.3c="4y",a.7.U=!0,"2n"!==a.7.1j||a.7.1J?1q e.4V():1q i.1e({1k:a.14.5M})):1q i.1e({1k:a.14.5R}):1q i.1e({1k:a.14.5L}):1q i.1e({1k:a.14.5G}):1q i.1e({1k:a.14.5a}):1q i.1e({1k:a.14.6L}):1q i.1e({1k:a.14.6E}):1q i.1e({1k:a.14.6y}):1q i.1e({1k:a.14.6x}):1q i.1e({1k:a.14.6t})):1q i.1e({1k:a.14.6P})},a.73=q(){W a.7.37},a.4H=q(b){v c=!1,d=h("1A")(a.6Q,b,!0);W d.J&&(c=!0),c},a.4f=q(b){a.z&&A.B("4f: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].54),c},2T.3y=q(b){a.7=b,a.3y()},2T.72=q(b){v f=b.6T;a.z&&A.B("1M.6T: "+f);v g="";1l(f.6l(a.6M)>-1)a.z&&A.B("5T 1x 78"),a.2U=f,e.68(),g=a.4E,a.1C(g);21 1l(f.6l(a.6o)>-1)20(a.7.O){1o"6W":1o"75":1o"71":1o"74":1o"76":c.79(a.1Q).2v(q(){a.z&&A.B("5r 2c: 6U, \\6Z 5Q 5k"+a.1Q);v b="6Y()",c=d.2A(b);g=a.6r+c,a.z&&A.B("8z 1i 9j, 9i 9h 3t = "+g),a.1C(g)},q(){a.z&&A.B("5r 2c: 9f, \\9g 5Q 5k "+a.1Q),a.3l()});22;6R:a.z&&A.B("9k 1b 1i 4O\'t 4Q a 4K"),a.5F(a.7.O+" 1b 1i 4O\'t 4Q a 4K")}},a.6N=q(){v b=a.4E;a.1C(b)},a.3l=q(){e.4n(),a.6N()},2T.3l=q(){a.3l()},a.4L=q(){"2n"===a.7.1j&&a.7.1J&&""!==a.7.1J?a.3a():a.7.1J&&""!==a.7.1J?a.3a():e.4n()},2T.4L=q(){a.4L()},a.1C=q(b){v c=b,d=f.66;a.z&&A.B("1C 66 I:"+1a.19(d,18,"")),"9l"===d&&(c=b.3F(/\\+/g,"-"),c=c.3F(/\\=/g,"9q")),a.z&&A.B("1C: \\6i: "+c),2T.31=c},a.5m=q(){a.3y(),b.2J("/2p")}}]),1u.1z("1w").1h("9p",q(){}),1u.1z("1w").1h("4a",["$1V","$2k","$31","$9o","4j",q(a,b,c,d,e){a.4Y=q(){1l(b.7.2j){v c=d.3A({3B:!0,2b:"1g/56.1c",1h:"6e",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6m=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/53.1c",1h:"6n",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6a=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/6S.1c",1h:"6h",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6C=q(){v a=!1,c={};1l(c.6F="2d 4C 9m",c.1W="","2N"===b.7.O?(a=!0,c.1W="2H 38 a 4C 1b"):"25"===b.7.O||"3H"===b.7.O?!b.7.2Q||b.7.2Q.J<16?(a=!0,c.1W="2d 25 2r 2P"):!b.7.1r||b.7.1r.J<3?(a=!0,c.1W="2d 3d 2P"):!b.7.1m||b.7.1m.J<5?(a=!0,c.1W="2d 3j 42"):b.7.1I||(a=!0,c.1W="2d 57 1Z"):"3b"===b.7.O&&(!b.7.1d||b.7.1d.J<10?(a=!0,c.1W="2d 5Z 2P"):b.7.2g||(a=!0,c.1W="2d 5Z 6D")),a){v f=d.3A({3B:!0,2b:"1g/6G.1c",1h:"62",3n:"K",3m:{32:q(){W c}}});f.1x.2v(q(){},q(){})}21 b.4H(b.7.O)&&(b.7.1j="2n"),e.5f(),e.5d()}}]),1u.1z("1w").1h("6p",["$1V","$2k",q(a,b){a.3x={},a.3x.3g={9n:2,9e:60,9d:10,95:!1,94:"93",91:"2e",92:12,96:"",9s:"#97"},a.4Z=b.4f(b.S.1b)}]),1u.1z("1w").4w("4j",["3p","$4T","$2k","$4U","4e","4x","$31",q(a,b,c,d,e,f,g){v h={};W h.2G=q(a){W 5I.2G(a).1B()},h.29=q(a){W 5I.29(a).1B()},h.1t=q(a,b){W"9c="+a+"&9b="+1a.19(b,18,"")},h.1U=q(a,d){c.2u=!0;v e={5z:"5x",3t:a,5t:{5s:"3I/3Q",9a:c.7.5P,"5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q","98-99":c.7.48},1M:d};b(e).2v(q(b){1l(c.2u=!1,b.1M.2c)c.z&&A.B("2x 9r 6s 1M 9D 2c:"+b.1M.2c),f.3w(a,b.1M.1x);21 1l("9C"===b.5y){1l(c.z&&A.B("2x 9F: \\n"+1a.19(b.1M,18,"")),b.1M.2c===!1)20(b.1M.1x.9G){1o 9u:1o 9v:c.z&&A.B(c.14.41),f.1e({1k:c.14.41});22;1o 9A:c.7.U=!0}(a===c.1Q||a===c.2U)&&f.3w(a,b.1M)}21 c.z&&A.B("9E 5x 3Z 63: "+b.5y)},q(){c.2u=!1,c.z&&A.B(c.14.3X),f.1e({1k:c.14.3X})})},h.9w=q(a){c.2u=!0;v d={5z:"9y",3t:a,5t:{5s:"3I/3Q","5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q"}};b(d).2v(q(){c.2u=!1},q(){c.2u=!1,c.z&&A.B("9z 9x 9t")})},h.2X=q(){c.z&&A.B("(R 1) 3u:"+c.7.1v);v a=h.2G(c.7.1v).1B(),b=c.7.Y+c.7.1K+a;c.z&&A.B("(R 2) 9B + 8d + 8Z(3u):"+b);v d=h.29(b).1B();W c.z&&A.B("(R 3) 29(8u 33 R 2):"+d),d},h.4i=q(a){v b="";1l(c.7.36)b=c.7.1v;21{v d=c.7.17,e=c.7.Y,f=c.7.1G,g=c.7.1v,i=a;b=h.2G(d+e+f+g+i).1B()}W b},h.6z=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1J,f=c.7.1v,g="46";a=h.2G(d+g+e+b+f).1B()}W a},h.4v=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1G,f=c.7.1v,g="40",i=d+g+e+b+f;c.z&&A.B("4v 8t:"+i),a=h.2G(i).1B()}W a},c.5F=q(a){v b=c.5E,d=c.7.Y+a+c.7.37,e=d+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+e);v f=h.29(e).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+f);v g={4d:c.7.Y,8s:a+c.7.37},i=h.1t(f,g);c.z&&A.B("(R 6) 2h 1t:"+i),h.1U(b,i)},h.51=q(){v a=c.3W,b=c.7.Y+c.7.1R,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y,5H:c.7.1R},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5j=q(){v a=c.47,b=c.7.Y,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5e=q(){v a="8v",b="0",d=c.4c,e=c.7.Y+c.7.1E+c.7.1S+c.7.1P+c.7.1K+a+b,f=e;c.z&&A.B("(R 4) 3K 3M:"+f);v g=h.29(f).1B(),i=g+h.2X();c.z&&A.B("(R 5) 3N(1x 33 R 4) + 3T 3G:"+i);v j={2Y:c.7.Y,4m:c.7.1E,4k:c.7.1S,4l:c.7.1P,4q:c.7.1K,30:a,1A:b},k=h.1t(i,j);c.z&&A.B("(R 6) 2h 1t:"+k),h.1U(d,k)},h.4V=q(){h.51(),h.5j(),h.5e()},h.5d=q(){c.1s="6c";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.5f=q(){c.1s="6k";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),h.1U(b,d)},h.68=q(){v a=c.2U,b="";c.z&&A.B("8x 5T 6s 3t:"+a),h.1U(a,b)},c.3a=q(){c.1s="46";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,4s:c.7.1J,3f:c.7.17,34:h.6z(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.4n=q(){c.1s="40";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,8q:c.7.1G,3f:c.7.17,34:h.4v(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h}]),1u.1z("1w").4w("4x",["$2k","3p","$31","$1A",q(a,b,c,d){v e={};W e.3V=q(b){1l(b){1l(a.7.26=b,0===a.7.26.J&&(a.z&&A.B(a.14.4u),e.1e({1k:a.14.4u})),"2N"!==a.7.O){v c=d("1A")(a.7.26,{4F:a.7.O},!0);c.J?a.7.2i=c[0].4G:(a.7.O="2N",a.7.2i="(2H 38 a 1b)")}21 a.7.O="2N",a.7.2i="(2H 38 a 1b)";"2n"===a.7.1j&&a.3a()}a.z&&A.B("3V: \\1Y: "+1a.19(a.7.26,18,""))},e.3Y=q(b){b&&(a.7.2M=b,a.7.2M.J>0?a.7.U=!1:a.7.U=!0),a.z&&A.B("3Y: \\1Y: "+1a.19(a.7.2M,18,""))},e.49=q(b){b&&(a.7.3r=b),a.z&&A.B("49: \\1Y: "+1a.19(a.7.3r,18,""))},e.4b=q(c){a.z&&A.B("4b: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.6J+d;a.1C(e)},e.6K=q(c){a.z&&A.B("6K: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.44=q(b){a.2y=b,a.z&&A.B("44: \\1Y: "+1a.19(a.2y,18,"")),a.2y&&""!==a.2y&&(a.7.1J=a.2y.8e,a.7.34=a.2y.34,a.3a())},e.45=q(d){a.S=d,a.7.1j&&(a.S.1j=a.7.1j,"2n"===a.S.1j&&a.S&&a.S.3C&&"11"==a.S.3C&&(a.z&&A.B("2n 2c 63, 8j 8k 8o"),a.S.1j="")),a.z&&A.B("45: \\1Y: "+1a.19(a.S,18,""));v e=b.2A(1a.19(a.S,18,""));a.z&&A.B("35: \\39: "+e);v f=a.2W+e;a.1C(f),"2n"===a.7.1j&&a.S&&a.S.3C&&"11"!==a.S.3C&&c.2J("/2s")},e.3z=q(c){a.3D=c,a.7.1j&&(a.3D.1j=a.7.1j),a.z&&A.B("3z: \\1Y: "+1a.19(a.3D,18,""));v d=b.2A(1a.19(a.3D,18,""));a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.1e=q(d){v e=d;e.61=a.7.61,c.2J("/27"),a.z&&A.B("1e: \\1Y: "+1a.19(d,18,""));v f=b.2A(1a.19(d,18,""));a.z&&A.B("35: \\39: "+f);v g=a.2W+f;a.1C(g)},e.3w=q(b,c){20(a.z&&A.B("3w: \\6i: "+b),b){1o a.3W:e.3V(c);22;1o a.4c:e.3Y(c);22;1o a.47:e.49(c);22;1o a.8C:e.8S(c);22;1o a.1Q:"6c"===a.1s?e.4b(c):"46"===a.1s?e.45(c):"40"===a.1s?e.3z(c):"6k"===a.1s&&e.3z(c);22;1o a.2U:e.44(c);22;6R:a.z&&A.B("8P 4O\'t 4Q a 4K")}},e}]),1u.1z("1w").1h("6f",q(){}),1u.1z("1w").1h("6e",["$1V","$3v","$2k",q(a,b,c){a.5i=q(a){c.7.O=a.4F,c.7.2i=a.4G,"3b"===c.7.O?c.6d():c.4H(c.7.O)?c.7.1j="2n":c.7.1j="",b.2q()},a.1i=q(){b.2q()}}]),1u.1z("1w").1h("6h",["$2k","$1V","$3v",q(a,b,c){b.55=q(b){a.7.1I=b.1Z,c.2q()},b.1i=q(){c.2q()}}]),1u.1z("1w").1h("6n",["$1V","5Y","$2k","$3v",q(a,b,c,d){a.5S=b.4D(),a.5J=q(a){c.7.1D=a[0],d.2q()},a.1i=q(){d.2q()}}]),1u.1z("1w").1h("62",["$1V","$3v","32",q(a,b,c){a.32=c,a.1i=q(){b.2q()}}]),1u.1z("1w").6H(["$8W",q(a){a.2f("1g/6G.1c",\' <6v>{{32.6F}} <6B>{{32.1W}} 4B \'),a.2f("1g/6S.1c",\' {{ C.1Z }} 4B \'),a.2f("1g/56.1c",\' {{ C.4G }} &1p; <3h 9="1b-4W" r-4h="{{ C.54 }}"> 4B \'),a.2f("1g/53.1c",\' {{ C[1] }} 8F \'),a.2f("1g/27.1c","

    8D 4C 2c.

    2H 8I.

    "),a.2f("1g/8M.1c",\'

    <67>28 X-8L

    1v 2m 1G 2K 1E 1X 1R Y 1S 1P 1K 2L 17 3k O 5b \'),a.2f("1g/2p.1c",\' 8H 5K {{7.1G}} {{7.1R}} {{7.17}} &1p; &1p; &1p; &1p; 5b 8N &1p; {{7.2i}} 8V 2r <3i-20 r-P="7.U" 9="4N-25-2r-20" 8X-u="8Y" 8U-u="65"><3i-20> 6I 2P &1p; 6b &1p; 6A 42 &1p; 8B &1p; {{7.3c}} 69 1Z &1p; {{7.1I}} 8l 5V 8m (8n = 5U 5V 8f) {{7.4t}} 6I# 8g 43 &1p; 8p &1p; 8y <3h r-4h="90/5h.8A" 9="5h"> \'),a.2f("1g/2s.1c",\' <3h 9="2s-4W" r-4h="{{ 4Z }}"> 8w 28 {{S.1b}} 8r 5K {{S.4s}} <2w I="5l" 5u="3h" 5W="{{S.4s}}" 3g="3x.3g"> {{S.5B}} {{S.6j}} <2w I="5l" 5u="3h" 5W="{{S.6j}}" 3g="3x.3g"> 7Q 3f {{S.4r}}{{S.7K}} 7l <6g 9="s-y-C 13-s-y-C 4z" r-3o="C 3q S.4z"> {{ C }} \')}]);',62,602,'|||||||sdkData||class||||||||||||div|span||||function|ng|list||label|var|value||group|isInternalDebugging|console|log|item|form|right|fa|pull|input|type|length|sm|control|col|text|mp_channel|model|substring|Step|C5ResultData|click|new_credit_card|button|return||mp_merchant_ID|left||||modal|sdkConstants|show||mp_amount|null|stringify|JSON|channel|html|bcard_no|commErrorHandler|mp_editing_enabled|views|controller|close|mp_request_type|Error|if|mp_credit_card_expiry|placeholder|case|nbsp|void|mp_credit_card_cvv|CurrentMsgType|Payload|angular|mp_verification_key|molpayXsdkApp|result|search|module|filter|toString|callNativeWebview|mp_credit_card_country|mp_bill_name|found|mp_order_ID|not|mp_credit_card_bank|mp_transaction_id|mp_app_name|circle|data|lg|token|mp_bill_mobile|MobileNewApiUrl|mp_currency|mp_bill_email|times|HttpPost|scope|errorDesc|mp_country|nresult|name|switch|else|break|mp_credit_card_no_display|hide|credit|available_channel|finalizingpayment|MOLPay|SHA1|www|templateUrl|status|Invalid|center|put|bcard_pin|The|mp_channel_title|mp_channel_editing|rootScope|body|mp_bill_description|Receipt|MY|paymentinfo|dismiss|card|receipt|year|isLoading|then|barcode|API|B4ResultData|month|encode|l_version|token_status|readonly|my|php|MD5|Please|watch|path|mp_username|mp_password|available_token|multi|https|number|mp_credit_card_no|com|onlinepayment|window|B4ResultUrl|index|nativeWebTransactionResults|PasswordHash|merchant_id|country|msgType|location|alertdata|of|chksum|htmlStringBase64|mp_is_secure|device_info|select|nhtmlStringBase64|ApiC5|pointbcard|mp_credit_card_country_title|cvv|tel|amount|options|img|toggle|exp|mp_debug_mode|closemolpay|resolve|size|repeat|base64|in|available_banklist|controllerAs|url|vcode|uibModalInstance|OnApiResponseReceived|vm|updateSdkData|D7Handler|open|animation|status_code|D7ResultData|xxxx|replace|password|credit3|application|Billing|all|when|variables|sha1|billing|mobile|json|Type|footer|checksum|chevron|GetAvailableChannelByIdHandler|GetAvailableChannelByIdUrl|CommunicationError|T1Handler|request|D7|AccessDeniedMidAppnameVerificationkey|date||B4Handler|C5Handler|C5|GetBankListUrl|sdk_version|GetBankListHandler|PaymentInfoCtrl|B3Handler|T1Url|merchantID|deviceDetector|getChannelLogoFromChannelName|row|src|VcodeHash|AuthenticationService|bill_email|bill_mobile|bill_name|ApiD7|split|bcard|app_name|cur|txn_ID|bcard_point|NoChannelFoundCheckCurrencyValue|ChecksumForD7|factory|ApiHandlerService|Malaysia|notes|bar|CLOSE|payment|getCountries|nativeWebCloseAllWindows|maskname|title|checkIfThisIsACashChannel|header|InternalUsed|handler|transactionRequest|Payment|new|doesn|opt|have|icon|mod|http|timeout|PreloadData|logo|check|onChannelListClicked|toplogourl|please|ApiGetAvailableChannelById|Search|countrylistmodal|logo_url|onBankSelected|channelmodal|bank|bank_name|cardnumber|CurrencyNotFound|Pay|orderid|ApiB3|ApiT1|ApiB3A|bill_desc|poweredByMOLPay|onChannelSelected|ApiGetBankList|to|code128c|onPayClicked|Content|urlencoded|Data|container|Online|Accept|headers|render|toFixed|checkIfThisIsAValidCountryCode|POST|statusText|method|getChannelMasknameFromChannelName|pcode_lbl|mp_is_escrow|proceed|PaymentRecordsLogUrl|ApiRecordsLog|CountryNotFound|currency|CryptoJS|onCountrySelected|ID|InvalidCountryCode|TransactionIdForReceiptRequestNotFound|expdate|parseInt|authData|connect|VerificationKeyNotFound|countryArray|B4|100|BCARD|string|MM|Countries|BCard||mp_transaction_request_type|AlertModalCtrl|failed|point|No|device|h2|ApiB4|Bank|onBanklistClicked|CVV|B3|updateBCardPoints|ChannelModalCtrl|FinalizingPaymentCtrl|li|BanklistModalCtrl|nurl|pcode|B3A|indexOf|onCountrylistClicked|CountrylistModalCtrl|manualCloseHandler|ReceiptCtrl|timeoutHttpIntercept|nativeWebClosePopupAndRunScriptOnMOLPayWindow|with|UsernameNotFound|Cash|h4|larger|PasswordNotFound|MerchantIdNotFound|ChecksumForC5|Exp|h5|proceedClicked|pin|AppNameNotFound|errorTitle|alertmodal|run|Card|nativeWebOpenMOLPayWindow|B3AHandler|OrderIdNotFound|molpayResultString|closeAll|xxx|AmountNotFound|sdkCashChannelList|default|banklistmodal|requestPath|YES|use|maybank2u|XP|actionForWindowClose|nCan|Basic|MOLWallet|nativeWebRequestUrlUpdates|getDeviceInfo|hlb|cimb|amb|userAgent|returned|get|raw|Access|chips|nativeWebOpenPopup|mobile_new|GetBankList|GetAvailableChannelById|ab|mpopenpopup|mpopenmolpaywindow|mptransactionresults|Note|mpclosepopupandrunscriptonmolpaywindow|mpcloseallwindows|ngTouch|ngSanitize|recordsLog|document|1e4|config|countries|maha|bootstrap|creditCardInput|routeProvider|httpProvider|FastClick|attach|push|interceptors|otherwise|redirectTo|manualPopupHandler|popup|MYR|mp_url_scheme|payable_amt|for|verification|key|mp_authData|bin|Payable|parseFloat|strict|bank_country|bin4|issuer_bank|or|app|webcash|paylink|esapay|singpost|epay|cash|MBBCDM|PermataBank|merchant|id|denied|ui|Communication|ngRoute|isNumber|appName|tranID|Points|6298|Last|digit|just|send|Use|points|RM1|results|Pin|order_ID|Transaction|message|checksumString|Result|T1|Services|Get|PROCEED|Manual|png|Country|ApiGenBarcode|Finalizing|email|Close|description|Order|wait|offset|horizontal|Platform|main|through|creditcard|Response|cvc|YYYY|GenBarcodeHandler|YY|off|New|templateCache|on|Yes|md5|images|textAlign|fontSize|monospace|font|displayValue|backgroundColor|000|SDK|Version|Authorization|Params|Checksum|quite|height|NO|nCannot|step|next|detected|This|iphone|information|width|uibModal|MainCtrl|_|responded|lineColor|Sent|1001|1002|HttpGet|Not|GET|Request|1003|mID|OK|and|Http|Returned|code|checkbox'.split('|'),0,{})) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js new file mode 100644 index 0000000..8d978f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js @@ -0,0 +1,11 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a,b,c){"use strict";function d(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function f(a,b,c){var d,g;if(a)if(A(a))for(d in a)"prototype"==d||"length"==d||"name"==d||a.hasOwnProperty&&!a.hasOwnProperty(d)||b.call(c,a[d],d,a);else if(Td(a)||e(a)){var h="object"!=typeof a;for(d=0,g=a.length;g>d;d++)(h||d in a)&&b.call(c,a[d],d,a)}else if(a.forEach&&a.forEach!==f)a.forEach(b,c,a);else if(w(a))for(d in a)b.call(c,a[d],d,a);else if("function"==typeof a.hasOwnProperty)for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);else for(d in a)Cd.call(a,d)&&b.call(c,a[d],d,a);return a}function g(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(v(g)||A(g))for(var h=Object.keys(g),i=0,l=h.length;l>i;i++){var m=h[i],n=g[m];c&&v(n)?z(n)?a[m]=new Date(n.valueOf()):B(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):L(n)?a[m]=n.clone():(v(a[m])||(a[m]=Td(n)?[]:{}),k(a[m],[n],!0)):a[m]=n}}return j(a,d),a}function l(a){return k(a,Ld.call(arguments,1),!1)}function m(a){return k(a,Ld.call(arguments,1),!0)}function n(a){return parseInt(a,10)}function o(a,b){return l(Object.create(a),b)}function p(){}function q(a){return a}function r(a){return function(){return a}}function s(a){return A(a.toString)&&a.toString!==Od}function t(a){return"undefined"==typeof a}function u(a){return"undefined"!=typeof a}function v(a){return null!==a&&"object"==typeof a}function w(a){return null!==a&&"object"==typeof a&&!Pd(a)}function x(a){return"string"==typeof a}function y(a){return"number"==typeof a}function z(a){return"[object Date]"===Od.call(a)}function A(a){return"function"==typeof a}function B(a){return"[object RegExp]"===Od.call(a)}function C(a){return a&&a.window===a}function D(a){return a&&a.$evalAsync&&a.$watch}function E(a){return"[object File]"===Od.call(a)}function F(a){return"[object FormData]"===Od.call(a)}function G(a){return"[object Blob]"===Od.call(a)}function H(a){return"boolean"==typeof a}function I(a){return a&&A(a.then)}function J(a){return a&&y(a.length)&&Ud.test(Od.call(a))}function K(a){return"[object ArrayBuffer]"===Od.call(a)}function L(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function M(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function P(a,b){function d(a,b){var c,d=b.$$hashKey;if(Td(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(w(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Cd.call(a,c)&&(b[c]=e(a[c]));return j(b,d),b}function e(a){if(!v(a))return a;var b=h.indexOf(a);if(-1!==b)return i[b];if(C(a)||D(a))throw Qd("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var e=!1,f=g(a);return f===c&&(f=Td(a)?[]:Object.create(Pd(a)),e=!0),h.push(a),i.push(f),e?d(a,f):f}function g(a){switch(Od.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c}return A(a.cloneNode)?a.cloneNode(!0):void 0}var h=[],i=[];if(b){if(J(b)||K(b))throw Qd("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Qd("cpi","Can't copy! Source and destination are identical.");return Td(b)?b.length=0:f(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),h.push(a),i.push(b),d(a,b)}return e(a)}function Q(a,b){if(Td(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(v(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function R(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Td(a)){if(z(a))return z(b)?R(a.getTime(),b.getTime()):!1;if(B(a))return B(b)?a.toString()==b.toString():!1;if(D(a)||D(b)||C(a)||C(b)||Td(b)||z(b)||B(b))return!1;e=ra();for(d in a)if("$"!==d.charAt(0)&&!A(a[d])){if(!R(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&u(b[d])&&!A(b[d]))return!1;return!0}if(!Td(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!R(a[d],b[d]))return!1;return!0}}return!1}function S(a,b,c){return a.concat(Ld.call(b,c))}function T(a,b){return Ld.call(a,b||0)}function U(a,b){var c=arguments.length>2?T(arguments,2):[];return!A(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,S(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function V(a,d){var e=d;return"string"==typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?e=c:C(d)?e="$WINDOW":d&&b===d?e="$DOCUMENT":D(d)&&(e="$SCOPE"),e}function W(a,b){return t(a)?c:(y(b)||(b=b?2:null),JSON.stringify(a,V,b))}function X(a){return x(a)?JSON.parse(a):a}function Y(a,b){a=a.replace(Zd,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function Z(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function $(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=Y(b,d);return Z(a,c*(e-d))}function _(a){a=Id(a).clone();try{a.empty()}catch(b){}var c=Id("
    ").append(a).html();try{return a[0].nodeType===de?Dd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Dd(b)})}catch(b){return Dd(c)}}function aa(a){try{return decodeURIComponent(a)}catch(b){}}function ba(a){var b={};return f((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=aa(d),u(d)&&(e=u(e)?aa(e):!0,Cd.call(b,d)?Td(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function ca(a){var b=[];return f(a,function(a,c){Td(a)?f(a,function(a){b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}):b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}),b.length?b.join("&"):""}function da(a){return ea(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ea(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function fa(a,b){var c,d,e=$d.length;for(d=0;e>d;++d)if(c=$d[d]+b,x(c=a.getAttribute(c)))return c;return null}function ga(a,b){var c,d,e={};f($d,function(b){var e=b+"app";!c&&a.hasAttribute&&a.hasAttribute(e)&&(c=a,d=a.getAttribute(e))}),f($d,function(b){var e,f=b+"app";!c&&(e=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(f))}),c&&(e.strictDi=null!==fa(c,"strict-di"),b(c,d?[d]:[],e))}function ha(c,d,e){v(e)||(e={});var g={strictDi:!1};e=l(g,e);var h=function(){if(c=Id(c),c.injector()){var a=c[0]===b?"document":_(c);throw Qd("btstrpd","App Already Bootstrapped with this Element '{0}'",a.replace(//,">"))}d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),e.debugInfoEnabled&&d.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),d.unshift("ng");var f=eb(d,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},i=/^NG_ENABLE_DEBUG_INFO!/,j=/^NG_DEFER_BOOTSTRAP!/;return a&&i.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(i,"")),a&&!j.test(a.name)?h():(a.name=a.name.replace(j,""),Rd.resumeBootstrap=function(a){return f(a,function(a){d.push(a)}),h()},void(A(Rd.resumeDeferredBootstrap)&&Rd.resumeDeferredBootstrap()))}function ia(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ja(a){var b=Rd.element(a).injector();if(!b)throw Qd("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ka(a,b){return b=b||"_",a.replace(_d,function(a,c){return(c?b:"")+a.toLowerCase()})}function la(){var b;if(!ae){var d=Yd();Jd=t(d)?a.jQuery:d?a[d]:c,Jd&&Jd.fn.on?(Id=Jd,l(Jd.fn,{scope:we.scope,isolateScope:we.isolateScope,controller:we.controller,injector:we.injector,inheritedData:we.inheritedData}),b=Jd.cleanData,Jd.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Jd._data(d,"events"),c&&c.$destroy&&Jd(d).triggerHandler("$destroy");b(a)}):Id=Fa,Rd.element=Id,ae=!0}}function ma(a,b,c){if(!a)throw Qd("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function na(a,b,c){return c&&Td(a)&&(a=a[a.length-1]),ma(A(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function oa(a,b){if("hasOwnProperty"===a)throw Qd("badname","hasOwnProperty is not a valid {0} name",b)}function pa(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&A(a)?U(f,a):a}function qa(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Id(Ld.call(a,0,e))),b.push(c));return b||a}function ra(){return Object.create(null)}function sa(a){function b(a,b,c){return a[b]||(a[b]=c())}var c=d("$injector"),e=d("ng"),f=b(a,"angular",Object);return f.$$minErr=f.$$minErr||d,b(f,"module",function(){var a={};return function(d,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(d,"module"),f&&a.hasOwnProperty(d)&&(a[d]=null),b(a,d,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function b(a,b){return function(c,f){return f&&A(f)&&(f.$$moduleName=d),e.push([a,b,arguments]),k}}if(!f)throw c("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",d);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:d,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function ta(a){var b=[];return JSON.stringify(a,function(a,c){if(c=V(a,c),v(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function ua(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):t(a)?"undefined":"string"!=typeof a?ta(a):a}function va(b){l(b,{bootstrap:ha,copy:P,extend:l,merge:m,equals:R,element:Id,forEach:f,injector:eb,noop:p,bind:U,toJson:W,fromJson:X,identity:q,isUndefined:t,isDefined:u,isString:x,isFunction:A,isObject:v,isNumber:y,isElement:L,isArray:Td,version:he,isDate:z,lowercase:Dd,uppercase:Ed,callbacks:{counter:0},getTestability:ja,$$minErr:d,$$csp:Xd,reloadWithDebugInfo:ia}),(Kd=sa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:wc}),a.provider("$compile",ob).directive({a:Cf,input:Tf,textarea:Tf,form:Hf,script:Og,select:Rg,style:Tg,option:Sg,ngBind:Wf,ngBindHtml:Yf,ngBindTemplate:Xf,ngClass:$f,ngClassEven:ag,ngClassOdd:_f,ngCloak:bg,ngController:cg,ngForm:If,ngHide:Hg,ngIf:fg,ngInclude:gg,ngInit:ig,ngNonBindable:yg,ngPluralize:Cg,ngRepeat:Dg,ngShow:Gg,ngStyle:Ig,ngSwitch:Jg,ngSwitchWhen:Kg,ngSwitchDefault:Lg,ngOptions:Bg,ngTransclude:Ng,ngModel:vg,ngList:jg,ngChange:Zf,pattern:Vg,ngPattern:Vg,required:Ug,ngRequired:Ug,minlength:Xg,ngMinlength:Xg,maxlength:Wg,ngMaxlength:Wg,ngValue:Vf,ngModelOptions:xg}).directive({ngInclude:hg}).directive(Df).directive(dg),a.provider({$anchorScroll:fb,$animate:Me,$animateCss:Pe,$$animateJs:Ke,$$animateQueue:Le,$$AnimateRunner:Oe,$$animateAsyncRun:Ne,$browser:lb,$cacheFactory:mb,$controller:tb,$document:ub,$exceptionHandler:vb,$filter:Kc,$$forceReflow:Ue,$interpolate:Jb,$interval:Kb,$http:Fb,$httpParamSerializer:xb,$httpParamSerializerJQLike:yb,$httpBackend:Hb,$xhrFactory:Gb,$location:Yb,$log:Zb,$parse:qc,$rootScope:vc,$q:rc,$$q:sc,$sce:Ac,$sceDelegate:zc,$sniffer:Bc,$templateCache:nb,$templateRequest:Cc,$$testability:Dc,$timeout:Ec,$window:Hc,$$rAF:uc,$$jqLite:$a,$$HashMap:Ae,$$cookieReader:Jc})}])}function wa(){return++je}function xa(a){return a.replace(me,function(a,b,c,d){return d?c.toUpperCase():c}).replace(ne,"Moz$1")}function ya(a){return!re.test(a)}function za(a){var b=a.nodeType;return b===be||!b||b===fe}function Aa(a){for(var b in ie[a.ng339])return!0;return!1}function Ba(a){for(var b=0,c=a.length;c>b;b++)Ja(a[b])}function Ca(a,b){var c,d,e,g,h=b.createDocumentFragment(),i=[];if(ya(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),d=(se.exec(a)||["",""])[1].toLowerCase(),e=ue[d]||ue._default,c.innerHTML=e[1]+a.replace(te,"<$1>")+e[2],g=e[0];g--;)c=c.lastChild;i=S(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",f(i,function(a){h.appendChild(a)}),h}function Da(a,c){c=c||b;var d;return(d=qe.exec(a))?[c.createElement(d[1])]:(d=Ca(a,c))?d.childNodes:[]}function Ea(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Fa(a){if(a instanceof Fa)return a;var b;if(x(a)&&(a=Vd(a),b=!0),!(this instanceof Fa)){if(b&&"<"!=a.charAt(0))throw pe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Fa(a)}b?Pa(this,Da(a)):Pa(this,a)}function Ga(a){return a.cloneNode(!0)}function Ha(a,b){if(b||Ja(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ja(c[d])}function Ia(a,b,c,d){if(u(d))throw pe("offargs","jqLite#off() does not support the `selector` argument");var e=Ka(a),g=e&&e.events,h=e&&e.handle;if(h)if(b){var i=function(b){var d=g[b];u(c)&&O(d||[],c),u(c)&&d&&d.length>0||(le(a,b,h),delete g[b])};f(b.split(" "),function(a){i(a),oe[a]&&i(oe[a])})}else for(b in g)"$destroy"!==b&&le(a,b,h),delete g[b]}function Ja(a,b){var d=a.ng339,e=d&&ie[d];if(e){if(b)return void delete e.data[b];e.handle&&(e.events.$destroy&&e.handle({},"$destroy"),Ia(a)),delete ie[d],a.ng339=c}}function Ka(a,b){var d=a.ng339,e=d&&ie[d];return b&&!e&&(a.ng339=d=wa(),e=ie[d]={events:{},data:{},handle:c}),e}function La(a,b,c){if(za(a)){var d=u(c),e=!d&&b&&!v(b),f=!b,g=Ka(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];l(h,b)}}}function Ma(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function Na(a,b){b&&a.setAttribute&&f(b.split(" "),function(b){a.setAttribute("class",Vd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vd(b)+" "," ")))})}function Oa(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");f(b.split(" "),function(a){a=Vd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Vd(c))}}function Pa(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Qa(a,b){return Ra(a,"$"+(b||"ngController")+"Controller")}function Ra(a,b,c){a.nodeType==fe&&(a=a.documentElement);for(var d=Td(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(u(c=Id.data(a,d[e])))return c;a=a.parentNode||a.nodeType===ge&&a.host}}function Sa(a){for(Ha(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ta(a,b){b||Ha(a);var c=a.parentNode;c&&c.removeChild(a)}function Ua(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Id(c).on("load",b)}function Va(a,b){var c=xe[b.toLowerCase()];return c&&ye[N(a)]&&c}function Wa(a){return ze[a]}function Xa(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(t(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Ya;f>1&&(e=Q(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Ya(a,b,c){c.call(a,b)}function Za(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ve.call(a,d))&&c.call(a,b)}function $a(){this.$get=function(){return l(Fa,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Oa(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),Na(a,b)}})}}function _a(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||i)():d+":"+a}function ab(a,b){if(b){var c=0;this.nextUid=function(){return++c}}f(a,this.put,this)}function bb(a){var b=a.toString().replace(Fe,""),c=b.match(Be)||b.match(Ce);return c}function cb(a){var b=bb(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function db(a,b,c){var d,e,g;if("function"==typeof a){if(!(d=a.$inject)){if(d=[],a.length){if(b)throw x(c)&&c||(c=a.name||cb(a)),Ge("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);e=bb(a),f(e[1].split(De),function(a){a.replace(Ee,function(a,b,c){d.push(c)})})}a.$inject=d}}else Td(a)?(g=a.length-1,na(a[g],"fn"),d=a.slice(0,g)):na(a,"fn",!0);return d}function eb(a,b){function d(a){return function(b,c){return v(b)?void f(b,h(a)):a(b,c)}}function e(a,b){if(oa(a,"service"),(A(b)||Td(b))&&(b=y.instantiate(b)),!b.$get)throw Ge("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=C.invoke(b,this);if(t(c))throw Ge("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function i(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function j(a,b){return i(a,["$injector",function(a){return a.instantiate(b)}])}function k(a,b){return i(a,r(b),!1)}function l(a,b){oa(a,"constant"),w[a]=b,z[a]=b}function m(a,b){var c=y.get(a+q),d=c.$get;c.$get=function(){var a=C.invoke(d,c);return C.invoke(b,null,{$delegate:a})}}function n(a){ma(t(a)||Td(a),"modulesToLoad","not an array");var b,c=[];return f(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=y.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{x(a)?(b=Kd(a),c=c.concat(n(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):A(a)?c.push(y.invoke(a)):Td(a)?c.push(y.invoke(a)):na(a,"module")}catch(e){throw Td(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ge("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function o(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===p)throw Ge("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=p,a[b]=c(b,d)}catch(e){throw a[b]===p&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=eb.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Ge("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Hd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Td(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Td(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:eb.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var p={},q="Provider",s=[],u=new ab([],!0),w={$provide:{provider:d(e),factory:d(i),service:d(j),value:d(k),constant:d(l),decorator:m}},y=w.$injector=o(w,function(a,b){throw Rd.isString(b)&&s.push(b),Ge("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},B=o(z,function(a,b){var d=y.get(a+q,b);return C.invoke(d.$get,d,c,a)}),C=B;w["$injector"+q]={$get:r(B)};var D=n(a);return C=B.get("$injector"),C.strictDi=b,f(D,function(a){a&&C.invoke(a)}),C}function fb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===N(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(A(a))a=a();else if(L(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else y(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=x(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Ua(function(){d.$evalAsync(h)})}),h}]}function gb(a,b){return a||b?a?b?(Td(a)&&(a=a.join(" ")),Td(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function hb(a){for(var b=0;bj&&this.remove(n.key),b}},get:function(a){if(j";var d=ja.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function F(a,b){try{a.addClass(b)}catch(c){}}function G(a,c,d,e,f){a instanceof Id||(a=Id(a));for(var g=/\S+/,h=0,i=a.length;i>h;h++){var j=a[h];j.nodeType===de&&j.nodeValue.match(g)&&Ea(j,a[h]=b.createElement("span"))}var k=J(a,c,a,d,e,f);G.$$addScopeClass(a);var l=null;return function(b,c,d){ma(b,"scope"),f&&f.needsNewScope&&(b=b.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=I(h));var i;if(i="html"!==l?Id(ba(l,Id("
    ").append(a).html())):c?we.clone.call(a):a,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return G.$$addScopeInfo(i,b),c&&c(i,b),k&&k(b,i,i,e),i}}function I(a){var b=a&&a[0];return b&&"foreignobject"!==N(b)&&Od.call(b).match(/SVG/)?"svg":"html"}function J(a,b,d,e,f,g){function h(a,d,e,f){var g,h,i,j,k,l,m,n,q;if(o){var r=d.length;for(q=new Array(r),k=0;kk;)i=q[p[k++]],g=p[k++],h=p[k++],g?(g.scope?(j=a.$new(),G.$$addScopeInfo(Id(i),j)):j=a,n=g.transcludeOnThisElement?K(a,g.transclude,f):!g.templateOnThisElement&&f?f:!f&&b?K(a,b):null,g(h,j,i,e,n)):h&&h(a,i.childNodes,c,f)}for(var i,j,k,l,m,n,o,p=[],q=0;qs;s++){var u=!1,w=!1;j=r[s],k=j.name,p=Vd(j.value),o=pb(k),(q=qa.test(o))&&(k=k.replace(Re,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=o.match(sa);y&&W(y[1])&&(u=k,w=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=pb(k.toLowerCase()),i[l]=k,(q||!c.hasOwnProperty(l))&&(c[l]=p,Va(a,l)&&(c[l]=!0)),da(a,b,p,l,q),V(b,l,"A",d,e,u,w)}if(g=a.className,v(g)&&(g=g.animVal),x(g)&&""!==g)for(;f=n.exec(g);)l=pb(f[2]),V(b,l,"C",d,e)&&(c[l]=Vd(f[3])),g=g.substr(f.index+f[0].length);break;case de:if(11===Hd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===de;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);aa(b,a.nodeValue);break;case ee:try{f=m.exec(a.nodeValue),f&&(l=pb(f[1]),V(b,l,"M",d,e)&&(c[l]=Vd(f[2])))}catch(z){}}return b.sort(Z),b}function M(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Qe("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==be&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Id(d)}function P(a,b,c){return function(d,e,f,g,h){return e=M(e[0],b,c),a(d,e,f,g,h)}}function Q(a,b,c,d,e,f){if(a)return G(b,c,d,e,f);var g;return function(){return g||(g=G(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function S(a,d,g,h,j,k,m,n,o){function p(a,b,c,d){a&&(c&&(a=P(a,c,d)),a.require=u.require,a.directiveName=y,(I===u||u.$$isolateScope)&&(a=fa(a,{isolateScope:!0})),m.push(a)),b&&(c&&(b=P(b,c,d)),b.require=u.require,b.directiveName=y,(I===u||u.$$isolateScope)&&(b=fa(b,{isolateScope:!0})),n.push(b))}function q(a,b,c,d){var e;if(x(b)){var g=b.match(w),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(e=d&&d[h],e=e&&e.instance),!e){var k="$"+h+"Controller";e=i?c.inheritedData(k):c.data(k)}if(!e&&!j)throw Qe("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Td(b)){e=[];for(var l=0,m=b.length;m>l;l++)e[l]=q(a,b[l],c,d)}else v(b)&&(e={},f(b,function(b,f){e[f]=q(a,b,c,d)}));return e||null}function r(a,b,c,d,e,f){var g=ra();for(var h in d){var j=d[h],k={$scope:j===I||j.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},l=j.controller;"@"==l&&(l=b[j.name]);var m=i(l,k,!0,j.controllerAs);g[j.name]=m,S||a.data("$"+j.name+"Controller",m.instance)}return g}function s(a,b,e,h,i){function j(a,b,d,e){var f;if(D(a)||(e=d,d=b,b=a,a=c),S&&(f=w),d||(d=S?y.parent():y),!e)return i(a,b,f,d,O);var g=i.$$slots[e];if(g)return g(a,b,f,d,O);if(t(g))throw Qe("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',e,_(y))}var k,o,p,s,u,w,x,y,z,B,C;d===e?(z=g,y=g.$$element):(y=Id(e),z=new la(y,g)),u=b,I?s=b.$new(!0):F&&(u=b.$parent),i&&(x=j,x.$$boundTransclude=i,x.isSlotFilled=function(a){return!!i.$$slots[a]}),H&&(w=r(y,z,x,H,s,b)),I&&(G.$$addScopeInfo(y,s,!0,!(J&&(J===I||J===I.$$originalDirective))),G.$$addScopeClass(y,!0),s.$$isolateBindings=I.$$isolateBindings,B=ha(b,z,s,s.$$isolateBindings,I),B&&s.$on("$destroy",B));for(var E in w){var K=H[E],L=w[E],M=K.$$bindings.bindToController;L.identifier&&M&&(C=ha(u,z,L.instance,M,K));var N=L();N!==L.instance&&(L.instance=N,y.data("$"+K.name+"Controller",N),C&&C(),C=ha(u,z,L.instance,M,K))}for(f(H,function(a,b){var c=a.require;a.bindToController&&!Td(c)&&v(c)&&l(w[b].instance,q(b,c,y,w))}),f(w,function(a){A(a.instance.$onInit)&&a.instance.$onInit()}),k=0,o=m.length;o>k;k++)p=m[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x);var O=b;for(I&&(I.template||null===I.templateUrl)&&(O=s),a&&a(O,e.childNodes,c,i),k=n.length-1;k>=0;k--)p=n[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x)}o=o||{};for(var u,y,z,B,C,E=-Number.MAX_VALUE,F=o.newScopeDirective,H=o.controllerDirectives,I=o.newIsolateScopeDirective,J=o.templateDirective,K=o.nonTlbTranscludeDirective,O=!1,R=!1,S=o.hasElementTranscludeDirective,V=g.$$element=Id(d),W=k,Z=h,aa=!1,ca=!1,da=0,ia=a.length;ia>da;da++){u=a[da];var ja=u.$$start,ka=u.$$end;if(ja&&(V=M(d,ja,ka)),z=c,E>u.priority)break;if((C=u.scope)&&(u.templateUrl||(v(C)?($("new/isolated scope",I||F,u,V),I=u):$("new/isolated scope",I,u,V)),F=F||u),y=u.name,!aa&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(var ma,na=da+1;ma=a[na++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){ca=!0;break}aa=!0}if(!u.templateUrl&&u.controller&&(C=u.controller,H=H||ra(),$("'"+y+"' controller",H[y],u,V),H[y]=u),C=u.transclude)if(O=!0,u.$$tlb||($("transclusion",K,u,V),K=u),"element"==C)S=!0,E=u.priority,z=V,V=g.$$element=Id(b.createComment(" "+y+": "+g[y]+" ")),d=V[0],ea(j,T(z),d),Z=Q(ca,z,h,E,W&&W.name,{nonTlbTranscludeDirective:K});else{var oa=ra();if(z=Id(Ga(d)).contents(),v(C)){z=[];var qa=ra(),sa=ra();f(C,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,qa[a]=b,oa[b]=null,sa[b]=c}),f(V.contents(),function(a){var b=qa[pb(N(a))];b?(sa[b]=!0,oa[b]=oa[b]||[],oa[b].push(a)):z.push(a)}),f(sa,function(a,b){if(!a)throw Qe("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ta in oa)oa[ta]&&(oa[ta]=Q(ca,oa[ta],h))}V.empty(),Z=Q(ca,z,h,c,c,{needsNewScope:u.$$isolateScope||u.$$newScope}),Z.$$slots=oa}if(u.template)if(R=!0,$("template",J,u,V),J=u,C=A(u.template)?u.template(V,g):u.template,C=pa(C),u.replace){if(W=u,z=ya(C)?[]:rb(ba(u.templateNamespace,Vd(C))),d=z[0],1!=z.length||d.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");ea(j,V,d);var ua={$attr:{}},va=L(d,[],ua),wa=a.splice(da+1,a.length-(da+1));(I||F)&&U(va,I,F),a=a.concat(va).concat(wa),X(g,ua),ia=a.length}else V.html(C);if(u.templateUrl)R=!0,$("template",J,u,V),J=u,u.replace&&(W=u),s=Y(a.splice(da,a.length-da),V,g,j,O&&Z,m,n,{controllerDirectives:H,newScopeDirective:F!==u&&F,newIsolateScopeDirective:I,templateDirective:J,nonTlbTranscludeDirective:K}),ia=a.length;else if(u.compile)try{B=u.compile(V,g,Z),A(B)?p(null,B,ja,ka):B&&p(B.pre,B.post,ja,ka)}catch(xa){e(xa,_(V))}u.terminal&&(s.terminal=!0,E=Math.max(E,u.priority))}return s.scope=F&&F.scope===!0,s.transcludeOnThisElement=O,s.templateOnThisElement=R,s.transclude=Z,o.hasElementTranscludeDirective=S,s}function U(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=o(a[d],{$$isolateScope:b,$$newScope:c})}function V(b,c,d,f,g,h,i){if(c===g)return null;var l=null;if(j.hasOwnProperty(c))for(var m,n=a.get(c+k),p=0,q=n.length;q>p;p++)try{m=n[p],(t(f)||f>m.priority)&&-1!=m.restrict.indexOf(d)&&(h&&(m=o(m,{$$start:h,$$end:i})),b.push(m),l=m)}catch(r){e(r)}return l}function W(b){if(j.hasOwnProperty(b))for(var c,d=a.get(b+k),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function X(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;f(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),f(b,function(b,f){"class"==f?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Y(a,b,c,d,e,h,i,j){var k,l,m=[],n=b[0],p=a.shift(),q=o(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=A(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),g(r).then(function(g){var o,t,u,w;if(g=pa(g),p.replace){if(u=ya(g)?[]:rb(ba(s,Vd(g))),o=u[0],1!=u.length||o.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);t={$attr:{}},ea(d,b,o);var x=L(o,[],t);v(p.scope)&&U(x,!0),a=x.concat(a),X(c,t)}else o=n,b.html(g);for(a.unshift(q),k=S(a,o,c,e,b,p,h,i,j),f(d,function(a,c){a==o&&(d[c]=b[0])}),l=J(b[0].childNodes,e);m.length;){var y=m.shift(),z=m.shift(),A=m.shift(),B=m.shift(),C=b[0];if(!y.$$destroyed){if(z!==n){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ga(o)),ea(A,Id(z),C),F(Id(C),D)}w=k.transcludeOnThisElement?K(y,k.transclude,B):B,k(l,y,C,d,w)}}m=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(m?m.push(b,c,d,f):(k.transcludeOnThisElement&&(f=K(b,k.transclude,e)),k(l,b,c,d,f)))}}function Z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function ca(a,b){if("srcdoc"==b)return u.HTML;var c=N(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?u.RESOURCE_URL:void 0}function da(a,b,c,e,f){var g=ca(a,e);f=s[e]||f;var h=d(c,!0,g,f);if(h){if("multiple"===e&&"select"===N(a))throw Qe("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",_(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=ra());if(y.test(e))throw Qe("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==c&&(h=k&&d(k,!0,g,f),c=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function ea(a,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(a)for(e=0,f=a.length;f>e;e++)if(a[e]==g){a[e++]=d;for(var j=e,k=j+h-1,l=a.length;l>j;j++,k++)l>k?a[j]=a[k]:delete a[j];a.length-=h-1,a.context===g&&(a.context=d);break}i&&i.replaceChild(d,g);var m=b.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Id.hasData(g)&&(Id.data(d,Id.data(g)),Id(g).off("$destroy")),Id.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function fa(a,b){return l(function(){return a.apply(null,arguments)},a,b)}function ga(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,_(c))}}function ha(a,b,c,e,g){var i=[];return f(e,function(e,f){var j,k,l,m,n,o=e.attrName,q=e.optional,r=e.mode;switch(r){case"@":q||Cd.call(b,o)||(c[f]=b[o]=void 0),b.$observe(o,function(a){x(a)&&(c[f]=a)}),b.$$observers[o].$$scope=a,j=b[o],x(j)?c[f]=d(j)(a):H(j)&&(c[f]=j);break;case"=":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),m=k.literal?R:function(a,b){return a===b||a!==a&&b!==b},l=k.assign||function(){throw j=c[f]=k(a),Qe("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[o],o,g.name)},j=c[f]=k(a);var s=function(b){return m(b,c[f])||(m(b,j)?l(a,b=c[f]):c[f]=b),j=b};s.$stateful=!0,n=e.collection?a.$watchCollection(b[o],s):a.$watch(h(b[o],s),null,k.literal),i.push(n);break;case"<":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),c[f]=k(a),n=a.$watch(k,function(a){c[f]=a},k.literal),i.push(n);break;case"&":if(k=b.hasOwnProperty(o)?h(b[o]):p,k===p&&q)break;c[f]=function(b){return k(a,b)}}}),i.length&&function(){for(var a=0,b=i.length;b>a;++a)i[a]()}}var ia=/^\w/,ja=b.createElement("div"),la=function(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a};la.prototype={$normalize:pb,$addClass:function(a){a&&a.length>0&&B.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&B.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=qb(a,b);c&&c.length&&B.addClass(this.$$element,c);var d=qb(b,a);d&&d.length&&B.removeClass(this.$$element,d)},$set:function(a,b,c,d){var g,h=this.$$element[0],i=Va(h,a),j=Wa(a),k=a;if(i?(this.$$element.prop(a,b),d=i):j&&(this[j]=b,k=j),this[a]=b,d?this.$attr[a]=d:(d=this.$attr[a],d||(this.$attr[a]=d=ka(a,"-"))),g=N(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=C(b,"src"===a);else if("img"===g&&"srcset"===a){for(var l="",m=Vd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),r=0;q>r;r++){var s=2*r;l+=C(Vd(p[s]),!0),l+=" "+Vd(p[s+1])}var u=Vd(p[2*r]).split(/\s/);l+=C(Vd(u[0]),!0),2===u.length&&(l+=" "+Vd(u[1])),this[a]=b=l}c!==!1&&(null===b||t(b)?this.$$element.removeAttr(d):ia.test(d)?this.$$element.attr(d,b):E(this.$$element[0],d,b));var v=this.$$observers;v&&f(v[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=ra()),e=d[a]||(d[a]=[]);return e.push(b),r.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||t(c[a])||b(c[a])}),function(){O(e,b)}}};var na=d.startSymbol(),oa=d.endSymbol(),pa="{{"==na&&"}}"==oa?q:function(a){return a.replace(/\{\{/g,na).replace(/}}/g,oa)},qa=/^ngAttr[A-Z]/,sa=/^(.+)Start$/;return G.$$addBindingInfo=z?function(a,b){var c=a.data("$binding")||[];Td(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:p,G.$$addBindingClass=z?function(a){F(a,"ng-binding")}:p,G.$$addScopeInfo=z?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:p,G.$$addScopeClass=z?function(a,b){F(a,b?"ng-isolate-scope":"ng-scope")}:p,G}]}function pb(a){return xa(a.replace(Re,""))}function qb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function rb(a){a=Id(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===ee&&Md.call(a,b,1)}return a}function sb(a,b){if(b&&x(b))return b;if(x(a)){var c=Te.exec(a);if(c)return c[3]}}function tb(){var a={},b=!1;this.register=function(b,c){oa(b,"controller"),v(b)?l(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(e,f){function g(a,b,c,e){if(!a||!v(a.$scope))throw d("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,b);a.$scope[b]=c}return function(d,h,i,j){var k,m,n,o;if(i=i===!0,j&&x(j)&&(o=j),x(d)){if(m=d.match(Te),!m)throw Se("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",d);n=m[1],o=o||m[3],d=a.hasOwnProperty(n)?a[n]:pa(h.$scope,n,!0)||(b?pa(f,n,!0):c),na(d,n,!0)}if(i){var p=(Td(d)?d[d.length-1]:d).prototype;k=Object.create(p||null),o&&g(h,o,k,n||d.name);var q;return q=l(function(){var a=e.invoke(d,k,h,n);return a!==k&&(v(a)||A(a))&&(k=a,o&&g(h,o,k,n||d.name)),k},{instance:k,identifier:o})}return k=e.instantiate(d,h,n),o&&g(h,o,k,n||d.name),k}}]}function ub(){this.$get=["$window",function(a){return Id(a.document)}]}function vb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function wb(a){return v(a)?z(a)?a.toISOString():W(a):a}function xb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return g(a,function(a,c){null===a||t(a)||(Td(a)?f(a,function(a,d){b.push(ea(c)+"="+ea(wb(a)))}):b.push(ea(c)+"="+ea(wb(a))))}),b.join("&")}}}function yb(){this.$get=function(){return function(a){function b(a,d,e){null===a||t(a)||(Td(a)?f(a,function(a,c){b(a,d+"["+(v(a)?c:"")+"]")}):v(a)&&!z(a)?g(a,function(a,c){b(a,d+(e?"":"[")+c+(e?"":"]"))}):c.push(ea(d)+"="+ea(wb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function zb(a,b){if(x(a)){var c=a.replace(Ze,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ve)||Ab(c))&&(a=X(c))}}return a}function Ab(a){var b=a.match(Xe);return b&&Ye[b[0]].test(a)}function Bb(a){function b(a,b){a&&(d[a]=d[a]?d[a]+", "+b:b)}var c,d=ra();return x(a)?f(a.split("\n"),function(a){c=a.indexOf(":"),b(Dd(Vd(a.substr(0,c))),Vd(a.substr(c+1)))}):v(a)&&f(a,function(a,c){b(Dd(c),Vd(a))}),d}function Cb(a){var b;return function(c){if(b||(b=Bb(a)),c){var d=b[Dd(c)];return void 0===d&&(d=null),d}return b}}function Db(a,b,c,d){return A(d)?d(a,b,c):(f(d,function(d){a=d(a,b,c)}),a)}function Eb(a){return a>=200&&300>a}function Fb(){var a=this.defaults={transformResponse:[zb],transformRequest:[function(a){return!v(a)||E(a)||G(a)||F(a)?a:W(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:Q(We),put:Q(We),patch:Q(We)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var e=!0;this.useLegacyPromiseExtensions=function(a){return u(a)?(e=!!a,this):e};var g=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,i,j,k,m,n){function o(b){function g(a){var b=l({},a);return b.data=Db(a.data,a.headers,a.status,j.transformResponse),Eb(a.status)?b:m.reject(b)}function h(a,b){var c,d={};return f(a,function(a,e){A(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a}),d}function i(b){var c,d,e,f=a.headers,g=l({},b.headers);f=l({},f.common,f[Dd(b.method)]);a:for(c in f){d=Dd(c);for(e in g)if(Dd(e)===d)continue a;g[c]=f[c]}return h(g,Q(b))}if(!v(b))throw d("$http")("badreq","Http request configuration must be an object. Received: {0}",b);if(!x(b.url))throw d("$http")("badreq","Http request configuration url must be a string. Received: {0}",b.url);var j=l({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);j.headers=i(b),j.method=Ed(j.method),j.paramSerializer=x(j.paramSerializer)?n.get(j.paramSerializer):j.paramSerializer;var k=function(b){var d=b.headers,e=Db(b.data,Cb(d),c,b.transformRequest);return t(e)&&f(d,function(a,b){"content-type"===Dd(b)&&delete d[b]}),t(b.withCredentials)&&!t(a.withCredentials)&&(b.withCredentials=a.withCredentials),r(b,e).then(g,g)},o=[k,c],p=m.when(j);for(f(y,function(a){(a.request||a.requestError)&&o.unshift(a.request,a.requestError),(a.response||a.responseError)&&o.push(a.response,a.responseError)});o.length;){var q=o.shift(),s=o.shift();p=p.then(q,s)}return e?(p.success=function(a){return na(a,"fn"),p.then(function(b){a(b.data,b.status,b.headers,j)}),p},p.error=function(a){return na(a,"fn"),p.then(null,function(b){a(b.data,b.status,b.headers,j)}),p}):(p.success=_e("success"),p.error=_e("error")),p}function p(a){f(arguments,function(a){o[a]=function(b,c){return o(l({},c||{},{method:a,url:b}))}})}function q(a){f(arguments,function(a){o[a]=function(b,c,d){return o(l({},d||{},{method:a,url:b,data:c}))}})}function r(d,e){function f(a,c,d,e){function f(){g(c,a,d,e)}n&&(Eb(a)?n.put(y,[a,c,Bb(d),e]):n.remove(y)),b?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function g(a,b,c,e){b=b>=-1?b:0,(Eb(b)?q.resolve:q.reject)({data:a,status:b,headers:Cb(c),config:d,statusText:e})}function j(a){g(a.data,a.status,Q(a.headers()),a.statusText)}function l(){var a=o.pendingRequests.indexOf(d);-1!==a&&o.pendingRequests.splice(a,1)}var n,p,q=m.defer(),r=q.promise,x=d.headers,y=s(d.url,d.paramSerializer(d.params));if(o.pendingRequests.push(d),r.then(l,l),!d.cache&&!a.cache||d.cache===!1||"GET"!==d.method&&"JSONP"!==d.method||(n=v(d.cache)?d.cache:v(a.cache)?a.cache:w),n&&(p=n.get(y),u(p)?I(p)?p.then(j,j):Td(p)?g(p[1],p[0],Q(p[2]),p[3]):g(p,200,{},"OK"):n.put(y,r)),t(p)){var z=Gc(d.url)?i()[d.xsrfCookieName||a.xsrfCookieName]:c;z&&(x[d.xsrfHeaderName||a.xsrfHeaderName]=z),h(d.method,y,e,f,x,d.timeout,d.withCredentials,d.responseType)}return r}function s(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=j("$http");a.paramSerializer=x(a.paramSerializer)?n.get(a.paramSerializer):a.paramSerializer;var y=[];return f(g,function(a){y.unshift(x(a)?n.get(a):n.invoke(a))}),o.pendingRequests=[],p("get","delete","head","jsonp"),q("post","put","patch"),o.defaults=a,o}]}function Gb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Hb(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Ib(a,d,a.defer,b.angular.callbacks,c[0])}]}function Ib(a,b,c,d,e){function g(a,b,c){var f=e.createElement("script"),g=null;return f.type="text/javascript",f.src=a,f.async=!0,g=function(a){le(f,"load",g),le(f,"error",g),e.body.removeChild(f),f=null;var h=-1,i="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ke(f,"load",g),ke(f,"error",g),e.body.appendChild(f),g}return function(e,h,i,j,k,l,m,n){function o(){s&&s(),v&&v.abort()}function q(b,d,e,f,g){u(y)&&c.cancel(y),s=v=null,b(d,e,f,g),a.$$completeOutstandingRequest(p)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Dd(e)){var r="_"+(d.counter++).toString(36);d[r]=function(a){d[r].data=a,d[r].called=!0};var s=g(h.replace("JSON_CALLBACK","angular.callbacks."+r),r,function(a,b){q(j,a,d[r].data,"",b),d[r]=p})}else{var v=b(e,h);v.open(e,h,!0),f(k,function(a,b){u(a)&&v.setRequestHeader(b,a)}),v.onload=function(){var a=v.statusText||"",b="response"in v?v.response:v.responseText,c=1223===v.status?204:v.status;0===c&&(c=b?200:"file"==Fc(h).protocol?404:0),q(j,c,b,v.getAllResponseHeaders(),a)};var w=function(){q(j,-1,null,null,"")};if(v.onerror=w,v.onabort=w,m&&(v.withCredentials=!0),n)try{v.responseType=n}catch(x){if("json"!==n)throw x}v.send(t(i)?null:i)}if(l>0)var y=c(o,l);else I(l)&&l.then(o)}}function Jb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=W(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function j(f,j,n,o){function p(a){try{return a=G(a),o&&!u(a)?a:h(a)}catch(b){d(af.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var q;if(!j){var s=g(f);q=r(s),q.exp=f,q.expressions=[],q.$$watchDelegate=i}return q}o=!!o;for(var v,w,x,y=0,z=[],B=[],C=f.length,D=[],E=[];C>y;){if(-1==(v=f.indexOf(a,y))||-1==(w=f.indexOf(b,v+k))){y!==C&&D.push(g(f.substring(y)));break}y!==v&&D.push(g(f.substring(y,v))),x=f.substring(v+k,w),z.push(x),B.push(c(x,p)),y=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&af.throwNoconcat(f),!j||z.length){var F=function(a){for(var b=0,c=z.length;c>b;b++){if(o&&t(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return l(function(a){var b=0,c=z.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(af.interr(f,g))}},{exp:f,expressions:z,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);A(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var k=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return j.startSymbol=function(){return a},j.endSymbol=function(){return b},j}]}function Kb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?T(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=u(j)&&!j,r=(q?d:c).defer(),s=r.promise;return i=u(i)?i:0,s.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(s.$$intervalId),delete g[s.$$intervalId]),q||a.$apply()},h),g[s.$$intervalId]=r,s}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Lb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=da(b[c]);return b.join("/")}function Mb(a,b){var c=Fc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=n(c.port)||cf[c.protocol]||null}function Nb(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Fc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=ba(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Ob(a,b){return 0===b.indexOf(a)?b.substr(a.length):void 0}function Pb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Qb(a){return a.replace(/(#.+)|#$/,"$1")}function Rb(a){return a.substr(0,Pb(a).lastIndexOf("/")+1)}function Sb(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Tb(a,b,c){this.$$html5=!0,c=c||"",Mb(a,this),this.$$parse=function(a){var c=Ob(b,a);if(!x(c))throw df("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Nb(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=ca(this.$$search),c=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return u(f=Ob(a,d))?(g=f,h=u(f=Ob(c,f))?b+(Ob("/",f)||f):a+g):u(f=Ob(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Ub(a,b,c){Mb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return 0===b.indexOf(c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Ob(a,d)||Ob(b,d);t(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",t(g)&&(a=d,this.replace())):(f=Ob(c,g),t(f)&&(f=g)),Nb(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Pb(a)==Pb(b)?(this.$$parse(b),!0):!1}}function Vb(a,b,c){this.$$html5=!0,Ub.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Pb(d)?f=d:(g=Ob(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){ +var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Wb(a){return function(){return this[a]}}function Xb(a,b){return function(c){return t(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function Yb(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a},this.html5Mode=function(a){return H(a)?(b.enabled=a,this):v(a)?(H(a.enabled)&&(b.enabled=a.enabled),H(a.requireBase)&&(b.requireBase=a.requireBase),H(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw df("nobase","$location in HTML5 mode requires a tag to be present!");l=Sb(n)+(m||"/"),k=e.history?Tb:Vb}else l=Pb(n),k=Ub;var o=Rb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Id(a.target);"a"!==N(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");v(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Fc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Qb(j.absUrl())!=Qb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return t(Ob(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Qb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Qb(d.url()),b=Qb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function Zb(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=c.console||{},e=b[a]||b.log||p,g=!1;try{g=!!e.apply}catch(h){}return g?function(){var a=[];return f(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function $b(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ff("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function _b(a){return a+""}function ac(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw ff("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ff("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw ff("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function bc(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===gf||a===hf||a===jf)throw ff("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function cc(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ff("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function dc(a,b){return"undefined"!=typeof a?a:b}function ec(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function fc(a,b){var c=a(b);return!c.$stateful}function gc(a,b){var c,d;switch(a.type){case nf.Program:c=!0,f(a.body,function(a){gc(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case nf.Literal:a.constant=!0,a.toWatch=[];break;case nf.UnaryExpression:gc(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case nf.BinaryExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case nf.LogicalExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case nf.ConditionalExpression:gc(a.test,b),gc(a.alternate,b),gc(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case nf.Identifier:a.constant=!1,a.toWatch=[a];break;case nf.MemberExpression:gc(a.object,b),a.computed&&gc(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case nf.CallExpression:c=a.filter?fc(b,a.callee.name):!1,d=[],f(a.arguments,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&fc(b,a.callee.name)?d:[a];break;case nf.AssignmentExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case nf.ArrayExpression:c=!0,d=[],f(a.elements,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ObjectExpression:c=!0,d=[],f(a.properties,function(a){gc(a.value,b),c=c&&a.value.constant,a.value.constant||d.push.apply(d,a.value.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ThisExpression:a.constant=!1,a.toWatch=[];break;case nf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function hc(a){if(1==a.length){var b=a[0].expression,d=b.toWatch;return 1!==d.length?d:d[0]!==b?d:c}}function ic(a){return a.type===nf.Identifier||a.type===nf.MemberExpression}function jc(a){return 1===a.body.length&&ic(a.body[0].expression)?{type:nf.AssignmentExpression,left:a.body[0].expression,right:{type:nf.NGValueParameter},operator:"="}:void 0}function kc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===nf.Literal||a.body[0].expression.type===nf.ArrayExpression||a.body[0].expression.type===nf.ObjectExpression)}function lc(a){return a.constant}function mc(a,b){this.astBuilder=a,this.$filter=b}function nc(a,b){this.astBuilder=a,this.$filter=b}function oc(a){return"constructor"==a}function pc(a){return A(a.valueOf)?a.valueOf():pf.call(a)}function qc(){var a=ra(),b=ra();this.$get=["$filter",function(d){function e(c,e,f){var h,n,s;switch(f=f||r,typeof c){case"string":c=c.trim(),s=c;var t=f?b:a;if(h=t[s],!h){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2));var u=f?q:o,v=new mf(u),w=new of(v,d,u);h=w.parse(c),h.constant?h.$$watchDelegate=l:n?h.$$watchDelegate=h.literal?k:j:h.inputs&&(h.$$watchDelegate=i),f&&(h=g(h)),t[s]=h}return m(h,e);case"function":return m(c,e);default:return m(p,e)}}function g(a){function b(b,c,d,e){var f=r;r=!0;try{return a(b,c,d,e)}finally{r=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=g(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cm;m++)k[m]=h,l[m]=null;return a.$watch(function(a){for(var b=!1,d=0,f=i.length;f>d;d++){var j=i[d](a);(b||(b=!h(j,k[d])))&&(l[d]=j,k[d]=j&&pc(j))}return b&&(g=e(a,c,c,l)),g},b,d,f)}function j(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,A(b)&&b.apply(this,arguments),u(a)&&d.$$postDigest(function(){u(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;return f(a,function(a){u(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return d(a)},function(a,c,d){h=a,A(b)&&b.call(this,a,c,d),e(a)&&d.$$postDigest(function(){e(h)&&g()})},c)}function l(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function m(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==k&&c!==j,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return u(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==i?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=i,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var n=Xd().noUnsafeEval,o={csp:n,expensiveChecks:!1},q={csp:n,expensiveChecks:!0},r=!1;return e.$$runningExpensiveChecks=function(){return r},e}]}function rc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return tc(function(b){a.$evalAsync(b)},b)}]}function sc(){this.$get=["$browser","$exceptionHandler",function(a,b){return tc(function(b){a.defer(b)},b)}]}function tc(a,b){function e(){this.$$state={status:0}}function g(a,b){return function(c){b.call(a,c)}}function h(a){var d,e,f;f=a.pending,a.processScheduled=!1,a.pending=c;for(var g=0,h=f.length;h>g;++g){e=f[g][0],d=f[g][a.status];try{A(d)?e.resolve(d(a.value)):1===a.status?e.resolve(a.value):e.reject(a.value)}catch(i){e.reject(i),b(i)}}}function i(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){h(b)}))}function j(){this.promise=new e}function k(a){var b=new j,c=0,d=Td(a)?[]:{};return f(a,function(a,e){c++,r(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})}),0===c&&b.resolve(d),b.promise}var m=d("$q",TypeError),n=function(){var a=new j;return a.resolve=g(a,a.resolve),a.reject=g(a,a.reject),a.notify=g(a,a.notify),a};l(e.prototype,{then:function(a,b,c){if(t(a)&&t(b)&&t(c))return this;var d=new j;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&i(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return q(b,!0,a)},function(b){return q(b,!1,a)},b)}}),l(j.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(m("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function c(a){h||(h=!0,f.$$resolve(a))}function d(a){h||(h=!0,f.$$reject(a))}var e,f=this,h=!1;try{(v(a)||A(a))&&(e=a&&a.then),A(e)?(this.promise.$$state.status=-1,e.call(a,c,d,g(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,i(this.promise.$$state))}catch(j){d(j),b(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,i(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(A(a)?a(c):c)}catch(h){b(h)}}})}});var o=function(a){var b=new j;return b.reject(a),b.promise},p=function(a,b){var c=new j;return b?c.resolve(a):c.reject(a),c.promise},q=function(a,b,c){var d=null;try{A(c)&&(d=c())}catch(e){return p(e,!1)}return I(d)?d.then(function(){return p(a,b)},function(a){return p(a,!1)}):p(a,b)},r=function(a,b,c,d){var e=new j;return e.resolve(a),e.promise.then(b,c,d)},s=r,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!A(a))throw m("norslvr","Expected resolverFn, got '{0}'",a);var d=new j;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=n,u.reject=o,u.when=r,u.resolve=s,u.all=k,u}function uc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function vc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=i(),this.$$ChildScope=null}return b.prototype=a,b}var b=10,c=d("$rootScope"),g=null,h=null;this.digestTtl=function(a){return arguments.length&&(b=a),b},this.$get=["$exceptionHandler","$parse","$browser",function(d,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Hd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function n(){this.$id=i(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function o(a){if(y.$$phase)throw c("inprog","{0} already in progress",y.$$phase);y.$$phase=a}function q(){y.$$phase=null}function r(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function u(){}function w(){for(;C.length;)try{C.shift()()}catch(a){d(a)}h=null}function x(){null===h&&(h=k.defer(function(){y.$apply(w)}))}n.prototype={constructor:n,$new:function(b,c){var d;return c=c||this,b?(d=new n,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,h=f.$$watchers,i={fn:b,last:u,get:e,exp:d||a,eq:!!c};return g=null,A(b)||(i.fn=p),h||(h=f.$$watchers=[]),h.unshift(i),r(this,1),function(){O(h,i)>=0&&r(f,-1),g=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(e,e,h)):b(e,d,h)}var d=new Array(a.length),e=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(e,e,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,f){e[0]=a,d[0]=c,b(e,a===c?e:d,f)}):(f(a,function(a,b){var f=h.$watch(a,function(a,f){e[b]=a,d[b]=f,i||(i=!0,h.$evalAsync(c))});g.push(f)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function c(a){f=a;var b,c,d,h,i;if(!t(f)){if(v(f))if(e(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],d=i!==i&&h!==h,d||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(c in f)Cd.call(f,c)&&(b++,h=f[c],i=g[c],c in g?(d=i!==i&&h!==h,d||i===h||(l++,g[c]=h)):(q++,g[c]=h,l++));if(q>b){l++;for(c in g)Cd.call(f,c)||(q--,delete g[c])}}else g!==f&&(g=f,l++);return l}}function d(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(v(f))if(e(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,c),n=[],o={},p=!0,q=0;return this.$watch(m,d)},$digest:function(){var a,e,f,i,j,l,m,n,p,r,s,t,v=b,x=this,C=[];o("$digest"),k.$$checkUrlChange(),this===y&&null!==h&&(k.defer.cancel(h),w()),g=null;do{for(n=!1,r=x;z.length;){try{t=z.shift(),t.scope.$eval(t.expression,t.locals)}catch(D){d(D)}g=null}a:do{if(l=r.$$watchers)for(m=l.length;m--;)try{if(a=l[m])if(j=a.get,(e=j(r))===(f=a.last)||(a.eq?R(e,f):"number"==typeof e&&"number"==typeof f&&isNaN(e)&&isNaN(f))){if(a===g){n=!1;break a}}else n=!0,g=a,a.last=a.eq?P(e,null):e,i=a.fn,i(e,f===u?e:f,r),5>v&&(s=4-v,C[s]||(C[s]=[]),C[s].push({msg:A(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:e,oldVal:f}))}catch(D){d(D)}if(!(p=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(p=r.$$nextSibling);)r=r.$parent}while(r=p);if((n||z.length)&&!v--)throw q(),c("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",b,C)}while(n||z.length);for(q();B.length;)try{B.shift()()}catch(D){d(D)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===y&&k.$$applicationDestroyed(),r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,m(this)}},$eval:function(a,b){return j(a)(this,b)},$evalAsync:function(a,b){y.$$phase||z.length||k.defer(function(){z.length&&y.$digest()}),z.push({scope:this,expression:j(a),locals:b})},$$postDigest:function(a){B.push(a)},$apply:function(a){try{o("$apply");try{return this.$eval(a)}finally{q()}}catch(b){d(b)}finally{try{y.$digest()}catch(b){throw d(b),b}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&C.push(b),a=j(a),x()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]),c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,s(e,1,a))}},$emit:function(a,b){var c,e,f,g=[],h=this,i=!1,j={name:a,targetScope:h,stopPropagation:function(){i=!0},preventDefault:function(){j.defaultPrevented=!0},defaultPrevented:!1},k=S([j],arguments,1);do{for(c=h.$$listeners[a]||g,j.currentScope=h,e=0,f=c.length;f>e;e++)if(c[e])try{c[e].apply(null,k)}catch(l){d(l)}else c.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,b){var c=this,e=c,f=c,g={name:a,targetScope:c,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!c.$$listenerCount[a])return g;for(var h,i,j,k=S([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){d(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==c&&e.$$nextSibling))for(;e!==c&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var y=new n,z=y.$$asyncQueue=[],B=y.$$postDigestQueue=[],C=y.$$applyAsyncQueue=[];return y}]}function wc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return u(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return u(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Fc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function xc(a){if("self"===a)return a;if(x(a)){if(a.indexOf("***")>-1)throw qf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Wd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(B(a))return new RegExp("^"+a.source+"$");throw qf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yc(a){var b=[];return u(a)&&f(a,function(a){b.push(xc(a))}),b}function zc(){this.SCE_CONTEXTS=rf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=yc(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=yc(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Gc(b):!!a.exec(b.href)}function e(c){var e,f,g=Fc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw qf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||t(b)||""===b)return b;if("string"!=typeof b)throw qf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||t(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===rf.RESOURCE_URL){if(e(b))return b;throw qf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===rf.HTML)return j(b);throw qf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw qf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[rf.HTML]=f(k),l[rf.CSS]=f(k),l[rf.URL]=f(k),l[rf.JS]=f(k),l[rf.RESOURCE_URL]=f(l[rf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Ac(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Hd)throw qf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var d=Q(rf);d.isEnabled=function(){return a},d.trustAs=c.trustAs,d.getTrusted=c.getTrusted,d.valueOf=c.valueOf,a||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=q),d.parseAs=function(a,c){var e=b(c);return e.literal&&e.constant?e:b(c,function(b){return d.getTrusted(a,b)})};var e=d.parseAs,g=d.getTrusted,h=d.trustAs;return f(rf,function(a,b){var c=Dd(b);d[xa("parse_as_"+c)]=function(b){return e(a,b)},d[xa("get_trusted_"+c)]=function(b){return g(a,b)},d[xa("trust_as_"+c)]=function(b){return h(a,b)}}),d}]}function Bc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=n((/android (\d+)/.exec(Dd((a.navigator||{}).userAgent))||[])[1]),g=/Boxee/i.test((a.navigator||{}).userAgent),h=b[0]||{},i=/^(Moz|webkit|ms)(?=[A-Z])/,j=h.body&&h.body.style,k=!1,l=!1;if(j){for(var m in j)if(d=i.exec(m)){c=d[0],c=c.substr(0,1).toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in j&&"webkit"),k=!!("transition"in j||c+"Transition"in j),l=!!("animation"in j||c+"Animation"in j),!f||k&&l||(k=x(j.webkitTransition),l=x(j.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>f||g),hasEvent:function(a){if("input"===a&&11>=Hd)return!1;if(t(e[a])){var b=h.createElement("div");e[a]="on"+a in b}return e[a]},csp:Xd(),vendorPrefix:c,transitions:k,animations:l,android:f}}]}function Cc(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw Qe("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,x(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var j=c.defaults&&c.defaults.transformResponse;return Td(j)?j=j.filter(function(a){return a!==zb}):j===zb&&(j=null),c.get(g,l({cache:b,transformResponse:j},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Dc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var d={};return d.findBindings=function(a,b,c){var d=a.getElementsByClassName("ng-binding"),e=[];return f(d,function(a){var d=Rd.element(a).data("$binding");d&&f(d,function(d){if(c){var f=new RegExp("(^|\\s)"+Wd(b)+"(\\s|\\||$)");f.test(d)&&e.push(a)}else-1!=d.indexOf(b)&&e.push(a)})}),e},d.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),t(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Jc(){this.$get=Ic}function Kc(a){function b(d,e){if(v(d)){var g={};return f(d,function(a,c){g[c]=b(c,a)}),g}return a.factory(d+c,e)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Pc),b("date",cd),b("filter",Lc),b("json",dd),b("limitTo",ed),b("lowercase",Af),b("number",Qc),b("orderBy",fd),b("uppercase",Bf)}function Lc(){return function(a,b,c){if(!e(a)){if(null==a)return a;throw d("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Oc(b);switch(h){case"function":f=b;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Mc(b,c,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Mc(a,b,c){var d,e=v(a)&&"$"in a;return b===!0?b=R:A(b)||(b=function(a,b){return t(a)?!1:null===a||null===b?a===b:v(b)||v(a)&&!s(a)?!1:(a=Dd(""+a),b=Dd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!v(d)?Nc(d,a.$,b,!1):Nc(d,a,b,c)}}function Nc(a,b,c,d,e){var f=Oc(a),g=Oc(b);if("string"===g&&"!"===b.charAt(0))return!Nc(a,b.substring(1),c,d);if(Td(a))return a.some(function(a){return Nc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Nc(a[h],b,c,!0))return!0;return e?!1:Nc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!A(i)&&!t(i)){var j="$"===h,k=j?a:a[h];if(!Nc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Oc(a){return null===a?"null":typeof a}function Pc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return t(c)&&(c=b.CURRENCY_SYM),t(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Tc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Qc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Tc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Rc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(vf))>-1&&(a=a.replace(vf,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==wf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==wf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>uf&&(b=b.splice(0,uf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Sc(a,b,c,d){var e=a.d,f=e.length-a.i;b=t(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0)e.splice(g);else{a.i=1,e.length=g=b+1;for(var i=0;g>i;i++)e[i]=0}for(h>=5&&e[g-1]++;b>f;f++)e.push(0);var j=e.reduceRight(function(a,b,c,d){return b+=a,d[c]=b%10,Math.floor(b/10)},0);j&&(e.unshift(j),a.i++)}function Tc(a,b,c,d,e){if(!x(a)&&!y(a)||isNaN(a))return"";var f,g=!isFinite(a),h=!1,i=Math.abs(a)+"",j="";if(g)j="∞";else{f=Rc(i),Sc(f,e,b.minFrac,b.maxFrac);var k=f.d,l=f.i,m=f.e,n=[];for(h=k.reduce(function(a,b){return a&&!b},!0);0>l;)k.unshift(0),l++;l>0?n=k.splice(l):(n=k,k=[0]);var o=[];for(k.length>b.lgSize&&o.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Uc(a,b,c){var d="";for(0>a&&(d="-",a=-a),a=""+a;a.length0||f>-c)&&(f+=c),0===f&&-12==c&&(f=12),Uc(f,b,d)}}function Wc(a,b){return function(c,d){var e=c["get"+a](),f=Ed(b?"SHORT"+a:a);return d[f][e]}}function Xc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Uc(Math[d>0?"floor":"ceil"](d/60),2)+Uc(Math.abs(d%60),2)}function Yc(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Zc(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function $c(a){return function(b){var c=Yc(b.getFullYear()),d=Zc(b),e=+d-+c,f=1+Math.round(e/6048e5);return Uc(f,a)}}function _c(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function ad(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function bd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function cd(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=n(b[9]+b[10]),f=n(b[9]+b[11])),g.call(d,n(b[1]),n(b[2])-1,n(b[3]));var i=n(b[4]||0)-e,j=n(b[5]||0)-f,k=n(b[6]||0),l=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,l),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g,h,i="",j=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,x(c)&&(c=zf.test(c)?n(c):b(c)),y(c)&&(c=new Date(c)),!z(c)||!isFinite(c.getTime()))return c;for(;d;)h=yf.exec(d),h?(j=S(j,h,1),d=j.pop()):(j.push(d),d=null);var k=c.getTimezoneOffset();return e&&(k=Y(e,k),c=$(c,e,!0)),f(j,function(b){g=xf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function dd(){return function(a,b){return t(b)&&(b=2),W(a,b)}}function ed(){return function(a,b,c){return b=Math.abs(Number(b))===1/0?Number(b):n(b),isNaN(b)?a:(y(a)&&(a=a.toString()),Td(a)||x(a)?(c=!c||isNaN(c)?0:n(c),c=0>c?Math.max(0,a.length+c):c,b>=0?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function fd(a){function b(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=q;if(A(b))e=b;else if(x(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant))){var f=e();e=function(a){return a[f]}}return{get:e,descending:d*c}})}function c(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a,b){return"function"==typeof a.valueOf&&(a=a.valueOf(),c(a))?a:s(a)&&(a=a.toString(),c(a))?a:b}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"string"===c?a=a.toLowerCase():"object"===c&&(a=f(a,b)), +{value:a,type:c}}function h(a,b){var c=0;return a.type===b.type?a.value!==b.value&&(c=a.valued&&!(c=h(a.predicateValues[d],b.predicateValues[d])*k[d].descending);++d);return c}if(null==a)return a;if(!e(a))throw d("orderBy")("notarray","Expected array but received: {0}",a);Td(c)||(c=[c]),0===c.length&&(c=["+"]);var k=b(c,f);k.push({get:function(){return{}},descending:f?-1:1});var l=Array.prototype.map.call(a,i);return l.sort(j),a=l.map(function(a){return a.value})}}function gd(a){return A(a)&&(a={link:a}),a.restrict=a.restrict||"AC",r(a)}function hd(a,b){a.$name=b}function id(a,b,d,e,g){var h=this,i=[];h.$error={},h.$$success={},h.$pending=c,h.$name=g(b.name||b.ngForm||"")(d),h.$dirty=!1,h.$pristine=!0,h.$valid=!0,h.$invalid=!1,h.$submitted=!1,h.$$parentForm=Ef,h.$rollbackViewValue=function(){f(i,function(a){a.$rollbackViewValue()})},h.$commitViewValue=function(){f(i,function(a){a.$commitViewValue()})},h.$addControl=function(a){oa(a.$name,"input"),i.push(a),a.$name&&(h[a.$name]=a),a.$$parentForm=h},h.$$renameControl=function(a,b){var c=a.$name;h[c]===a&&delete h[c],h[b]=a,a.$name=b},h.$removeControl=function(a){a.$name&&h[a.$name]===a&&delete h[a.$name],f(h.$pending,function(b,c){h.$setValidity(c,null,a)}),f(h.$error,function(b,c){h.$setValidity(c,null,a)}),f(h.$$success,function(b,c){h.$setValidity(c,null,a)}),O(i,a),a.$$parentForm=Ef},xd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(O(d,c),0===d.length&&delete a[b])},$animate:e}),h.$setDirty=function(){e.removeClass(a,mg),e.addClass(a,ng),h.$dirty=!0,h.$pristine=!1,h.$$parentForm.$setDirty()},h.$setPristine=function(){e.setClass(a,mg,ng+" "+Ff),h.$dirty=!1,h.$pristine=!0,h.$submitted=!1,f(i,function(a){a.$setPristine()})},h.$setUntouched=function(){f(i,function(a){a.$setUntouched()})},h.$setSubmitted=function(){e.addClass(a,Ff),h.$submitted=!0,h.$$parentForm.$setSubmitted()}}function jd(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function kd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d)}function ld(a,b,c,d,e,f){var g=Dd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0}),b.on("compositionend",function(){h=!1,i()})}var i=function(a){if(j&&(f.defer.cancel(j),j=null),!h){var e=b.val(),i=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Vd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,i)}};if(e.hasEvent("input"))b.on("input",i);else{var j,k=function(a,b,c){j||(j=f.defer(function(){j=null,b&&b.value===c||i(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",i),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function md(a,b){if(z(a))return a;if(x(a)){Pf.lastIndex=0;var c=Pf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=Yc(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function nd(a,b){return function(c,d){var e,g;if(z(c))return c;if(x(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Jf.test(c))return new Date(c);if(a.lastIndex=0,e=a.exec(c))return e.shift(),g=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},f(e,function(a,c){c=q},h.$observe("min",function(a){q=n(a),i.$validate()})}if(u(h.max)||h.ngMax){var r;i.$validators.max=function(a){return!m(a)||t(r)||d(a)<=r},h.$observe("max",function(a){r=n(a),i.$validate()})}}}function pd(a,b,d,e){var f=b[0],g=e.$$hasNativeValidators=v(f.validity);g&&e.$parsers.push(function(a){var d=b.prop(Bd)||{};return d.badInput||d.typeMismatch?c:a})}function qd(a,b,d,e,f,g){if(pd(a,b,d,e),ld(a,b,d,e,f,g),e.$$parserName="number",e.$parsers.push(function(a){return e.$isEmpty(a)?null:Mf.test(a)?parseFloat(a):c}),e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!y(a))throw tg("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),u(d.min)||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||t(h)||a>=h},d.$observe("min",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),h=y(a)&&!isNaN(a)?a:c,e.$validate()})}if(u(d.max)||d.ngMax){var i;e.$validators.max=function(a){return e.$isEmpty(a)||t(i)||i>=a},d.$observe("max",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),i=y(a)&&!isNaN(a)?a:c,e.$validate()})}}function rd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Kf.test(c)}}function sd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Lf.test(c)}}function td(a,b,c,d){t(c.name)&&b.attr("name",i());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function ud(a,b,c,d,e){var f;if(u(d)){if(f=a(d),!f.constant)throw tg("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function vd(a,b,c,d,e,f,g,h){var i=ud(h,a,"ngTrueValue",c.ngTrueValue,!0),j=ud(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return R(a,i)}),d.$parsers.push(function(a){return a?i:j})}function wd(a,b){return a="ngClass"+a,["$animate",function(c){function d(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&d.push(a))}),h.data("$classCounts",c),d.join(" ")}function m(a,b){var e=d(b,a),f=d(a,b);e=l(e,1),f=l(f,-1),e&&e.length&&c.addClass(h,e),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||g.$index%2===b){var c=e(a||[]);if(o){if(!R(a,o)){var d=e(o);m(d,c)}}else j(c)}o=Q(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var f=1&c;if(f!==(1&d)){var h=e(g.$eval(i[a]));f===b?j(h):k(h)}})}}}]}function xd(a){function b(a,b,i){t(b)?d("$pending",a,i):e("$pending",a,i),H(b)?b?(l(h.$error,a,i),k(h.$$success,a,i)):(k(h.$error,a,i),l(h.$$success,a,i)):(l(h.$error,a,i),l(h.$$success,a,i)),h.$pending?(f(qg,!0),h.$valid=h.$invalid=c,g("",null)):(f(qg,!1),h.$valid=yd(h.$error),h.$invalid=!h.$valid,g("",h.$valid));var j;j=h.$pending&&h.$pending[a]?c:h.$error[a]?!1:h.$$success[a]?!0:null,g(a,j),h.$$parentForm.$setValidity(a,j,h)}function d(a,b,c){h[a]||(h[a]={}),k(h[a],b,c)}function e(a,b,d){h[a]&&l(h[a],b,d),yd(h[a])&&(h[a]=c)}function f(a,b){b&&!j[a]?(m.addClass(i,a),j[a]=!0):!b&&j[a]&&(m.removeClass(i,a),j[a]=!1)}function g(a,b){a=a?"-"+ka(a,"-"):"",f(kg+a,b===!0),f(lg+a,b===!1)}var h=a.ctrl,i=a.$element,j={},k=a.set,l=a.unset,m=a.$animate;j[lg]=!(j[kg]=i.hasClass(kg)),h.$setValidity=b}function yd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function zd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Ad=/^\/(.+)\/([a-z]*)$/,Bd="validity",Cd=Object.prototype.hasOwnProperty,Dd=function(a){return x(a)?a.toLowerCase():a},Ed=function(a){return x(a)?a.toUpperCase():a},Fd=function(a){return x(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Gd=function(a){return x(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Dd=Fd,Ed=Gd);var Hd,Id,Jd,Kd,Ld=[].slice,Md=[].splice,Nd=[].push,Od=Object.prototype.toString,Pd=Object.getPrototypeOf,Qd=d("ng"),Rd=a.angular||(a.angular={}),Sd=0;Hd=b.documentMode,p.$inject=[],q.$inject=[];var Td=Array.isArray,Ud=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Vd=function(a){return x(a)?a.trim():a},Wd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=$d[c],a=b.querySelector("["+d.replace(":","\\:")+"jq]")){e=a.getAttribute(d+"jq");break}return Yd.name_=e},Zd=/:/g,$d=["ng-","data-ng-","ng:","x-ng-"],_d=/[A-Z]/g,ae=!1,be=1,ce=2,de=3,ee=8,fe=9,ge=11,he={full:"1.5.0",major:1,minor:5,dot:0,codeName:"ennoblement-facilitation"};Fa.expando="ng339";var ie=Fa.cache={},je=1,ke=function(a,b,c){a.addEventListener(b,c,!1)},le=function(a,b,c){a.removeEventListener(b,c,!1)};Fa._data=function(a){return this.cache[a[this.expando]]||{}};var me=/([\:\-\_]+(.))/g,ne=/^moz([A-Z])/,oe={mouseleave:"mouseout",mouseenter:"mouseover"},pe=d("jqLite"),qe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,re=/<|&#?\w+;/,se=/<([\w:-]+)/,te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ue={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ue.optgroup=ue.option,ue.tbody=ue.tfoot=ue.colgroup=ue.caption=ue.thead,ue.th=ue.td;var ve=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},we=Fa.prototype={ready:function(c){function d(){e||(e=!0,c())}var e=!1;"complete"===b.readyState?setTimeout(d):(this.on("DOMContentLoaded",d),Fa(a).on("load",d))},toString:function(){var a=[];return f(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Id(a>=0?this[a]:this[this.length+a])},length:0,push:Nd,sort:[].sort,splice:[].splice},xe={};f("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){xe[Dd(a)]=a});var ye={};f("input,select,option,textarea,button,form,details".split(","),function(a){ye[a]=!0});var ze={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};f({data:La,removeData:Ja,hasData:Aa,cleanData:Ba},function(a,b){Fa[b]=a}),f({data:La,inheritedData:Ra,scope:function(a){return Id.data(a,"$scope")||Ra(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Id.data(a,"$isolateScope")||Id.data(a,"$isolateScopeNoTemplate")},controller:Qa,injector:function(a){return Ra(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ma,css:function(a,b,c){return b=xa(b),u(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,d){var e=a.nodeType;if(e!==de&&e!==ce&&e!==ee){var f=Dd(b);if(xe[f]){if(!u(d))return a[b]||(a.attributes.getNamedItem(b)||p).specified?f:c;d?(a[b]=!0,a.setAttribute(b,f)):(a[b]=!1,a.removeAttribute(f))}else if(u(d))a.setAttribute(b,d);else if(a.getAttribute){var g=a.getAttribute(b,2);return null===g?c:g}}},prop:function(a,b,c){return u(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(t(b)){var c=a.nodeType;return c===be||c===de?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(t(b)){if(a.multiple&&"select"===N(a)){var c=[];return f(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return t(b)?a.innerHTML:(Ha(a,!0),void(a.innerHTML=b))},empty:Sa},function(a,b){Fa.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Sa&&t(2==a.length&&a!==Ma&&a!==Qa?b:c)){if(v(b)){for(d=0;f>d;d++)if(a===La)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=t(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),f({removeData:Ja,on:function(a,b,d,e){if(u(e))throw pe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(za(a)){var f=Ka(a,!0),g=f.events,h=f.handle;h||(h=f.handle=Xa(a,g));for(var i=b.indexOf(" ")>=0?b.split(" "):[b],j=i.length,k=function(b,c,e){var f=g[b];f||(f=g[b]=[],f.specialHandlerWrapper=c,"$destroy"===b||e||ke(a,b,h)),f.push(d)};j--;)b=i[j],oe[b]?(k(oe[b],Za),k(b,c,!0)):k(b)}},off:Ia,one:function(a,b,c){a=Id(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,d=a.parentNode;Ha(a),f(new Fa(b),function(b){c?d.insertBefore(b,c.nextSibling):d.replaceChild(b,a),c=b})},children:function(a){var b=[];return f(a.childNodes,function(a){a.nodeType===be&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===be||c===ge){b=new Fa(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===be){var c=a.firstChild;f(new Fa(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ea(a,Id(b).eq(0).clone()[0])},remove:Ta,detach:function(a){Ta(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Fa(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Oa,removeClass:Na,toggleClass:function(a,b,c){b&&f(b.split(" "),function(b){var d=c;t(d)&&(d=!Ma(a,b)),(d?Oa:Na)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==ge?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ga,triggerHandler:function(a,b,c){var d,e,g,h=b.type||b,i=Ka(a),j=i&&i.events,k=j&&j[h];k&&(d={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:h,target:a},b.type&&(d=l(d,b)),e=Q(k),g=c?[d].concat(c):[d],f(e,function(b){d.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Fa.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)t(e)?(e=a(this[f],b,c,d),u(e)&&(e=Id(e))):Pa(e,a(this[f],b,c,d));return u(e)?e:this},Fa.prototype.bind=Fa.prototype.on,Fa.prototype.unbind=Fa.prototype.off}),ab.prototype={put:function(a,b){this[_a(a,this.nextUid)]=b},get:function(a){return this[_a(a,this.nextUid)]},remove:function(a){var b=this[a=_a(a,this.nextUid)];return delete this[a],b}};var Ae=[function(){this.$get=[function(){return ab}]}],Be=/^([^\(]+?)=>/,Ce=/^[^\(]*\(\s*([^\)]*)\)/m,De=/,/,Ee=/^\s*(_?)(\S+?)\1\s*$/,Fe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ge=d("$injector");eb.$$annotate=db;var He=d("$animate"),Ie=1,Je="ng-animate",Ke=function(){this.$get=function(){}},Le=function(){var a=new ab,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,d){function e(a,b,c){var d=!1;return b&&(b=x(b)?b.split(" "):Td(b)?b:[],f(b,function(b){b&&(d=!0,a[b]=c)})),d}function g(){f(b,function(b){var c=a.get(b);if(c){var d=ib(b.attr("class")),e="",g="";f(c,function(a,b){var c=!!d[b];a!==c&&(a?e+=(e.length?" ":"")+b:g+=(g.length?" ":"")+b)}),f(b,function(a){e&&Oa(a,e),g&&Na(a,g)}),a.remove(b)}}),b.length=0}function h(c,f,h){var i=a.get(c)||{},j=e(i,f,!0),k=e(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&d.$$postDigest(g))}return{enabled:p,on:p,off:p,pin:p,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Me=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw He("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Je+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw He("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Je)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=hb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",jb(f))},move:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",jb(f))},leave:function(b,c){return a.push(b,"leave",jb(c),function(){b.remove()})},addClass:function(b,c,d){return d=jb(d),d.addClass=gb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=jb(d),d.removeClass=gb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=jb(e),e.addClass=gb(e.addClass,c),e.removeClass=gb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=jb(f),f.from=f.from?l(f.from,c):c,f.to=f.to?l(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=gb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Ne=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){kf[a]=!0});var lf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},mf=function(a){this.options=a};mf.prototype={constructor:mf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdent:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw ff("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:nf.Program,body:a}},expressionStatement:function(){return{type:nf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:nf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:nf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:nf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:nf.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:nf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=P(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:nf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:nf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:nf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:nf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.expression());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:nf.Identifier,name:a.text}},constant:function(){return{type:nf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:nf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:nf.Property,kind:"init"},this.peek().constant?a.key=this.constant():this.peek().identifier?a.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),a.value=this.expression(),b.push(a)}while(this.expect(","));return this.consume("}"),{type:nf.ObjectExpression,properties:b}},throwError:function(a,b){throw ff("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},constants:{"true":{type:nf.Literal,value:!0},"false":{type:nf.Literal,value:!1},"null":{type:nf.Literal,value:null},undefined:{type:nf.Literal,value:c},"this":{type:nf.ThisExpression},$locals:{type:nf.LocalsExpression}}},mc.prototype={compile:function(a,b){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},gc(e,d.$filter);var g,h="";if(this.stage="assign",g=jc(e)){this.state.computing="assign";var i=this.nextId();this.recurse(g,i), +this.return_(i),h="fn.assign="+this.generateFunction("assign","s,v,l")}var j=hc(e.body);d.stage="inputs",f(j,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var k='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+h+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",k)(this.$filter,$b,ac,bc,_b,cc,dc,ec,a);return this.state=this.stage=c,l.literal=kc(e),l.constant=lc(e),l},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return f(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return f(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,e,g,h){var i,j,k,l,m=this;if(e=e||p,!h&&u(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,e,g,!0));switch(a.type){case nf.Program:f(a.body,function(b,d){m.recurse(b.expression,c,c,function(a){j=a}),d!==a.body.length-1?m.current().body.push(j,";"):m.return_(j)});break;case nf.Literal:l=this.escape(a.value),this.assign(b,l),e(l);break;case nf.UnaryExpression:this.recurse(a.argument,c,c,function(a){j=a}),l=a.operator+"("+this.ifDefined(j,0)+")",this.assign(b,l),e(l);break;case nf.BinaryExpression:this.recurse(a.left,c,c,function(a){i=a}),this.recurse(a.right,c,c,function(a){j=a}),l="+"===a.operator?this.plus(i,j):"-"===a.operator?this.ifDefined(i,0)+a.operator+this.ifDefined(j,0):"("+i+")"+a.operator+"("+j+")",this.assign(b,l),e(l);break;case nf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case nf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case nf.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),$b(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){g&&1!==g&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||oc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case nf.MemberExpression:i=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,i,c,function(){m.if_(m.notNull(i),function(){g&&1!==g&&m.addEnsureSafeAssignContext(i),a.computed?(j=m.nextId(),m.recurse(a.property,j),m.getStringValue(j),m.addEnsureSafeMemberName(j),g&&1!==g&&m.if_(m.not(m.computedMember(i,j)),m.lazyAssign(m.computedMember(i,j),"{}")),l=m.ensureSafeObject(m.computedMember(i,j)),m.assign(b,l),d&&(d.computed=!0,d.name=j)):($b(a.property.name),g&&1!==g&&m.if_(m.not(m.nonComputedMember(i,a.property.name)),m.lazyAssign(m.nonComputedMember(i,a.property.name),"{}")),l=m.nonComputedMember(i,a.property.name),(m.state.expensiveChecks||oc(a.property.name))&&(l=m.ensureSafeObject(l)),m.assign(b,l),d&&(d.computed=!1,d.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!g);break;case nf.CallExpression:b=b||this.nextId(),a.filter?(j=m.filter(a.callee.name),k=[],f(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),k.push(b)}),l=j+"("+k.join(",")+")",m.assign(b,l),e(b)):(j=m.nextId(),i={},k=[],m.recurse(a.callee,j,i,function(){m.if_(m.notNull(j),function(){m.addEnsureSafeFunction(j),f(a.arguments,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(m.ensureSafeObject(a))})}),i.name?(m.state.expensiveChecks||m.addEnsureSafeObject(i.context),l=m.member(i.context,i.name,i.computed)+"("+k.join(",")+")"):l=j+"("+k.join(",")+")",l=m.ensureSafeObject(l),m.assign(b,l)},function(){m.assign(b,"undefined")}),e(b)}));break;case nf.AssignmentExpression:if(j=this.nextId(),i={},!ic(a.left))throw ff("lval","Trying to assign a value to a non l-value");this.recurse(a.left,c,i,function(){m.if_(m.notNull(i.context),function(){m.recurse(a.right,j),m.addEnsureSafeObject(m.member(i.context,i.name,i.computed)),m.addEnsureSafeAssignContext(i.context),l=m.member(i.context,i.name,i.computed)+a.operator+j,m.assign(b,l),e(b||l)})},1);break;case nf.ArrayExpression:k=[],f(a.elements,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(a)})}),l="["+k.join(",")+"]",this.assign(b,l),e(l);break;case nf.ObjectExpression:k=[],f(a.properties,function(a){m.recurse(a.value,m.nextId(),c,function(b){k.push(m.escape(a.key.type===nf.Identifier?a.key.name:""+a.key.value)+":"+b)})}),l="{"+k.join(",")+"}",this.assign(b,l),e(l);break;case nf.ThisExpression:this.assign(b,"s"),e("s");break;case nf.LocalsExpression:this.assign(b,"l"),e("l");break;case nf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(x(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(y(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw ff("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},nc.prototype={compile:function(a,b){var c=this,d=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,gc(d,c.$filter);var e,g;(e=jc(d))&&(g=this.recurse(e));var h,i=hc(d.body);i&&(h=[],f(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];f(d.body,function(a){j.push(c.recurse(a.expression))});var k=0===d.body.length?function(){}:1===d.body.length?j[0]:function(a,b){var c;return f(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=kc(d),k.constant=lc(d),k},recurse:function(a,b,d){var e,g,h,i=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case nf.Literal:return this.value(a.value,b);case nf.UnaryExpression:return g=this.recurse(a.argument),this["unary"+a.operator](g,b);case nf.BinaryExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.LogicalExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case nf.Identifier:return $b(a.name,i.expression),i.identifier(a.name,i.expensiveChecks||oc(a.name),b,d,i.expression);case nf.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||($b(a.property.name,i.expression),g=a.property.name),a.computed&&(g=this.recurse(a.property)),a.computed?this.computedMember(e,g,b,d,i.expression):this.nonComputedMember(e,g,i.expensiveChecks,b,d,i.expression);case nf.CallExpression:return h=[],f(a.arguments,function(a){h.push(i.recurse(a))}),a.filter&&(g=this.$filter(a.callee.name)),a.filter||(g=this.recurse(a.callee,!0)),a.filter?function(a,d,e,f){for(var i=[],j=0;j":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:c,name:c,value:a}:a}},identifier:function(a,b,d,e,f){return function(g,h,i,j){var k=h&&a in h?h:g;e&&1!==e&&k&&!k[a]&&(k[a]={});var l=k?k[a]:c;return b&&ac(l,f),d?{context:k,name:a,value:l}:l}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=_b(j),$b(j,e),d&&1!==d&&(cc(l),l&&!l[j]&&(l[j]={})),k=l[j],ac(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,d,e,f,g){return function(h,i,j,k){var l=a(h,i,j,k);f&&1!==f&&(cc(l),l&&!l[b]&&(l[b]={}));var m=null!=l?l[b]:c;return(d||oc(b))&&ac(m,g),e?{context:l,name:b,value:m}:m}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var of=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new nf(this.lexer),this.astCompiler=c.csp?new nc(this.ast,b):new mc(this.ast,b)};of.prototype={constructor:of,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var pf=Object.prototype.valueOf,qf=d("$sce"),rf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Qe=d("$compile"),sf=b.createElement("a"),tf=Fc(a.location.href);Ic.$inject=["$document"],Kc.$inject=["$provide"];var uf=22,vf=".",wf="0";Pc.$inject=["$locale"],Qc.$inject=["$locale"];var xf={yyyy:Vc("FullYear",4),yy:Vc("FullYear",2,0,!0),y:Vc("FullYear",1),MMMM:Wc("Month"),MMM:Wc("Month",!0),MM:Vc("Month",2,1),M:Vc("Month",1,1),dd:Vc("Date",2),d:Vc("Date",1),HH:Vc("Hours",2),H:Vc("Hours",1),hh:Vc("Hours",2,-12),h:Vc("Hours",1,-12),mm:Vc("Minutes",2),m:Vc("Minutes",1),ss:Vc("Seconds",2),s:Vc("Seconds",1),sss:Vc("Milliseconds",3),EEEE:Wc("Day"),EEE:Wc("Day",!0),a:_c,Z:Xc,ww:$c(2),w:$c(1),G:ad,GG:ad,GGG:ad,GGGG:bd},yf=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,zf=/^\-?\d+$/;cd.$inject=["$locale"];var Af=r(Dd),Bf=r(Ed);fd.$inject=["$parse"];var Cf=r({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Od.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Df={};f(xe,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=pb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Df[d]=function(){return{restrict:"A",priority:100,link:e}}}}),f(ze,function(a,b){Df[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Ad);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),f(["src","srcset","href"],function(a){var b=pb("ng-"+a);Df[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Od.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Hd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Ef={$addControl:p,$$renameControl:hd,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ff="ng-submitted";id.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Gf=function(a){return["$timeout","$parse",function(b,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||p}var f={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:id,compile:function(d,f){d.addClass(mg).addClass(kg);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,f,h){var i=h[0];if(!("action"in f)){var j=function(b){a.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),b.preventDefault()};ke(d[0],"submit",j),d.on("$destroy",function(){b(function(){le(d[0],"submit",j)},0,!1)})}var k=h[1]||i.$$parentForm;k.$addControl(i);var m=g?e(i.$name):p;g&&(m(a,i),f.$observe(g,function(b){i.$name!==b&&(m(a,c),i.$$parentForm.$$renameControl(i,b),(m=e(i.$name))(a,i))})),d.on("$destroy",function(){i.$$parentForm.$removeControl(i),m(a,c),l(i,Ef)})}}}};return f}]},Hf=Gf(),If=Gf(!0),Jf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Kf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Lf=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Mf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Nf=/^(\d{4})-(\d{2})-(\d{2})$/,Of=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Pf=/^(\d{4})-W(\d\d)$/,Qf=/^(\d{4})-(\d\d)$/,Rf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sf={text:kd,date:od("date",Nf,nd(Nf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":od("datetimelocal",Of,nd(Of,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:od("time",Rf,nd(Rf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:od("week",Pf,md,"yyyy-Www"),month:od("month",Qf,nd(Qf,["yyyy","MM"]),"yyyy-MM"),number:qd,url:rd,email:sd,radio:td,checkbox:vd,hidden:p,button:p,submit:p,reset:p,file:p},Tf=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sf[Dd(g.type)]||Sf.text)(e,f,g,h[0],b,a,c,d)}}}}],Uf=/^(true|false|\d+)$/,Vf=function(){return{restrict:"A",priority:100,compile:function(a,b){return Uf.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Wf=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=t(a)?"":a})}}}}],Xf=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=t(a)?"":a})}}}}],Yf=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){d.html(a.getTrustedHtml(f(b))||"")})}}}}],Zf=r({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),$f=wd("",!0),_f=wd("Odd",0),ag=wd("Even",1),bg=gd({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),cg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],dg={},eg={blur:!0,focus:!0};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=pb("ng-"+a);dg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};eg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var fg=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=qa(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],gg=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Rd.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!u(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],hg=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Od.call(d[0]).match(/SVG/)?(d.empty(),void a(Ca(f.template,b).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void a(d.contents())(c))}}}],ig=gd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),jg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,e){var g=b.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,i=h?Vd(g):g,j=function(a){if(!t(a)){var b=[];return a&&f(a.split(i),function(a){a&&b.push(h?Vd(a):a)}),b}};e.$parsers.push(j),e.$formatters.push(function(a){return Td(a)?a.join(g):c}),e.$isEmpty=function(a){return!a||!a.length}}}},kg="ng-valid",lg="ng-invalid",mg="ng-pristine",ng="ng-dirty",og="ng-untouched",pg="ng-touched",qg="ng-pending",rg="ng-empty",sg="ng-not-empty",tg=d("ngModel"),ug=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,e,g,h,i,j,k,l){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=c,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=c,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Ef;var m,n=g(d.ngModel),o=n.assign,q=n,r=o,s=null,v=this;this.$$setOptions=function(a){if(v.$options=a,a&&a.getterSetter){var b=g(d.ngModel+"()"),c=g(d.ngModel+"($$$p)");q=function(a){var c=n(a);return A(c)&&(c=b(a)),c},r=function(a,b){A(n(a))?c(a,{$$$p:v.$modelValue}):o(a,v.$modelValue)}}else if(!n.assign)throw tg("nonassign","Expression '{0}' is non-assignable. Element: {1}",d.ngModel,_(e))},this.$render=p,this.$isEmpty=function(a){return t(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){v.$isEmpty(a)?(h.removeClass(e,sg),h.addClass(e,rg)):(h.removeClass(e,rg),h.addClass(e,sg))};var w=0;xd({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:h}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,h.removeClass(e,ng),h.addClass(e,mg)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,h.removeClass(e,mg),h.addClass(e,ng),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,h.setClass(e,og,pg)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,h.setClass(e,pg,og)},this.$rollbackViewValue=function(){i.cancel(s),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!y(v.$modelValue)||!isNaN(v.$modelValue)){var a=v.$$lastCommittedViewValue,b=v.$$rawModelValue,d=v.$valid,e=v.$modelValue,f=v.$options&&v.$options.allowInvalid;v.$$runValidators(b,a,function(a){f||d===a||(v.$modelValue=a?b:c,v.$modelValue!==e&&v.$$writeModelToScope())})}},this.$$runValidators=function(a,b,d){function e(){var a=v.$$parserName||"parse";return t(m)?(i(a,null),!0):(m||(f(v.$validators,function(a,b){i(b,null)}),f(v.$asyncValidators,function(a,b){i(b,null)})),i(a,m),m)}function g(){var c=!0;return f(v.$validators,function(d,e){var f=d(a,b);c=c&&f,i(e,f)}),c?!0:(f(v.$asyncValidators,function(a,b){i(b,null)}),!1)}function h(){var d=[],e=!0;f(v.$asyncValidators,function(f,g){var h=f(a,b);if(!I(h))throw tg("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",h);i(g,c),d.push(h.then(function(){i(g,!0)},function(a){e=!1,i(g,!1)}))}),d.length?k.all(d).then(function(){j(e)},p):j(!0)}function i(a,b){l===w&&v.$setValidity(a,b)}function j(a){l===w&&d(a)}w++;var l=w;return e()&&g()?void h():void j(!1)},this.$commitViewValue=function(){var a=v.$viewValue;i.cancel(s),(v.$$lastCommittedViewValue!==a||""===a&&v.$$hasNativeValidators)&&(v.$$updateEmptyClasses(a),v.$$lastCommittedViewValue=a,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){v.$modelValue!==g&&v.$$writeModelToScope()}var d=v.$$lastCommittedViewValue,e=d;if(m=t(e)?c:!0)for(var f=0;ff;f++){var i=a===c?f:c[f],j=(a[i],x(a[i],i)),k=q(a[i],j);if(b.push(k),h[2]||h[1]){var l=s(d,j);b.push(l)}if(h[4]){var m=u(d,j);b.push(m)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],e=g(c),h=e.length,i=0;h>i;i++){var j=c===e?i:e[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new f(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Rd.copy(a.viewValue):a.viewValue}}}}}function g(b,c,e,g){function j(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function k(a,b,c,d){var e;return b&&Dd(b.nodeName)===c?e=b:(e=d.cloneNode(!1),b?a.insertBefore(e,b):a.appendChild(e)),e}function l(a){for(var b;a;)b=a.nextSibling,Ta(a),a=b}function m(a){var b=o&&o[0],c=x&&x[0];if(b||c)for(;a&&(a===b||a===c||a.nodeType===ee||"option"===N(a)&&""===a.value);)a=a.nextSibling;return a}function n(){var a=y&&p.readValue();y=z.getOptions();var b={},d=c[0].firstChild;if(w&&c.prepend(o),d=m(d),y.items.forEach(function(a){var e,f,g;u(a.group)?(e=b[a.group],e||(f=k(c[0],d,"optgroup",i),d=f.nextSibling,f.label=a.group,e=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),g=k(e.groupElement,e.currentOptionElement,"option",h),j(a,g),e.currentOptionElement=g.nextSibling):(g=k(c[0],d,"option",h),j(a,g),d=g.nextSibling)}),Object.keys(b).forEach(function(a){l(b[a].currentOptionElement)}),l(d),q.$render(),!q.$isEmpty(a)){var e=p.readValue(),f=z.trackBy||r;(f?R(a,e):a===e)||(q.$setViewValue(e),q.$render())}}for(var o,p=g[0],q=g[1],r=e.multiple,s=0,t=c.children(),v=t.length;v>s;s++)if(""===t[s].value){o=t.eq(s);break}var w=!!o,x=Id(h.cloneNode(!1));x.val("?");var y,z=d(e.ngOptions,c,b),A=function(){w||c.prepend(o),c.val(""),o.prop("selected",!0),o.attr("selected",!0)},B=function(){w||o.remove()},C=function(){c.prepend(x),c.val("?"),x.prop("selected",!0),x.attr("selected",!0)},D=function(){x.remove()};r?(q.$isEmpty=function(a){return!a||0===a.length},p.writeValue=function(a){y.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled&&(b.element.selected=!0)})},p.readValue=function(){var a=c.val()||[],b=[];return f(a,function(a){var c=y.selectValueMap[a];c&&!c.disabled&&b.push(y.getViewValueFromOption(c))}),b},z.trackBy&&b.$watchCollection(function(){return Td(q.$viewValue)?q.$viewValue.map(function(a){return z.getTrackByValue(a)}):void 0},function(){q.$render()})):(p.writeValue=function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled?c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||w?(D(),A()):(B(),C())},p.readValue=function(){var a=y.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),y.getViewValueFromOption(a)):null},z.trackBy&&b.$watch(function(){return z.getTrackByValue(q.$viewValue)},function(){q.$render()})),w?(o.remove(),a(o)(b),o.removeClass("ng-scope")):o=Id(h.cloneNode(!1)),n(),b.$watchCollection(z.getWatchables,n)}var h=b.createElement("option"),i=b.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=p},post:g +}}}],Cg=["$locale","$interpolate","$log",function(a,b,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),n=i.offset||0,o=g.$eval(m)||{},q={},r=b.startSymbol(),s=b.endSymbol(),u=r+l+"-"+n+s,v=Rd.noop;f(i,function(a,b){var c=e.exec(b);if(c){var d=(c[1]?"-":"")+Dd(c[2]);o[d]=h.attr(i.$attr[b])}}),f(o,function(a,c){q[c]=b(a.replace(d,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in o||(d=a.pluralCat(d-n)),d!==k&&!(e&&y(k)&&isNaN(k))){v();var f=q[d];t(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=p,j()):v=g.$watch(f,j),k=d}})}}}],Dg=["$parse","$animate",function(a,g){var h="$$NG_REMOVED",i=d("ngRepeat"),j=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},k=function(a){return a.clone[0]},l=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(d,m){var n=m.ngRepeat,o=b.createComment(" end ngRepeat: "+n+" "),p=n.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);var q=p[1],r=p[2],s=p[3],t=p[4];if(p=q.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!p)throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",q);var u=p[3]||p[1],v=p[2];if(s&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(s)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(s)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",s);var w,x,y,z,A={$id:_a};return t?w=a(t):(y=function(a,b){return _a(b)},z=function(a){return a}),function(a,b,d,m,p){w&&(x=function(b,c,d){return v&&(A[v]=b),A[u]=c,A.$index=d,w(a,A)});var q=ra();a.$watchCollection(r,function(d){var m,r,t,w,A,B,C,D,E,F,G,H,I=b[0],J=ra();if(s&&(a[s]=d),e(d))E=d,D=x||y;else{D=x||z,E=[];for(var K in d)Cd.call(d,K)&&"$"!==K.charAt(0)&&E.push(K)}for(w=E.length,G=new Array(w),m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],C=D(A,B,m),q[C])F=q[C],delete q[C],J[C]=F,G[m]=F;else{if(J[C])throw f(G,function(a){a&&a.scope&&(q[a.id]=a)}),i("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",n,C,B);G[m]={id:C,scope:c,clone:c},J[C]=!0}for(var L in q){if(F=q[L],H=qa(F.clone),g.leave(H),H[0].parentNode)for(m=0,r=H.length;r>m;m++)H[m][h]=!0;F.scope.$destroy()}for(m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],F=G[m],F.scope){t=I;do t=t.nextSibling;while(t&&t[h]);k(F)!=t&&g.move(qa(F.clone),null,Id(I)),I=l(F),j(F.scope,m,u,B,v,A,w)}else p(function(a,b){F.scope=b;var c=o.cloneNode(!1);a[a.length++]=c,g.enter(a,null,Id(I)),I=c,F.clone=a,J[F.id]=F,j(F.scope,m,u,B,v,A,w)});q=J})}}}}],Eg="ng-hide",Fg="ng-hide-animate",Gg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Eg,{tempClasses:Fg})})}}}],Hg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Eg,{tempClasses:Fg})})}}}],Ig=gd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&f(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Jg=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var h=e.ngSwitch||e.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var d,e;for(d=0,e=k.length;e>d;++d)a.cancel(k[d]);for(k.length=0,d=0,e=l.length;e>d;++d){var h=qa(j[d].clone);l[d].$destroy();var n=k[d]=a.leave(h);n.then(m(k,d))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&f(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.createComment(" end ngSwitchWhen: ");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Kg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Lg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Mg=d("ngTransclude"),Ng=gd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Mg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",_(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Og=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Pg={$setViewValue:p,$render:p},Qg=["$element","$scope","$attrs",function(a,d,e){var f=this,g=new ab;f.ngModelCtrl=Pg,f.unknownOption=Id(b.createElement("option")),f.renderUnknownOption=function(b){var c="? "+_a(b)+" ?";f.unknownOption.val(c),a.prepend(f.unknownOption),a.val(c)},d.$on("$destroy",function(){f.renderUnknownOption=p}),f.removeUnknownOption=function(){f.unknownOption.parent()&&f.unknownOption.remove()},f.readValue=function(){return f.removeUnknownOption(),a.val()},f.writeValue=function(b){f.hasOption(b)?(f.removeUnknownOption(),a.val(b),""===b&&f.emptyOption.prop("selected",!0)):null==b&&f.emptyOption?(f.removeUnknownOption(),a.val("")):f.renderUnknownOption(b)},f.addOption=function(a,b){if(b[0].nodeType!==ee){oa(a,'"option value"'),""===a&&(f.emptyOption=b);var c=g.get(a)||0;g.put(a,c+1),f.ngModelCtrl.$render(),zd(b)}},f.removeOption=function(a){var b=g.get(a);b&&(1===b?(g.remove(a),""===a&&(f.emptyOption=c)):g.put(a,b-1))},f.hasOption=function(a){return!!g.get(a)},f.registerOption=function(a,b,c,d,e){if(d){var g;c.$observe("value",function(a){u(g)&&f.removeOption(g),g=a,f.addOption(a,b)})}else e?a.$watch(e,function(a,d){c.$set("value",a),d!==a&&f.removeOption(d),f.addOption(a,b)}):f.addOption(c.value,b);b.on("$destroy",function(){f.removeOption(c.value),f.ngModelCtrl.$render()})}}],Rg=function(){function a(a,b,c,d){var e=d[1];if(e){var g=d[0];if(g.ngModelCtrl=e,b.on("change",function(){a.$apply(function(){e.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return f(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new ab(a);f(b.find("option"),function(a){a.selected=u(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==e.$viewValue||R(h,e.$viewValue)||(h=Q(e.$viewValue),e.$render()),i=e.$viewValue}),e.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Qg,priority:1,link:{pre:a,post:b}}},Sg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(u(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],Tg=r({restrict:"E",terminal:!1}),Ug=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},Vg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,e,f){if(f){var g,h=e.ngPattern||e.pattern;e.$observe("pattern",function(a){if(x(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw d("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",h,a,_(b));g=a||c,f.$validate()}),f.$validators.pattern=function(a,b){return f.$isEmpty(b)||t(g)||g.test(b)}}}}},Wg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=n(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},Xg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=n(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(la(),va(Rd),Rd.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function d(a,d){var e=d;c===e&&(e=Math.min(b(a),3));var f=Math.pow(10,e),g=(a*f|0)%f;return{v:e,f:g}}var e={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var c=0|a,f=d(a,b);return 1==c&&0==f.v?e.ONE:e.OTHER}})}]),void Id(b).ready(function(){ga(b,ha)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/");var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/ +},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){ +return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){ +function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n'); +}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]; +},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),angular.module("barcode",[]).directive("barcode",["BarcodeService","Code39Service","Code128BService","Code128CService","EanService","Itf14NumberService","ItfNumberService","UpcService",function(a,b,c,d,e,f,g,h){function i(i,j,k){var l={width:2,height:100,quite:10,displayValue:!1,font:"monospace",textAlign:"center",fontSize:12,backgroundColor:"",lineColor:"#000"},m=[];m=a.merge(l,i.options);var n=j.find("canvas")[0];if("img"==k.render&&(n=document.createElement("canvas")),!n.getContext)return null;var o="";switch(k.type){case"upc":o=h;break;case"ean":o=e;break;case"code39":o=b;break;case"code128b":o=c;break;case"code128c":o=d;break;case"itf":o=g;break;case"itf14":o=f}if(""!==o){var p=o.encoded(k.string);if(!angular.isUndefined(p)){var q=function(a){var b,c;c=m.height,r.font=m.fontSize+"px "+m.font,r.textBaseline="bottom",r.textBaseline="top","left"==m.textAlign?(b=m.quite,r.textAlign="left"):"right"==m.textAlign?(b=n.width-m.quite,r.textAlign="right"):(b=n.width/2,r.textAlign="center"),r.fillText(a,b,c)},r=n.getContext("2d");n.width=p.length*m.width+2*m.quite,n.height=m.height+(m.displayValue?1.3*m.fontSize:0),r.clearRect(0,0,n.width,n.height),m.backgroundColor&&(r.fillStyle=m.backgroundColor,r.fillRect(0,0,n.width,n.height)),r.fillStyle=m.lineColor;for(var s=0;s"),a.append(c),{post:j}}return{restrict:"E",scope:{options:"=options"},compile:k}}]),angular.module("barcode").factory("BarcodeService",[function(){"use strict";var a={};return a.merge=function(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c},a}]),angular.module("barcode").factory("Code128Service",[function(){"use strict";var a={},b=[[" ","11011001100",0],["!","11001101100",1],['"',"11001100110",2],["#","10010011000",3],["$","10010001100",4],["%","10001001100",5],["&","10011001000",6],["'","10011000100",7],["(","10001100100",8],[")","11001001000",9],["*","11001000100",10],["+","11000100100",11],[",","10110011100",12],["-","10011011100",13],[".","10011001110",14],["/","10111001100",15],["0","10011101100",16],["1","10011100110",17],["2","11001110010",18],["3","11001011100",19],["4","11001001110",20],["5","11011100100",21],["6","11001110100",22],["7","11101101110",23],["8","11101001100",24],["9","11100101100",25],[":","11100100110",26],[";","11101100100",27],["<","11100110100",28],["=","11100110010",29],[">","11011011000",30],["?","11011000110",31],["@","11000110110",32],["A","10100011000",33],["B","10001011000",34],["C","10001000110",35],["D","10110001000",36],["E","10001101000",37],["F","10001100010",38],["G","11010001000",39],["H","11000101000",40],["I","11000100010",41],["J","10110111000",42],["K","10110001110",43],["L","10001101110",44],["M","10111011000",45],["N","10111000110",46],["O","10001110110",47],["P","11101110110",48],["Q","11010001110",49],["R","11000101110",50],["S","11011101000",51],["T","11011100010",52],["U","11011101110",53],["V","11101011000",54],["W","11101000110",55],["X","11100010110",56],["Y","11101101000",57],["Z","11101100010",58],["[","11100011010",59],["\\","11101111010",60],["]","11001000010",61],["^","11110001010",62],["_","10100110000",63],["`","10100001100",64],["a","10010110000",65],["b","10010000110",66],["c","10000101100",67],["d","10000100110",68],["e","10110010000",69],["f","10110000100",70],["g","10011010000",71],["h","10011000010",72],["i","10000110100",73],["j","10000110010",74],["k","11000010010",75],["l","11001010000",76],["m","11110111010",77],["n","11000010100",78],["o","10001111010",79],["p","10100111100",80],["q","10010111100",81],["r","10010011110",82],["s","10111100100",83],["t","10011110100",84],["u","10011110010",85],["v","11110100100",86],["w","11110010100",87],["x","11110010010",88],["y","11011011110",89],["z","11011110110",90],["{","11110110110",91],["|","10101111000",92],["}","10100011110",93],["~","10001011110",94],[String.fromCharCode(127),"10111101000",95],[String.fromCharCode(128),"10111100010",96],[String.fromCharCode(129),"11110101000",97],[String.fromCharCode(130),"11110100010",98],[String.fromCharCode(131),"10111011110",99],[String.fromCharCode(132),"10111101110",100],[String.fromCharCode(133),"11101011110",101],[String.fromCharCode(134),"11110101110",102],[String.fromCharCode(135),"11010000100",103],[String.fromCharCode(136),"11010010000",104],[String.fromCharCode(137),"11010011100",105]],c="1100011101011",d=/^[!-~ ]+$/;return a.valid=function(a){return-1==a.search(d)?!1:!0},a.calculateCode128=function(b,d,e,f){var g="";return g+=a.encodingById(e),g+=d(b),g+=a.encodingById(f(b,e)),g+=c},a.encodingById=function(a){for(var c=0;cc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),angular.module("barcode").factory("Itf14NumberService",[function(){"use strict";function a(a){var d="";13==a.length&&(a+=c(a)),d+=g;for(var e=0;14>e;e+=2)d+=b(a.substr(e,2));return d+=h}function b(a){for(var b="",c=f[a[0]],d=f[a[1]],e=0;5>e;e++)b+="1"==c[e]?"111":"1",b+="1"==d[e]?"000":"0";return b}function c(a){for(var b=0,c=0;13>c;c++)b+=parseInt(a[c])*(3-c%2*2);return 10-b%10}function d(a){return-1==a.search(i)?!1:14==a.length?a[13]==c(a):!0}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},g="1010",h="11101",i=/^[0-9]{13,14}$/;return e}]),angular.module("barcode").factory("ItfNumberService",[function(){"use strict";function a(a){var c="";c+=f;for(var d=0;df;f++)b+="1"==c[f]?"111":"1",b+="1"==d[f]?"000":"0";return b}function c(a){return-1!==a.search(h)}var d={};d.valid=function(a){return c(a)},d.encoded=function(b){return c(b)?a(b):""};var e={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},f="1010",g="11101",h=/^([0-9][0-9])+$/;return d}]),angular.module("barcode").factory("UpcService",[function(){"use strict";function a(a){var c="",d=a[0],e=a.substr(1,7),f=a.substr(7,6);return c+=j,c+=b(e,i[d]),c+=l,c+=b(f,"RRRRRR"),c+=k}function b(a,b){for(var c="",d=0;dc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d("0"+a)},e.encoded=function(b){return d("0"+b)?a("0"+b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css new file mode 100644 index 0000000..fe87a68 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.modal-body,.modal-footer,body{font-family:FontAwesome}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{background-color:#d6d6d6;padding:0}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.close-button,.proceed-button{background-color:#72529b;color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.proceed-button{font-size:larger;border-radius:4px}.close-button{border-radius:4px}.poweredByMOLPay{margin-top:15px;max-height:20px;max-width:150px}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html new file mode 100644 index 0000000..1172c42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html new file mode 100644 index 0000000..cab8cc3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html new file mode 100644 index 0000000..9e47ece --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html new file mode 100644 index 0000000..6f04d86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html new file mode 100644 index 0000000..a77da9e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html @@ -0,0 +1 @@ +

    Finalizing payment status.

    Please wait.

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html new file mode 100644 index 0000000..4d9bee4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html @@ -0,0 +1 @@ +

    MOLPay X-Platform

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html new file mode 100644 index 0000000..1f22555 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html @@ -0,0 +1,10 @@ +
    Order ID {{sdkData.mp_order_ID}}
    {{sdkData.mp_currency}} {{sdkData.mp_amount}}
     
     
     
     
    Pay through   {{sdkData.mp_channel_title}}
    New card
    Card number  
    CVV  
    Exp date  
    Country   {{sdkData.mp_credit_card_country_title}}
    Bank name   {{sdkData.mp_credit_card_bank}}
    Use BCARD points (RM1 = 100 BCARD Points)
    {{sdkData.bcard_point}}
    Card# 6298 43  
    Pin  
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html new file mode 100644 index 0000000..909397f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html @@ -0,0 +1 @@ +
    Services MOLPay {{C5ResultData.channel}}
    Transaction ID {{C5ResultData.txn_ID}}
    {{C5ResultData.pcode_lbl}} {{C5ResultData.pcode}}
    Payable amount {{C5ResultData.cur}}{{C5ResultData.payable_amt}}
    Note
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..dd70808 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var iabRef = null; +var molpaySdkUrl = 'molpay-mobile-xdk-www/index.html'; + +var sdkData = { + // ------- SDK required basic data ---------- + 'mp_amount' : '1.10', + 'mp_username' : 'molpayapi', + 'mp_password' : '*M0Lp4y4p1!*', + 'mp_merchant_ID' : 'molpaymerchant', + 'mp_app_name' : 'wilwe_makan2', + 'mp_order_ID' : 'XP010', + 'mp_currency' : 'MYR', + 'mp_country' : 'MY', + 'mp_verification_key' : '501c4f508cf1c3f486f4f5c820591f41', + 'mp_channel' : 'multi', + 'mp_bill_description' : 'Cordova payment test', + 'mp_bill_name' : 'MOLPay Developer', + 'mp_bill_email' : 'clement@molpay.com', + 'mp_bill_mobile' : '123456', + 'mp_channel_editing' : false, + 'mp_editing_enabled' : false, + 'mp_transaction_id' : '', // Required if mp_request_type is 'Receipt' + 'mp_request_type' : '', // 'Receipt' for Cash channels +}; + + +var app = { + + onMOLPayLoadstart: function(event) { + console.log('onMOLPayLoadstart event = '+JSON.stringify(event, null, '')); + }, + + onMOLPayLoadstop: function(event) { + console.log('onMOLPayLoadstop event = '+JSON.stringify(sdkData, null, '')); + iabRef.executeScript({ + code: "updateSdkData("+JSON.stringify(sdkData)+");" + }, function() { + alert("updateSdkData executed successfully"); + }); + }, + + + // Application Constructor + initialize: function() { + this.bindEvents(); + }, + // Bind Event Listeners + // + // Bind any events that are required on startup. Common events are: + // 'load', 'deviceready', 'offline', and 'online'. + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + // deviceready Event Handler + // + // The scope of 'this' is the event. In order to call the 'receivedEvent' + // function, we must explicitly call 'app.receivedEvent(...);' + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + // Update DOM on a Received Event + receivedEvent: function(id) { + var parentElement = document.getElementById(id); + var listeningElement = parentElement.querySelector('.listening'); + var receivedElement = parentElement.querySelector('.received'); + + listeningElement.setAttribute('style', 'display:none;'); + receivedElement.setAttribute('style', 'display:block;'); + + console.log('Received Event: ' + id); + + window.open = cordova.InAppBrowser.open; + iabRef = window.open(molpaySdkUrl, '_blank', 'location=no'); + iabRef.addEventListener('loadstart', app.onMOLPayLoadstart); + iabRef.addEventListener('loadstop', app.onMOLPayLoadstop); + + // iabRef = window.open(molpaySdkUrl,'_blank','location=yes,hardwareback=yes'); + } +}; + +app.initialize(); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml new file mode 100644 index 0000000..626db73 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml @@ -0,0 +1,24 @@ + + + MOLPay XDK for Cordova + MOLPay official in-app payment module for Cordova + MOLPay Mobile Division + MOLPay,payment,gateway + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/hooks/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/hooks/README.md new file mode 100644 index 0000000..574ad4c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/hooks/README.md @@ -0,0 +1,23 @@ + +# Cordova Hooks + +Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.npmignore new file mode 100644 index 0000000..6e52445 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/.npmignore @@ -0,0 +1,14 @@ +# Non-project-specific build files: +build.xml +local.properties +/gradlew +/gradlew.bat +/gradle +# Ant builds +ant-build +ant-gen +# Eclipse builds +gen +out +# Gradle builds +/build diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/AndroidManifest.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/AndroidManifest.xml new file mode 100644 index 0000000..022f54a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/AndroidManifest.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/AndroidManifest.xml new file mode 100755 index 0000000..3feb903 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build.gradle b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build.gradle new file mode 100644 index 0000000..b580e13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build.gradle @@ -0,0 +1,62 @@ +/* Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + + + +buildscript { + repositories { + mavenCentral() + jcenter(); + } + + dependencies { + classpath 'com.android.tools.build:gradle:2.2.1' + } + +} + +apply plugin: 'com.android.library' + +ext { + apply from: 'cordova.gradle' + cdvCompileSdkVersion = privateHelpers.getProjectTarget() + cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() +} + +android { + compileSdkVersion cdvCompileSdkVersion + buildToolsVersion cdvBuildToolsVersion + publishNonDefault true + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_6 + targetCompatibility JavaVersion.VERSION_1_6 + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/cordova.gradle b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/cordova.gradle new file mode 100644 index 0000000..21a01bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/cordova.gradle @@ -0,0 +1,201 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +import java.util.regex.Pattern +import groovy.swing.SwingBuilder + +String doEnsureValueExists(filePath, props, key) { + if (props.get(key) == null) { + throw new GradleException(filePath + ': Missing key required "' + key + '"') + } + return props.get(key) +} + +String doGetProjectTarget() { + def props = new Properties() + file('project.properties').withReader { reader -> + props.load(reader) + } + return doEnsureValueExists('project.properties', props, 'target') +} + +String[] getAvailableBuildTools() { + def buildToolsDir = new File(getAndroidSdkDir(), "build-tools") + buildToolsDir.list() + .findAll { it ==~ /[0-9.]+/ } + .sort { a, b -> compareVersions(b, a) } +} + +String doFindLatestInstalledBuildTools(String minBuildToolsVersion) { + def availableBuildToolsVersions + try { + availableBuildToolsVersions = getAvailableBuildTools() + } catch (e) { + println "An exception occurred while trying to find the Android build tools." + throw e + } + if (availableBuildToolsVersions.length > 0) { + def highestBuildToolsVersion = availableBuildToolsVersions[0] + if (compareVersions(highestBuildToolsVersion, minBuildToolsVersion) < 0) { + throw new RuntimeException( + "No usable Android build tools found. Highest installed version is " + + highestBuildToolsVersion + "; minimum version required is " + + minBuildToolsVersion + ".") + } + highestBuildToolsVersion + } else { + throw new RuntimeException( + "No installed build tools found. Install the Android build tools version " + + minBuildToolsVersion + " or higher.") + } +} + +// Return the first non-zero result of subtracting version list elements +// pairwise. If they are all identical, return the difference in length of +// the two lists. +int compareVersionList(Collection aParts, Collection bParts) { + def pairs = ([aParts, bParts]).transpose() + pairs.findResult(aParts.size()-bParts.size()) {it[0] - it[1] != 0 ? it[0] - it[1] : null} +} + +// Compare two version strings, such as "19.0.0" and "18.1.1.0". If all matched +// elements are identical, the longer version is the largest by this method. +// Examples: +// "19.0.0" > "19" +// "19.0.1" > "19.0.0" +// "19.1.0" > "19.0.1" +// "19" > "18.999.999" +int compareVersions(String a, String b) { + def aParts = a.tokenize('.').collect {it.toInteger()} + def bParts = b.tokenize('.').collect {it.toInteger()} + compareVersionList(aParts, bParts) +} + +String getAndroidSdkDir() { + def rootDir = project.rootDir + def androidSdkDir = null + String envVar = System.getenv("ANDROID_HOME") + def localProperties = new File(rootDir, 'local.properties') + String systemProperty = System.getProperty("android.home") + if (envVar != null) { + androidSdkDir = envVar + } else if (localProperties.exists()) { + Properties properties = new Properties() + localProperties.withInputStream { instr -> + properties.load(instr) + } + def sdkDirProp = properties.getProperty('sdk.dir') + if (sdkDirProp != null) { + androidSdkDir = sdkDirProp + } else { + sdkDirProp = properties.getProperty('android.dir') + if (sdkDirProp != null) { + androidSdkDir = (new File(rootDir, sdkDirProp)).getAbsolutePath() + } + } + } + if (androidSdkDir == null && systemProperty != null) { + androidSdkDir = systemProperty + } + if (androidSdkDir == null) { + throw new RuntimeException( + "Unable to determine Android SDK directory.") + } + androidSdkDir +} + +def doExtractIntFromManifest(name) { + def manifestFile = file(android.sourceSets.main.manifest.srcFile) + def pattern = Pattern.compile(name + "=\"(\\d+)\"") + def matcher = pattern.matcher(manifestFile.getText()) + matcher.find() + return new BigInteger(matcher.group(1)) +} + +def doExtractStringFromManifest(name) { + def manifestFile = file(android.sourceSets.main.manifest.srcFile) + def pattern = Pattern.compile(name + "=\"(\\S+)\"") + def matcher = pattern.matcher(manifestFile.getText()) + matcher.find() + return matcher.group(1) +} + +def doPromptForPassword(msg) { + if (System.console() == null) { + def ret = null + new SwingBuilder().edt { + dialog(modal: true, title: 'Enter password', alwaysOnTop: true, resizable: false, locationRelativeTo: null, pack: true, show: true) { + vbox { + label(text: msg) + def input = passwordField() + button(defaultButton: true, text: 'OK', actionPerformed: { + ret = input.password; + dispose(); + }) + } + } + } + if (!ret) { + throw new GradleException('User canceled build') + } + return new String(ret) + } else { + return System.console().readPassword('\n' + msg); + } +} + +def doGetConfigXml() { + def xml = file("res/xml/config.xml").getText() + // Disable namespace awareness since Cordova doesn't use them properly + return new XmlParser(false, false).parseText(xml) +} + +def doGetConfigPreference(name, defaultValue) { + name = name.toLowerCase() + def root = doGetConfigXml() + + def ret = defaultValue + root.preference.each { it -> + def attrName = it.attribute("name") + if (attrName && attrName.toLowerCase() == name) { + ret = it.attribute("value") + } + } + return ret +} + +// Properties exported here are visible to all plugins. +ext { + // These helpers are shared, but are not guaranteed to be stable / unchanged. + privateHelpers = {} + privateHelpers.getProjectTarget = { doGetProjectTarget() } + privateHelpers.findLatestInstalledBuildTools = { doFindLatestInstalledBuildTools('19.1.0') } + privateHelpers.extractIntFromManifest = { name -> doExtractIntFromManifest(name) } + privateHelpers.extractStringFromManifest = { name -> doExtractStringFromManifest(name) } + privateHelpers.promptForPassword = { msg -> doPromptForPassword(msg) } + privateHelpers.ensureValueExists = { filePath, props, key -> doEnsureValueExists(filePath, props, key) } + + // These helpers can be used by plugins / projects and will not change. + cdvHelpers = {} + // Returns a XmlParser for the config.xml. Added in 4.1.0. + cdvHelpers.getConfigXml = { doGetConfigXml() } + // Returns the value for the desired . Added in 4.1.0. + cdvHelpers.getConfigPreference = { name, defaultValue -> doGetConfigPreference(name, defaultValue) } +} + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/project.properties b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/project.properties new file mode 100644 index 0000000..df3c73c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/project.properties @@ -0,0 +1,16 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Indicates whether an apk should be generated for each density. +split.density=false +# Project target. +target=android-25 +apk-configurations= +renderscript.opt.level=O0 +android.library=true diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java new file mode 100644 index 0000000..d3a231a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java @@ -0,0 +1,69 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +/** + * The Class AuthenticationToken defines the userName and password to be used for authenticating a web resource + */ +public class AuthenticationToken { + private String userName; + private String password; + + /** + * Gets the user name. + * + * @return the user name + */ + public String getUserName() { + return userName; + } + + /** + * Sets the user name. + * + * @param userName + * the new user name + */ + public void setUserName(String userName) { + this.userName = userName; + } + + /** + * Gets the password. + * + * @return the password + */ + public String getPassword() { + return password; + } + + /** + * Sets the password. + * + * @param password + * the new password + */ + public void setPassword(String password) { + this.password = password; + } + + + + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java new file mode 100644 index 0000000..4336386 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java @@ -0,0 +1,142 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import org.json.JSONArray; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.PluginResult; +import org.json.JSONObject; + +public class CallbackContext { + private static final String LOG_TAG = "CordovaPlugin"; + + private String callbackId; + private CordovaWebView webView; + protected boolean finished; + private int changingThreads; + + public CallbackContext(String callbackId, CordovaWebView webView) { + this.callbackId = callbackId; + this.webView = webView; + } + + public boolean isFinished() { + return finished; + } + + public boolean isChangingThreads() { + return changingThreads > 0; + } + + public String getCallbackId() { + return callbackId; + } + + public void sendPluginResult(PluginResult pluginResult) { + synchronized (this) { + if (finished) { + LOG.w(LOG_TAG, "Attempted to send a second callback for ID: " + callbackId + "\nResult was: " + pluginResult.getMessage()); + return; + } else { + finished = !pluginResult.getKeepCallback(); + } + } + webView.sendPluginResult(pluginResult, callbackId); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + * + * @param message The message to add to the success result. + */ + public void success(JSONObject message) { + sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + * + * @param message The message to add to the success result. + */ + public void success(String message) { + sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + * + * @param message The message to add to the success result. + */ + public void success(JSONArray message) { + sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + * + * @param message The message to add to the success result. + */ + public void success(byte[] message) { + sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + * + * @param message The message to add to the success result. + */ + public void success(int message) { + sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); + } + + /** + * Helper for success callbacks that just returns the Status.OK by default + */ + public void success() { + sendPluginResult(new PluginResult(PluginResult.Status.OK)); + } + + /** + * Helper for error callbacks that just returns the Status.ERROR by default + * + * @param message The message to add to the error result. + */ + public void error(JSONObject message) { + sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); + } + + /** + * Helper for error callbacks that just returns the Status.ERROR by default + * + * @param message The message to add to the error result. + */ + public void error(String message) { + sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); + } + + /** + * Helper for error callbacks that just returns the Status.ERROR by default + * + * @param message The message to add to the error result. + */ + public void error(int message) { + sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java new file mode 100644 index 0000000..050daa0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java @@ -0,0 +1,65 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import android.util.Pair; +import android.util.SparseArray; + +/** + * Provides a collection that maps unique request codes to CordovaPlugins and Integers. + * Used to ensure that when plugins make requests for runtime permissions, those requests do not + * collide with requests from other plugins that use the same request code value. + */ +public class CallbackMap { + private int currentCallbackId = 0; + private SparseArray> callbacks; + + public CallbackMap() { + this.callbacks = new SparseArray>(); + } + + /** + * Stores a CordovaPlugin and request code and returns a new unique request code to use + * in a permission request. + * + * @param receiver The plugin that is making the request + * @param requestCode The original request code used by the plugin + * @return A unique request code that can be used to retrieve this callback + * with getAndRemoveCallback() + */ + public synchronized int registerCallback(CordovaPlugin receiver, int requestCode) { + int mappedId = this.currentCallbackId++; + callbacks.put(mappedId, new Pair(receiver, requestCode)); + return mappedId; + } + + /** + * Retrieves and removes a callback stored in the map using the mapped request code + * obtained from registerCallback() + * + * @param mappedId The request code obtained from registerCallback() + * @return The CordovaPlugin and orignal request code that correspond to the + * given mappedCode + */ + public synchronized Pair getAndRemoveCallback(int mappedId) { + Pair callback = callbacks.get(mappedId); + callbacks.remove(mappedId); + return callback; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/Config.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/Config.java new file mode 100644 index 0000000..0739795 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/Config.java @@ -0,0 +1,71 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +import java.util.List; + +import android.app.Activity; + +@Deprecated // Use Whitelist, CordovaPrefences, etc. directly. +public class Config { + private static final String TAG = "Config"; + + static ConfigXmlParser parser; + + private Config() { + } + + public static void init(Activity action) { + parser = new ConfigXmlParser(); + parser.parse(action); + //TODO: Add feature to bring this back. Some preferences should be overridden by intents, but not all + parser.getPreferences().setPreferencesBundle(action.getIntent().getExtras()); + } + + // Intended to be used for testing only; creates an empty configuration. + public static void init() { + if (parser == null) { + parser = new ConfigXmlParser(); + } + } + + public static String getStartUrl() { + if (parser == null) { + return "file:///android_asset/www/index.html"; + } + return parser.getLaunchUrl(); + } + + public static String getErrorUrl() { + return parser.getPreferences().getString("errorurl", null); + } + + public static List getPluginEntries() { + return parser.getPluginEntries(); + } + + public static CordovaPreferences getPreferences() { + return parser.getPreferences(); + } + + public static boolean isInitialized() { + return parser != null; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java new file mode 100644 index 0000000..01a97f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java @@ -0,0 +1,145 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import android.content.Context; + +public class ConfigXmlParser { + private static String TAG = "ConfigXmlParser"; + + private String launchUrl = "file:///android_asset/www/index.html"; + private CordovaPreferences prefs = new CordovaPreferences(); + private ArrayList pluginEntries = new ArrayList(20); + + public CordovaPreferences getPreferences() { + return prefs; + } + + public ArrayList getPluginEntries() { + return pluginEntries; + } + + public String getLaunchUrl() { + return launchUrl; + } + + public void parse(Context action) { + // First checking the class namespace for config.xml + int id = action.getResources().getIdentifier("config", "xml", action.getClass().getPackage().getName()); + if (id == 0) { + // If we couldn't find config.xml there, we'll look in the namespace from AndroidManifest.xml + id = action.getResources().getIdentifier("config", "xml", action.getPackageName()); + if (id == 0) { + LOG.e(TAG, "res/xml/config.xml is missing!"); + return; + } + } + parse(action.getResources().getXml(id)); + } + + boolean insideFeature = false; + String service = "", pluginClass = "", paramType = ""; + boolean onload = false; + + public void parse(XmlPullParser xml) { + int eventType = -1; + + while (eventType != XmlPullParser.END_DOCUMENT) { + if (eventType == XmlPullParser.START_TAG) { + handleStartTag(xml); + } + else if (eventType == XmlPullParser.END_TAG) + { + handleEndTag(xml); + } + try { + eventType = xml.next(); + } catch (XmlPullParserException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public void handleStartTag(XmlPullParser xml) { + String strNode = xml.getName(); + if (strNode.equals("feature")) { + //Check for supported feature sets aka. plugins (Accelerometer, Geolocation, etc) + //Set the bit for reading params + insideFeature = true; + service = xml.getAttributeValue(null, "name"); + } + else if (insideFeature && strNode.equals("param")) { + paramType = xml.getAttributeValue(null, "name"); + if (paramType.equals("service")) // check if it is using the older service param + service = xml.getAttributeValue(null, "value"); + else if (paramType.equals("package") || paramType.equals("android-package")) + pluginClass = xml.getAttributeValue(null,"value"); + else if (paramType.equals("onload")) + onload = "true".equals(xml.getAttributeValue(null, "value")); + } + else if (strNode.equals("preference")) { + String name = xml.getAttributeValue(null, "name").toLowerCase(Locale.ENGLISH); + String value = xml.getAttributeValue(null, "value"); + prefs.set(name, value); + } + else if (strNode.equals("content")) { + String src = xml.getAttributeValue(null, "src"); + if (src != null) { + setStartUrl(src); + } + } + } + + public void handleEndTag(XmlPullParser xml) { + String strNode = xml.getName(); + if (strNode.equals("feature")) { + pluginEntries.add(new PluginEntry(service, pluginClass, onload)); + + service = ""; + pluginClass = ""; + insideFeature = false; + onload = false; + } + } + + private void setStartUrl(String src) { + Pattern schemeRegex = Pattern.compile("^[a-z-]+://"); + Matcher matcher = schemeRegex.matcher(src); + if (matcher.find()) { + launchUrl = src; + } else { + if (src.charAt(0) == '/') { + src = src.substring(1); + } + launchUrl = "file:///android_asset/www/" + src; + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java new file mode 100755 index 0000000..85eeb53 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java @@ -0,0 +1,518 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import java.util.ArrayList; +import java.util.Locale; + +import org.json.JSONException; +import org.json.JSONObject; + +import android.app.Activity; +import android.app.AlertDialog; +import android.annotation.SuppressLint; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.res.Configuration; +import android.graphics.Color; +import android.media.AudioManager; +import android.os.Build; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; +import android.webkit.WebViewClient; +import android.widget.FrameLayout; + +/** + * This class is the main Android activity that represents the Cordova + * application. It should be extended by the user to load the specific + * html file that contains the application. + * + * As an example: + * + *
    + *     package org.apache.cordova.examples;
    + *
    + *     import android.os.Bundle;
    + *     import org.apache.cordova.*;
    + *
    + *     public class Example extends CordovaActivity {
    + *       @Override
    + *       public void onCreate(Bundle savedInstanceState) {
    + *         super.onCreate(savedInstanceState);
    + *         super.init();
    + *         // Load your application
    + *         loadUrl(launchUrl);
    + *       }
    + *     }
    + * 
    + * + * Cordova xml configuration: Cordova uses a configuration file at + * res/xml/config.xml to specify its settings. See "The config.xml File" + * guide in cordova-docs at http://cordova.apache.org/docs for the documentation + * for the configuration. The use of the set*Property() methods is + * deprecated in favor of the config.xml file. + * + */ +public class CordovaActivity extends Activity { + public static String TAG = "CordovaActivity"; + + // The webview for our app + protected CordovaWebView appView; + + private static int ACTIVITY_STARTING = 0; + private static int ACTIVITY_RUNNING = 1; + private static int ACTIVITY_EXITING = 2; + + // Keep app running when pause is received. (default = true) + // If true, then the JavaScript and native code continue to run in the background + // when another application (activity) is started. + protected boolean keepRunning = true; + + // Flag to keep immersive mode if set to fullscreen + protected boolean immersiveMode; + + // Read from config.xml: + protected CordovaPreferences preferences; + protected String launchUrl; + protected ArrayList pluginEntries; + protected CordovaInterfaceImpl cordovaInterface; + + /** + * Called when the activity is first created. + */ + @Override + public void onCreate(Bundle savedInstanceState) { + // need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception + loadConfig(); + + String logLevel = preferences.getString("loglevel", "ERROR"); + LOG.setLogLevel(logLevel); + + LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting"); + LOG.d(TAG, "CordovaActivity.onCreate()"); + + if (!preferences.getBoolean("ShowTitle", false)) { + getWindow().requestFeature(Window.FEATURE_NO_TITLE); + } + + if (preferences.getBoolean("SetFullscreen", false)) { + LOG.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version."); + preferences.set("Fullscreen", true); + } + if (preferences.getBoolean("Fullscreen", false)) { + // NOTE: use the FullscreenNotImmersive configuration key to set the activity in a REAL full screen + // (as was the case in previous cordova versions) + if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) && !preferences.getBoolean("FullscreenNotImmersive", false)) { + immersiveMode = true; + } else { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + } else { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); + } + + super.onCreate(savedInstanceState); + + cordovaInterface = makeCordovaInterface(); + if (savedInstanceState != null) { + cordovaInterface.restoreInstanceState(savedInstanceState); + } + } + + protected void init() { + appView = makeWebView(); + createViews(); + if (!appView.isInitialized()) { + appView.init(cordovaInterface, pluginEntries, preferences); + } + cordovaInterface.onCordovaInit(appView.getPluginManager()); + + // Wire the hardware volume controls to control media if desired. + String volumePref = preferences.getString("DefaultVolumeStream", ""); + if ("media".equals(volumePref.toLowerCase(Locale.ENGLISH))) { + setVolumeControlStream(AudioManager.STREAM_MUSIC); + } + } + + @SuppressWarnings("deprecation") + protected void loadConfig() { + ConfigXmlParser parser = new ConfigXmlParser(); + parser.parse(this); + preferences = parser.getPreferences(); + preferences.setPreferencesBundle(getIntent().getExtras()); + launchUrl = parser.getLaunchUrl(); + pluginEntries = parser.getPluginEntries(); + Config.parser = parser; + } + + //Suppressing warnings in AndroidStudio + @SuppressWarnings({"deprecation", "ResourceType"}) + protected void createViews() { + //Why are we setting a constant as the ID? This should be investigated + appView.getView().setId(100); + appView.getView().setLayoutParams(new FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT)); + + setContentView(appView.getView()); + + if (preferences.contains("BackgroundColor")) { + try { + int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK); + // Background of activity: + appView.getView().setBackgroundColor(backgroundColor); + } + catch (NumberFormatException e){ + e.printStackTrace(); + } + } + + appView.getView().requestFocusFromTouch(); + } + + /** + * Construct the default web view object. + *

    + * Override this to customize the webview that is used. + */ + protected CordovaWebView makeWebView() { + return new CordovaWebViewImpl(makeWebViewEngine()); + } + + protected CordovaWebViewEngine makeWebViewEngine() { + return CordovaWebViewImpl.createEngine(this, preferences); + } + + protected CordovaInterfaceImpl makeCordovaInterface() { + return new CordovaInterfaceImpl(this) { + @Override + public Object onMessage(String id, Object data) { + // Plumb this to CordovaActivity.onMessage for backwards compatibility + return CordovaActivity.this.onMessage(id, data); + } + }; + } + + /** + * Load the url into the webview. + */ + public void loadUrl(String url) { + if (appView == null) { + init(); + } + + // If keepRunning + this.keepRunning = preferences.getBoolean("KeepRunning", true); + + appView.loadUrlIntoView(url, true); + } + + /** + * Called when the system is about to start resuming a previous activity. + */ + @Override + protected void onPause() { + super.onPause(); + LOG.d(TAG, "Paused the activity."); + + if (this.appView != null) { + // CB-9382 If there is an activity that started for result and main activity is waiting for callback + // result, we shoudn't stop WebView Javascript timers, as activity for result might be using them + boolean keepRunning = this.keepRunning || this.cordovaInterface.activityResultCallback != null; + this.appView.handlePause(keepRunning); + } + } + + /** + * Called when the activity receives a new intent + */ + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + //Forward to plugins + if (this.appView != null) + this.appView.onNewIntent(intent); + } + + /** + * Called when the activity will start interacting with the user. + */ + @Override + protected void onResume() { + super.onResume(); + LOG.d(TAG, "Resumed the activity."); + + if (this.appView == null) { + return; + } + // Force window to have focus, so application always + // receive user input. Workaround for some devices (Samsung Galaxy Note 3 at least) + this.getWindow().getDecorView().requestFocus(); + + this.appView.handleResume(this.keepRunning); + } + + /** + * Called when the activity is no longer visible to the user. + */ + @Override + protected void onStop() { + super.onStop(); + LOG.d(TAG, "Stopped the activity."); + + if (this.appView == null) { + return; + } + this.appView.handleStop(); + } + + /** + * Called when the activity is becoming visible to the user. + */ + @Override + protected void onStart() { + super.onStart(); + LOG.d(TAG, "Started the activity."); + + if (this.appView == null) { + return; + } + this.appView.handleStart(); + } + + /** + * The final call you receive before your activity is destroyed. + */ + @Override + public void onDestroy() { + LOG.d(TAG, "CordovaActivity.onDestroy()"); + super.onDestroy(); + + if (this.appView != null) { + appView.handleDestroy(); + } + } + + /** + * Called when view focus is changed + */ + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + if (hasFocus && immersiveMode) { + final int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; + + getWindow().getDecorView().setSystemUiVisibility(uiOptions); + } + } + + @SuppressLint("NewApi") + @Override + public void startActivityForResult(Intent intent, int requestCode, Bundle options) { + // Capture requestCode here so that it is captured in the setActivityResultCallback() case. + cordovaInterface.setActivityResultRequestCode(requestCode); + super.startActivityForResult(intent, requestCode, options); + } + + /** + * Called when an activity you launched exits, giving you the requestCode you started it with, + * the resultCode it returned, and any additional data from it. + * + * @param requestCode The request code originally supplied to startActivityForResult(), + * allowing you to identify who this result came from. + * @param resultCode The integer result code returned by the child activity through its setResult(). + * @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras"). + */ + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent intent) { + LOG.d(TAG, "Incoming Result. Request code = " + requestCode); + super.onActivityResult(requestCode, resultCode, intent); + cordovaInterface.onActivityResult(requestCode, resultCode, intent); + } + + /** + * Report an error to the host application. These errors are unrecoverable (i.e. the main resource is unavailable). + * The errorCode parameter corresponds to one of the ERROR_* constants. + * + * @param errorCode The error code corresponding to an ERROR_* value. + * @param description A String describing the error. + * @param failingUrl The url that failed to load. + */ + public void onReceivedError(final int errorCode, final String description, final String failingUrl) { + final CordovaActivity me = this; + + // If errorUrl specified, then load it + final String errorUrl = preferences.getString("errorUrl", null); + if ((errorUrl != null) && (!failingUrl.equals(errorUrl)) && (appView != null)) { + // Load URL on UI thread + me.runOnUiThread(new Runnable() { + public void run() { + me.appView.showWebPage(errorUrl, false, true, null); + } + }); + } + // If not, then display error dialog + else { + final boolean exit = !(errorCode == WebViewClient.ERROR_HOST_LOOKUP); + me.runOnUiThread(new Runnable() { + public void run() { + if (exit) { + me.appView.getView().setVisibility(View.GONE); + me.displayError("Application Error", description + " (" + failingUrl + ")", "OK", exit); + } + } + }); + } + } + + /** + * Display an error dialog and optionally exit application. + */ + public void displayError(final String title, final String message, final String button, final boolean exit) { + final CordovaActivity me = this; + me.runOnUiThread(new Runnable() { + public void run() { + try { + AlertDialog.Builder dlg = new AlertDialog.Builder(me); + dlg.setMessage(message); + dlg.setTitle(title); + dlg.setCancelable(false); + dlg.setPositiveButton(button, + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + if (exit) { + finish(); + } + } + }); + dlg.create(); + dlg.show(); + } catch (Exception e) { + finish(); + } + } + }); + } + + /* + * Hook in Cordova for menu plugins + */ + @Override + public boolean onCreateOptionsMenu(Menu menu) { + if (appView != null) { + appView.getPluginManager().postMessage("onCreateOptionsMenu", menu); + } + return super.onCreateOptionsMenu(menu); + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + if (appView != null) { + appView.getPluginManager().postMessage("onPrepareOptionsMenu", menu); + } + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + if (appView != null) { + appView.getPluginManager().postMessage("onOptionsItemSelected", item); + } + return true; + } + + /** + * Called when a message is sent to plugin. + * + * @param id The message id + * @param data The message data + * @return Object or null + */ + public Object onMessage(String id, Object data) { + if ("onReceivedError".equals(id)) { + JSONObject d = (JSONObject) data; + try { + this.onReceivedError(d.getInt("errorCode"), d.getString("description"), d.getString("url")); + } catch (JSONException e) { + e.printStackTrace(); + } + } else if ("exit".equals(id)) { + finish(); + } + return null; + } + + protected void onSaveInstanceState(Bundle outState) { + cordovaInterface.onSaveInstanceState(outState); + super.onSaveInstanceState(outState); + } + + /** + * Called by the system when the device configuration changes while your activity is running. + * + * @param newConfig The new device configuration + */ + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + if (this.appView == null) { + return; + } + PluginManager pm = this.appView.getPluginManager(); + if (pm != null) { + pm.onConfigurationChanged(newConfig); + } + } + + /** + * Called by the system when the user grants permissions + * + * @param requestCode + * @param permissions + * @param grantResults + */ + @Override + public void onRequestPermissionsResult(int requestCode, String permissions[], + int[] grantResults) { + try + { + cordovaInterface.onRequestPermissionResult(requestCode, permissions, grantResults); + } + catch (JSONException e) + { + LOG.d(TAG, "JSONException: Parameters fed into the method are not valid"); + e.printStackTrace(); + } + + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java new file mode 100644 index 0000000..d40d26e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java @@ -0,0 +1,113 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.util.Base64; + +public class CordovaArgs { + private JSONArray baseArgs; + + public CordovaArgs(JSONArray args) { + this.baseArgs = args; + } + + + // Pass through the basics to the base args. + public Object get(int index) throws JSONException { + return baseArgs.get(index); + } + + public boolean getBoolean(int index) throws JSONException { + return baseArgs.getBoolean(index); + } + + public double getDouble(int index) throws JSONException { + return baseArgs.getDouble(index); + } + + public int getInt(int index) throws JSONException { + return baseArgs.getInt(index); + } + + public JSONArray getJSONArray(int index) throws JSONException { + return baseArgs.getJSONArray(index); + } + + public JSONObject getJSONObject(int index) throws JSONException { + return baseArgs.getJSONObject(index); + } + + public long getLong(int index) throws JSONException { + return baseArgs.getLong(index); + } + + public String getString(int index) throws JSONException { + return baseArgs.getString(index); + } + + + public Object opt(int index) { + return baseArgs.opt(index); + } + + public boolean optBoolean(int index) { + return baseArgs.optBoolean(index); + } + + public double optDouble(int index) { + return baseArgs.optDouble(index); + } + + public int optInt(int index) { + return baseArgs.optInt(index); + } + + public JSONArray optJSONArray(int index) { + return baseArgs.optJSONArray(index); + } + + public JSONObject optJSONObject(int index) { + return baseArgs.optJSONObject(index); + } + + public long optLong(int index) { + return baseArgs.optLong(index); + } + + public String optString(int index) { + return baseArgs.optString(index); + } + + public boolean isNull(int index) { + return baseArgs.isNull(index); + } + + + // The interesting custom helpers. + public byte[] getArrayBuffer(int index) throws JSONException { + String encoded = baseArgs.getString(index); + return Base64.decode(encoded, Base64.DEFAULT); + } +} + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java new file mode 100644 index 0000000..9459a11 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java @@ -0,0 +1,182 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import java.security.SecureRandom; + +import org.json.JSONArray; +import org.json.JSONException; + +/** + * Contains APIs that the JS can call. All functions in here should also have + * an equivalent entry in CordovaChromeClient.java, and be added to + * cordova-js/lib/android/plugin/android/promptbasednativeapi.js + */ +public class CordovaBridge { + private static final String LOG_TAG = "CordovaBridge"; + private PluginManager pluginManager; + private NativeToJsMessageQueue jsMessageQueue; + private volatile int expectedBridgeSecret = -1; // written by UI thread, read by JS thread. + + public CordovaBridge(PluginManager pluginManager, NativeToJsMessageQueue jsMessageQueue) { + this.pluginManager = pluginManager; + this.jsMessageQueue = jsMessageQueue; + } + + public String jsExec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException { + if (!verifySecret("exec()", bridgeSecret)) { + return null; + } + // If the arguments weren't received, send a message back to JS. It will switch bridge modes and try again. See CB-2666. + // We send a message meant specifically for this case. It starts with "@" so no other message can be encoded into the same string. + if (arguments == null) { + return "@Null arguments."; + } + + jsMessageQueue.setPaused(true); + try { + // Tell the resourceApi what thread the JS is running on. + CordovaResourceApi.jsThread = Thread.currentThread(); + + pluginManager.exec(service, action, callbackId, arguments); + String ret = null; + if (!NativeToJsMessageQueue.DISABLE_EXEC_CHAINING) { + ret = jsMessageQueue.popAndEncode(false); + } + return ret; + } catch (Throwable e) { + e.printStackTrace(); + return ""; + } finally { + jsMessageQueue.setPaused(false); + } + } + + public void jsSetNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException { + if (!verifySecret("setNativeToJsBridgeMode()", bridgeSecret)) { + return; + } + jsMessageQueue.setBridgeMode(value); + } + + public String jsRetrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException { + if (!verifySecret("retrieveJsMessages()", bridgeSecret)) { + return null; + } + return jsMessageQueue.popAndEncode(fromOnlineEvent); + } + + private boolean verifySecret(String action, int bridgeSecret) throws IllegalAccessException { + if (!jsMessageQueue.isBridgeEnabled()) { + if (bridgeSecret == -1) { + LOG.d(LOG_TAG, action + " call made before bridge was enabled."); + } else { + LOG.d(LOG_TAG, "Ignoring " + action + " from previous page load."); + } + return false; + } + // Bridge secret wrong and bridge not due to it being from the previous page. + if (expectedBridgeSecret < 0 || bridgeSecret != expectedBridgeSecret) { + LOG.e(LOG_TAG, "Bridge access attempt with wrong secret token, possibly from malicious code. Disabling exec() bridge!"); + clearBridgeSecret(); + throw new IllegalAccessException(); + } + return true; + } + + /** Called on page transitions */ + void clearBridgeSecret() { + expectedBridgeSecret = -1; + } + + public boolean isSecretEstablished() { + return expectedBridgeSecret != -1; + } + + /** Called by cordova.js to initialize the bridge. */ + int generateBridgeSecret() { + SecureRandom randGen = new SecureRandom(); + expectedBridgeSecret = randGen.nextInt(Integer.MAX_VALUE); + return expectedBridgeSecret; + } + + public void reset() { + jsMessageQueue.reset(); + clearBridgeSecret(); + } + + public String promptOnJsPrompt(String origin, String message, String defaultValue) { + if (defaultValue != null && defaultValue.length() > 3 && defaultValue.startsWith("gap:")) { + JSONArray array; + try { + array = new JSONArray(defaultValue.substring(4)); + int bridgeSecret = array.getInt(0); + String service = array.getString(1); + String action = array.getString(2); + String callbackId = array.getString(3); + String r = jsExec(bridgeSecret, service, action, callbackId, message); + return r == null ? "" : r; + } catch (JSONException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + return ""; + } + // Sets the native->JS bridge mode. + else if (defaultValue != null && defaultValue.startsWith("gap_bridge_mode:")) { + try { + int bridgeSecret = Integer.parseInt(defaultValue.substring(16)); + jsSetNativeToJsBridgeMode(bridgeSecret, Integer.parseInt(message)); + } catch (NumberFormatException e){ + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + return ""; + } + // Polling for JavaScript messages + else if (defaultValue != null && defaultValue.startsWith("gap_poll:")) { + int bridgeSecret = Integer.parseInt(defaultValue.substring(9)); + try { + String r = jsRetrieveJsMessages(bridgeSecret, "1".equals(message)); + return r == null ? "" : r; + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + return ""; + } + else if (defaultValue != null && defaultValue.startsWith("gap_init:")) { + // Protect against random iframes being able to talk through the bridge. + // Trust only pages which the app would have been allowed to navigate to anyway. + if (pluginManager.shouldAllowBridgeAccess(origin)) { + // Enable the bridge + int bridgeMode = Integer.parseInt(defaultValue.substring(9)); + jsMessageQueue.setBridgeMode(bridgeMode); + // Tell JS the bridge secret. + int secret = generateBridgeSecret(); + return ""+secret; + } else { + LOG.e(LOG_TAG, "gap_init called from restricted origin: " + origin); + } + return ""; + } + return null; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java new file mode 100644 index 0000000..5dd0eca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java @@ -0,0 +1,96 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import java.security.Principal; +import java.security.PrivateKey; +import java.security.cert.X509Certificate; + +import android.webkit.ClientCertRequest; + +/** + * Implementation of the ICordovaClientCertRequest for Android WebView. + */ +public class CordovaClientCertRequest implements ICordovaClientCertRequest { + + private final ClientCertRequest request; + + public CordovaClientCertRequest(ClientCertRequest request) { + this.request = request; + } + + /** + * Cancel this request + */ + public void cancel() + { + request.cancel(); + } + + /* + * Returns the host name of the server requesting the certificate. + */ + public String getHost() + { + return request.getHost(); + } + + /* + * Returns the acceptable types of asymmetric keys (can be null). + */ + public String[] getKeyTypes() + { + return request.getKeyTypes(); + } + + /* + * Returns the port number of the server requesting the certificate. + */ + public int getPort() + { + return request.getPort(); + } + + /* + * Returns the acceptable certificate issuers for the certificate matching the private key (can be null). + */ + public Principal[] getPrincipals() + { + return request.getPrincipals(); + } + + /* + * Ignore the request for now. Do not remember user's choice. + */ + public void ignore() + { + request.ignore(); + } + + /* + * Proceed with the specified private key and client certificate chain. Remember the user's positive choice and use it for future requests. + * + * @param privateKey The privateKey + * @param chain The certificate chain + */ + public void proceed(PrivateKey privateKey, X509Certificate[] chain) + { + request.proceed(privateKey, chain); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java new file mode 100644 index 0000000..a219c99 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java @@ -0,0 +1,152 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.view.KeyEvent; +import android.widget.EditText; + +/** + * Helper class for WebViews to implement prompt(), alert(), confirm() dialogs. + */ +public class CordovaDialogsHelper { + private final Context context; + private AlertDialog lastHandledDialog; + + public CordovaDialogsHelper(Context context) { + this.context = context; + } + + public void showAlert(String message, final Result result) { + AlertDialog.Builder dlg = new AlertDialog.Builder(context); + dlg.setMessage(message); + dlg.setTitle("Alert"); + //Don't let alerts break the back button + dlg.setCancelable(true); + dlg.setPositiveButton(android.R.string.ok, + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + result.gotResult(true, null); + } + }); + dlg.setOnCancelListener( + new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + result.gotResult(false, null); + } + }); + dlg.setOnKeyListener(new DialogInterface.OnKeyListener() { + //DO NOTHING + public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_BACK) + { + result.gotResult(true, null); + return false; + } + else + return true; + } + }); + lastHandledDialog = dlg.show(); + } + + public void showConfirm(String message, final Result result) { + AlertDialog.Builder dlg = new AlertDialog.Builder(context); + dlg.setMessage(message); + dlg.setTitle("Confirm"); + dlg.setCancelable(true); + dlg.setPositiveButton(android.R.string.ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + result.gotResult(true, null); + } + }); + dlg.setNegativeButton(android.R.string.cancel, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + result.gotResult(false, null); + } + }); + dlg.setOnCancelListener( + new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + result.gotResult(false, null); + } + }); + dlg.setOnKeyListener(new DialogInterface.OnKeyListener() { + //DO NOTHING + public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_BACK) + { + result.gotResult(false, null); + return false; + } + else + return true; + } + }); + lastHandledDialog = dlg.show(); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * Since we are hacking prompts for our own purposes, we should not be using them for + * this purpose, perhaps we should hack console.log to do this instead! + */ + public void showPrompt(String message, String defaultValue, final Result result) { + // Returning false would also show a dialog, but the default one shows the origin (ugly). + AlertDialog.Builder dlg = new AlertDialog.Builder(context); + dlg.setMessage(message); + final EditText input = new EditText(context); + if (defaultValue != null) { + input.setText(defaultValue); + } + dlg.setView(input); + dlg.setCancelable(false); + dlg.setPositiveButton(android.R.string.ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + String userText = input.getText().toString(); + result.gotResult(true, userText); + } + }); + dlg.setNegativeButton(android.R.string.cancel, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + result.gotResult(false, null); + } + }); + lastHandledDialog = dlg.show(); + } + + public void destroyLastDialog(){ + if (lastHandledDialog != null){ + lastHandledDialog.cancel(); + } + } + + public interface Result { + public void gotResult(boolean success, String value); + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java new file mode 100644 index 0000000..724381e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java @@ -0,0 +1,51 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import android.webkit.HttpAuthHandler; + +/** + * Specifies interface for HTTP auth handler object which is used to handle auth requests and + * specifying user credentials. + */ +public class CordovaHttpAuthHandler implements ICordovaHttpAuthHandler { + + private final HttpAuthHandler handler; + + public CordovaHttpAuthHandler(HttpAuthHandler handler) { + this.handler = handler; + } + + /** + * Instructs the WebView to cancel the authentication request. + */ + public void cancel () { + this.handler.cancel(); + } + + /** + * Instructs the WebView to proceed with the authentication with the given credentials. + * + * @param username + * @param password + */ + public void proceed (String username, String password) { + this.handler.proceed(username, password); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java new file mode 100755 index 0000000..3b8468f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java @@ -0,0 +1,88 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import android.app.Activity; +import android.content.Intent; + +import org.apache.cordova.CordovaPlugin; + +import java.util.concurrent.ExecutorService; + +/** + * The Activity interface that is implemented by CordovaActivity. + * It is used to isolate plugin development, and remove dependency on entire Cordova library. + */ +public interface CordovaInterface { + + /** + * Launch an activity for which you would like a result when it finished. When this activity exits, + * your onActivityResult() method will be called. + * + * @param command The command object + * @param intent The intent to start + * @param requestCode The request code that is passed to callback to identify the activity + */ + abstract public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode); + + /** + * Set the plugin to be called when a sub-activity exits. + * + * @param plugin The plugin on which onActivityResult is to be called + */ + abstract public void setActivityResultCallback(CordovaPlugin plugin); + + /** + * Get the Android activity. + * + * @return the Activity + */ + public abstract Activity getActivity(); + + + /** + * Called when a message is sent to plugin. + * + * @param id The message id + * @param data The message data + * @return Object or null + */ + public Object onMessage(String id, Object data); + + /** + * Returns a shared thread pool that can be used for background tasks. + */ + public ExecutorService getThreadPool(); + + /** + * Sends a permission request to the activity for one permission. + */ + public void requestPermission(CordovaPlugin plugin, int requestCode, String permission); + + /** + * Sends a permission request to the activity for a group of permissions + */ + public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions); + + /** + * Check for a permission. Returns true if the permission is granted, false otherwise. + */ + public boolean hasPermission(String permission); + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java new file mode 100644 index 0000000..71dcb78 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java @@ -0,0 +1,241 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Build; +import android.os.Bundle; +import android.util.Pair; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +/** + * Default implementation of CordovaInterface. + */ +public class CordovaInterfaceImpl implements CordovaInterface { + private static final String TAG = "CordovaInterfaceImpl"; + protected Activity activity; + protected ExecutorService threadPool; + protected PluginManager pluginManager; + + protected ActivityResultHolder savedResult; + protected CallbackMap permissionResultCallbacks; + protected CordovaPlugin activityResultCallback; + protected String initCallbackService; + protected int activityResultRequestCode; + protected boolean activityWasDestroyed = false; + protected Bundle savedPluginState; + + public CordovaInterfaceImpl(Activity activity) { + this(activity, Executors.newCachedThreadPool()); + } + + public CordovaInterfaceImpl(Activity activity, ExecutorService threadPool) { + this.activity = activity; + this.threadPool = threadPool; + this.permissionResultCallbacks = new CallbackMap(); + } + + @Override + public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode) { + setActivityResultCallback(command); + try { + activity.startActivityForResult(intent, requestCode); + } catch (RuntimeException e) { // E.g.: ActivityNotFoundException + activityResultCallback = null; + throw e; + } + } + + @Override + public void setActivityResultCallback(CordovaPlugin plugin) { + // Cancel any previously pending activity. + if (activityResultCallback != null) { + activityResultCallback.onActivityResult(activityResultRequestCode, Activity.RESULT_CANCELED, null); + } + activityResultCallback = plugin; + } + + @Override + public Activity getActivity() { + return activity; + } + + @Override + public Object onMessage(String id, Object data) { + if ("exit".equals(id)) { + activity.finish(); + } + return null; + } + + @Override + public ExecutorService getThreadPool() { + return threadPool; + } + + /** + * Dispatches any pending onActivityResult callbacks and sends the resume event if the + * Activity was destroyed by the OS. + */ + public void onCordovaInit(PluginManager pluginManager) { + this.pluginManager = pluginManager; + if (savedResult != null) { + onActivityResult(savedResult.requestCode, savedResult.resultCode, savedResult.intent); + } else if(activityWasDestroyed) { + // If there was no Activity result, we still need to send out the resume event if the + // Activity was destroyed by the OS + activityWasDestroyed = false; + if(pluginManager != null) + { + CoreAndroid appPlugin = (CoreAndroid) pluginManager.getPlugin(CoreAndroid.PLUGIN_NAME); + if(appPlugin != null) { + JSONObject obj = new JSONObject(); + try { + obj.put("action", "resume"); + } catch (JSONException e) { + LOG.e(TAG, "Failed to create event message", e); + } + appPlugin.sendResumeEvent(new PluginResult(PluginResult.Status.OK, obj)); + } + } + + } + } + + /** + * Routes the result to the awaiting plugin. Returns false if no plugin was waiting. + */ + public boolean onActivityResult(int requestCode, int resultCode, Intent intent) { + CordovaPlugin callback = activityResultCallback; + if(callback == null && initCallbackService != null) { + // The application was restarted, but had defined an initial callback + // before being shut down. + savedResult = new ActivityResultHolder(requestCode, resultCode, intent); + if (pluginManager != null) { + callback = pluginManager.getPlugin(initCallbackService); + if(callback != null) { + callback.onRestoreStateForActivityResult(savedPluginState.getBundle(callback.getServiceName()), + new ResumeCallback(callback.getServiceName(), pluginManager)); + } + } + } + activityResultCallback = null; + + if (callback != null) { + LOG.d(TAG, "Sending activity result to plugin"); + initCallbackService = null; + savedResult = null; + callback.onActivityResult(requestCode, resultCode, intent); + return true; + } + LOG.w(TAG, "Got an activity result, but no plugin was registered to receive it" + (savedResult != null ? " yet!" : ".")); + return false; + } + + /** + * Call this from your startActivityForResult() overload. This is required to catch the case + * where plugins use Activity.startActivityForResult() + CordovaInterface.setActivityResultCallback() + * rather than CordovaInterface.startActivityForResult(). + */ + public void setActivityResultRequestCode(int requestCode) { + activityResultRequestCode = requestCode; + } + + /** + * Saves parameters for startActivityForResult(). + */ + public void onSaveInstanceState(Bundle outState) { + if (activityResultCallback != null) { + String serviceName = activityResultCallback.getServiceName(); + outState.putString("callbackService", serviceName); + } + if(pluginManager != null){ + outState.putBundle("plugin", pluginManager.onSaveInstanceState()); + } + + } + + /** + * Call this from onCreate() so that any saved startActivityForResult parameters will be restored. + */ + public void restoreInstanceState(Bundle savedInstanceState) { + initCallbackService = savedInstanceState.getString("callbackService"); + savedPluginState = savedInstanceState.getBundle("plugin"); + activityWasDestroyed = true; + } + + private static class ActivityResultHolder { + private int requestCode; + private int resultCode; + private Intent intent; + + public ActivityResultHolder(int requestCode, int resultCode, Intent intent) { + this.requestCode = requestCode; + this.resultCode = resultCode; + this.intent = intent; + } + } + + /** + * Called by the system when the user grants permissions + * + * @param requestCode + * @param permissions + * @param grantResults + */ + public void onRequestPermissionResult(int requestCode, String[] permissions, + int[] grantResults) throws JSONException { + Pair callback = permissionResultCallbacks.getAndRemoveCallback(requestCode); + if(callback != null) { + callback.first.onRequestPermissionResult(callback.second, permissions, grantResults); + } + } + + public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) { + String[] permissions = new String [1]; + permissions[0] = permission; + requestPermissions(plugin, requestCode, permissions); + } + + public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions) { + int mappedRequestCode = permissionResultCallbacks.registerCallback(plugin, requestCode); + getActivity().requestPermissions(permissions, mappedRequestCode); + } + + public boolean hasPermission(String permission) + { + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) + { + int result = activity.checkSelfPermission(permission); + return PackageManager.PERMISSION_GRANTED == result; + } + else + { + return true; + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java new file mode 100644 index 0000000..41af1db --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java @@ -0,0 +1,422 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova; + +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CallbackContext; +import org.json.JSONArray; +import org.json.JSONException; + +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.res.Configuration; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; + +import java.io.FileNotFoundException; +import java.io.IOException; + +/** + * Plugins must extend this class and override one of the execute methods. + */ +public class CordovaPlugin { + public CordovaWebView webView; + public CordovaInterface cordova; + protected CordovaPreferences preferences; + private String serviceName; + + /** + * Call this after constructing to initialize the plugin. + * Final because we want to be able to change args without breaking plugins. + */ + public final void privateInitialize(String serviceName, CordovaInterface cordova, CordovaWebView webView, CordovaPreferences preferences) { + assert this.cordova == null; + this.serviceName = serviceName; + this.cordova = cordova; + this.webView = webView; + this.preferences = preferences; + initialize(cordova, webView); + pluginInitialize(); + } + + /** + * Called after plugin construction and fields have been initialized. + * Prefer to use pluginInitialize instead since there is no value in + * having parameters on the initialize() function. + */ + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + } + + /** + * Called after plugin construction and fields have been initialized. + */ + protected void pluginInitialize() { + } + + /** + * Returns the plugin's service name (what you'd use when calling pluginManger.getPlugin()) + */ + public String getServiceName() { + return serviceName; + } + + /** + * Executes the request. + * + * This method is called from the WebView thread. To do a non-trivial amount of work, use: + * cordova.getThreadPool().execute(runnable); + * + * To run on the UI thread, use: + * cordova.getActivity().runOnUiThread(runnable); + * + * @param action The action to execute. + * @param rawArgs The exec() arguments in JSON form. + * @param callbackContext The callback context used when calling back into JavaScript. + * @return Whether the action was valid. + */ + public boolean execute(String action, String rawArgs, CallbackContext callbackContext) throws JSONException { + JSONArray args = new JSONArray(rawArgs); + return execute(action, args, callbackContext); + } + + /** + * Executes the request. + * + * This method is called from the WebView thread. To do a non-trivial amount of work, use: + * cordova.getThreadPool().execute(runnable); + * + * To run on the UI thread, use: + * cordova.getActivity().runOnUiThread(runnable); + * + * @param action The action to execute. + * @param args The exec() arguments. + * @param callbackContext The callback context used when calling back into JavaScript. + * @return Whether the action was valid. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + CordovaArgs cordovaArgs = new CordovaArgs(args); + return execute(action, cordovaArgs, callbackContext); + } + + /** + * Executes the request. + * + * This method is called from the WebView thread. To do a non-trivial amount of work, use: + * cordova.getThreadPool().execute(runnable); + * + * To run on the UI thread, use: + * cordova.getActivity().runOnUiThread(runnable); + * + * @param action The action to execute. + * @param args The exec() arguments, wrapped with some Cordova helpers. + * @param callbackContext The callback context used when calling back into JavaScript. + * @return Whether the action was valid. + */ + public boolean execute(String action, CordovaArgs args, CallbackContext callbackContext) throws JSONException { + return false; + } + + /** + * Called when the system is about to start resuming a previous activity. + * + * @param multitasking Flag indicating if multitasking is turned on for app + */ + public void onPause(boolean multitasking) { + } + + /** + * Called when the activity will start interacting with the user. + * + * @param multitasking Flag indicating if multitasking is turned on for app + */ + public void onResume(boolean multitasking) { + } + + /** + * Called when the activity is becoming visible to the user. + */ + public void onStart() { + } + + /** + * Called when the activity is no longer visible to the user. + */ + public void onStop() { + } + + /** + * Called when the activity receives a new intent. + */ + public void onNewIntent(Intent intent) { + } + + /** + * The final call you receive before your activity is destroyed. + */ + public void onDestroy() { + } + + /** + * Called when the Activity is being destroyed (e.g. if a plugin calls out to an external + * Activity and the OS kills the CordovaActivity in the background). The plugin should save its + * state in this method only if it is awaiting the result of an external Activity and needs + * to preserve some information so as to handle that result; onRestoreStateForActivityResult() + * will only be called if the plugin is the recipient of an Activity result + * + * @return Bundle containing the state of the plugin or null if state does not need to be saved + */ + public Bundle onSaveInstanceState() { + return null; + } + + /** + * Called when a plugin is the recipient of an Activity result after the CordovaActivity has + * been destroyed. The Bundle will be the same as the one the plugin returned in + * onSaveInstanceState() + * + * @param state Bundle containing the state of the plugin + * @param callbackContext Replacement Context to return the plugin result to + */ + public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {} + + /** + * Called when a message is sent to plugin. + * + * @param id The message id + * @param data The message data + * @return Object to stop propagation or null + */ + public Object onMessage(String id, Object data) { + return null; + } + + /** + * Called when an activity you launched exits, giving you the requestCode you started it with, + * the resultCode it returned, and any additional data from it. + * + * @param requestCode The request code originally supplied to startActivityForResult(), + * allowing you to identify who this result came from. + * @param resultCode The integer result code returned by the child activity through its setResult(). + * @param intent An Intent, which can return result data to the caller (various data can be + * attached to Intent "extras"). + */ + public void onActivityResult(int requestCode, int resultCode, Intent intent) { + } + + /** + * Hook for blocking the loading of external resources. + * + * This will be called when the WebView's shouldInterceptRequest wants to + * know whether to open a connection to an external resource. Return false + * to block the request: if any plugin returns false, Cordova will block + * the request. If all plugins return null, the default policy will be + * enforced. If at least one plugin returns true, and no plugins return + * false, then the request will proceed. + * + * Note that this only affects resource requests which are routed through + * WebViewClient.shouldInterceptRequest, such as XMLHttpRequest requests and + * img tag loads. WebSockets and media requests (such as

    Local URL

    +
    + You have successfully loaded a local URL: + +
    +
    +
    User-Agent =
    +
    +
    Likely running inAppBrowser: Device version from Cordova=not found, Back link should not work, toolbar may be present, logcat should show failed 'gap:' calls.
    +
    +
    Visit Google (whitelisted)
    +
    Visit Yahoo (not whitelisted)
    + + +

    Back +

    + +

    tall div with border
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf new file mode 100644 index 0000000..b54f1b7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html new file mode 100644 index 0000000..4f167f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html @@ -0,0 +1,45 @@ + + + + + + + + + Cordova Mobile Spec + + + + +
    + + +
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js new file mode 100644 index 0000000..03e3e12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js @@ -0,0 +1,632 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var cordova = require('cordova'); +var isWindows = cordova.platformId == 'windows'; + +window.alert = window.alert || navigator.notification.alert; + +exports.defineAutoTests = function () { + + describe('cordova.InAppBrowser', function () { + + it("inappbrowser.spec.1 should exist", function () { + expect(cordova.InAppBrowser).toBeDefined(); + }); + + it("inappbrowser.spec.2 should contain open function", function () { + expect(cordova.InAppBrowser.open).toBeDefined(); + expect(cordova.InAppBrowser.open).toEqual(jasmine.any(Function)); + }); + }); + + describe('open method', function () { + + var iabInstance; + var originalTimeout; + var url = 'https://dist.apache.org/repos/dist/dev/cordova/'; + var badUrl = 'http://bad-uri/'; + + beforeEach(function () { + // increase timeout to ensure test url could be loaded within test time + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000; + + iabInstance = null; + }); + + afterEach(function (done) { + // restore original timeout + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + + if (iabInstance !== null && iabInstance.close) { + iabInstance.close(); + } + iabInstance = null; + // add some extra time so that iab dialog is closed + setTimeout(done, 2000); + }); + + function verifyEvent(evt, type) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual(type); + if (type !== 'exit') { // `exit` event does not have url field + expect(evt.url).toEqual(url); + } + } + + function verifyLoadErrorEvent(evt) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual('loaderror'); + expect(evt.url).toEqual(badUrl); + expect(evt.code).toEqual(jasmine.any(Number)); + expect(evt.message).toEqual(jasmine.any(String)); + } + + it("inappbrowser.spec.3 should retun InAppBrowser instance with required methods", function () { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + + expect(iabInstance).toBeDefined(); + + expect(iabInstance.addEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.removeEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.close).toEqual(jasmine.any(Function)); + expect(iabInstance.show).toEqual(jasmine.any(Function)); + expect(iabInstance.executeScript).toEqual(jasmine.any(Function)); + expect(iabInstance.insertCSS).toEqual(jasmine.any(Function)); + }); + + it("inappbrowser.spec.4 should support loadstart and loadstop events", function (done) { + var onLoadStart = jasmine.createSpy('loadstart event callback').and.callFake(function (evt) { + verifyEvent(evt, 'loadstart'); + }); + + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('loadstart', onLoadStart); + iabInstance.addEventListener('loadstop', function (evt) { + verifyEvent(evt, 'loadstop'); + expect(onLoadStart).toHaveBeenCalled(); + done(); + }); + }); + + it("inappbrowser.spec.5 should support exit event", function (done) { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('exit', function (evt) { + verifyEvent(evt, 'exit'); + done(); + }); + iabInstance.close(); + iabInstance = null; + }); + + it("inappbrowser.spec.6 should support loaderror event", function (done) { + iabInstance = cordova.InAppBrowser.open(badUrl, '_blank'); + iabInstance.addEventListener('loaderror', function (evt) { + verifyLoadErrorEvent(evt); + done(); + }); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + + function doOpen(url, target, params, numExpectedRedirects, useWindowOpen) { + numExpectedRedirects = numExpectedRedirects || 0; + useWindowOpen = useWindowOpen || false; + console.log("Opening " + url); + + var counts; + var lastLoadStartURL; + var wasReset = false; + function reset() { + counts = { + 'loaderror': 0, + 'loadstart': 0, + 'loadstop': 0, + 'exit': 0 + }; + lastLoadStartURL = ''; + } + reset(); + + var iab; + var callbacks = { + loaderror: logEvent, + loadstart: logEvent, + loadstop: logEvent, + exit: logEvent + }; + if (useWindowOpen) { + console.log('Use window.open() for url'); + iab = window.open(url, target, params, callbacks); + } + else { + iab = cordova.InAppBrowser.open(url, target, params, callbacks); + } + if (!iab) { + alert('open returned ' + iab); + return; + } + + function logEvent(e) { + console.log('IAB event=' + JSON.stringify(e)); + counts[e.type]++; + // Verify that event.url gets updated on redirects. + if (e.type == 'loadstart') { + if (e.url == lastLoadStartURL) { + alert('Unexpected: loadstart fired multiple times for the same URL.'); + } + lastLoadStartURL = e.url; + } + // Verify the right number of loadstart events were fired. + if (e.type == 'loadstop' || e.type == 'loaderror') { + if (e.url != lastLoadStartURL) { + alert('Unexpected: ' + e.type + ' event.url != loadstart\'s event.url'); + } + if (numExpectedRedirects === 0 && counts['loadstart'] !== 1) { + // Do allow a loaderror without a loadstart (e.g. in the case of an invalid URL). + if (!(e.type == 'loaderror' && counts['loadstart'] === 0)) { + alert('Unexpected: got multiple loadstart events. (' + counts['loadstart'] + ')'); + } + } else if (numExpectedRedirects > 0 && counts['loadstart'] < (numExpectedRedirects + 1)) { + alert('Unexpected: should have got at least ' + (numExpectedRedirects + 1) + ' loadstart events, but got ' + counts['loadstart']); + } + wasReset = true; + numExpectedRedirects = 0; + reset(); + } + // Verify that loadend / loaderror was called. + if (e.type == 'exit') { + var numStopEvents = counts['loadstop'] + counts['loaderror']; + if (numStopEvents === 0 && !wasReset) { + alert('Unexpected: browser closed without a loadstop or loaderror.'); + } else if (numStopEvents > 1) { + alert('Unexpected: got multiple loadstop/loaderror events.'); + } + } + } + + return iab; + } + + function doHookOpen(url, target, params, numExpectedRedirects) { + var originalFunc = window.open; + var wasClobbered = window.hasOwnProperty('open'); + window.open = cordova.InAppBrowser.open; + + try { + doOpen(url, target, params, numExpectedRedirects, true); + } + finally { + if (wasClobbered) { + window.open = originalFunc; + } + else { + console.log('just delete, to restore open from prototype'); + delete window.open; + } + } + } + + function openWithStyle(url, cssUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + var callback = function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }; + if (cssUrl) { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ file: cssUrl }, useCallback && callback); + }); + } else { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ code: '#style-update-literal { \ndisplay: block !important; \n}' }, + useCallback && callback); + }); + } + } + + function openWithScript(url, jsUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + if (jsUrl) { + iab.addEventListener('loadstop', function (event) { + iab.executeScript({ file: jsUrl }, useCallback && function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } else { + iab.addEventListener('loadstop', function (event) { + var code = '(function(){\n' + + ' var header = document.getElementById("header");\n' + + ' header.innerHTML = "Script literal successfully injected";\n' + + ' return "abc";\n' + + '})()'; + iab.executeScript({ code: code }, useCallback && function (results) { + if (results && results.length === 1 && results[0] === 'abc') { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } + } + var hiddenwnd = null; + var loadlistener = function (event) { alert('background window loaded '); }; + function openHidden(url, startHidden) { + var shopt = (startHidden) ? 'hidden=yes' : ''; + hiddenwnd = cordova.InAppBrowser.open(url, 'random_string', shopt); + if (!hiddenwnd) { + alert('cordova.InAppBrowser.open returned ' + hiddenwnd); + return; + } + if (startHidden) hiddenwnd.addEventListener('loadstop', loadlistener); + } + function showHidden() { + if (!!hiddenwnd) { + hiddenwnd.show(); + } + } + function closeHidden() { + if (!!hiddenwnd) { + hiddenwnd.removeEventListener('loadstop', loadlistener); + hiddenwnd.close(); + hiddenwnd = null; + } + } + + var info_div = '

    InAppBrowser

    ' + + '
    ' + + 'Make sure http://cordova.apache.org and http://google.co.uk and https://www.google.co.uk are white listed.
    ' + + 'Make sure http://www.apple.com is not in the white list.
    ' + + 'In iOS, starred * tests will put the app in a state with no way to return.
    ' + + '

    User-Agent: ' + + '

    '; + + var local_tests = '

    Local URL

    ' + + '
    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView (using hook of window.open()).' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: fails to open' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar at top.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser without locationBar.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the bottom.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the top.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with no locationBar. On iOS the toolbar is at the top.'; + + var white_listed_tests = '

    White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org (using hook of window.open())' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in system browser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org with no location bar.'; + + var non_white_listed_tests = '

    Non White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (using hook of window.open()).' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).' + + '

    ' + + 'Expected result: open successfully in system browser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com without locationBar.'; + + var page_with_redirects_tests = '

    Page with redirect

    ' + + '
    ' + + 'Expected result: should 301 and open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.'; + + var pdf_url_tests = '

    PDF URL

    ' + + '
    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.' + + '

    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.'; + + var invalid_url_tests = '

    Invalid URL

    ' + + '
    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser (404).'; + + var css_js_injection_tests = '

    CSS / JS Injection

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser without text "Style updated from..."' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected" and alert dialog with the text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" .' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" and alert dialog with the text "Results verified".'; + + var open_hidden_tests = '

    Open Hidden

    ' + + '
    ' + + 'Expected result: no additional browser window. Alert appears with the text "background window loaded".' + + '

    ' + + 'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: no output. But click on "show hidden" again and nothing should be shown.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to https://www.google.co.uk'; + + var clearing_cache_tests = '

    Clearing Cache

    ' + + '
    ' + + 'Expected result: ?' + + '

    ' + + 'Expected result: ?'; + + var video_tag_tests = '

    Video tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video does not play automatically on iOS and Android but rather works after clicking the "play" button.'; + + var local_with_anchor_tag_tests = '

    Local with anchor tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the top as normal.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the beginning of the tall div with border.'; + + // CB-7490 We need to wrap this code due to Windows security restrictions + // see http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences for details + if (window.MSApp && window.MSApp.execUnsafeLocalFunction) { + MSApp.execUnsafeLocalFunction(function() { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + }); + } else { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + } + + document.getElementById("user-agent").textContent = navigator.userAgent; + + // we are already in cdvtests directory + var basePath = 'iab-resources/'; + var localhtml = basePath + 'local.html', + localpdf = basePath + 'local.pdf', + injecthtml = basePath + 'inject.html', + injectjs = isWindows ? basePath + 'inject.js' : 'inject.js', + injectcss = isWindows ? basePath + 'inject.css' : 'inject.css', + videohtml = basePath + 'video.html'; + + //Local + createActionButton('target=Default', function () { + doOpen(localhtml); + }, 'openLocal'); + createActionButton('target=Default (window.open)', function () { + doHookOpen(localhtml); + }, 'openLocalHook'); + createActionButton('target=_self', function () { + doOpen(localhtml, '_self'); + }, 'openLocalSelf'); + createActionButton('target=_system', function () { + doOpen(localhtml, '_system'); + }, 'openLocalSystem'); + createActionButton('target=_blank', function () { + doOpen(localhtml, '_blank'); + }, 'openLocalBlank'); + createActionButton('target=Random, location=no, disallowoverscroll=yes', function () { + doOpen(localhtml, 'random_string', 'location=no, disallowoverscroll=yes'); + }, 'openLocalRandomNoLocation'); + createActionButton('target=Random, toolbarposition=bottom', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=bottom'); + }, 'openLocalRandomToolBarBottom'); + createActionButton('target=Random, toolbarposition=top', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top'); + }, 'openLocalRandomToolBarTop'); + createActionButton('target=Random, toolbarposition=top, location=no', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top,location=no'); + }, 'openLocalRandomToolBarTopNoLocation'); + + //White Listed + createActionButton('* target=Default', function () { + doOpen('http://cordova.apache.org'); + }, 'openWhiteListed'); + createActionButton('* target=Default (window.open)', function () { + doHookOpen('http://cordova.apache.org'); + }, 'openWhiteListedHook'); + createActionButton('* target=_self', function () { + doOpen('http://cordova.apache.org', '_self'); + }, 'openWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://cordova.apache.org', '_system'); + }, 'openWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://cordova.apache.org', '_blank'); + }, 'openWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://cordova.apache.org', 'random_string'); + }, 'openWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://cordova.apache.org', 'random_string', 'location=no'); + }, 'openWhiteListedRandomNoLocation'); + + //Non White Listed + createActionButton('target=Default', function () { + doOpen('http://www.apple.com'); + }, 'openNonWhiteListed'); + createActionButton('target=Default (window.open)', function () { + doHookOpen('http://www.apple.com'); + }, 'openNonWhiteListedHook'); + createActionButton('target=_self', function () { + doOpen('http://www.apple.com', '_self'); + }, 'openNonWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://www.apple.com', '_system'); + }, 'openNonWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://www.apple.com', '_blank'); + }, 'openNonWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://www.apple.com', 'random_string'); + }, 'openNonWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://www.apple.com', 'random_string', 'location=no'); + }, 'openNonWhiteListedRandomNoLocation'); + + //Page with redirect + createActionButton('http://google.co.uk', function () { + doOpen('http://google.co.uk', 'random_string', '', 1); + }, 'openRedirect301'); + createActionButton('http://goo.gl/pUFqg', function () { + doOpen('http://goo.gl/pUFqg', 'random_string', '', 2); + }, 'openRedirect302'); + + //PDF URL + createActionButton('Remote URL', function () { + doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf'); + }, 'openPDF'); + createActionButton('Local URL', function () { + doOpen(localpdf, '_blank'); + }, 'openPDFBlank'); + + //Invalid URL + createActionButton('Invalid Scheme', function () { + doOpen('x-ttp://www.invalid.com/', '_blank'); + }, 'openInvalidScheme'); + createActionButton('Invalid Host', function () { + doOpen('http://www.inv;alid.com/', '_blank'); + }, 'openInvalidHost'); + createActionButton('Missing Local File', function () { + doOpen('nonexistent.html', '_blank'); + }, 'openInvalidMissing'); + + //CSS / JS injection + createActionButton('Original Document', function () { + doOpen(injecthtml, '_blank'); + }, 'openOriginalDocument'); + createActionButton('CSS File Injection', function () { + openWithStyle(injecthtml, injectcss); + }, 'openCSSInjection'); + createActionButton('CSS File Injection (callback)', function () { + openWithStyle(injecthtml, injectcss, true); + }, 'openCSSInjectionCallback'); + createActionButton('CSS Literal Injection', function () { + openWithStyle(injecthtml); + }, 'openCSSLiteralInjection'); + createActionButton('CSS Literal Injection (callback)', function () { + openWithStyle(injecthtml, null, true); + }, 'openCSSLiteralInjectionCallback'); + createActionButton('Script File Injection', function () { + openWithScript(injecthtml, injectjs); + }, 'openScriptInjection'); + createActionButton('Script File Injection (callback)', function () { + openWithScript(injecthtml, injectjs, true); + }, 'openScriptInjectionCallback'); + createActionButton('Script Literal Injection', function () { + openWithScript(injecthtml); + }, 'openScriptLiteralInjection'); + createActionButton('Script Literal Injection (callback)', function () { + openWithScript(injecthtml, null, true); + }, 'openScriptLiteralInjectionCallback'); + + //Open hidden + createActionButton('Create Hidden', function () { + openHidden('https://www.google.co.uk', true); + }, 'openHidden'); + createActionButton('Show Hidden', function () { + showHidden(); + }, 'showHidden'); + createActionButton('Close Hidden', function () { + closeHidden(); + }, 'closeHidden'); + createActionButton('google.co.uk Not Hidden', function () { + openHidden('https://www.google.co.uk', false); + }, 'openHiddenShow'); + + //Clearing cache + createActionButton('Clear Browser Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearcache=yes'); + }, 'openClearCache'); + createActionButton('Clear Session Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearsessioncache=yes'); + }, 'openClearSessionCache'); + + //Video tag + createActionButton('Remote Video', function () { + doOpen(videohtml, '_blank'); + }, 'openRemoteVideo'); + createActionButton('Remote Need User No Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=no'); + }, 'openRemoteNeedUserNoVideo'); + createActionButton('Remote Need User Yes Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=yes'); + }, 'openRemoteNeedUserYesVideo'); + + //Local With Anchor Tag + createActionButton('Anchor1', function () { + doOpen(localhtml + '#bogusanchor', '_blank'); + }, 'openAnchor1'); + createActionButton('Anchor2', function () { + doOpen(localhtml + '#anchor2', '_blank'); + }, 'openAnchor2'); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css new file mode 100644 index 0000000..5762c74 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.inAppBrowserWrap { + margin: 0; + padding: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: 0 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9999999; + box-sizing: border-box; + border: 40px solid #bfbfbf; + border: 40px solid rgba(0, 0, 0, 0.25); +} + +.inAppBrowserWrapFullscreen { + border: 0; +} + +.inappbrowser-app-bar { + height: 70px; + background-color: #404040; + z-index: 9999999; +} + +.inappbrowser-app-bar-inner { + padding-top: 10px; + height: 60px; + width: 155px; + margin: 0 auto; + background-color: #404040; + z-index: 9999999; +} + +.app-bar-action { + width: auto; + height: 40px; + margin-left: 20px; + font-family: "Segoe UI Symbol"; + float: left; + color: white; + font-size: 12px; + text-transform: lowercase; + text-align: center; + cursor: default; +} + +.app-bar-action[disabled] { + color: gray; + /*disable click*/ + pointer-events: none; +} + +.app-bar-action::before { + font-size: 28px; + display: block; + height: 36px; +} + +/* Back */ +.action-back { + margin-left: 0px; +} + +.action-back::before { + content: "\E0BA"; +} + +.action-back:not([disabled]):hover::before { + content: "\E0B3"; +} + +/* Forward */ +.action-forward::before { + content: "\E0AC"; +} + +.action-forward:not([disabled]):hover::before { + content: "\E0AF"; +} + +/* Close */ +.action-close::before { + content: "\E0C7"; + /* close icon is larger so we re-size it to fit other icons */ + font-size: 20px; + line-height: 40px; +} + +.action-close:not([disabled]):hover::before { + content: "\E0CA"; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..25f6271 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,111 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js new file mode 100644 index 0000000..42d15d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -0,0 +1,129 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +/*jslint sloppy:true */ +/*global Windows:true, require, document, setTimeout, window, module */ + + +var cordova = require('cordova'), + channel = require('cordova/channel'); + +var browserWrap; + +var IAB = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + } + }, + show: function (win, lose) { + /* empty block, ran out of bacon? + if (browserWrap) { + + }*/ + }, + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features = args[2], + url, + elem; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_blank") { + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.width = (window.innerWidth - 80) + "px"; + browserWrap.style.height = (window.innerHeight - 80) + "px"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + browserWrap.style.zIndex = "9999999"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + var localFile = (strUrl.indexOf('ms-appdata:///') > -1); + if (localFile) { + elem = document.createElement("x-ms-webview"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + + } else { + elem = document.createElement("iframe"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + } + + browserWrap.appendChild(elem); + } else { + window.location = strUrl; + } + + //var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl }); + + }, + + injectScriptCode: function (code, bCB) { + + // "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)" + }, + + injectScriptFile: function (file, bCB) { + + } +}; + +module.exports = IAB; + + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/fetch.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/fetch.json new file mode 100644 index 0000000..2987041 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/fetch.json @@ -0,0 +1,18 @@ +{ + "molpay-mobile-xdk-cordova": { + "source": { + "type": "local", + "path": "../molpay-mobile-xdk-cordova" + }, + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-inappbrowser": { + "source": { + "type": "registry", + "id": "cordova-plugin-inappbrowser" + }, + "is_top_level": false, + "variables": {} + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d05688e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png new file mode 100644 index 0000000..16f1bde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html new file mode 100644 index 0000000..9272260 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +
    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js new file mode 100644 index 0000000..f62b4ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('"6V 7S";1u.1z("1w",["8b","7p","7o","7h-3p","r.4e","89.7w","7x","7v.7u","3i-20","2w"]).4w("6q",q(){W{3Z:q(a){W a.4U=7s,a}}}).7t(["$7y","$7z",q(a,b){a.3L("/",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2p",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2s",{2b:"1g/2s.1c",1h:"6p",3s:"2s"}).3L("/27",{2b:"1g/27.1c",1h:"6f",3s:"27"}).7E({7F:"/"}),b.7D.7C("6q")}]).6H(["$2k","$31","$4T","3p","4j","4e","5Y","$1A","4x",q(a,b,c,d,e,f,g,h,i){7A.7B(7r.2l),a.z=!1,a.5E="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7q",a.3W="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7g",a.47="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7f",a.1Q="2O://2a.2S.2R.2E/28/2x/7e/2V.2F",a.4c="2O://2a.2S.2R.2E/28/2x/7c/2V.2F",a.2U="",a.1s="",a.2y="",a.7d="7i://",a.6J="7j://",a.4E="7n://",a.6r="7m://",a.2W="7k://",a.6M="2O://2a.2S.2R.2E/28/1x.2F",a.7G="#7H",a.6o="#1i",a.2u=!1,a.6Q=["82","83","81","80","7Y","7Z","6u-84","6u-85"],a.14={3X:"8a 1k",41:"7b 88, 50 4X 86 87, 7X 1Z, 7W 7M 7N",4u:"65 1b 1F, 50 4X 5H w",6t:"2K w 1H 1F",6x:"2L w 1H 1F",6y:"Y w 1H 1F",6E:"1K w 1H 1F",6L:"1G w 1H 1F",6P:"17 w 1H 1F",5a:"1R w 1H 1F",5G:"1X w 1H 1F",5L:"2d 1X w",5R:"1v w 1H 1F",5M:"1J w 7L 2s 3Z 1H 1F"},a.7={2K:"",2L:"",Y:"",1K:"",1G:"",17:"",1R:"7I",1X:"2o",1v:"",36:!1,O:"",2j:!0,1f:"",1E:"",1S:"",1P:"",2m:"",5C:!1,3k:!1,7J:"",1J:"",1j:"",34:"",2B:"2",7O:"",48:"",37:"",2Q:"",1r:"",1m:"",1I:"",2z:"",2t:"",1O:"",U:!0,1D:"2o",3c:"4y",23:"",1d:"",2g:"",4t:"",2C:"1",26:"",2M:"",3r:"",2i:""},a.$2I("7.1D",q(){v b=g.4D(),c=h("1A")(b,a.7.1D,!0);c.J?a.7.3c=c[0][1]:a.7.1D=""}),a.$2I("7.1m",q(){v b=a.7.1m;b=b.3F(/\\//g,"");v c="";b.J>4&&(b=b.Q(0,4)),1===b.J&&(c=5O(b.Q(0,1)),c>1&&(b="")),2===b.J&&(c=5O(b.Q(0,2)),c>12&&(b=b.Q(0,1))),b.J>2&&(b=b.Q(0,2)+"/"+b.Q(2,b.J)),a.7.1m=b,5===a.7.1m.J&&(a.7.2z=a.7.1m.Q(0,2),a.7.2t=a.7.1m.Q(3,5))}),a.$2I("7.1d",q(){v b=a.7.1d;b.J>10&&(b=b.Q(0,10)),a.7.1d=b}),a.$2I("7.U",q(){1l(a.7.U)a.7.23="",a.7.1r="",a.7.1m="",a.7.1I="",a.7.1D="2o",a.7.3c="4y",a.7.2z="",a.7.2t="",a.7.1O="";21{v b=a.7.2M[0];1q 0!==b&&(a.7.23=b.7P+"******"+b.7U,a.7.1r="",a.7.1m=b.5N.Q(2,4)+"/"+b.5N.Q(0,2),a.7.1I=b.7V,a.7.1D=b.7T,a.7.1O=b.1O)}}),a.$2I("7.23",q(){v b=a.7.23;b=b.3F(/ /g,""),b.J>16&&(b=b.Q(0,16)),b.J>4&&b.J<=8?b=b.Q(0,4)+" "+b.Q(4,b.J):b.J>8&&b.J<=12?b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,b.J):b.J>12&&b.J<16&&(b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,b.J)),16===b.J&&(a.7.2Q=b,b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,16)),a.7.23=b}),a.$2I("7.1r",q(){v b=a.7.1r;b.J>4&&(b=b.Q(0,4)),a.7.1r=b}),a.5w=q(a){v b=!1,c=g.4D(),d=h("1A")(c,a,!0);W d.J&&(b=!0),b},a.5A=q(b){a.z&&A.B("5A: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].4F),c},a.6d=q(){v b=a.7.17,c=7R(b);c=5U*c,a.7.4t=c.5v(0)},a.3y=q(){W a.7.17?(1u.8c(a.7.17)&&(a.7.17=a.7.17.5v(2)),a.7.2K?a.7.2L?a.7.Y?a.7.1K?a.7.1G?a.7.1R?a.7.1X?a.5w(a.7.1X)?a.7.1v?(a.7.5P="70 "+d.2A(a.7.2K+":"+a.7.2L),a.7.48="6X 1.0.0",a.7.37=f.7a.77,a.7.2B="2",a.7.2C="1",a.7.5C=!1,a.7.36=!1,a.7.2j||(a.7.2j=!1),a.7.O?"2N"===a.7.O&&(a.7.2j=!0,a.7.2i="(2H 38 a 1b)"):(a.7.O="2N",a.7.2j=!0,a.7.2i="(2H 38 a 1b)"),a.7.1f||(a.7.1f=!1),a.7.1E&&a.7.1S&&a.7.1P&&a.7.2m&&a.7.1E||(a.7.1f=!0),a.7.3k||(a.7.3k=!1),a.7.1D="2o",a.7.3c="4y",a.7.U=!0,"2n"!==a.7.1j||a.7.1J?1q e.4V():1q i.1e({1k:a.14.5M})):1q i.1e({1k:a.14.5R}):1q i.1e({1k:a.14.5L}):1q i.1e({1k:a.14.5G}):1q i.1e({1k:a.14.5a}):1q i.1e({1k:a.14.6L}):1q i.1e({1k:a.14.6E}):1q i.1e({1k:a.14.6y}):1q i.1e({1k:a.14.6x}):1q i.1e({1k:a.14.6t})):1q i.1e({1k:a.14.6P})},a.73=q(){W a.7.37},a.4H=q(b){v c=!1,d=h("1A")(a.6Q,b,!0);W d.J&&(c=!0),c},a.4f=q(b){a.z&&A.B("4f: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].54),c},2T.3y=q(b){a.7=b,a.3y()},2T.72=q(b){v f=b.6T;a.z&&A.B("1M.6T: "+f);v g="";1l(f.6l(a.6M)>-1)a.z&&A.B("5T 1x 78"),a.2U=f,e.68(),g=a.4E,a.1C(g);21 1l(f.6l(a.6o)>-1)20(a.7.O){1o"6W":1o"75":1o"71":1o"74":1o"76":c.79(a.1Q).2v(q(){a.z&&A.B("5r 2c: 6U, \\6Z 5Q 5k"+a.1Q);v b="6Y()",c=d.2A(b);g=a.6r+c,a.z&&A.B("8z 1i 9j, 9i 9h 3t = "+g),a.1C(g)},q(){a.z&&A.B("5r 2c: 9f, \\9g 5Q 5k "+a.1Q),a.3l()});22;6R:a.z&&A.B("9k 1b 1i 4O\'t 4Q a 4K"),a.5F(a.7.O+" 1b 1i 4O\'t 4Q a 4K")}},a.6N=q(){v b=a.4E;a.1C(b)},a.3l=q(){e.4n(),a.6N()},2T.3l=q(){a.3l()},a.4L=q(){"2n"===a.7.1j&&a.7.1J&&""!==a.7.1J?a.3a():a.7.1J&&""!==a.7.1J?a.3a():e.4n()},2T.4L=q(){a.4L()},a.1C=q(b){v c=b,d=f.66;a.z&&A.B("1C 66 I:"+1a.19(d,18,"")),"9l"===d&&(c=b.3F(/\\+/g,"-"),c=c.3F(/\\=/g,"9q")),a.z&&A.B("1C: \\6i: "+c),2T.31=c},a.5m=q(){a.3y(),b.2J("/2p")}}]),1u.1z("1w").1h("9p",q(){}),1u.1z("1w").1h("4a",["$1V","$2k","$31","$9o","4j",q(a,b,c,d,e){a.4Y=q(){1l(b.7.2j){v c=d.3A({3B:!0,2b:"1g/56.1c",1h:"6e",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6m=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/53.1c",1h:"6n",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6a=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/6S.1c",1h:"6h",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6C=q(){v a=!1,c={};1l(c.6F="2d 4C 9m",c.1W="","2N"===b.7.O?(a=!0,c.1W="2H 38 a 4C 1b"):"25"===b.7.O||"3H"===b.7.O?!b.7.2Q||b.7.2Q.J<16?(a=!0,c.1W="2d 25 2r 2P"):!b.7.1r||b.7.1r.J<3?(a=!0,c.1W="2d 3d 2P"):!b.7.1m||b.7.1m.J<5?(a=!0,c.1W="2d 3j 42"):b.7.1I||(a=!0,c.1W="2d 57 1Z"):"3b"===b.7.O&&(!b.7.1d||b.7.1d.J<10?(a=!0,c.1W="2d 5Z 2P"):b.7.2g||(a=!0,c.1W="2d 5Z 6D")),a){v f=d.3A({3B:!0,2b:"1g/6G.1c",1h:"62",3n:"K",3m:{32:q(){W c}}});f.1x.2v(q(){},q(){})}21 b.4H(b.7.O)&&(b.7.1j="2n"),e.5f(),e.5d()}}]),1u.1z("1w").1h("6p",["$1V","$2k",q(a,b){a.3x={},a.3x.3g={9n:2,9e:60,9d:10,95:!1,94:"93",91:"2e",92:12,96:"",9s:"#97"},a.4Z=b.4f(b.S.1b)}]),1u.1z("1w").4w("4j",["3p","$4T","$2k","$4U","4e","4x","$31",q(a,b,c,d,e,f,g){v h={};W h.2G=q(a){W 5I.2G(a).1B()},h.29=q(a){W 5I.29(a).1B()},h.1t=q(a,b){W"9c="+a+"&9b="+1a.19(b,18,"")},h.1U=q(a,d){c.2u=!0;v e={5z:"5x",3t:a,5t:{5s:"3I/3Q",9a:c.7.5P,"5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q","98-99":c.7.48},1M:d};b(e).2v(q(b){1l(c.2u=!1,b.1M.2c)c.z&&A.B("2x 9r 6s 1M 9D 2c:"+b.1M.2c),f.3w(a,b.1M.1x);21 1l("9C"===b.5y){1l(c.z&&A.B("2x 9F: \\n"+1a.19(b.1M,18,"")),b.1M.2c===!1)20(b.1M.1x.9G){1o 9u:1o 9v:c.z&&A.B(c.14.41),f.1e({1k:c.14.41});22;1o 9A:c.7.U=!0}(a===c.1Q||a===c.2U)&&f.3w(a,b.1M)}21 c.z&&A.B("9E 5x 3Z 63: "+b.5y)},q(){c.2u=!1,c.z&&A.B(c.14.3X),f.1e({1k:c.14.3X})})},h.9w=q(a){c.2u=!0;v d={5z:"9y",3t:a,5t:{5s:"3I/3Q","5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q"}};b(d).2v(q(){c.2u=!1},q(){c.2u=!1,c.z&&A.B("9z 9x 9t")})},h.2X=q(){c.z&&A.B("(R 1) 3u:"+c.7.1v);v a=h.2G(c.7.1v).1B(),b=c.7.Y+c.7.1K+a;c.z&&A.B("(R 2) 9B + 8d + 8Z(3u):"+b);v d=h.29(b).1B();W c.z&&A.B("(R 3) 29(8u 33 R 2):"+d),d},h.4i=q(a){v b="";1l(c.7.36)b=c.7.1v;21{v d=c.7.17,e=c.7.Y,f=c.7.1G,g=c.7.1v,i=a;b=h.2G(d+e+f+g+i).1B()}W b},h.6z=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1J,f=c.7.1v,g="46";a=h.2G(d+g+e+b+f).1B()}W a},h.4v=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1G,f=c.7.1v,g="40",i=d+g+e+b+f;c.z&&A.B("4v 8t:"+i),a=h.2G(i).1B()}W a},c.5F=q(a){v b=c.5E,d=c.7.Y+a+c.7.37,e=d+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+e);v f=h.29(e).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+f);v g={4d:c.7.Y,8s:a+c.7.37},i=h.1t(f,g);c.z&&A.B("(R 6) 2h 1t:"+i),h.1U(b,i)},h.51=q(){v a=c.3W,b=c.7.Y+c.7.1R,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y,5H:c.7.1R},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5j=q(){v a=c.47,b=c.7.Y,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5e=q(){v a="8v",b="0",d=c.4c,e=c.7.Y+c.7.1E+c.7.1S+c.7.1P+c.7.1K+a+b,f=e;c.z&&A.B("(R 4) 3K 3M:"+f);v g=h.29(f).1B(),i=g+h.2X();c.z&&A.B("(R 5) 3N(1x 33 R 4) + 3T 3G:"+i);v j={2Y:c.7.Y,4m:c.7.1E,4k:c.7.1S,4l:c.7.1P,4q:c.7.1K,30:a,1A:b},k=h.1t(i,j);c.z&&A.B("(R 6) 2h 1t:"+k),h.1U(d,k)},h.4V=q(){h.51(),h.5j(),h.5e()},h.5d=q(){c.1s="6c";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.5f=q(){c.1s="6k";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),h.1U(b,d)},h.68=q(){v a=c.2U,b="";c.z&&A.B("8x 5T 6s 3t:"+a),h.1U(a,b)},c.3a=q(){c.1s="46";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,4s:c.7.1J,3f:c.7.17,34:h.6z(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.4n=q(){c.1s="40";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,8q:c.7.1G,3f:c.7.17,34:h.4v(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h}]),1u.1z("1w").4w("4x",["$2k","3p","$31","$1A",q(a,b,c,d){v e={};W e.3V=q(b){1l(b){1l(a.7.26=b,0===a.7.26.J&&(a.z&&A.B(a.14.4u),e.1e({1k:a.14.4u})),"2N"!==a.7.O){v c=d("1A")(a.7.26,{4F:a.7.O},!0);c.J?a.7.2i=c[0].4G:(a.7.O="2N",a.7.2i="(2H 38 a 1b)")}21 a.7.O="2N",a.7.2i="(2H 38 a 1b)";"2n"===a.7.1j&&a.3a()}a.z&&A.B("3V: \\1Y: "+1a.19(a.7.26,18,""))},e.3Y=q(b){b&&(a.7.2M=b,a.7.2M.J>0?a.7.U=!1:a.7.U=!0),a.z&&A.B("3Y: \\1Y: "+1a.19(a.7.2M,18,""))},e.49=q(b){b&&(a.7.3r=b),a.z&&A.B("49: \\1Y: "+1a.19(a.7.3r,18,""))},e.4b=q(c){a.z&&A.B("4b: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.6J+d;a.1C(e)},e.6K=q(c){a.z&&A.B("6K: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.44=q(b){a.2y=b,a.z&&A.B("44: \\1Y: "+1a.19(a.2y,18,"")),a.2y&&""!==a.2y&&(a.7.1J=a.2y.8e,a.7.34=a.2y.34,a.3a())},e.45=q(d){a.S=d,a.7.1j&&(a.S.1j=a.7.1j,"2n"===a.S.1j&&a.S&&a.S.3C&&"11"==a.S.3C&&(a.z&&A.B("2n 2c 63, 8j 8k 8o"),a.S.1j="")),a.z&&A.B("45: \\1Y: "+1a.19(a.S,18,""));v e=b.2A(1a.19(a.S,18,""));a.z&&A.B("35: \\39: "+e);v f=a.2W+e;a.1C(f),"2n"===a.7.1j&&a.S&&a.S.3C&&"11"!==a.S.3C&&c.2J("/2s")},e.3z=q(c){a.3D=c,a.7.1j&&(a.3D.1j=a.7.1j),a.z&&A.B("3z: \\1Y: "+1a.19(a.3D,18,""));v d=b.2A(1a.19(a.3D,18,""));a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.1e=q(d){v e=d;e.61=a.7.61,c.2J("/27"),a.z&&A.B("1e: \\1Y: "+1a.19(d,18,""));v f=b.2A(1a.19(d,18,""));a.z&&A.B("35: \\39: "+f);v g=a.2W+f;a.1C(g)},e.3w=q(b,c){20(a.z&&A.B("3w: \\6i: "+b),b){1o a.3W:e.3V(c);22;1o a.4c:e.3Y(c);22;1o a.47:e.49(c);22;1o a.8C:e.8S(c);22;1o a.1Q:"6c"===a.1s?e.4b(c):"46"===a.1s?e.45(c):"40"===a.1s?e.3z(c):"6k"===a.1s&&e.3z(c);22;1o a.2U:e.44(c);22;6R:a.z&&A.B("8P 4O\'t 4Q a 4K")}},e}]),1u.1z("1w").1h("6f",q(){}),1u.1z("1w").1h("6e",["$1V","$3v","$2k",q(a,b,c){a.5i=q(a){c.7.O=a.4F,c.7.2i=a.4G,"3b"===c.7.O?c.6d():c.4H(c.7.O)?c.7.1j="2n":c.7.1j="",b.2q()},a.1i=q(){b.2q()}}]),1u.1z("1w").1h("6h",["$2k","$1V","$3v",q(a,b,c){b.55=q(b){a.7.1I=b.1Z,c.2q()},b.1i=q(){c.2q()}}]),1u.1z("1w").1h("6n",["$1V","5Y","$2k","$3v",q(a,b,c,d){a.5S=b.4D(),a.5J=q(a){c.7.1D=a[0],d.2q()},a.1i=q(){d.2q()}}]),1u.1z("1w").1h("62",["$1V","$3v","32",q(a,b,c){a.32=c,a.1i=q(){b.2q()}}]),1u.1z("1w").6H(["$8W",q(a){a.2f("1g/6G.1c",\' <6v>{{32.6F}} <6B>{{32.1W}} 4B \'),a.2f("1g/6S.1c",\' {{ C.1Z }} 4B \'),a.2f("1g/56.1c",\' {{ C.4G }} &1p; <3h 9="1b-4W" r-4h="{{ C.54 }}"> 4B \'),a.2f("1g/53.1c",\' {{ C[1] }} 8F \'),a.2f("1g/27.1c","

    8D 4C 2c.

    2H 8I.

    "),a.2f("1g/8M.1c",\'

    <67>28 X-8L

    1v 2m 1G 2K 1E 1X 1R Y 1S 1P 1K 2L 17 3k O 5b \'),a.2f("1g/2p.1c",\' 8H 5K {{7.1G}} {{7.1R}} {{7.17}} &1p; &1p; &1p; &1p; 5b 8N &1p; {{7.2i}} 8V 2r <3i-20 r-P="7.U" 9="4N-25-2r-20" 8X-u="8Y" 8U-u="65"><3i-20> 6I 2P &1p; 6b &1p; 6A 42 &1p; 8B &1p; {{7.3c}} 69 1Z &1p; {{7.1I}} 8l 5V 8m (8n = 5U 5V 8f) {{7.4t}} 6I# 8g 43 &1p; 8p &1p; 8y <3h r-4h="90/5h.8A" 9="5h"> \'),a.2f("1g/2s.1c",\' <3h 9="2s-4W" r-4h="{{ 4Z }}"> 8w 28 {{S.1b}} 8r 5K {{S.4s}} <2w I="5l" 5u="3h" 5W="{{S.4s}}" 3g="3x.3g"> {{S.5B}} {{S.6j}} <2w I="5l" 5u="3h" 5W="{{S.6j}}" 3g="3x.3g"> 7Q 3f {{S.4r}}{{S.7K}} 7l <6g 9="s-y-C 13-s-y-C 4z" r-3o="C 3q S.4z"> {{ C }} \')}]);',62,602,'|||||||sdkData||class||||||||||||div|span||||function|ng|list||label|var|value||group|isInternalDebugging|console|log|item|form|right|fa|pull|input|type|length|sm|control|col|text|mp_channel|model|substring|Step|C5ResultData|click|new_credit_card|button|return||mp_merchant_ID|left||||modal|sdkConstants|show||mp_amount|null|stringify|JSON|channel|html|bcard_no|commErrorHandler|mp_editing_enabled|views|controller|close|mp_request_type|Error|if|mp_credit_card_expiry|placeholder|case|nbsp|void|mp_credit_card_cvv|CurrentMsgType|Payload|angular|mp_verification_key|molpayXsdkApp|result|search|module|filter|toString|callNativeWebview|mp_credit_card_country|mp_bill_name|found|mp_order_ID|not|mp_credit_card_bank|mp_transaction_id|mp_app_name|circle|data|lg|token|mp_bill_mobile|MobileNewApiUrl|mp_currency|mp_bill_email|times|HttpPost|scope|errorDesc|mp_country|nresult|name|switch|else|break|mp_credit_card_no_display|hide|credit|available_channel|finalizingpayment|MOLPay|SHA1|www|templateUrl|status|Invalid|center|put|bcard_pin|The|mp_channel_title|mp_channel_editing|rootScope|body|mp_bill_description|Receipt|MY|paymentinfo|dismiss|card|receipt|year|isLoading|then|barcode|API|B4ResultData|month|encode|l_version|token_status|readonly|my|php|MD5|Please|watch|path|mp_username|mp_password|available_token|multi|https|number|mp_credit_card_no|com|onlinepayment|window|B4ResultUrl|index|nativeWebTransactionResults|PasswordHash|merchant_id|country|msgType|location|alertdata|of|chksum|htmlStringBase64|mp_is_secure|device_info|select|nhtmlStringBase64|ApiC5|pointbcard|mp_credit_card_country_title|cvv|tel|amount|options|img|toggle|exp|mp_debug_mode|closemolpay|resolve|size|repeat|base64|in|available_banklist|controllerAs|url|vcode|uibModalInstance|OnApiResponseReceived|vm|updateSdkData|D7Handler|open|animation|status_code|D7ResultData|xxxx|replace|password|credit3|application|Billing|all|when|variables|sha1|billing|mobile|json|Type|footer|checksum|chevron|GetAvailableChannelByIdHandler|GetAvailableChannelByIdUrl|CommunicationError|T1Handler|request|D7|AccessDeniedMidAppnameVerificationkey|date||B4Handler|C5Handler|C5|GetBankListUrl|sdk_version|GetBankListHandler|PaymentInfoCtrl|B3Handler|T1Url|merchantID|deviceDetector|getChannelLogoFromChannelName|row|src|VcodeHash|AuthenticationService|bill_email|bill_mobile|bill_name|ApiD7|split|bcard|app_name|cur|txn_ID|bcard_point|NoChannelFoundCheckCurrencyValue|ChecksumForD7|factory|ApiHandlerService|Malaysia|notes|bar|CLOSE|payment|getCountries|nativeWebCloseAllWindows|maskname|title|checkIfThisIsACashChannel|header|InternalUsed|handler|transactionRequest|Payment|new|doesn|opt|have|icon|mod|http|timeout|PreloadData|logo|check|onChannelListClicked|toplogourl|please|ApiGetAvailableChannelById|Search|countrylistmodal|logo_url|onBankSelected|channelmodal|bank|bank_name|cardnumber|CurrencyNotFound|Pay|orderid|ApiB3|ApiT1|ApiB3A|bill_desc|poweredByMOLPay|onChannelSelected|ApiGetBankList|to|code128c|onPayClicked|Content|urlencoded|Data|container|Online|Accept|headers|render|toFixed|checkIfThisIsAValidCountryCode|POST|statusText|method|getChannelMasknameFromChannelName|pcode_lbl|mp_is_escrow|proceed|PaymentRecordsLogUrl|ApiRecordsLog|CountryNotFound|currency|CryptoJS|onCountrySelected|ID|InvalidCountryCode|TransactionIdForReceiptRequestNotFound|expdate|parseInt|authData|connect|VerificationKeyNotFound|countryArray|B4|100|BCARD|string|MM|Countries|BCard||mp_transaction_request_type|AlertModalCtrl|failed|point|No|device|h2|ApiB4|Bank|onBanklistClicked|CVV|B3|updateBCardPoints|ChannelModalCtrl|FinalizingPaymentCtrl|li|BanklistModalCtrl|nurl|pcode|B3A|indexOf|onCountrylistClicked|CountrylistModalCtrl|manualCloseHandler|ReceiptCtrl|timeoutHttpIntercept|nativeWebClosePopupAndRunScriptOnMOLPayWindow|with|UsernameNotFound|Cash|h4|larger|PasswordNotFound|MerchantIdNotFound|ChecksumForC5|Exp|h5|proceedClicked|pin|AppNameNotFound|errorTitle|alertmodal|run|Card|nativeWebOpenMOLPayWindow|B3AHandler|OrderIdNotFound|molpayResultString|closeAll|xxx|AmountNotFound|sdkCashChannelList|default|banklistmodal|requestPath|YES|use|maybank2u|XP|actionForWindowClose|nCan|Basic|MOLWallet|nativeWebRequestUrlUpdates|getDeviceInfo|hlb|cimb|amb|userAgent|returned|get|raw|Access|chips|nativeWebOpenPopup|mobile_new|GetBankList|GetAvailableChannelById|ab|mpopenpopup|mpopenmolpaywindow|mptransactionresults|Note|mpclosepopupandrunscriptonmolpaywindow|mpcloseallwindows|ngTouch|ngSanitize|recordsLog|document|1e4|config|countries|maha|bootstrap|creditCardInput|routeProvider|httpProvider|FastClick|attach|push|interceptors|otherwise|redirectTo|manualPopupHandler|popup|MYR|mp_url_scheme|payable_amt|for|verification|key|mp_authData|bin|Payable|parseFloat|strict|bank_country|bin4|issuer_bank|or|app|webcash|paylink|esapay|singpost|epay|cash|MBBCDM|PermataBank|merchant|id|denied|ui|Communication|ngRoute|isNumber|appName|tranID|Points|6298|Last|digit|just|send|Use|points|RM1|results|Pin|order_ID|Transaction|message|checksumString|Result|T1|Services|Get|PROCEED|Manual|png|Country|ApiGenBarcode|Finalizing|email|Close|description|Order|wait|offset|horizontal|Platform|main|through|creditcard|Response|cvc|YYYY|GenBarcodeHandler|YY|off|New|templateCache|on|Yes|md5|images|textAlign|fontSize|monospace|font|displayValue|backgroundColor|000|SDK|Version|Authorization|Params|Checksum|quite|height|NO|nCannot|step|next|detected|This|iphone|information|width|uibModal|MainCtrl|_|responded|lineColor|Sent|1001|1002|HttpGet|Not|GET|Request|1003|mID|OK|and|Http|Returned|code|checkbox'.split('|'),0,{})) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js new file mode 100644 index 0000000..8d978f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js @@ -0,0 +1,11 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a,b,c){"use strict";function d(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function f(a,b,c){var d,g;if(a)if(A(a))for(d in a)"prototype"==d||"length"==d||"name"==d||a.hasOwnProperty&&!a.hasOwnProperty(d)||b.call(c,a[d],d,a);else if(Td(a)||e(a)){var h="object"!=typeof a;for(d=0,g=a.length;g>d;d++)(h||d in a)&&b.call(c,a[d],d,a)}else if(a.forEach&&a.forEach!==f)a.forEach(b,c,a);else if(w(a))for(d in a)b.call(c,a[d],d,a);else if("function"==typeof a.hasOwnProperty)for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);else for(d in a)Cd.call(a,d)&&b.call(c,a[d],d,a);return a}function g(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(v(g)||A(g))for(var h=Object.keys(g),i=0,l=h.length;l>i;i++){var m=h[i],n=g[m];c&&v(n)?z(n)?a[m]=new Date(n.valueOf()):B(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):L(n)?a[m]=n.clone():(v(a[m])||(a[m]=Td(n)?[]:{}),k(a[m],[n],!0)):a[m]=n}}return j(a,d),a}function l(a){return k(a,Ld.call(arguments,1),!1)}function m(a){return k(a,Ld.call(arguments,1),!0)}function n(a){return parseInt(a,10)}function o(a,b){return l(Object.create(a),b)}function p(){}function q(a){return a}function r(a){return function(){return a}}function s(a){return A(a.toString)&&a.toString!==Od}function t(a){return"undefined"==typeof a}function u(a){return"undefined"!=typeof a}function v(a){return null!==a&&"object"==typeof a}function w(a){return null!==a&&"object"==typeof a&&!Pd(a)}function x(a){return"string"==typeof a}function y(a){return"number"==typeof a}function z(a){return"[object Date]"===Od.call(a)}function A(a){return"function"==typeof a}function B(a){return"[object RegExp]"===Od.call(a)}function C(a){return a&&a.window===a}function D(a){return a&&a.$evalAsync&&a.$watch}function E(a){return"[object File]"===Od.call(a)}function F(a){return"[object FormData]"===Od.call(a)}function G(a){return"[object Blob]"===Od.call(a)}function H(a){return"boolean"==typeof a}function I(a){return a&&A(a.then)}function J(a){return a&&y(a.length)&&Ud.test(Od.call(a))}function K(a){return"[object ArrayBuffer]"===Od.call(a)}function L(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function M(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function P(a,b){function d(a,b){var c,d=b.$$hashKey;if(Td(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(w(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Cd.call(a,c)&&(b[c]=e(a[c]));return j(b,d),b}function e(a){if(!v(a))return a;var b=h.indexOf(a);if(-1!==b)return i[b];if(C(a)||D(a))throw Qd("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var e=!1,f=g(a);return f===c&&(f=Td(a)?[]:Object.create(Pd(a)),e=!0),h.push(a),i.push(f),e?d(a,f):f}function g(a){switch(Od.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c}return A(a.cloneNode)?a.cloneNode(!0):void 0}var h=[],i=[];if(b){if(J(b)||K(b))throw Qd("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Qd("cpi","Can't copy! Source and destination are identical.");return Td(b)?b.length=0:f(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),h.push(a),i.push(b),d(a,b)}return e(a)}function Q(a,b){if(Td(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(v(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function R(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Td(a)){if(z(a))return z(b)?R(a.getTime(),b.getTime()):!1;if(B(a))return B(b)?a.toString()==b.toString():!1;if(D(a)||D(b)||C(a)||C(b)||Td(b)||z(b)||B(b))return!1;e=ra();for(d in a)if("$"!==d.charAt(0)&&!A(a[d])){if(!R(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&u(b[d])&&!A(b[d]))return!1;return!0}if(!Td(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!R(a[d],b[d]))return!1;return!0}}return!1}function S(a,b,c){return a.concat(Ld.call(b,c))}function T(a,b){return Ld.call(a,b||0)}function U(a,b){var c=arguments.length>2?T(arguments,2):[];return!A(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,S(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function V(a,d){var e=d;return"string"==typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?e=c:C(d)?e="$WINDOW":d&&b===d?e="$DOCUMENT":D(d)&&(e="$SCOPE"),e}function W(a,b){return t(a)?c:(y(b)||(b=b?2:null),JSON.stringify(a,V,b))}function X(a){return x(a)?JSON.parse(a):a}function Y(a,b){a=a.replace(Zd,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function Z(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function $(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=Y(b,d);return Z(a,c*(e-d))}function _(a){a=Id(a).clone();try{a.empty()}catch(b){}var c=Id("
    ").append(a).html();try{return a[0].nodeType===de?Dd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Dd(b)})}catch(b){return Dd(c)}}function aa(a){try{return decodeURIComponent(a)}catch(b){}}function ba(a){var b={};return f((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=aa(d),u(d)&&(e=u(e)?aa(e):!0,Cd.call(b,d)?Td(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function ca(a){var b=[];return f(a,function(a,c){Td(a)?f(a,function(a){b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}):b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}),b.length?b.join("&"):""}function da(a){return ea(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ea(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function fa(a,b){var c,d,e=$d.length;for(d=0;e>d;++d)if(c=$d[d]+b,x(c=a.getAttribute(c)))return c;return null}function ga(a,b){var c,d,e={};f($d,function(b){var e=b+"app";!c&&a.hasAttribute&&a.hasAttribute(e)&&(c=a,d=a.getAttribute(e))}),f($d,function(b){var e,f=b+"app";!c&&(e=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(f))}),c&&(e.strictDi=null!==fa(c,"strict-di"),b(c,d?[d]:[],e))}function ha(c,d,e){v(e)||(e={});var g={strictDi:!1};e=l(g,e);var h=function(){if(c=Id(c),c.injector()){var a=c[0]===b?"document":_(c);throw Qd("btstrpd","App Already Bootstrapped with this Element '{0}'",a.replace(//,">"))}d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),e.debugInfoEnabled&&d.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),d.unshift("ng");var f=eb(d,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},i=/^NG_ENABLE_DEBUG_INFO!/,j=/^NG_DEFER_BOOTSTRAP!/;return a&&i.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(i,"")),a&&!j.test(a.name)?h():(a.name=a.name.replace(j,""),Rd.resumeBootstrap=function(a){return f(a,function(a){d.push(a)}),h()},void(A(Rd.resumeDeferredBootstrap)&&Rd.resumeDeferredBootstrap()))}function ia(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ja(a){var b=Rd.element(a).injector();if(!b)throw Qd("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ka(a,b){return b=b||"_",a.replace(_d,function(a,c){return(c?b:"")+a.toLowerCase()})}function la(){var b;if(!ae){var d=Yd();Jd=t(d)?a.jQuery:d?a[d]:c,Jd&&Jd.fn.on?(Id=Jd,l(Jd.fn,{scope:we.scope,isolateScope:we.isolateScope,controller:we.controller,injector:we.injector,inheritedData:we.inheritedData}),b=Jd.cleanData,Jd.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Jd._data(d,"events"),c&&c.$destroy&&Jd(d).triggerHandler("$destroy");b(a)}):Id=Fa,Rd.element=Id,ae=!0}}function ma(a,b,c){if(!a)throw Qd("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function na(a,b,c){return c&&Td(a)&&(a=a[a.length-1]),ma(A(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function oa(a,b){if("hasOwnProperty"===a)throw Qd("badname","hasOwnProperty is not a valid {0} name",b)}function pa(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&A(a)?U(f,a):a}function qa(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Id(Ld.call(a,0,e))),b.push(c));return b||a}function ra(){return Object.create(null)}function sa(a){function b(a,b,c){return a[b]||(a[b]=c())}var c=d("$injector"),e=d("ng"),f=b(a,"angular",Object);return f.$$minErr=f.$$minErr||d,b(f,"module",function(){var a={};return function(d,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(d,"module"),f&&a.hasOwnProperty(d)&&(a[d]=null),b(a,d,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function b(a,b){return function(c,f){return f&&A(f)&&(f.$$moduleName=d),e.push([a,b,arguments]),k}}if(!f)throw c("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",d);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:d,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function ta(a){var b=[];return JSON.stringify(a,function(a,c){if(c=V(a,c),v(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function ua(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):t(a)?"undefined":"string"!=typeof a?ta(a):a}function va(b){l(b,{bootstrap:ha,copy:P,extend:l,merge:m,equals:R,element:Id,forEach:f,injector:eb,noop:p,bind:U,toJson:W,fromJson:X,identity:q,isUndefined:t,isDefined:u,isString:x,isFunction:A,isObject:v,isNumber:y,isElement:L,isArray:Td,version:he,isDate:z,lowercase:Dd,uppercase:Ed,callbacks:{counter:0},getTestability:ja,$$minErr:d,$$csp:Xd,reloadWithDebugInfo:ia}),(Kd=sa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:wc}),a.provider("$compile",ob).directive({a:Cf,input:Tf,textarea:Tf,form:Hf,script:Og,select:Rg,style:Tg,option:Sg,ngBind:Wf,ngBindHtml:Yf,ngBindTemplate:Xf,ngClass:$f,ngClassEven:ag,ngClassOdd:_f,ngCloak:bg,ngController:cg,ngForm:If,ngHide:Hg,ngIf:fg,ngInclude:gg,ngInit:ig,ngNonBindable:yg,ngPluralize:Cg,ngRepeat:Dg,ngShow:Gg,ngStyle:Ig,ngSwitch:Jg,ngSwitchWhen:Kg,ngSwitchDefault:Lg,ngOptions:Bg,ngTransclude:Ng,ngModel:vg,ngList:jg,ngChange:Zf,pattern:Vg,ngPattern:Vg,required:Ug,ngRequired:Ug,minlength:Xg,ngMinlength:Xg,maxlength:Wg,ngMaxlength:Wg,ngValue:Vf,ngModelOptions:xg}).directive({ngInclude:hg}).directive(Df).directive(dg),a.provider({$anchorScroll:fb,$animate:Me,$animateCss:Pe,$$animateJs:Ke,$$animateQueue:Le,$$AnimateRunner:Oe,$$animateAsyncRun:Ne,$browser:lb,$cacheFactory:mb,$controller:tb,$document:ub,$exceptionHandler:vb,$filter:Kc,$$forceReflow:Ue,$interpolate:Jb,$interval:Kb,$http:Fb,$httpParamSerializer:xb,$httpParamSerializerJQLike:yb,$httpBackend:Hb,$xhrFactory:Gb,$location:Yb,$log:Zb,$parse:qc,$rootScope:vc,$q:rc,$$q:sc,$sce:Ac,$sceDelegate:zc,$sniffer:Bc,$templateCache:nb,$templateRequest:Cc,$$testability:Dc,$timeout:Ec,$window:Hc,$$rAF:uc,$$jqLite:$a,$$HashMap:Ae,$$cookieReader:Jc})}])}function wa(){return++je}function xa(a){return a.replace(me,function(a,b,c,d){return d?c.toUpperCase():c}).replace(ne,"Moz$1")}function ya(a){return!re.test(a)}function za(a){var b=a.nodeType;return b===be||!b||b===fe}function Aa(a){for(var b in ie[a.ng339])return!0;return!1}function Ba(a){for(var b=0,c=a.length;c>b;b++)Ja(a[b])}function Ca(a,b){var c,d,e,g,h=b.createDocumentFragment(),i=[];if(ya(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),d=(se.exec(a)||["",""])[1].toLowerCase(),e=ue[d]||ue._default,c.innerHTML=e[1]+a.replace(te,"<$1>")+e[2],g=e[0];g--;)c=c.lastChild;i=S(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",f(i,function(a){h.appendChild(a)}),h}function Da(a,c){c=c||b;var d;return(d=qe.exec(a))?[c.createElement(d[1])]:(d=Ca(a,c))?d.childNodes:[]}function Ea(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Fa(a){if(a instanceof Fa)return a;var b;if(x(a)&&(a=Vd(a),b=!0),!(this instanceof Fa)){if(b&&"<"!=a.charAt(0))throw pe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Fa(a)}b?Pa(this,Da(a)):Pa(this,a)}function Ga(a){return a.cloneNode(!0)}function Ha(a,b){if(b||Ja(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ja(c[d])}function Ia(a,b,c,d){if(u(d))throw pe("offargs","jqLite#off() does not support the `selector` argument");var e=Ka(a),g=e&&e.events,h=e&&e.handle;if(h)if(b){var i=function(b){var d=g[b];u(c)&&O(d||[],c),u(c)&&d&&d.length>0||(le(a,b,h),delete g[b])};f(b.split(" "),function(a){i(a),oe[a]&&i(oe[a])})}else for(b in g)"$destroy"!==b&&le(a,b,h),delete g[b]}function Ja(a,b){var d=a.ng339,e=d&&ie[d];if(e){if(b)return void delete e.data[b];e.handle&&(e.events.$destroy&&e.handle({},"$destroy"),Ia(a)),delete ie[d],a.ng339=c}}function Ka(a,b){var d=a.ng339,e=d&&ie[d];return b&&!e&&(a.ng339=d=wa(),e=ie[d]={events:{},data:{},handle:c}),e}function La(a,b,c){if(za(a)){var d=u(c),e=!d&&b&&!v(b),f=!b,g=Ka(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];l(h,b)}}}function Ma(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function Na(a,b){b&&a.setAttribute&&f(b.split(" "),function(b){a.setAttribute("class",Vd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vd(b)+" "," ")))})}function Oa(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");f(b.split(" "),function(a){a=Vd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Vd(c))}}function Pa(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Qa(a,b){return Ra(a,"$"+(b||"ngController")+"Controller")}function Ra(a,b,c){a.nodeType==fe&&(a=a.documentElement);for(var d=Td(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(u(c=Id.data(a,d[e])))return c;a=a.parentNode||a.nodeType===ge&&a.host}}function Sa(a){for(Ha(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ta(a,b){b||Ha(a);var c=a.parentNode;c&&c.removeChild(a)}function Ua(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Id(c).on("load",b)}function Va(a,b){var c=xe[b.toLowerCase()];return c&&ye[N(a)]&&c}function Wa(a){return ze[a]}function Xa(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(t(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Ya;f>1&&(e=Q(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Ya(a,b,c){c.call(a,b)}function Za(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ve.call(a,d))&&c.call(a,b)}function $a(){this.$get=function(){return l(Fa,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Oa(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),Na(a,b)}})}}function _a(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||i)():d+":"+a}function ab(a,b){if(b){var c=0;this.nextUid=function(){return++c}}f(a,this.put,this)}function bb(a){var b=a.toString().replace(Fe,""),c=b.match(Be)||b.match(Ce);return c}function cb(a){var b=bb(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function db(a,b,c){var d,e,g;if("function"==typeof a){if(!(d=a.$inject)){if(d=[],a.length){if(b)throw x(c)&&c||(c=a.name||cb(a)),Ge("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);e=bb(a),f(e[1].split(De),function(a){a.replace(Ee,function(a,b,c){d.push(c)})})}a.$inject=d}}else Td(a)?(g=a.length-1,na(a[g],"fn"),d=a.slice(0,g)):na(a,"fn",!0);return d}function eb(a,b){function d(a){return function(b,c){return v(b)?void f(b,h(a)):a(b,c)}}function e(a,b){if(oa(a,"service"),(A(b)||Td(b))&&(b=y.instantiate(b)),!b.$get)throw Ge("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=C.invoke(b,this);if(t(c))throw Ge("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function i(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function j(a,b){return i(a,["$injector",function(a){return a.instantiate(b)}])}function k(a,b){return i(a,r(b),!1)}function l(a,b){oa(a,"constant"),w[a]=b,z[a]=b}function m(a,b){var c=y.get(a+q),d=c.$get;c.$get=function(){var a=C.invoke(d,c);return C.invoke(b,null,{$delegate:a})}}function n(a){ma(t(a)||Td(a),"modulesToLoad","not an array");var b,c=[];return f(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=y.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{x(a)?(b=Kd(a),c=c.concat(n(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):A(a)?c.push(y.invoke(a)):Td(a)?c.push(y.invoke(a)):na(a,"module")}catch(e){throw Td(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ge("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function o(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===p)throw Ge("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=p,a[b]=c(b,d)}catch(e){throw a[b]===p&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=eb.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Ge("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Hd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Td(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Td(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:eb.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var p={},q="Provider",s=[],u=new ab([],!0),w={$provide:{provider:d(e),factory:d(i),service:d(j),value:d(k),constant:d(l),decorator:m}},y=w.$injector=o(w,function(a,b){throw Rd.isString(b)&&s.push(b),Ge("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},B=o(z,function(a,b){var d=y.get(a+q,b);return C.invoke(d.$get,d,c,a)}),C=B;w["$injector"+q]={$get:r(B)};var D=n(a);return C=B.get("$injector"),C.strictDi=b,f(D,function(a){a&&C.invoke(a)}),C}function fb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===N(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(A(a))a=a();else if(L(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else y(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=x(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Ua(function(){d.$evalAsync(h)})}),h}]}function gb(a,b){return a||b?a?b?(Td(a)&&(a=a.join(" ")),Td(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function hb(a){for(var b=0;bj&&this.remove(n.key),b}},get:function(a){if(j";var d=ja.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function F(a,b){try{a.addClass(b)}catch(c){}}function G(a,c,d,e,f){a instanceof Id||(a=Id(a));for(var g=/\S+/,h=0,i=a.length;i>h;h++){var j=a[h];j.nodeType===de&&j.nodeValue.match(g)&&Ea(j,a[h]=b.createElement("span"))}var k=J(a,c,a,d,e,f);G.$$addScopeClass(a);var l=null;return function(b,c,d){ma(b,"scope"),f&&f.needsNewScope&&(b=b.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=I(h));var i;if(i="html"!==l?Id(ba(l,Id("
    ").append(a).html())):c?we.clone.call(a):a,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return G.$$addScopeInfo(i,b),c&&c(i,b),k&&k(b,i,i,e),i}}function I(a){var b=a&&a[0];return b&&"foreignobject"!==N(b)&&Od.call(b).match(/SVG/)?"svg":"html"}function J(a,b,d,e,f,g){function h(a,d,e,f){var g,h,i,j,k,l,m,n,q;if(o){var r=d.length;for(q=new Array(r),k=0;kk;)i=q[p[k++]],g=p[k++],h=p[k++],g?(g.scope?(j=a.$new(),G.$$addScopeInfo(Id(i),j)):j=a,n=g.transcludeOnThisElement?K(a,g.transclude,f):!g.templateOnThisElement&&f?f:!f&&b?K(a,b):null,g(h,j,i,e,n)):h&&h(a,i.childNodes,c,f)}for(var i,j,k,l,m,n,o,p=[],q=0;qs;s++){var u=!1,w=!1;j=r[s],k=j.name,p=Vd(j.value),o=pb(k),(q=qa.test(o))&&(k=k.replace(Re,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=o.match(sa);y&&W(y[1])&&(u=k,w=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=pb(k.toLowerCase()),i[l]=k,(q||!c.hasOwnProperty(l))&&(c[l]=p,Va(a,l)&&(c[l]=!0)),da(a,b,p,l,q),V(b,l,"A",d,e,u,w)}if(g=a.className,v(g)&&(g=g.animVal),x(g)&&""!==g)for(;f=n.exec(g);)l=pb(f[2]),V(b,l,"C",d,e)&&(c[l]=Vd(f[3])),g=g.substr(f.index+f[0].length);break;case de:if(11===Hd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===de;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);aa(b,a.nodeValue);break;case ee:try{f=m.exec(a.nodeValue),f&&(l=pb(f[1]),V(b,l,"M",d,e)&&(c[l]=Vd(f[2])))}catch(z){}}return b.sort(Z),b}function M(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Qe("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==be&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Id(d)}function P(a,b,c){return function(d,e,f,g,h){return e=M(e[0],b,c),a(d,e,f,g,h)}}function Q(a,b,c,d,e,f){if(a)return G(b,c,d,e,f);var g;return function(){return g||(g=G(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function S(a,d,g,h,j,k,m,n,o){function p(a,b,c,d){a&&(c&&(a=P(a,c,d)),a.require=u.require,a.directiveName=y,(I===u||u.$$isolateScope)&&(a=fa(a,{isolateScope:!0})),m.push(a)),b&&(c&&(b=P(b,c,d)),b.require=u.require,b.directiveName=y,(I===u||u.$$isolateScope)&&(b=fa(b,{isolateScope:!0})),n.push(b))}function q(a,b,c,d){var e;if(x(b)){var g=b.match(w),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(e=d&&d[h],e=e&&e.instance),!e){var k="$"+h+"Controller";e=i?c.inheritedData(k):c.data(k)}if(!e&&!j)throw Qe("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Td(b)){e=[];for(var l=0,m=b.length;m>l;l++)e[l]=q(a,b[l],c,d)}else v(b)&&(e={},f(b,function(b,f){e[f]=q(a,b,c,d)}));return e||null}function r(a,b,c,d,e,f){var g=ra();for(var h in d){var j=d[h],k={$scope:j===I||j.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},l=j.controller;"@"==l&&(l=b[j.name]);var m=i(l,k,!0,j.controllerAs);g[j.name]=m,S||a.data("$"+j.name+"Controller",m.instance)}return g}function s(a,b,e,h,i){function j(a,b,d,e){var f;if(D(a)||(e=d,d=b,b=a,a=c),S&&(f=w),d||(d=S?y.parent():y),!e)return i(a,b,f,d,O);var g=i.$$slots[e];if(g)return g(a,b,f,d,O);if(t(g))throw Qe("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',e,_(y))}var k,o,p,s,u,w,x,y,z,B,C;d===e?(z=g,y=g.$$element):(y=Id(e),z=new la(y,g)),u=b,I?s=b.$new(!0):F&&(u=b.$parent),i&&(x=j,x.$$boundTransclude=i,x.isSlotFilled=function(a){return!!i.$$slots[a]}),H&&(w=r(y,z,x,H,s,b)),I&&(G.$$addScopeInfo(y,s,!0,!(J&&(J===I||J===I.$$originalDirective))),G.$$addScopeClass(y,!0),s.$$isolateBindings=I.$$isolateBindings,B=ha(b,z,s,s.$$isolateBindings,I),B&&s.$on("$destroy",B));for(var E in w){var K=H[E],L=w[E],M=K.$$bindings.bindToController;L.identifier&&M&&(C=ha(u,z,L.instance,M,K));var N=L();N!==L.instance&&(L.instance=N,y.data("$"+K.name+"Controller",N),C&&C(),C=ha(u,z,L.instance,M,K))}for(f(H,function(a,b){var c=a.require;a.bindToController&&!Td(c)&&v(c)&&l(w[b].instance,q(b,c,y,w))}),f(w,function(a){A(a.instance.$onInit)&&a.instance.$onInit()}),k=0,o=m.length;o>k;k++)p=m[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x);var O=b;for(I&&(I.template||null===I.templateUrl)&&(O=s),a&&a(O,e.childNodes,c,i),k=n.length-1;k>=0;k--)p=n[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x)}o=o||{};for(var u,y,z,B,C,E=-Number.MAX_VALUE,F=o.newScopeDirective,H=o.controllerDirectives,I=o.newIsolateScopeDirective,J=o.templateDirective,K=o.nonTlbTranscludeDirective,O=!1,R=!1,S=o.hasElementTranscludeDirective,V=g.$$element=Id(d),W=k,Z=h,aa=!1,ca=!1,da=0,ia=a.length;ia>da;da++){u=a[da];var ja=u.$$start,ka=u.$$end;if(ja&&(V=M(d,ja,ka)),z=c,E>u.priority)break;if((C=u.scope)&&(u.templateUrl||(v(C)?($("new/isolated scope",I||F,u,V),I=u):$("new/isolated scope",I,u,V)),F=F||u),y=u.name,!aa&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(var ma,na=da+1;ma=a[na++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){ca=!0;break}aa=!0}if(!u.templateUrl&&u.controller&&(C=u.controller,H=H||ra(),$("'"+y+"' controller",H[y],u,V),H[y]=u),C=u.transclude)if(O=!0,u.$$tlb||($("transclusion",K,u,V),K=u),"element"==C)S=!0,E=u.priority,z=V,V=g.$$element=Id(b.createComment(" "+y+": "+g[y]+" ")),d=V[0],ea(j,T(z),d),Z=Q(ca,z,h,E,W&&W.name,{nonTlbTranscludeDirective:K});else{var oa=ra();if(z=Id(Ga(d)).contents(),v(C)){z=[];var qa=ra(),sa=ra();f(C,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,qa[a]=b,oa[b]=null,sa[b]=c}),f(V.contents(),function(a){var b=qa[pb(N(a))];b?(sa[b]=!0,oa[b]=oa[b]||[],oa[b].push(a)):z.push(a)}),f(sa,function(a,b){if(!a)throw Qe("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ta in oa)oa[ta]&&(oa[ta]=Q(ca,oa[ta],h))}V.empty(),Z=Q(ca,z,h,c,c,{needsNewScope:u.$$isolateScope||u.$$newScope}),Z.$$slots=oa}if(u.template)if(R=!0,$("template",J,u,V),J=u,C=A(u.template)?u.template(V,g):u.template,C=pa(C),u.replace){if(W=u,z=ya(C)?[]:rb(ba(u.templateNamespace,Vd(C))),d=z[0],1!=z.length||d.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");ea(j,V,d);var ua={$attr:{}},va=L(d,[],ua),wa=a.splice(da+1,a.length-(da+1));(I||F)&&U(va,I,F),a=a.concat(va).concat(wa),X(g,ua),ia=a.length}else V.html(C);if(u.templateUrl)R=!0,$("template",J,u,V),J=u,u.replace&&(W=u),s=Y(a.splice(da,a.length-da),V,g,j,O&&Z,m,n,{controllerDirectives:H,newScopeDirective:F!==u&&F,newIsolateScopeDirective:I,templateDirective:J,nonTlbTranscludeDirective:K}),ia=a.length;else if(u.compile)try{B=u.compile(V,g,Z),A(B)?p(null,B,ja,ka):B&&p(B.pre,B.post,ja,ka)}catch(xa){e(xa,_(V))}u.terminal&&(s.terminal=!0,E=Math.max(E,u.priority))}return s.scope=F&&F.scope===!0,s.transcludeOnThisElement=O,s.templateOnThisElement=R,s.transclude=Z,o.hasElementTranscludeDirective=S,s}function U(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=o(a[d],{$$isolateScope:b,$$newScope:c})}function V(b,c,d,f,g,h,i){if(c===g)return null;var l=null;if(j.hasOwnProperty(c))for(var m,n=a.get(c+k),p=0,q=n.length;q>p;p++)try{m=n[p],(t(f)||f>m.priority)&&-1!=m.restrict.indexOf(d)&&(h&&(m=o(m,{$$start:h,$$end:i})),b.push(m),l=m)}catch(r){e(r)}return l}function W(b){if(j.hasOwnProperty(b))for(var c,d=a.get(b+k),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function X(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;f(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),f(b,function(b,f){"class"==f?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Y(a,b,c,d,e,h,i,j){var k,l,m=[],n=b[0],p=a.shift(),q=o(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=A(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),g(r).then(function(g){var o,t,u,w;if(g=pa(g),p.replace){if(u=ya(g)?[]:rb(ba(s,Vd(g))),o=u[0],1!=u.length||o.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);t={$attr:{}},ea(d,b,o);var x=L(o,[],t);v(p.scope)&&U(x,!0),a=x.concat(a),X(c,t)}else o=n,b.html(g);for(a.unshift(q),k=S(a,o,c,e,b,p,h,i,j),f(d,function(a,c){a==o&&(d[c]=b[0])}),l=J(b[0].childNodes,e);m.length;){var y=m.shift(),z=m.shift(),A=m.shift(),B=m.shift(),C=b[0];if(!y.$$destroyed){if(z!==n){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ga(o)),ea(A,Id(z),C),F(Id(C),D)}w=k.transcludeOnThisElement?K(y,k.transclude,B):B,k(l,y,C,d,w)}}m=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(m?m.push(b,c,d,f):(k.transcludeOnThisElement&&(f=K(b,k.transclude,e)),k(l,b,c,d,f)))}}function Z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function ca(a,b){if("srcdoc"==b)return u.HTML;var c=N(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?u.RESOURCE_URL:void 0}function da(a,b,c,e,f){var g=ca(a,e);f=s[e]||f;var h=d(c,!0,g,f);if(h){if("multiple"===e&&"select"===N(a))throw Qe("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",_(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=ra());if(y.test(e))throw Qe("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==c&&(h=k&&d(k,!0,g,f),c=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function ea(a,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(a)for(e=0,f=a.length;f>e;e++)if(a[e]==g){a[e++]=d;for(var j=e,k=j+h-1,l=a.length;l>j;j++,k++)l>k?a[j]=a[k]:delete a[j];a.length-=h-1,a.context===g&&(a.context=d);break}i&&i.replaceChild(d,g);var m=b.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Id.hasData(g)&&(Id.data(d,Id.data(g)),Id(g).off("$destroy")),Id.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function fa(a,b){return l(function(){return a.apply(null,arguments)},a,b)}function ga(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,_(c))}}function ha(a,b,c,e,g){var i=[];return f(e,function(e,f){var j,k,l,m,n,o=e.attrName,q=e.optional,r=e.mode;switch(r){case"@":q||Cd.call(b,o)||(c[f]=b[o]=void 0),b.$observe(o,function(a){x(a)&&(c[f]=a)}),b.$$observers[o].$$scope=a,j=b[o],x(j)?c[f]=d(j)(a):H(j)&&(c[f]=j);break;case"=":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),m=k.literal?R:function(a,b){return a===b||a!==a&&b!==b},l=k.assign||function(){throw j=c[f]=k(a),Qe("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[o],o,g.name)},j=c[f]=k(a);var s=function(b){return m(b,c[f])||(m(b,j)?l(a,b=c[f]):c[f]=b),j=b};s.$stateful=!0,n=e.collection?a.$watchCollection(b[o],s):a.$watch(h(b[o],s),null,k.literal),i.push(n);break;case"<":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),c[f]=k(a),n=a.$watch(k,function(a){c[f]=a},k.literal),i.push(n);break;case"&":if(k=b.hasOwnProperty(o)?h(b[o]):p,k===p&&q)break;c[f]=function(b){return k(a,b)}}}),i.length&&function(){for(var a=0,b=i.length;b>a;++a)i[a]()}}var ia=/^\w/,ja=b.createElement("div"),la=function(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a};la.prototype={$normalize:pb,$addClass:function(a){a&&a.length>0&&B.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&B.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=qb(a,b);c&&c.length&&B.addClass(this.$$element,c);var d=qb(b,a);d&&d.length&&B.removeClass(this.$$element,d)},$set:function(a,b,c,d){var g,h=this.$$element[0],i=Va(h,a),j=Wa(a),k=a;if(i?(this.$$element.prop(a,b),d=i):j&&(this[j]=b,k=j),this[a]=b,d?this.$attr[a]=d:(d=this.$attr[a],d||(this.$attr[a]=d=ka(a,"-"))),g=N(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=C(b,"src"===a);else if("img"===g&&"srcset"===a){for(var l="",m=Vd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),r=0;q>r;r++){var s=2*r;l+=C(Vd(p[s]),!0),l+=" "+Vd(p[s+1])}var u=Vd(p[2*r]).split(/\s/);l+=C(Vd(u[0]),!0),2===u.length&&(l+=" "+Vd(u[1])),this[a]=b=l}c!==!1&&(null===b||t(b)?this.$$element.removeAttr(d):ia.test(d)?this.$$element.attr(d,b):E(this.$$element[0],d,b));var v=this.$$observers;v&&f(v[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=ra()),e=d[a]||(d[a]=[]);return e.push(b),r.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||t(c[a])||b(c[a])}),function(){O(e,b)}}};var na=d.startSymbol(),oa=d.endSymbol(),pa="{{"==na&&"}}"==oa?q:function(a){return a.replace(/\{\{/g,na).replace(/}}/g,oa)},qa=/^ngAttr[A-Z]/,sa=/^(.+)Start$/;return G.$$addBindingInfo=z?function(a,b){var c=a.data("$binding")||[];Td(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:p,G.$$addBindingClass=z?function(a){F(a,"ng-binding")}:p,G.$$addScopeInfo=z?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:p,G.$$addScopeClass=z?function(a,b){F(a,b?"ng-isolate-scope":"ng-scope")}:p,G}]}function pb(a){return xa(a.replace(Re,""))}function qb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function rb(a){a=Id(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===ee&&Md.call(a,b,1)}return a}function sb(a,b){if(b&&x(b))return b;if(x(a)){var c=Te.exec(a);if(c)return c[3]}}function tb(){var a={},b=!1;this.register=function(b,c){oa(b,"controller"),v(b)?l(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(e,f){function g(a,b,c,e){if(!a||!v(a.$scope))throw d("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,b);a.$scope[b]=c}return function(d,h,i,j){var k,m,n,o;if(i=i===!0,j&&x(j)&&(o=j),x(d)){if(m=d.match(Te),!m)throw Se("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",d);n=m[1],o=o||m[3],d=a.hasOwnProperty(n)?a[n]:pa(h.$scope,n,!0)||(b?pa(f,n,!0):c),na(d,n,!0)}if(i){var p=(Td(d)?d[d.length-1]:d).prototype;k=Object.create(p||null),o&&g(h,o,k,n||d.name);var q;return q=l(function(){var a=e.invoke(d,k,h,n);return a!==k&&(v(a)||A(a))&&(k=a,o&&g(h,o,k,n||d.name)),k},{instance:k,identifier:o})}return k=e.instantiate(d,h,n),o&&g(h,o,k,n||d.name),k}}]}function ub(){this.$get=["$window",function(a){return Id(a.document)}]}function vb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function wb(a){return v(a)?z(a)?a.toISOString():W(a):a}function xb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return g(a,function(a,c){null===a||t(a)||(Td(a)?f(a,function(a,d){b.push(ea(c)+"="+ea(wb(a)))}):b.push(ea(c)+"="+ea(wb(a))))}),b.join("&")}}}function yb(){this.$get=function(){return function(a){function b(a,d,e){null===a||t(a)||(Td(a)?f(a,function(a,c){b(a,d+"["+(v(a)?c:"")+"]")}):v(a)&&!z(a)?g(a,function(a,c){b(a,d+(e?"":"[")+c+(e?"":"]"))}):c.push(ea(d)+"="+ea(wb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function zb(a,b){if(x(a)){var c=a.replace(Ze,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ve)||Ab(c))&&(a=X(c))}}return a}function Ab(a){var b=a.match(Xe);return b&&Ye[b[0]].test(a)}function Bb(a){function b(a,b){a&&(d[a]=d[a]?d[a]+", "+b:b)}var c,d=ra();return x(a)?f(a.split("\n"),function(a){c=a.indexOf(":"),b(Dd(Vd(a.substr(0,c))),Vd(a.substr(c+1)))}):v(a)&&f(a,function(a,c){b(Dd(c),Vd(a))}),d}function Cb(a){var b;return function(c){if(b||(b=Bb(a)),c){var d=b[Dd(c)];return void 0===d&&(d=null),d}return b}}function Db(a,b,c,d){return A(d)?d(a,b,c):(f(d,function(d){a=d(a,b,c)}),a)}function Eb(a){return a>=200&&300>a}function Fb(){var a=this.defaults={transformResponse:[zb],transformRequest:[function(a){return!v(a)||E(a)||G(a)||F(a)?a:W(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:Q(We),put:Q(We),patch:Q(We)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var e=!0;this.useLegacyPromiseExtensions=function(a){return u(a)?(e=!!a,this):e};var g=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,i,j,k,m,n){function o(b){function g(a){var b=l({},a);return b.data=Db(a.data,a.headers,a.status,j.transformResponse),Eb(a.status)?b:m.reject(b)}function h(a,b){var c,d={};return f(a,function(a,e){A(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a}),d}function i(b){var c,d,e,f=a.headers,g=l({},b.headers);f=l({},f.common,f[Dd(b.method)]);a:for(c in f){d=Dd(c);for(e in g)if(Dd(e)===d)continue a;g[c]=f[c]}return h(g,Q(b))}if(!v(b))throw d("$http")("badreq","Http request configuration must be an object. Received: {0}",b);if(!x(b.url))throw d("$http")("badreq","Http request configuration url must be a string. Received: {0}",b.url);var j=l({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);j.headers=i(b),j.method=Ed(j.method),j.paramSerializer=x(j.paramSerializer)?n.get(j.paramSerializer):j.paramSerializer;var k=function(b){var d=b.headers,e=Db(b.data,Cb(d),c,b.transformRequest);return t(e)&&f(d,function(a,b){"content-type"===Dd(b)&&delete d[b]}),t(b.withCredentials)&&!t(a.withCredentials)&&(b.withCredentials=a.withCredentials),r(b,e).then(g,g)},o=[k,c],p=m.when(j);for(f(y,function(a){(a.request||a.requestError)&&o.unshift(a.request,a.requestError),(a.response||a.responseError)&&o.push(a.response,a.responseError)});o.length;){var q=o.shift(),s=o.shift();p=p.then(q,s)}return e?(p.success=function(a){return na(a,"fn"),p.then(function(b){a(b.data,b.status,b.headers,j)}),p},p.error=function(a){return na(a,"fn"),p.then(null,function(b){a(b.data,b.status,b.headers,j)}),p}):(p.success=_e("success"),p.error=_e("error")),p}function p(a){f(arguments,function(a){o[a]=function(b,c){return o(l({},c||{},{method:a,url:b}))}})}function q(a){f(arguments,function(a){o[a]=function(b,c,d){return o(l({},d||{},{method:a,url:b,data:c}))}})}function r(d,e){function f(a,c,d,e){function f(){g(c,a,d,e)}n&&(Eb(a)?n.put(y,[a,c,Bb(d),e]):n.remove(y)),b?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function g(a,b,c,e){b=b>=-1?b:0,(Eb(b)?q.resolve:q.reject)({data:a,status:b,headers:Cb(c),config:d,statusText:e})}function j(a){g(a.data,a.status,Q(a.headers()),a.statusText)}function l(){var a=o.pendingRequests.indexOf(d);-1!==a&&o.pendingRequests.splice(a,1)}var n,p,q=m.defer(),r=q.promise,x=d.headers,y=s(d.url,d.paramSerializer(d.params));if(o.pendingRequests.push(d),r.then(l,l),!d.cache&&!a.cache||d.cache===!1||"GET"!==d.method&&"JSONP"!==d.method||(n=v(d.cache)?d.cache:v(a.cache)?a.cache:w),n&&(p=n.get(y),u(p)?I(p)?p.then(j,j):Td(p)?g(p[1],p[0],Q(p[2]),p[3]):g(p,200,{},"OK"):n.put(y,r)),t(p)){var z=Gc(d.url)?i()[d.xsrfCookieName||a.xsrfCookieName]:c;z&&(x[d.xsrfHeaderName||a.xsrfHeaderName]=z),h(d.method,y,e,f,x,d.timeout,d.withCredentials,d.responseType)}return r}function s(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=j("$http");a.paramSerializer=x(a.paramSerializer)?n.get(a.paramSerializer):a.paramSerializer;var y=[];return f(g,function(a){y.unshift(x(a)?n.get(a):n.invoke(a))}),o.pendingRequests=[],p("get","delete","head","jsonp"),q("post","put","patch"),o.defaults=a,o}]}function Gb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Hb(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Ib(a,d,a.defer,b.angular.callbacks,c[0])}]}function Ib(a,b,c,d,e){function g(a,b,c){var f=e.createElement("script"),g=null;return f.type="text/javascript",f.src=a,f.async=!0,g=function(a){le(f,"load",g),le(f,"error",g),e.body.removeChild(f),f=null;var h=-1,i="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ke(f,"load",g),ke(f,"error",g),e.body.appendChild(f),g}return function(e,h,i,j,k,l,m,n){function o(){s&&s(),v&&v.abort()}function q(b,d,e,f,g){u(y)&&c.cancel(y),s=v=null,b(d,e,f,g),a.$$completeOutstandingRequest(p)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Dd(e)){var r="_"+(d.counter++).toString(36);d[r]=function(a){d[r].data=a,d[r].called=!0};var s=g(h.replace("JSON_CALLBACK","angular.callbacks."+r),r,function(a,b){q(j,a,d[r].data,"",b),d[r]=p})}else{var v=b(e,h);v.open(e,h,!0),f(k,function(a,b){u(a)&&v.setRequestHeader(b,a)}),v.onload=function(){var a=v.statusText||"",b="response"in v?v.response:v.responseText,c=1223===v.status?204:v.status;0===c&&(c=b?200:"file"==Fc(h).protocol?404:0),q(j,c,b,v.getAllResponseHeaders(),a)};var w=function(){q(j,-1,null,null,"")};if(v.onerror=w,v.onabort=w,m&&(v.withCredentials=!0),n)try{v.responseType=n}catch(x){if("json"!==n)throw x}v.send(t(i)?null:i)}if(l>0)var y=c(o,l);else I(l)&&l.then(o)}}function Jb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=W(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function j(f,j,n,o){function p(a){try{return a=G(a),o&&!u(a)?a:h(a)}catch(b){d(af.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var q;if(!j){var s=g(f);q=r(s),q.exp=f,q.expressions=[],q.$$watchDelegate=i}return q}o=!!o;for(var v,w,x,y=0,z=[],B=[],C=f.length,D=[],E=[];C>y;){if(-1==(v=f.indexOf(a,y))||-1==(w=f.indexOf(b,v+k))){y!==C&&D.push(g(f.substring(y)));break}y!==v&&D.push(g(f.substring(y,v))),x=f.substring(v+k,w),z.push(x),B.push(c(x,p)),y=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&af.throwNoconcat(f),!j||z.length){var F=function(a){for(var b=0,c=z.length;c>b;b++){if(o&&t(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return l(function(a){var b=0,c=z.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(af.interr(f,g))}},{exp:f,expressions:z,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);A(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var k=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return j.startSymbol=function(){return a},j.endSymbol=function(){return b},j}]}function Kb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?T(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=u(j)&&!j,r=(q?d:c).defer(),s=r.promise;return i=u(i)?i:0,s.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(s.$$intervalId),delete g[s.$$intervalId]),q||a.$apply()},h),g[s.$$intervalId]=r,s}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Lb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=da(b[c]);return b.join("/")}function Mb(a,b){var c=Fc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=n(c.port)||cf[c.protocol]||null}function Nb(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Fc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=ba(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Ob(a,b){return 0===b.indexOf(a)?b.substr(a.length):void 0}function Pb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Qb(a){return a.replace(/(#.+)|#$/,"$1")}function Rb(a){return a.substr(0,Pb(a).lastIndexOf("/")+1)}function Sb(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Tb(a,b,c){this.$$html5=!0,c=c||"",Mb(a,this),this.$$parse=function(a){var c=Ob(b,a);if(!x(c))throw df("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Nb(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=ca(this.$$search),c=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return u(f=Ob(a,d))?(g=f,h=u(f=Ob(c,f))?b+(Ob("/",f)||f):a+g):u(f=Ob(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Ub(a,b,c){Mb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return 0===b.indexOf(c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Ob(a,d)||Ob(b,d);t(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",t(g)&&(a=d,this.replace())):(f=Ob(c,g),t(f)&&(f=g)),Nb(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Pb(a)==Pb(b)?(this.$$parse(b),!0):!1}}function Vb(a,b,c){this.$$html5=!0,Ub.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Pb(d)?f=d:(g=Ob(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){ +var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Wb(a){return function(){return this[a]}}function Xb(a,b){return function(c){return t(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function Yb(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a},this.html5Mode=function(a){return H(a)?(b.enabled=a,this):v(a)?(H(a.enabled)&&(b.enabled=a.enabled),H(a.requireBase)&&(b.requireBase=a.requireBase),H(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw df("nobase","$location in HTML5 mode requires a tag to be present!");l=Sb(n)+(m||"/"),k=e.history?Tb:Vb}else l=Pb(n),k=Ub;var o=Rb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Id(a.target);"a"!==N(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");v(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Fc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Qb(j.absUrl())!=Qb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return t(Ob(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Qb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Qb(d.url()),b=Qb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function Zb(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=c.console||{},e=b[a]||b.log||p,g=!1;try{g=!!e.apply}catch(h){}return g?function(){var a=[];return f(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function $b(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ff("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function _b(a){return a+""}function ac(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw ff("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ff("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw ff("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function bc(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===gf||a===hf||a===jf)throw ff("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function cc(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ff("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function dc(a,b){return"undefined"!=typeof a?a:b}function ec(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function fc(a,b){var c=a(b);return!c.$stateful}function gc(a,b){var c,d;switch(a.type){case nf.Program:c=!0,f(a.body,function(a){gc(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case nf.Literal:a.constant=!0,a.toWatch=[];break;case nf.UnaryExpression:gc(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case nf.BinaryExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case nf.LogicalExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case nf.ConditionalExpression:gc(a.test,b),gc(a.alternate,b),gc(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case nf.Identifier:a.constant=!1,a.toWatch=[a];break;case nf.MemberExpression:gc(a.object,b),a.computed&&gc(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case nf.CallExpression:c=a.filter?fc(b,a.callee.name):!1,d=[],f(a.arguments,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&fc(b,a.callee.name)?d:[a];break;case nf.AssignmentExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case nf.ArrayExpression:c=!0,d=[],f(a.elements,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ObjectExpression:c=!0,d=[],f(a.properties,function(a){gc(a.value,b),c=c&&a.value.constant,a.value.constant||d.push.apply(d,a.value.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ThisExpression:a.constant=!1,a.toWatch=[];break;case nf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function hc(a){if(1==a.length){var b=a[0].expression,d=b.toWatch;return 1!==d.length?d:d[0]!==b?d:c}}function ic(a){return a.type===nf.Identifier||a.type===nf.MemberExpression}function jc(a){return 1===a.body.length&&ic(a.body[0].expression)?{type:nf.AssignmentExpression,left:a.body[0].expression,right:{type:nf.NGValueParameter},operator:"="}:void 0}function kc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===nf.Literal||a.body[0].expression.type===nf.ArrayExpression||a.body[0].expression.type===nf.ObjectExpression)}function lc(a){return a.constant}function mc(a,b){this.astBuilder=a,this.$filter=b}function nc(a,b){this.astBuilder=a,this.$filter=b}function oc(a){return"constructor"==a}function pc(a){return A(a.valueOf)?a.valueOf():pf.call(a)}function qc(){var a=ra(),b=ra();this.$get=["$filter",function(d){function e(c,e,f){var h,n,s;switch(f=f||r,typeof c){case"string":c=c.trim(),s=c;var t=f?b:a;if(h=t[s],!h){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2));var u=f?q:o,v=new mf(u),w=new of(v,d,u);h=w.parse(c),h.constant?h.$$watchDelegate=l:n?h.$$watchDelegate=h.literal?k:j:h.inputs&&(h.$$watchDelegate=i),f&&(h=g(h)),t[s]=h}return m(h,e);case"function":return m(c,e);default:return m(p,e)}}function g(a){function b(b,c,d,e){var f=r;r=!0;try{return a(b,c,d,e)}finally{r=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=g(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cm;m++)k[m]=h,l[m]=null;return a.$watch(function(a){for(var b=!1,d=0,f=i.length;f>d;d++){var j=i[d](a);(b||(b=!h(j,k[d])))&&(l[d]=j,k[d]=j&&pc(j))}return b&&(g=e(a,c,c,l)),g},b,d,f)}function j(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,A(b)&&b.apply(this,arguments),u(a)&&d.$$postDigest(function(){u(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;return f(a,function(a){u(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return d(a)},function(a,c,d){h=a,A(b)&&b.call(this,a,c,d),e(a)&&d.$$postDigest(function(){e(h)&&g()})},c)}function l(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function m(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==k&&c!==j,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return u(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==i?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=i,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var n=Xd().noUnsafeEval,o={csp:n,expensiveChecks:!1},q={csp:n,expensiveChecks:!0},r=!1;return e.$$runningExpensiveChecks=function(){return r},e}]}function rc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return tc(function(b){a.$evalAsync(b)},b)}]}function sc(){this.$get=["$browser","$exceptionHandler",function(a,b){return tc(function(b){a.defer(b)},b)}]}function tc(a,b){function e(){this.$$state={status:0}}function g(a,b){return function(c){b.call(a,c)}}function h(a){var d,e,f;f=a.pending,a.processScheduled=!1,a.pending=c;for(var g=0,h=f.length;h>g;++g){e=f[g][0],d=f[g][a.status];try{A(d)?e.resolve(d(a.value)):1===a.status?e.resolve(a.value):e.reject(a.value)}catch(i){e.reject(i),b(i)}}}function i(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){h(b)}))}function j(){this.promise=new e}function k(a){var b=new j,c=0,d=Td(a)?[]:{};return f(a,function(a,e){c++,r(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})}),0===c&&b.resolve(d),b.promise}var m=d("$q",TypeError),n=function(){var a=new j;return a.resolve=g(a,a.resolve),a.reject=g(a,a.reject),a.notify=g(a,a.notify),a};l(e.prototype,{then:function(a,b,c){if(t(a)&&t(b)&&t(c))return this;var d=new j;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&i(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return q(b,!0,a)},function(b){return q(b,!1,a)},b)}}),l(j.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(m("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function c(a){h||(h=!0,f.$$resolve(a))}function d(a){h||(h=!0,f.$$reject(a))}var e,f=this,h=!1;try{(v(a)||A(a))&&(e=a&&a.then),A(e)?(this.promise.$$state.status=-1,e.call(a,c,d,g(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,i(this.promise.$$state))}catch(j){d(j),b(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,i(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(A(a)?a(c):c)}catch(h){b(h)}}})}});var o=function(a){var b=new j;return b.reject(a),b.promise},p=function(a,b){var c=new j;return b?c.resolve(a):c.reject(a),c.promise},q=function(a,b,c){var d=null;try{A(c)&&(d=c())}catch(e){return p(e,!1)}return I(d)?d.then(function(){return p(a,b)},function(a){return p(a,!1)}):p(a,b)},r=function(a,b,c,d){var e=new j;return e.resolve(a),e.promise.then(b,c,d)},s=r,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!A(a))throw m("norslvr","Expected resolverFn, got '{0}'",a);var d=new j;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=n,u.reject=o,u.when=r,u.resolve=s,u.all=k,u}function uc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function vc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=i(),this.$$ChildScope=null}return b.prototype=a,b}var b=10,c=d("$rootScope"),g=null,h=null;this.digestTtl=function(a){return arguments.length&&(b=a),b},this.$get=["$exceptionHandler","$parse","$browser",function(d,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Hd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function n(){this.$id=i(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function o(a){if(y.$$phase)throw c("inprog","{0} already in progress",y.$$phase);y.$$phase=a}function q(){y.$$phase=null}function r(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function u(){}function w(){for(;C.length;)try{C.shift()()}catch(a){d(a)}h=null}function x(){null===h&&(h=k.defer(function(){y.$apply(w)}))}n.prototype={constructor:n,$new:function(b,c){var d;return c=c||this,b?(d=new n,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,h=f.$$watchers,i={fn:b,last:u,get:e,exp:d||a,eq:!!c};return g=null,A(b)||(i.fn=p),h||(h=f.$$watchers=[]),h.unshift(i),r(this,1),function(){O(h,i)>=0&&r(f,-1),g=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(e,e,h)):b(e,d,h)}var d=new Array(a.length),e=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(e,e,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,f){e[0]=a,d[0]=c,b(e,a===c?e:d,f)}):(f(a,function(a,b){var f=h.$watch(a,function(a,f){e[b]=a,d[b]=f,i||(i=!0,h.$evalAsync(c))});g.push(f)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function c(a){f=a;var b,c,d,h,i;if(!t(f)){if(v(f))if(e(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],d=i!==i&&h!==h,d||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(c in f)Cd.call(f,c)&&(b++,h=f[c],i=g[c],c in g?(d=i!==i&&h!==h,d||i===h||(l++,g[c]=h)):(q++,g[c]=h,l++));if(q>b){l++;for(c in g)Cd.call(f,c)||(q--,delete g[c])}}else g!==f&&(g=f,l++);return l}}function d(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(v(f))if(e(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,c),n=[],o={},p=!0,q=0;return this.$watch(m,d)},$digest:function(){var a,e,f,i,j,l,m,n,p,r,s,t,v=b,x=this,C=[];o("$digest"),k.$$checkUrlChange(),this===y&&null!==h&&(k.defer.cancel(h),w()),g=null;do{for(n=!1,r=x;z.length;){try{t=z.shift(),t.scope.$eval(t.expression,t.locals)}catch(D){d(D)}g=null}a:do{if(l=r.$$watchers)for(m=l.length;m--;)try{if(a=l[m])if(j=a.get,(e=j(r))===(f=a.last)||(a.eq?R(e,f):"number"==typeof e&&"number"==typeof f&&isNaN(e)&&isNaN(f))){if(a===g){n=!1;break a}}else n=!0,g=a,a.last=a.eq?P(e,null):e,i=a.fn,i(e,f===u?e:f,r),5>v&&(s=4-v,C[s]||(C[s]=[]),C[s].push({msg:A(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:e,oldVal:f}))}catch(D){d(D)}if(!(p=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(p=r.$$nextSibling);)r=r.$parent}while(r=p);if((n||z.length)&&!v--)throw q(),c("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",b,C)}while(n||z.length);for(q();B.length;)try{B.shift()()}catch(D){d(D)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===y&&k.$$applicationDestroyed(),r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,m(this)}},$eval:function(a,b){return j(a)(this,b)},$evalAsync:function(a,b){y.$$phase||z.length||k.defer(function(){z.length&&y.$digest()}),z.push({scope:this,expression:j(a),locals:b})},$$postDigest:function(a){B.push(a)},$apply:function(a){try{o("$apply");try{return this.$eval(a)}finally{q()}}catch(b){d(b)}finally{try{y.$digest()}catch(b){throw d(b),b}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&C.push(b),a=j(a),x()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]),c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,s(e,1,a))}},$emit:function(a,b){var c,e,f,g=[],h=this,i=!1,j={name:a,targetScope:h,stopPropagation:function(){i=!0},preventDefault:function(){j.defaultPrevented=!0},defaultPrevented:!1},k=S([j],arguments,1);do{for(c=h.$$listeners[a]||g,j.currentScope=h,e=0,f=c.length;f>e;e++)if(c[e])try{c[e].apply(null,k)}catch(l){d(l)}else c.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,b){var c=this,e=c,f=c,g={name:a,targetScope:c,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!c.$$listenerCount[a])return g;for(var h,i,j,k=S([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){d(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==c&&e.$$nextSibling))for(;e!==c&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var y=new n,z=y.$$asyncQueue=[],B=y.$$postDigestQueue=[],C=y.$$applyAsyncQueue=[];return y}]}function wc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return u(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return u(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Fc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function xc(a){if("self"===a)return a;if(x(a)){if(a.indexOf("***")>-1)throw qf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Wd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(B(a))return new RegExp("^"+a.source+"$");throw qf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yc(a){var b=[];return u(a)&&f(a,function(a){b.push(xc(a))}),b}function zc(){this.SCE_CONTEXTS=rf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=yc(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=yc(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Gc(b):!!a.exec(b.href)}function e(c){var e,f,g=Fc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw qf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||t(b)||""===b)return b;if("string"!=typeof b)throw qf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||t(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===rf.RESOURCE_URL){if(e(b))return b;throw qf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===rf.HTML)return j(b);throw qf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw qf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[rf.HTML]=f(k),l[rf.CSS]=f(k),l[rf.URL]=f(k),l[rf.JS]=f(k),l[rf.RESOURCE_URL]=f(l[rf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Ac(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Hd)throw qf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var d=Q(rf);d.isEnabled=function(){return a},d.trustAs=c.trustAs,d.getTrusted=c.getTrusted,d.valueOf=c.valueOf,a||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=q),d.parseAs=function(a,c){var e=b(c);return e.literal&&e.constant?e:b(c,function(b){return d.getTrusted(a,b)})};var e=d.parseAs,g=d.getTrusted,h=d.trustAs;return f(rf,function(a,b){var c=Dd(b);d[xa("parse_as_"+c)]=function(b){return e(a,b)},d[xa("get_trusted_"+c)]=function(b){return g(a,b)},d[xa("trust_as_"+c)]=function(b){return h(a,b)}}),d}]}function Bc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=n((/android (\d+)/.exec(Dd((a.navigator||{}).userAgent))||[])[1]),g=/Boxee/i.test((a.navigator||{}).userAgent),h=b[0]||{},i=/^(Moz|webkit|ms)(?=[A-Z])/,j=h.body&&h.body.style,k=!1,l=!1;if(j){for(var m in j)if(d=i.exec(m)){c=d[0],c=c.substr(0,1).toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in j&&"webkit"),k=!!("transition"in j||c+"Transition"in j),l=!!("animation"in j||c+"Animation"in j),!f||k&&l||(k=x(j.webkitTransition),l=x(j.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>f||g),hasEvent:function(a){if("input"===a&&11>=Hd)return!1;if(t(e[a])){var b=h.createElement("div");e[a]="on"+a in b}return e[a]},csp:Xd(),vendorPrefix:c,transitions:k,animations:l,android:f}}]}function Cc(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw Qe("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,x(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var j=c.defaults&&c.defaults.transformResponse;return Td(j)?j=j.filter(function(a){return a!==zb}):j===zb&&(j=null),c.get(g,l({cache:b,transformResponse:j},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Dc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var d={};return d.findBindings=function(a,b,c){var d=a.getElementsByClassName("ng-binding"),e=[];return f(d,function(a){var d=Rd.element(a).data("$binding");d&&f(d,function(d){if(c){var f=new RegExp("(^|\\s)"+Wd(b)+"(\\s|\\||$)");f.test(d)&&e.push(a)}else-1!=d.indexOf(b)&&e.push(a)})}),e},d.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),t(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Jc(){this.$get=Ic}function Kc(a){function b(d,e){if(v(d)){var g={};return f(d,function(a,c){g[c]=b(c,a)}),g}return a.factory(d+c,e)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Pc),b("date",cd),b("filter",Lc),b("json",dd),b("limitTo",ed),b("lowercase",Af),b("number",Qc),b("orderBy",fd),b("uppercase",Bf)}function Lc(){return function(a,b,c){if(!e(a)){if(null==a)return a;throw d("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Oc(b);switch(h){case"function":f=b;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Mc(b,c,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Mc(a,b,c){var d,e=v(a)&&"$"in a;return b===!0?b=R:A(b)||(b=function(a,b){return t(a)?!1:null===a||null===b?a===b:v(b)||v(a)&&!s(a)?!1:(a=Dd(""+a),b=Dd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!v(d)?Nc(d,a.$,b,!1):Nc(d,a,b,c)}}function Nc(a,b,c,d,e){var f=Oc(a),g=Oc(b);if("string"===g&&"!"===b.charAt(0))return!Nc(a,b.substring(1),c,d);if(Td(a))return a.some(function(a){return Nc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Nc(a[h],b,c,!0))return!0;return e?!1:Nc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!A(i)&&!t(i)){var j="$"===h,k=j?a:a[h];if(!Nc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Oc(a){return null===a?"null":typeof a}function Pc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return t(c)&&(c=b.CURRENCY_SYM),t(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Tc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Qc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Tc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Rc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(vf))>-1&&(a=a.replace(vf,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==wf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==wf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>uf&&(b=b.splice(0,uf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Sc(a,b,c,d){var e=a.d,f=e.length-a.i;b=t(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0)e.splice(g);else{a.i=1,e.length=g=b+1;for(var i=0;g>i;i++)e[i]=0}for(h>=5&&e[g-1]++;b>f;f++)e.push(0);var j=e.reduceRight(function(a,b,c,d){return b+=a,d[c]=b%10,Math.floor(b/10)},0);j&&(e.unshift(j),a.i++)}function Tc(a,b,c,d,e){if(!x(a)&&!y(a)||isNaN(a))return"";var f,g=!isFinite(a),h=!1,i=Math.abs(a)+"",j="";if(g)j="∞";else{f=Rc(i),Sc(f,e,b.minFrac,b.maxFrac);var k=f.d,l=f.i,m=f.e,n=[];for(h=k.reduce(function(a,b){return a&&!b},!0);0>l;)k.unshift(0),l++;l>0?n=k.splice(l):(n=k,k=[0]);var o=[];for(k.length>b.lgSize&&o.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Uc(a,b,c){var d="";for(0>a&&(d="-",a=-a),a=""+a;a.length0||f>-c)&&(f+=c),0===f&&-12==c&&(f=12),Uc(f,b,d)}}function Wc(a,b){return function(c,d){var e=c["get"+a](),f=Ed(b?"SHORT"+a:a);return d[f][e]}}function Xc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Uc(Math[d>0?"floor":"ceil"](d/60),2)+Uc(Math.abs(d%60),2)}function Yc(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Zc(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function $c(a){return function(b){var c=Yc(b.getFullYear()),d=Zc(b),e=+d-+c,f=1+Math.round(e/6048e5);return Uc(f,a)}}function _c(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function ad(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function bd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function cd(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=n(b[9]+b[10]),f=n(b[9]+b[11])),g.call(d,n(b[1]),n(b[2])-1,n(b[3]));var i=n(b[4]||0)-e,j=n(b[5]||0)-f,k=n(b[6]||0),l=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,l),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g,h,i="",j=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,x(c)&&(c=zf.test(c)?n(c):b(c)),y(c)&&(c=new Date(c)),!z(c)||!isFinite(c.getTime()))return c;for(;d;)h=yf.exec(d),h?(j=S(j,h,1),d=j.pop()):(j.push(d),d=null);var k=c.getTimezoneOffset();return e&&(k=Y(e,k),c=$(c,e,!0)),f(j,function(b){g=xf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function dd(){return function(a,b){return t(b)&&(b=2),W(a,b)}}function ed(){return function(a,b,c){return b=Math.abs(Number(b))===1/0?Number(b):n(b),isNaN(b)?a:(y(a)&&(a=a.toString()),Td(a)||x(a)?(c=!c||isNaN(c)?0:n(c),c=0>c?Math.max(0,a.length+c):c,b>=0?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function fd(a){function b(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=q;if(A(b))e=b;else if(x(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant))){var f=e();e=function(a){return a[f]}}return{get:e,descending:d*c}})}function c(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a,b){return"function"==typeof a.valueOf&&(a=a.valueOf(),c(a))?a:s(a)&&(a=a.toString(),c(a))?a:b}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"string"===c?a=a.toLowerCase():"object"===c&&(a=f(a,b)), +{value:a,type:c}}function h(a,b){var c=0;return a.type===b.type?a.value!==b.value&&(c=a.valued&&!(c=h(a.predicateValues[d],b.predicateValues[d])*k[d].descending);++d);return c}if(null==a)return a;if(!e(a))throw d("orderBy")("notarray","Expected array but received: {0}",a);Td(c)||(c=[c]),0===c.length&&(c=["+"]);var k=b(c,f);k.push({get:function(){return{}},descending:f?-1:1});var l=Array.prototype.map.call(a,i);return l.sort(j),a=l.map(function(a){return a.value})}}function gd(a){return A(a)&&(a={link:a}),a.restrict=a.restrict||"AC",r(a)}function hd(a,b){a.$name=b}function id(a,b,d,e,g){var h=this,i=[];h.$error={},h.$$success={},h.$pending=c,h.$name=g(b.name||b.ngForm||"")(d),h.$dirty=!1,h.$pristine=!0,h.$valid=!0,h.$invalid=!1,h.$submitted=!1,h.$$parentForm=Ef,h.$rollbackViewValue=function(){f(i,function(a){a.$rollbackViewValue()})},h.$commitViewValue=function(){f(i,function(a){a.$commitViewValue()})},h.$addControl=function(a){oa(a.$name,"input"),i.push(a),a.$name&&(h[a.$name]=a),a.$$parentForm=h},h.$$renameControl=function(a,b){var c=a.$name;h[c]===a&&delete h[c],h[b]=a,a.$name=b},h.$removeControl=function(a){a.$name&&h[a.$name]===a&&delete h[a.$name],f(h.$pending,function(b,c){h.$setValidity(c,null,a)}),f(h.$error,function(b,c){h.$setValidity(c,null,a)}),f(h.$$success,function(b,c){h.$setValidity(c,null,a)}),O(i,a),a.$$parentForm=Ef},xd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(O(d,c),0===d.length&&delete a[b])},$animate:e}),h.$setDirty=function(){e.removeClass(a,mg),e.addClass(a,ng),h.$dirty=!0,h.$pristine=!1,h.$$parentForm.$setDirty()},h.$setPristine=function(){e.setClass(a,mg,ng+" "+Ff),h.$dirty=!1,h.$pristine=!0,h.$submitted=!1,f(i,function(a){a.$setPristine()})},h.$setUntouched=function(){f(i,function(a){a.$setUntouched()})},h.$setSubmitted=function(){e.addClass(a,Ff),h.$submitted=!0,h.$$parentForm.$setSubmitted()}}function jd(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function kd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d)}function ld(a,b,c,d,e,f){var g=Dd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0}),b.on("compositionend",function(){h=!1,i()})}var i=function(a){if(j&&(f.defer.cancel(j),j=null),!h){var e=b.val(),i=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Vd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,i)}};if(e.hasEvent("input"))b.on("input",i);else{var j,k=function(a,b,c){j||(j=f.defer(function(){j=null,b&&b.value===c||i(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",i),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function md(a,b){if(z(a))return a;if(x(a)){Pf.lastIndex=0;var c=Pf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=Yc(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function nd(a,b){return function(c,d){var e,g;if(z(c))return c;if(x(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Jf.test(c))return new Date(c);if(a.lastIndex=0,e=a.exec(c))return e.shift(),g=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},f(e,function(a,c){c=q},h.$observe("min",function(a){q=n(a),i.$validate()})}if(u(h.max)||h.ngMax){var r;i.$validators.max=function(a){return!m(a)||t(r)||d(a)<=r},h.$observe("max",function(a){r=n(a),i.$validate()})}}}function pd(a,b,d,e){var f=b[0],g=e.$$hasNativeValidators=v(f.validity);g&&e.$parsers.push(function(a){var d=b.prop(Bd)||{};return d.badInput||d.typeMismatch?c:a})}function qd(a,b,d,e,f,g){if(pd(a,b,d,e),ld(a,b,d,e,f,g),e.$$parserName="number",e.$parsers.push(function(a){return e.$isEmpty(a)?null:Mf.test(a)?parseFloat(a):c}),e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!y(a))throw tg("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),u(d.min)||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||t(h)||a>=h},d.$observe("min",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),h=y(a)&&!isNaN(a)?a:c,e.$validate()})}if(u(d.max)||d.ngMax){var i;e.$validators.max=function(a){return e.$isEmpty(a)||t(i)||i>=a},d.$observe("max",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),i=y(a)&&!isNaN(a)?a:c,e.$validate()})}}function rd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Kf.test(c)}}function sd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Lf.test(c)}}function td(a,b,c,d){t(c.name)&&b.attr("name",i());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function ud(a,b,c,d,e){var f;if(u(d)){if(f=a(d),!f.constant)throw tg("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function vd(a,b,c,d,e,f,g,h){var i=ud(h,a,"ngTrueValue",c.ngTrueValue,!0),j=ud(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return R(a,i)}),d.$parsers.push(function(a){return a?i:j})}function wd(a,b){return a="ngClass"+a,["$animate",function(c){function d(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&d.push(a))}),h.data("$classCounts",c),d.join(" ")}function m(a,b){var e=d(b,a),f=d(a,b);e=l(e,1),f=l(f,-1),e&&e.length&&c.addClass(h,e),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||g.$index%2===b){var c=e(a||[]);if(o){if(!R(a,o)){var d=e(o);m(d,c)}}else j(c)}o=Q(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var f=1&c;if(f!==(1&d)){var h=e(g.$eval(i[a]));f===b?j(h):k(h)}})}}}]}function xd(a){function b(a,b,i){t(b)?d("$pending",a,i):e("$pending",a,i),H(b)?b?(l(h.$error,a,i),k(h.$$success,a,i)):(k(h.$error,a,i),l(h.$$success,a,i)):(l(h.$error,a,i),l(h.$$success,a,i)),h.$pending?(f(qg,!0),h.$valid=h.$invalid=c,g("",null)):(f(qg,!1),h.$valid=yd(h.$error),h.$invalid=!h.$valid,g("",h.$valid));var j;j=h.$pending&&h.$pending[a]?c:h.$error[a]?!1:h.$$success[a]?!0:null,g(a,j),h.$$parentForm.$setValidity(a,j,h)}function d(a,b,c){h[a]||(h[a]={}),k(h[a],b,c)}function e(a,b,d){h[a]&&l(h[a],b,d),yd(h[a])&&(h[a]=c)}function f(a,b){b&&!j[a]?(m.addClass(i,a),j[a]=!0):!b&&j[a]&&(m.removeClass(i,a),j[a]=!1)}function g(a,b){a=a?"-"+ka(a,"-"):"",f(kg+a,b===!0),f(lg+a,b===!1)}var h=a.ctrl,i=a.$element,j={},k=a.set,l=a.unset,m=a.$animate;j[lg]=!(j[kg]=i.hasClass(kg)),h.$setValidity=b}function yd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function zd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Ad=/^\/(.+)\/([a-z]*)$/,Bd="validity",Cd=Object.prototype.hasOwnProperty,Dd=function(a){return x(a)?a.toLowerCase():a},Ed=function(a){return x(a)?a.toUpperCase():a},Fd=function(a){return x(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Gd=function(a){return x(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Dd=Fd,Ed=Gd);var Hd,Id,Jd,Kd,Ld=[].slice,Md=[].splice,Nd=[].push,Od=Object.prototype.toString,Pd=Object.getPrototypeOf,Qd=d("ng"),Rd=a.angular||(a.angular={}),Sd=0;Hd=b.documentMode,p.$inject=[],q.$inject=[];var Td=Array.isArray,Ud=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Vd=function(a){return x(a)?a.trim():a},Wd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=$d[c],a=b.querySelector("["+d.replace(":","\\:")+"jq]")){e=a.getAttribute(d+"jq");break}return Yd.name_=e},Zd=/:/g,$d=["ng-","data-ng-","ng:","x-ng-"],_d=/[A-Z]/g,ae=!1,be=1,ce=2,de=3,ee=8,fe=9,ge=11,he={full:"1.5.0",major:1,minor:5,dot:0,codeName:"ennoblement-facilitation"};Fa.expando="ng339";var ie=Fa.cache={},je=1,ke=function(a,b,c){a.addEventListener(b,c,!1)},le=function(a,b,c){a.removeEventListener(b,c,!1)};Fa._data=function(a){return this.cache[a[this.expando]]||{}};var me=/([\:\-\_]+(.))/g,ne=/^moz([A-Z])/,oe={mouseleave:"mouseout",mouseenter:"mouseover"},pe=d("jqLite"),qe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,re=/<|&#?\w+;/,se=/<([\w:-]+)/,te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ue={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ue.optgroup=ue.option,ue.tbody=ue.tfoot=ue.colgroup=ue.caption=ue.thead,ue.th=ue.td;var ve=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},we=Fa.prototype={ready:function(c){function d(){e||(e=!0,c())}var e=!1;"complete"===b.readyState?setTimeout(d):(this.on("DOMContentLoaded",d),Fa(a).on("load",d))},toString:function(){var a=[];return f(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Id(a>=0?this[a]:this[this.length+a])},length:0,push:Nd,sort:[].sort,splice:[].splice},xe={};f("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){xe[Dd(a)]=a});var ye={};f("input,select,option,textarea,button,form,details".split(","),function(a){ye[a]=!0});var ze={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};f({data:La,removeData:Ja,hasData:Aa,cleanData:Ba},function(a,b){Fa[b]=a}),f({data:La,inheritedData:Ra,scope:function(a){return Id.data(a,"$scope")||Ra(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Id.data(a,"$isolateScope")||Id.data(a,"$isolateScopeNoTemplate")},controller:Qa,injector:function(a){return Ra(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ma,css:function(a,b,c){return b=xa(b),u(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,d){var e=a.nodeType;if(e!==de&&e!==ce&&e!==ee){var f=Dd(b);if(xe[f]){if(!u(d))return a[b]||(a.attributes.getNamedItem(b)||p).specified?f:c;d?(a[b]=!0,a.setAttribute(b,f)):(a[b]=!1,a.removeAttribute(f))}else if(u(d))a.setAttribute(b,d);else if(a.getAttribute){var g=a.getAttribute(b,2);return null===g?c:g}}},prop:function(a,b,c){return u(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(t(b)){var c=a.nodeType;return c===be||c===de?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(t(b)){if(a.multiple&&"select"===N(a)){var c=[];return f(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return t(b)?a.innerHTML:(Ha(a,!0),void(a.innerHTML=b))},empty:Sa},function(a,b){Fa.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Sa&&t(2==a.length&&a!==Ma&&a!==Qa?b:c)){if(v(b)){for(d=0;f>d;d++)if(a===La)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=t(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),f({removeData:Ja,on:function(a,b,d,e){if(u(e))throw pe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(za(a)){var f=Ka(a,!0),g=f.events,h=f.handle;h||(h=f.handle=Xa(a,g));for(var i=b.indexOf(" ")>=0?b.split(" "):[b],j=i.length,k=function(b,c,e){var f=g[b];f||(f=g[b]=[],f.specialHandlerWrapper=c,"$destroy"===b||e||ke(a,b,h)),f.push(d)};j--;)b=i[j],oe[b]?(k(oe[b],Za),k(b,c,!0)):k(b)}},off:Ia,one:function(a,b,c){a=Id(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,d=a.parentNode;Ha(a),f(new Fa(b),function(b){c?d.insertBefore(b,c.nextSibling):d.replaceChild(b,a),c=b})},children:function(a){var b=[];return f(a.childNodes,function(a){a.nodeType===be&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===be||c===ge){b=new Fa(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===be){var c=a.firstChild;f(new Fa(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ea(a,Id(b).eq(0).clone()[0])},remove:Ta,detach:function(a){Ta(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Fa(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Oa,removeClass:Na,toggleClass:function(a,b,c){b&&f(b.split(" "),function(b){var d=c;t(d)&&(d=!Ma(a,b)),(d?Oa:Na)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==ge?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ga,triggerHandler:function(a,b,c){var d,e,g,h=b.type||b,i=Ka(a),j=i&&i.events,k=j&&j[h];k&&(d={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:h,target:a},b.type&&(d=l(d,b)),e=Q(k),g=c?[d].concat(c):[d],f(e,function(b){d.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Fa.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)t(e)?(e=a(this[f],b,c,d),u(e)&&(e=Id(e))):Pa(e,a(this[f],b,c,d));return u(e)?e:this},Fa.prototype.bind=Fa.prototype.on,Fa.prototype.unbind=Fa.prototype.off}),ab.prototype={put:function(a,b){this[_a(a,this.nextUid)]=b},get:function(a){return this[_a(a,this.nextUid)]},remove:function(a){var b=this[a=_a(a,this.nextUid)];return delete this[a],b}};var Ae=[function(){this.$get=[function(){return ab}]}],Be=/^([^\(]+?)=>/,Ce=/^[^\(]*\(\s*([^\)]*)\)/m,De=/,/,Ee=/^\s*(_?)(\S+?)\1\s*$/,Fe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ge=d("$injector");eb.$$annotate=db;var He=d("$animate"),Ie=1,Je="ng-animate",Ke=function(){this.$get=function(){}},Le=function(){var a=new ab,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,d){function e(a,b,c){var d=!1;return b&&(b=x(b)?b.split(" "):Td(b)?b:[],f(b,function(b){b&&(d=!0,a[b]=c)})),d}function g(){f(b,function(b){var c=a.get(b);if(c){var d=ib(b.attr("class")),e="",g="";f(c,function(a,b){var c=!!d[b];a!==c&&(a?e+=(e.length?" ":"")+b:g+=(g.length?" ":"")+b)}),f(b,function(a){e&&Oa(a,e),g&&Na(a,g)}),a.remove(b)}}),b.length=0}function h(c,f,h){var i=a.get(c)||{},j=e(i,f,!0),k=e(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&d.$$postDigest(g))}return{enabled:p,on:p,off:p,pin:p,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Me=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw He("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Je+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw He("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Je)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=hb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",jb(f))},move:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",jb(f))},leave:function(b,c){return a.push(b,"leave",jb(c),function(){b.remove()})},addClass:function(b,c,d){return d=jb(d),d.addClass=gb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=jb(d),d.removeClass=gb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=jb(e),e.addClass=gb(e.addClass,c),e.removeClass=gb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=jb(f),f.from=f.from?l(f.from,c):c,f.to=f.to?l(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=gb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Ne=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){kf[a]=!0});var lf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},mf=function(a){this.options=a};mf.prototype={constructor:mf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdent:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw ff("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:nf.Program,body:a}},expressionStatement:function(){return{type:nf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:nf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:nf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:nf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:nf.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:nf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=P(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:nf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:nf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:nf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:nf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.expression());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:nf.Identifier,name:a.text}},constant:function(){return{type:nf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:nf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:nf.Property,kind:"init"},this.peek().constant?a.key=this.constant():this.peek().identifier?a.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),a.value=this.expression(),b.push(a)}while(this.expect(","));return this.consume("}"),{type:nf.ObjectExpression,properties:b}},throwError:function(a,b){throw ff("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},constants:{"true":{type:nf.Literal,value:!0},"false":{type:nf.Literal,value:!1},"null":{type:nf.Literal,value:null},undefined:{type:nf.Literal,value:c},"this":{type:nf.ThisExpression},$locals:{type:nf.LocalsExpression}}},mc.prototype={compile:function(a,b){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},gc(e,d.$filter);var g,h="";if(this.stage="assign",g=jc(e)){this.state.computing="assign";var i=this.nextId();this.recurse(g,i), +this.return_(i),h="fn.assign="+this.generateFunction("assign","s,v,l")}var j=hc(e.body);d.stage="inputs",f(j,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var k='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+h+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",k)(this.$filter,$b,ac,bc,_b,cc,dc,ec,a);return this.state=this.stage=c,l.literal=kc(e),l.constant=lc(e),l},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return f(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return f(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,e,g,h){var i,j,k,l,m=this;if(e=e||p,!h&&u(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,e,g,!0));switch(a.type){case nf.Program:f(a.body,function(b,d){m.recurse(b.expression,c,c,function(a){j=a}),d!==a.body.length-1?m.current().body.push(j,";"):m.return_(j)});break;case nf.Literal:l=this.escape(a.value),this.assign(b,l),e(l);break;case nf.UnaryExpression:this.recurse(a.argument,c,c,function(a){j=a}),l=a.operator+"("+this.ifDefined(j,0)+")",this.assign(b,l),e(l);break;case nf.BinaryExpression:this.recurse(a.left,c,c,function(a){i=a}),this.recurse(a.right,c,c,function(a){j=a}),l="+"===a.operator?this.plus(i,j):"-"===a.operator?this.ifDefined(i,0)+a.operator+this.ifDefined(j,0):"("+i+")"+a.operator+"("+j+")",this.assign(b,l),e(l);break;case nf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case nf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case nf.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),$b(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){g&&1!==g&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||oc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case nf.MemberExpression:i=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,i,c,function(){m.if_(m.notNull(i),function(){g&&1!==g&&m.addEnsureSafeAssignContext(i),a.computed?(j=m.nextId(),m.recurse(a.property,j),m.getStringValue(j),m.addEnsureSafeMemberName(j),g&&1!==g&&m.if_(m.not(m.computedMember(i,j)),m.lazyAssign(m.computedMember(i,j),"{}")),l=m.ensureSafeObject(m.computedMember(i,j)),m.assign(b,l),d&&(d.computed=!0,d.name=j)):($b(a.property.name),g&&1!==g&&m.if_(m.not(m.nonComputedMember(i,a.property.name)),m.lazyAssign(m.nonComputedMember(i,a.property.name),"{}")),l=m.nonComputedMember(i,a.property.name),(m.state.expensiveChecks||oc(a.property.name))&&(l=m.ensureSafeObject(l)),m.assign(b,l),d&&(d.computed=!1,d.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!g);break;case nf.CallExpression:b=b||this.nextId(),a.filter?(j=m.filter(a.callee.name),k=[],f(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),k.push(b)}),l=j+"("+k.join(",")+")",m.assign(b,l),e(b)):(j=m.nextId(),i={},k=[],m.recurse(a.callee,j,i,function(){m.if_(m.notNull(j),function(){m.addEnsureSafeFunction(j),f(a.arguments,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(m.ensureSafeObject(a))})}),i.name?(m.state.expensiveChecks||m.addEnsureSafeObject(i.context),l=m.member(i.context,i.name,i.computed)+"("+k.join(",")+")"):l=j+"("+k.join(",")+")",l=m.ensureSafeObject(l),m.assign(b,l)},function(){m.assign(b,"undefined")}),e(b)}));break;case nf.AssignmentExpression:if(j=this.nextId(),i={},!ic(a.left))throw ff("lval","Trying to assign a value to a non l-value");this.recurse(a.left,c,i,function(){m.if_(m.notNull(i.context),function(){m.recurse(a.right,j),m.addEnsureSafeObject(m.member(i.context,i.name,i.computed)),m.addEnsureSafeAssignContext(i.context),l=m.member(i.context,i.name,i.computed)+a.operator+j,m.assign(b,l),e(b||l)})},1);break;case nf.ArrayExpression:k=[],f(a.elements,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(a)})}),l="["+k.join(",")+"]",this.assign(b,l),e(l);break;case nf.ObjectExpression:k=[],f(a.properties,function(a){m.recurse(a.value,m.nextId(),c,function(b){k.push(m.escape(a.key.type===nf.Identifier?a.key.name:""+a.key.value)+":"+b)})}),l="{"+k.join(",")+"}",this.assign(b,l),e(l);break;case nf.ThisExpression:this.assign(b,"s"),e("s");break;case nf.LocalsExpression:this.assign(b,"l"),e("l");break;case nf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(x(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(y(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw ff("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},nc.prototype={compile:function(a,b){var c=this,d=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,gc(d,c.$filter);var e,g;(e=jc(d))&&(g=this.recurse(e));var h,i=hc(d.body);i&&(h=[],f(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];f(d.body,function(a){j.push(c.recurse(a.expression))});var k=0===d.body.length?function(){}:1===d.body.length?j[0]:function(a,b){var c;return f(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=kc(d),k.constant=lc(d),k},recurse:function(a,b,d){var e,g,h,i=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case nf.Literal:return this.value(a.value,b);case nf.UnaryExpression:return g=this.recurse(a.argument),this["unary"+a.operator](g,b);case nf.BinaryExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.LogicalExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case nf.Identifier:return $b(a.name,i.expression),i.identifier(a.name,i.expensiveChecks||oc(a.name),b,d,i.expression);case nf.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||($b(a.property.name,i.expression),g=a.property.name),a.computed&&(g=this.recurse(a.property)),a.computed?this.computedMember(e,g,b,d,i.expression):this.nonComputedMember(e,g,i.expensiveChecks,b,d,i.expression);case nf.CallExpression:return h=[],f(a.arguments,function(a){h.push(i.recurse(a))}),a.filter&&(g=this.$filter(a.callee.name)),a.filter||(g=this.recurse(a.callee,!0)),a.filter?function(a,d,e,f){for(var i=[],j=0;j":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:c,name:c,value:a}:a}},identifier:function(a,b,d,e,f){return function(g,h,i,j){var k=h&&a in h?h:g;e&&1!==e&&k&&!k[a]&&(k[a]={});var l=k?k[a]:c;return b&&ac(l,f),d?{context:k,name:a,value:l}:l}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=_b(j),$b(j,e),d&&1!==d&&(cc(l),l&&!l[j]&&(l[j]={})),k=l[j],ac(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,d,e,f,g){return function(h,i,j,k){var l=a(h,i,j,k);f&&1!==f&&(cc(l),l&&!l[b]&&(l[b]={}));var m=null!=l?l[b]:c;return(d||oc(b))&&ac(m,g),e?{context:l,name:b,value:m}:m}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var of=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new nf(this.lexer),this.astCompiler=c.csp?new nc(this.ast,b):new mc(this.ast,b)};of.prototype={constructor:of,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var pf=Object.prototype.valueOf,qf=d("$sce"),rf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Qe=d("$compile"),sf=b.createElement("a"),tf=Fc(a.location.href);Ic.$inject=["$document"],Kc.$inject=["$provide"];var uf=22,vf=".",wf="0";Pc.$inject=["$locale"],Qc.$inject=["$locale"];var xf={yyyy:Vc("FullYear",4),yy:Vc("FullYear",2,0,!0),y:Vc("FullYear",1),MMMM:Wc("Month"),MMM:Wc("Month",!0),MM:Vc("Month",2,1),M:Vc("Month",1,1),dd:Vc("Date",2),d:Vc("Date",1),HH:Vc("Hours",2),H:Vc("Hours",1),hh:Vc("Hours",2,-12),h:Vc("Hours",1,-12),mm:Vc("Minutes",2),m:Vc("Minutes",1),ss:Vc("Seconds",2),s:Vc("Seconds",1),sss:Vc("Milliseconds",3),EEEE:Wc("Day"),EEE:Wc("Day",!0),a:_c,Z:Xc,ww:$c(2),w:$c(1),G:ad,GG:ad,GGG:ad,GGGG:bd},yf=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,zf=/^\-?\d+$/;cd.$inject=["$locale"];var Af=r(Dd),Bf=r(Ed);fd.$inject=["$parse"];var Cf=r({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Od.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Df={};f(xe,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=pb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Df[d]=function(){return{restrict:"A",priority:100,link:e}}}}),f(ze,function(a,b){Df[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Ad);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),f(["src","srcset","href"],function(a){var b=pb("ng-"+a);Df[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Od.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Hd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Ef={$addControl:p,$$renameControl:hd,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ff="ng-submitted";id.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Gf=function(a){return["$timeout","$parse",function(b,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||p}var f={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:id,compile:function(d,f){d.addClass(mg).addClass(kg);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,f,h){var i=h[0];if(!("action"in f)){var j=function(b){a.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),b.preventDefault()};ke(d[0],"submit",j),d.on("$destroy",function(){b(function(){le(d[0],"submit",j)},0,!1)})}var k=h[1]||i.$$parentForm;k.$addControl(i);var m=g?e(i.$name):p;g&&(m(a,i),f.$observe(g,function(b){i.$name!==b&&(m(a,c),i.$$parentForm.$$renameControl(i,b),(m=e(i.$name))(a,i))})),d.on("$destroy",function(){i.$$parentForm.$removeControl(i),m(a,c),l(i,Ef)})}}}};return f}]},Hf=Gf(),If=Gf(!0),Jf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Kf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Lf=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Mf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Nf=/^(\d{4})-(\d{2})-(\d{2})$/,Of=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Pf=/^(\d{4})-W(\d\d)$/,Qf=/^(\d{4})-(\d\d)$/,Rf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sf={text:kd,date:od("date",Nf,nd(Nf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":od("datetimelocal",Of,nd(Of,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:od("time",Rf,nd(Rf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:od("week",Pf,md,"yyyy-Www"),month:od("month",Qf,nd(Qf,["yyyy","MM"]),"yyyy-MM"),number:qd,url:rd,email:sd,radio:td,checkbox:vd,hidden:p,button:p,submit:p,reset:p,file:p},Tf=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sf[Dd(g.type)]||Sf.text)(e,f,g,h[0],b,a,c,d)}}}}],Uf=/^(true|false|\d+)$/,Vf=function(){return{restrict:"A",priority:100,compile:function(a,b){return Uf.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Wf=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=t(a)?"":a})}}}}],Xf=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=t(a)?"":a})}}}}],Yf=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){d.html(a.getTrustedHtml(f(b))||"")})}}}}],Zf=r({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),$f=wd("",!0),_f=wd("Odd",0),ag=wd("Even",1),bg=gd({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),cg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],dg={},eg={blur:!0,focus:!0};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=pb("ng-"+a);dg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};eg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var fg=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=qa(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],gg=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Rd.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!u(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],hg=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Od.call(d[0]).match(/SVG/)?(d.empty(),void a(Ca(f.template,b).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void a(d.contents())(c))}}}],ig=gd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),jg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,e){var g=b.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,i=h?Vd(g):g,j=function(a){if(!t(a)){var b=[];return a&&f(a.split(i),function(a){a&&b.push(h?Vd(a):a)}),b}};e.$parsers.push(j),e.$formatters.push(function(a){return Td(a)?a.join(g):c}),e.$isEmpty=function(a){return!a||!a.length}}}},kg="ng-valid",lg="ng-invalid",mg="ng-pristine",ng="ng-dirty",og="ng-untouched",pg="ng-touched",qg="ng-pending",rg="ng-empty",sg="ng-not-empty",tg=d("ngModel"),ug=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,e,g,h,i,j,k,l){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=c,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=c,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Ef;var m,n=g(d.ngModel),o=n.assign,q=n,r=o,s=null,v=this;this.$$setOptions=function(a){if(v.$options=a,a&&a.getterSetter){var b=g(d.ngModel+"()"),c=g(d.ngModel+"($$$p)");q=function(a){var c=n(a);return A(c)&&(c=b(a)),c},r=function(a,b){A(n(a))?c(a,{$$$p:v.$modelValue}):o(a,v.$modelValue)}}else if(!n.assign)throw tg("nonassign","Expression '{0}' is non-assignable. Element: {1}",d.ngModel,_(e))},this.$render=p,this.$isEmpty=function(a){return t(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){v.$isEmpty(a)?(h.removeClass(e,sg),h.addClass(e,rg)):(h.removeClass(e,rg),h.addClass(e,sg))};var w=0;xd({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:h}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,h.removeClass(e,ng),h.addClass(e,mg)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,h.removeClass(e,mg),h.addClass(e,ng),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,h.setClass(e,og,pg)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,h.setClass(e,pg,og)},this.$rollbackViewValue=function(){i.cancel(s),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!y(v.$modelValue)||!isNaN(v.$modelValue)){var a=v.$$lastCommittedViewValue,b=v.$$rawModelValue,d=v.$valid,e=v.$modelValue,f=v.$options&&v.$options.allowInvalid;v.$$runValidators(b,a,function(a){f||d===a||(v.$modelValue=a?b:c,v.$modelValue!==e&&v.$$writeModelToScope())})}},this.$$runValidators=function(a,b,d){function e(){var a=v.$$parserName||"parse";return t(m)?(i(a,null),!0):(m||(f(v.$validators,function(a,b){i(b,null)}),f(v.$asyncValidators,function(a,b){i(b,null)})),i(a,m),m)}function g(){var c=!0;return f(v.$validators,function(d,e){var f=d(a,b);c=c&&f,i(e,f)}),c?!0:(f(v.$asyncValidators,function(a,b){i(b,null)}),!1)}function h(){var d=[],e=!0;f(v.$asyncValidators,function(f,g){var h=f(a,b);if(!I(h))throw tg("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",h);i(g,c),d.push(h.then(function(){i(g,!0)},function(a){e=!1,i(g,!1)}))}),d.length?k.all(d).then(function(){j(e)},p):j(!0)}function i(a,b){l===w&&v.$setValidity(a,b)}function j(a){l===w&&d(a)}w++;var l=w;return e()&&g()?void h():void j(!1)},this.$commitViewValue=function(){var a=v.$viewValue;i.cancel(s),(v.$$lastCommittedViewValue!==a||""===a&&v.$$hasNativeValidators)&&(v.$$updateEmptyClasses(a),v.$$lastCommittedViewValue=a,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){v.$modelValue!==g&&v.$$writeModelToScope()}var d=v.$$lastCommittedViewValue,e=d;if(m=t(e)?c:!0)for(var f=0;ff;f++){var i=a===c?f:c[f],j=(a[i],x(a[i],i)),k=q(a[i],j);if(b.push(k),h[2]||h[1]){var l=s(d,j);b.push(l)}if(h[4]){var m=u(d,j);b.push(m)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],e=g(c),h=e.length,i=0;h>i;i++){var j=c===e?i:e[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new f(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Rd.copy(a.viewValue):a.viewValue}}}}}function g(b,c,e,g){function j(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function k(a,b,c,d){var e;return b&&Dd(b.nodeName)===c?e=b:(e=d.cloneNode(!1),b?a.insertBefore(e,b):a.appendChild(e)),e}function l(a){for(var b;a;)b=a.nextSibling,Ta(a),a=b}function m(a){var b=o&&o[0],c=x&&x[0];if(b||c)for(;a&&(a===b||a===c||a.nodeType===ee||"option"===N(a)&&""===a.value);)a=a.nextSibling;return a}function n(){var a=y&&p.readValue();y=z.getOptions();var b={},d=c[0].firstChild;if(w&&c.prepend(o),d=m(d),y.items.forEach(function(a){var e,f,g;u(a.group)?(e=b[a.group],e||(f=k(c[0],d,"optgroup",i),d=f.nextSibling,f.label=a.group,e=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),g=k(e.groupElement,e.currentOptionElement,"option",h),j(a,g),e.currentOptionElement=g.nextSibling):(g=k(c[0],d,"option",h),j(a,g),d=g.nextSibling)}),Object.keys(b).forEach(function(a){l(b[a].currentOptionElement)}),l(d),q.$render(),!q.$isEmpty(a)){var e=p.readValue(),f=z.trackBy||r;(f?R(a,e):a===e)||(q.$setViewValue(e),q.$render())}}for(var o,p=g[0],q=g[1],r=e.multiple,s=0,t=c.children(),v=t.length;v>s;s++)if(""===t[s].value){o=t.eq(s);break}var w=!!o,x=Id(h.cloneNode(!1));x.val("?");var y,z=d(e.ngOptions,c,b),A=function(){w||c.prepend(o),c.val(""),o.prop("selected",!0),o.attr("selected",!0)},B=function(){w||o.remove()},C=function(){c.prepend(x),c.val("?"),x.prop("selected",!0),x.attr("selected",!0)},D=function(){x.remove()};r?(q.$isEmpty=function(a){return!a||0===a.length},p.writeValue=function(a){y.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled&&(b.element.selected=!0)})},p.readValue=function(){var a=c.val()||[],b=[];return f(a,function(a){var c=y.selectValueMap[a];c&&!c.disabled&&b.push(y.getViewValueFromOption(c))}),b},z.trackBy&&b.$watchCollection(function(){return Td(q.$viewValue)?q.$viewValue.map(function(a){return z.getTrackByValue(a)}):void 0},function(){q.$render()})):(p.writeValue=function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled?c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||w?(D(),A()):(B(),C())},p.readValue=function(){var a=y.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),y.getViewValueFromOption(a)):null},z.trackBy&&b.$watch(function(){return z.getTrackByValue(q.$viewValue)},function(){q.$render()})),w?(o.remove(),a(o)(b),o.removeClass("ng-scope")):o=Id(h.cloneNode(!1)),n(),b.$watchCollection(z.getWatchables,n)}var h=b.createElement("option"),i=b.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=p},post:g +}}}],Cg=["$locale","$interpolate","$log",function(a,b,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),n=i.offset||0,o=g.$eval(m)||{},q={},r=b.startSymbol(),s=b.endSymbol(),u=r+l+"-"+n+s,v=Rd.noop;f(i,function(a,b){var c=e.exec(b);if(c){var d=(c[1]?"-":"")+Dd(c[2]);o[d]=h.attr(i.$attr[b])}}),f(o,function(a,c){q[c]=b(a.replace(d,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in o||(d=a.pluralCat(d-n)),d!==k&&!(e&&y(k)&&isNaN(k))){v();var f=q[d];t(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=p,j()):v=g.$watch(f,j),k=d}})}}}],Dg=["$parse","$animate",function(a,g){var h="$$NG_REMOVED",i=d("ngRepeat"),j=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},k=function(a){return a.clone[0]},l=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(d,m){var n=m.ngRepeat,o=b.createComment(" end ngRepeat: "+n+" "),p=n.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);var q=p[1],r=p[2],s=p[3],t=p[4];if(p=q.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!p)throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",q);var u=p[3]||p[1],v=p[2];if(s&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(s)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(s)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",s);var w,x,y,z,A={$id:_a};return t?w=a(t):(y=function(a,b){return _a(b)},z=function(a){return a}),function(a,b,d,m,p){w&&(x=function(b,c,d){return v&&(A[v]=b),A[u]=c,A.$index=d,w(a,A)});var q=ra();a.$watchCollection(r,function(d){var m,r,t,w,A,B,C,D,E,F,G,H,I=b[0],J=ra();if(s&&(a[s]=d),e(d))E=d,D=x||y;else{D=x||z,E=[];for(var K in d)Cd.call(d,K)&&"$"!==K.charAt(0)&&E.push(K)}for(w=E.length,G=new Array(w),m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],C=D(A,B,m),q[C])F=q[C],delete q[C],J[C]=F,G[m]=F;else{if(J[C])throw f(G,function(a){a&&a.scope&&(q[a.id]=a)}),i("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",n,C,B);G[m]={id:C,scope:c,clone:c},J[C]=!0}for(var L in q){if(F=q[L],H=qa(F.clone),g.leave(H),H[0].parentNode)for(m=0,r=H.length;r>m;m++)H[m][h]=!0;F.scope.$destroy()}for(m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],F=G[m],F.scope){t=I;do t=t.nextSibling;while(t&&t[h]);k(F)!=t&&g.move(qa(F.clone),null,Id(I)),I=l(F),j(F.scope,m,u,B,v,A,w)}else p(function(a,b){F.scope=b;var c=o.cloneNode(!1);a[a.length++]=c,g.enter(a,null,Id(I)),I=c,F.clone=a,J[F.id]=F,j(F.scope,m,u,B,v,A,w)});q=J})}}}}],Eg="ng-hide",Fg="ng-hide-animate",Gg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Eg,{tempClasses:Fg})})}}}],Hg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Eg,{tempClasses:Fg})})}}}],Ig=gd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&f(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Jg=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var h=e.ngSwitch||e.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var d,e;for(d=0,e=k.length;e>d;++d)a.cancel(k[d]);for(k.length=0,d=0,e=l.length;e>d;++d){var h=qa(j[d].clone);l[d].$destroy();var n=k[d]=a.leave(h);n.then(m(k,d))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&f(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.createComment(" end ngSwitchWhen: ");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Kg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Lg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Mg=d("ngTransclude"),Ng=gd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Mg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",_(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Og=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Pg={$setViewValue:p,$render:p},Qg=["$element","$scope","$attrs",function(a,d,e){var f=this,g=new ab;f.ngModelCtrl=Pg,f.unknownOption=Id(b.createElement("option")),f.renderUnknownOption=function(b){var c="? "+_a(b)+" ?";f.unknownOption.val(c),a.prepend(f.unknownOption),a.val(c)},d.$on("$destroy",function(){f.renderUnknownOption=p}),f.removeUnknownOption=function(){f.unknownOption.parent()&&f.unknownOption.remove()},f.readValue=function(){return f.removeUnknownOption(),a.val()},f.writeValue=function(b){f.hasOption(b)?(f.removeUnknownOption(),a.val(b),""===b&&f.emptyOption.prop("selected",!0)):null==b&&f.emptyOption?(f.removeUnknownOption(),a.val("")):f.renderUnknownOption(b)},f.addOption=function(a,b){if(b[0].nodeType!==ee){oa(a,'"option value"'),""===a&&(f.emptyOption=b);var c=g.get(a)||0;g.put(a,c+1),f.ngModelCtrl.$render(),zd(b)}},f.removeOption=function(a){var b=g.get(a);b&&(1===b?(g.remove(a),""===a&&(f.emptyOption=c)):g.put(a,b-1))},f.hasOption=function(a){return!!g.get(a)},f.registerOption=function(a,b,c,d,e){if(d){var g;c.$observe("value",function(a){u(g)&&f.removeOption(g),g=a,f.addOption(a,b)})}else e?a.$watch(e,function(a,d){c.$set("value",a),d!==a&&f.removeOption(d),f.addOption(a,b)}):f.addOption(c.value,b);b.on("$destroy",function(){f.removeOption(c.value),f.ngModelCtrl.$render()})}}],Rg=function(){function a(a,b,c,d){var e=d[1];if(e){var g=d[0];if(g.ngModelCtrl=e,b.on("change",function(){a.$apply(function(){e.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return f(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new ab(a);f(b.find("option"),function(a){a.selected=u(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==e.$viewValue||R(h,e.$viewValue)||(h=Q(e.$viewValue),e.$render()),i=e.$viewValue}),e.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Qg,priority:1,link:{pre:a,post:b}}},Sg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(u(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],Tg=r({restrict:"E",terminal:!1}),Ug=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},Vg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,e,f){if(f){var g,h=e.ngPattern||e.pattern;e.$observe("pattern",function(a){if(x(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw d("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",h,a,_(b));g=a||c,f.$validate()}),f.$validators.pattern=function(a,b){return f.$isEmpty(b)||t(g)||g.test(b)}}}}},Wg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=n(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},Xg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=n(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(la(),va(Rd),Rd.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function d(a,d){var e=d;c===e&&(e=Math.min(b(a),3));var f=Math.pow(10,e),g=(a*f|0)%f;return{v:e,f:g}}var e={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var c=0|a,f=d(a,b);return 1==c&&0==f.v?e.ONE:e.OTHER}})}]),void Id(b).ready(function(){ga(b,ha)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/");var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/ +},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){ +return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){ +function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n'); +}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]; +},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),angular.module("barcode",[]).directive("barcode",["BarcodeService","Code39Service","Code128BService","Code128CService","EanService","Itf14NumberService","ItfNumberService","UpcService",function(a,b,c,d,e,f,g,h){function i(i,j,k){var l={width:2,height:100,quite:10,displayValue:!1,font:"monospace",textAlign:"center",fontSize:12,backgroundColor:"",lineColor:"#000"},m=[];m=a.merge(l,i.options);var n=j.find("canvas")[0];if("img"==k.render&&(n=document.createElement("canvas")),!n.getContext)return null;var o="";switch(k.type){case"upc":o=h;break;case"ean":o=e;break;case"code39":o=b;break;case"code128b":o=c;break;case"code128c":o=d;break;case"itf":o=g;break;case"itf14":o=f}if(""!==o){var p=o.encoded(k.string);if(!angular.isUndefined(p)){var q=function(a){var b,c;c=m.height,r.font=m.fontSize+"px "+m.font,r.textBaseline="bottom",r.textBaseline="top","left"==m.textAlign?(b=m.quite,r.textAlign="left"):"right"==m.textAlign?(b=n.width-m.quite,r.textAlign="right"):(b=n.width/2,r.textAlign="center"),r.fillText(a,b,c)},r=n.getContext("2d");n.width=p.length*m.width+2*m.quite,n.height=m.height+(m.displayValue?1.3*m.fontSize:0),r.clearRect(0,0,n.width,n.height),m.backgroundColor&&(r.fillStyle=m.backgroundColor,r.fillRect(0,0,n.width,n.height)),r.fillStyle=m.lineColor;for(var s=0;s"),a.append(c),{post:j}}return{restrict:"E",scope:{options:"=options"},compile:k}}]),angular.module("barcode").factory("BarcodeService",[function(){"use strict";var a={};return a.merge=function(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c},a}]),angular.module("barcode").factory("Code128Service",[function(){"use strict";var a={},b=[[" ","11011001100",0],["!","11001101100",1],['"',"11001100110",2],["#","10010011000",3],["$","10010001100",4],["%","10001001100",5],["&","10011001000",6],["'","10011000100",7],["(","10001100100",8],[")","11001001000",9],["*","11001000100",10],["+","11000100100",11],[",","10110011100",12],["-","10011011100",13],[".","10011001110",14],["/","10111001100",15],["0","10011101100",16],["1","10011100110",17],["2","11001110010",18],["3","11001011100",19],["4","11001001110",20],["5","11011100100",21],["6","11001110100",22],["7","11101101110",23],["8","11101001100",24],["9","11100101100",25],[":","11100100110",26],[";","11101100100",27],["<","11100110100",28],["=","11100110010",29],[">","11011011000",30],["?","11011000110",31],["@","11000110110",32],["A","10100011000",33],["B","10001011000",34],["C","10001000110",35],["D","10110001000",36],["E","10001101000",37],["F","10001100010",38],["G","11010001000",39],["H","11000101000",40],["I","11000100010",41],["J","10110111000",42],["K","10110001110",43],["L","10001101110",44],["M","10111011000",45],["N","10111000110",46],["O","10001110110",47],["P","11101110110",48],["Q","11010001110",49],["R","11000101110",50],["S","11011101000",51],["T","11011100010",52],["U","11011101110",53],["V","11101011000",54],["W","11101000110",55],["X","11100010110",56],["Y","11101101000",57],["Z","11101100010",58],["[","11100011010",59],["\\","11101111010",60],["]","11001000010",61],["^","11110001010",62],["_","10100110000",63],["`","10100001100",64],["a","10010110000",65],["b","10010000110",66],["c","10000101100",67],["d","10000100110",68],["e","10110010000",69],["f","10110000100",70],["g","10011010000",71],["h","10011000010",72],["i","10000110100",73],["j","10000110010",74],["k","11000010010",75],["l","11001010000",76],["m","11110111010",77],["n","11000010100",78],["o","10001111010",79],["p","10100111100",80],["q","10010111100",81],["r","10010011110",82],["s","10111100100",83],["t","10011110100",84],["u","10011110010",85],["v","11110100100",86],["w","11110010100",87],["x","11110010010",88],["y","11011011110",89],["z","11011110110",90],["{","11110110110",91],["|","10101111000",92],["}","10100011110",93],["~","10001011110",94],[String.fromCharCode(127),"10111101000",95],[String.fromCharCode(128),"10111100010",96],[String.fromCharCode(129),"11110101000",97],[String.fromCharCode(130),"11110100010",98],[String.fromCharCode(131),"10111011110",99],[String.fromCharCode(132),"10111101110",100],[String.fromCharCode(133),"11101011110",101],[String.fromCharCode(134),"11110101110",102],[String.fromCharCode(135),"11010000100",103],[String.fromCharCode(136),"11010010000",104],[String.fromCharCode(137),"11010011100",105]],c="1100011101011",d=/^[!-~ ]+$/;return a.valid=function(a){return-1==a.search(d)?!1:!0},a.calculateCode128=function(b,d,e,f){var g="";return g+=a.encodingById(e),g+=d(b),g+=a.encodingById(f(b,e)),g+=c},a.encodingById=function(a){for(var c=0;cc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),angular.module("barcode").factory("Itf14NumberService",[function(){"use strict";function a(a){var d="";13==a.length&&(a+=c(a)),d+=g;for(var e=0;14>e;e+=2)d+=b(a.substr(e,2));return d+=h}function b(a){for(var b="",c=f[a[0]],d=f[a[1]],e=0;5>e;e++)b+="1"==c[e]?"111":"1",b+="1"==d[e]?"000":"0";return b}function c(a){for(var b=0,c=0;13>c;c++)b+=parseInt(a[c])*(3-c%2*2);return 10-b%10}function d(a){return-1==a.search(i)?!1:14==a.length?a[13]==c(a):!0}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},g="1010",h="11101",i=/^[0-9]{13,14}$/;return e}]),angular.module("barcode").factory("ItfNumberService",[function(){"use strict";function a(a){var c="";c+=f;for(var d=0;df;f++)b+="1"==c[f]?"111":"1",b+="1"==d[f]?"000":"0";return b}function c(a){return-1!==a.search(h)}var d={};d.valid=function(a){return c(a)},d.encoded=function(b){return c(b)?a(b):""};var e={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},f="1010",g="11101",h=/^([0-9][0-9])+$/;return d}]),angular.module("barcode").factory("UpcService",[function(){"use strict";function a(a){var c="",d=a[0],e=a.substr(1,7),f=a.substr(7,6);return c+=j,c+=b(e,i[d]),c+=l,c+=b(f,"RRRRRR"),c+=k}function b(a,b){for(var c="",d=0;dc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d("0"+a)},e.encoded=function(b){return d("0"+b)?a("0"+b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css new file mode 100644 index 0000000..fe87a68 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.modal-body,.modal-footer,body{font-family:FontAwesome}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{background-color:#d6d6d6;padding:0}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.close-button,.proceed-button{background-color:#72529b;color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.proceed-button{font-size:larger;border-radius:4px}.close-button{border-radius:4px}.poweredByMOLPay{margin-top:15px;max-height:20px;max-width:150px}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html new file mode 100644 index 0000000..1172c42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html new file mode 100644 index 0000000..cab8cc3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html new file mode 100644 index 0000000..9e47ece --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html new file mode 100644 index 0000000..6f04d86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html new file mode 100644 index 0000000..a77da9e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html @@ -0,0 +1 @@ +

    Finalizing payment status.

    Please wait.

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html new file mode 100644 index 0000000..4d9bee4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html @@ -0,0 +1 @@ +

    MOLPay X-Platform

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html new file mode 100644 index 0000000..1f22555 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html @@ -0,0 +1,10 @@ +
    Order ID {{sdkData.mp_order_ID}}
    {{sdkData.mp_currency}} {{sdkData.mp_amount}}
     
     
     
     
    Pay through   {{sdkData.mp_channel_title}}
    New card
    Card number  
    CVV  
    Exp date  
    Country   {{sdkData.mp_credit_card_country_title}}
    Bank name   {{sdkData.mp_credit_card_bank}}
    Use BCARD points (RM1 = 100 BCARD Points)
    {{sdkData.bcard_point}}
    Card# 6298 43  
    Pin  
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html new file mode 100644 index 0000000..909397f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html @@ -0,0 +1 @@ +
    Services MOLPay {{C5ResultData.channel}}
    Transaction ID {{C5ResultData.txn_ID}}
    {{C5ResultData.pcode_lbl}} {{C5ResultData.pcode}}
    Payable amount {{C5ResultData.cur}}{{C5ResultData.payable_amt}}
    Note
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..dd70808 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var iabRef = null; +var molpaySdkUrl = 'molpay-mobile-xdk-www/index.html'; + +var sdkData = { + // ------- SDK required basic data ---------- + 'mp_amount' : '1.10', + 'mp_username' : 'molpayapi', + 'mp_password' : '*M0Lp4y4p1!*', + 'mp_merchant_ID' : 'molpaymerchant', + 'mp_app_name' : 'wilwe_makan2', + 'mp_order_ID' : 'XP010', + 'mp_currency' : 'MYR', + 'mp_country' : 'MY', + 'mp_verification_key' : '501c4f508cf1c3f486f4f5c820591f41', + 'mp_channel' : 'multi', + 'mp_bill_description' : 'Cordova payment test', + 'mp_bill_name' : 'MOLPay Developer', + 'mp_bill_email' : 'clement@molpay.com', + 'mp_bill_mobile' : '123456', + 'mp_channel_editing' : false, + 'mp_editing_enabled' : false, + 'mp_transaction_id' : '', // Required if mp_request_type is 'Receipt' + 'mp_request_type' : '', // 'Receipt' for Cash channels +}; + + +var app = { + + onMOLPayLoadstart: function(event) { + console.log('onMOLPayLoadstart event = '+JSON.stringify(event, null, '')); + }, + + onMOLPayLoadstop: function(event) { + console.log('onMOLPayLoadstop event = '+JSON.stringify(sdkData, null, '')); + iabRef.executeScript({ + code: "updateSdkData("+JSON.stringify(sdkData)+");" + }, function() { + alert("updateSdkData executed successfully"); + }); + }, + + + // Application Constructor + initialize: function() { + this.bindEvents(); + }, + // Bind Event Listeners + // + // Bind any events that are required on startup. Common events are: + // 'load', 'deviceready', 'offline', and 'online'. + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + // deviceready Event Handler + // + // The scope of 'this' is the event. In order to call the 'receivedEvent' + // function, we must explicitly call 'app.receivedEvent(...);' + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + // Update DOM on a Received Event + receivedEvent: function(id) { + var parentElement = document.getElementById(id); + var listeningElement = parentElement.querySelector('.listening'); + var receivedElement = parentElement.querySelector('.received'); + + listeningElement.setAttribute('style', 'display:none;'); + receivedElement.setAttribute('style', 'display:block;'); + + console.log('Received Event: ' + id); + + window.open = cordova.InAppBrowser.open; + iabRef = window.open(molpaySdkUrl, '_blank', 'location=no'); + iabRef.addEventListener('loadstart', app.onMOLPayLoadstart); + iabRef.addEventListener('loadstop', app.onMOLPayLoadstop); + + // iabRef = window.open(molpaySdkUrl,'_blank','location=yes,hardwareback=yes'); + } +}; + +app.initialize(); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml new file mode 100644 index 0000000..626db73 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml @@ -0,0 +1,24 @@ + + + MOLPay XDK for Cordova + MOLPay official in-app payment module for Cordova + MOLPay Mobile Division + MOLPay,payment,gateway + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js new file mode 100644 index 0000000..8ec1b0b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js @@ -0,0 +1,62 @@ +cordova.define('cordova/plugin_list', function(require, exports, module) { +module.exports = [ + { + "id": "cordova-plugin-android-permissions.Permissions", + "file": "plugins/cordova-plugin-android-permissions/www/permissions.js", + "pluginId": "cordova-plugin-android-permissions", + "clobbers": [ + "cordova.plugins.permissions" + ] + }, + { + "id": "cordova-plugin-inappbrowser.inappbrowser", + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", + "pluginId": "cordova-plugin-inappbrowser", + "clobbers": [ + "cordova.InAppBrowser.open", + "window.open" + ] + }, + { + "id": "cordova-plugin-x-toast.Toast", + "file": "plugins/cordova-plugin-x-toast/www/Toast.js", + "pluginId": "cordova-plugin-x-toast", + "clobbers": [ + "window.plugins.toast" + ] + }, + { + "id": "cordova-plugin-x-toast.tests", + "file": "plugins/cordova-plugin-x-toast/test/tests.js", + "pluginId": "cordova-plugin-x-toast" + }, + { + "id": "cordova-save-image-gallery.saveImageGallery", + "file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js", + "pluginId": "cordova-save-image-gallery", + "clobbers": [ + "cordova.saveImageGallery" + ] + }, + { + "id": "molpay-mobile-xdk-cordova.MOLPay", + "file": "plugins/molpay-mobile-xdk-cordova/molpay.js", + "pluginId": "molpay-mobile-xdk-cordova", + "clobbers": [ + "molpay" + ] + } +]; +module.exports.metadata = +// TOP OF METADATA +{ + "cordova-plugin-android-permissions": "0.10.0", + "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-privacyscreen": "0.3.1", + "cordova-plugin-whitelist": "1.3.2", + "cordova-plugin-x-toast": "2.6.0", + "cordova-save-image-gallery": "0.0.26", + "molpay-mobile-xdk-cordova": "3.11.0" +}; +// BOTTOM OF METADATA +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/css/index.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/css/index.css new file mode 100644 index 0000000..dd2f06d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/css/index.css @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ +} + +body { + -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ + -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ + -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ + background-color:#E4E4E4; + background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-gradient( + linear, + left top, + left bottom, + color-stop(0, #A7A7A7), + color-stop(0.51, #E4E4E4) + ); + background-attachment:fixed; + font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; + font-size:12px; + height:100%; + margin:0px; + padding:0px; + text-transform:uppercase; + width:100%; +} + +/* Portrait layout (default) */ +.app { + position:absolute; + height:100%; + width:100%; + padding:0px; + margin:0px; +} + +/* Landscape layout (with min-width) */ +@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { + .app { + background-position:left center; + padding:0px; /* padding-top + padding-bottom + text area = image height */ + margin:0px; /* offset vertical: half of image height */ + /* offset horizontal: half of image width and text area width */ + } +} + +h1 { + font-size:24px; + font-weight:normal; + margin:0px; + overflow:visible; + padding:0px; + text-align:center; +} + +.event { + border-radius:4px; + -webkit-border-radius:4px; + color:#FFFFFF; + font-size:12px; + margin:0px 30px; + padding:2px 0px; +} + +.event.listening { + background-color:#333333; + display:block; +} + +.event.received { + background-color:#4B946A; + display:none; +} + +@keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +@-webkit-keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +.blink { + animation:fade 3000ms infinite; + -webkit-animation:fade 3000ms infinite; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/custom.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/custom.css new file mode 100644 index 0000000..56e9551 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/custom.css @@ -0,0 +1,367 @@ +/* Original CSS + +.nav, .pagination, .carousel, .panel-title a { cursor: pointer; } + +body { + font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + background-color: #d6d6d6; + padding: 0; +} + +.container-fluid { + padding-top: 15px; + padding-bottom: 15px; +} + +.list-group-item:last-child, +.list-group-item:first-child { + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + border-top-right-radius: 0px; + border-top-left-radius: 0px; +} + +.marginless-listgroup { + margin-bottom: 0px; +} + +.list-group-item { + padding: 15px 15px; + overflow: auto; +} + +.modal-list-group-item { + padding: 10px 5px; + height: 64px; +} + +.list-value { + font-weight: normal; + color: #595959; + padding-top: 0px; + border: 0px; + text-align: right; +} + +.channel-list-container { + height: 40px; + line-height: 40px; + padding-left: 5px; + padding-right: 5px; +} + +.text-list-container { + padding-left: 5px; + padding-right: 5px; +} + +.left-aligned-list-value-label { + float: left; + height: 100%; + text-align: left; +} + +.right-aligned-list-value-label { + float: right; +} + +.left-label { + font-weight: 200; + color: #ababab; + text-align: left; + width: 100%; +} + +.larger-text { + font-size: 40px; + font-weight: bold; +} + +.proceed-row { + margin-left: 20px; + margin-right: 20px; +} + +.proceed-button { + background-color: #72529b; + color: #FFFFFF; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: 0; + padding: 10px 15px; + width: 100%; + font-weight: bold; + font-size: larger; +} + +button[disabled], html input[disabled] { + opacity: 0.4; + -moz-opacity: 0.4; + background-color: gray; +} + +.close-button { + background-color: #72529b; + color: #FFFFFF; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: 0; + padding: 10px 15px; + width: 100%; + font-weight: bold; +} + +.molpay-disclaimer-container { + padding: 15px; +} + +.poweredByMOLPay { + height: 20px; +} + +.mp-version { + color: #818285; + float: right; + height: 20px; + font-size: 8px; + display: table; + font-weight: bold; +} + +.mp-version span { + display: table-cell; + vertical-align: bottom; +} + +.modal-body { + font-size: larger; + text-align: center; +} + +.loading { + position: fixed; + z-index: 999; + height: 2em; + overflow: show; + margin: auto; + top: 0px; + left: 0px; + bottom: 0px; + right: 0px; +} + +.loading:before { + display: block; + width: 100%; + height: 100%; +} + +.loadingbackground { + content: ''; + display: block; + position: fixed; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background-color: Black; + filter: alpha(opacity=60); + opacity: 0.6; + -moz-opacity: 0.8; + display:block; +} + +.fa-spinner:before { + color: white; +} + +.loading-text { + position: relative; + z-index: 999; + height: 100%; + width: 100%; + top: 10px; + left:0px; + display:block; + color: #FFFFFF; +} + +.channel-logo { + max-height: 40px; +} + +.creditcard-form { + margin-top: 10px; +} + +.split { + padding: 0px; + border-width: 0px; + display: -webkit-flex; + display: flex; +} + +.split-cvv { + width: 40%; +} + +.split-exp { + width: 60%; +} + +.card-number-input { + border-width: 0px; + text-align: right; + max-width: 160px; +} + +.cvv-input { + border-width: 0px; + text-align: right; + width: 50%; +} + +.exp-input { + border-width: 0px; + text-align: right; + width: 50%; +} + +.channel-list-modal-body { + max-height: calc(100vh - 105px); + min-height: 480px; + min-height: 80vw; + overflow-y: auto; +} + +.country-list-modal-body { + max-height: calc(100vh - 185px); + min-height: 480px; + min-height: 80vw; + overflow-y: auto; +} + +.search-bar { + margin-bottom: 0px; +} + +.search-icon { + float: right; + margin-right: 10px; + margin-top: -24px; + position: relative; + z-index: 2; +} + +.modal-header { + text-align: center; +} + +.bcard-form { + margin-top: 10px; +} + +.new-credit-card-form { + position: relative; + display: block; + padding-left: 15px; + padding-top: 5px; + padding-bottom: 5px; + border: 0px; + margin-bottom: -1px; + min-height: 44px; +} + +.new-card-label { + position: absolute; + margin-top: 5px; + font-weight: 200; + color: #595959; +} + +.new-credit-card-switch { + margin-left: 80px; + position: relative; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + min-height: 28px; +} + +.new-credit-card-switch span { + min-height: 28px; +} + +.new-credit-card-switch .switch-left { + background: #72529b; +} + +.new-credit-card-switch .switch-right { + color: #333; + background: #f0f0f0; +} + +.new-credit-card-switch .knob { + background: red; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + background-color: #FFFFFF; + width: 34%; + z-index: 100; +} + +.billing { + text-align: left; + width: 90%; +} + +.bcard-point-label { + padding-bottom: 0px; + margin-bottom: 0px; + border-bottom: 0px; +} + +.bcard-point { + border-top: 0px; +} + +.notes { + border: 0px; + padding-bottom: 0px; +} + +.barcode-container { + width: 100%; + padding-top: 15px; + padding-left: 10px; + padding-right: 10px; + text-align: center; +} + +.receipt-logo { + height: 70px; +} + +.pull-right { + max-width: 70%; +} + +.credit-card-input { + max-width: 160px; +} + +@media screen and (min-width: 320px) { + .container { + width: auto; + } +} + +*/ \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/img/logo.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/img/logo.png new file mode 100644 index 0000000..9519e7d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/img/logo.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/index.html new file mode 100644 index 0000000..fa9a358 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/index.html @@ -0,0 +1,21 @@ + + + + + + + + + MOLPay Example + + +
    +
    + +
    +
    +
    + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/js/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/js/index.js new file mode 100644 index 0000000..4476fb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/js/index.js @@ -0,0 +1,65 @@ +var app = { + initialize: function() { + this.bindEvents(); + }, + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + receivedEvent: function(id) { + + // MOLPay payment details + var paymentDetails = { + // ------- SDK required data ---------- + 'mp_amount' : '', + 'mp_username' : '', + 'mp_password' : '', + 'mp_merchant_ID' : '', + 'mp_app_name' : '', + 'mp_order_ID' : '', + 'mp_currency' : 'MYR', + 'mp_country' : 'MY', + 'mp_verification_key' : '', + 'mp_channel' : '', + 'mp_bill_description' : 'Bill description', + 'mp_bill_name' : 'Bill name', + 'mp_bill_email' : 'email@email.com', + 'mp_bill_mobile' : '123456' + // 'mp_channel_editing' : false, + // 'mp_editing_enabled' : false, + // 'mp_transaction_id' : '', // Optional, required when mp_request_type is 'Status' + // 'mp_preferred_token' : '', // Optional, set the token id to nominate a preferred token as the default selection + // 'mp_request_type' : '', // Optional, set 'Status' when performing a transactionRequest + // 'mp_bin_lock' : ['414170', '414171'], // Optional for credit card BIN restrictions + // 'mp_bin_lock_err_msg' : 'Only UOB allowed', // Optional for credit card BIN restrictions + // 'mp_is_escrow' : '', // Optional for Escrow, put "1" to enable escrow + // 'mp_filter' : '0', // Optional for debit card only transactions + // 'mp_custom_css_url' : cordova.file.applicationDirectory + 'www/custom.css', // Optional for custom UI + // 'mp_is_recurring' : false, // Optional, set true to process this transaction through the recurring api, please refer the MOLPay Recurring API pdf + // 'mp_allowed_channels': ['credit', 'credit3'], // Optional for channels restriction + // 'mp_sandbox_mode': true, // Optional for sandboxed development environment, set boolean value to enable. + // 'mp_express_mode': true, // Optional, required a valid mp_channel value, this will skip the payment info page and go direct to the payment screen. + // 'mp_advanced_email_validation_enabled': true, // Optional, enable this for extended email format validation based on W3C standards. + // 'mp_advanced_phone_validation_enabled': true, // Optional, enable this for extended phone format validation based on Google i18n standards. + // 'mp_bill_name_edit_disabled': true, // Optional, explicitly force disable billing name edit. + // 'mp_bill_email_edit_disabled': true, // Optional, explicitly force disable billing email edit. + // 'mp_bill_mobile_edit_disabled': true, // Optional, explicitly force disable billing mobile edit. + // 'mp_bill_description_edit_disabled': true // Optional, explicitly force disable billing description edit. + }; + + var molpayCallback = function (transactionResult) { + console.log('molpayCallback transactionResult = '+transactionResult); + alert('molpayCallback transactionResult = '+transactionResult); + }; + + window.molpay.startMolpay(paymentDetails, molpayCallback); + // window.molpay.transactionRequest(paymentDetails, molpayCallback); + // window.molpay.closeMolpay(); + + } + +}; + +app.initialize(); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d05688e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/ImageUnavailable.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/ImageUnavailable.png new file mode 100644 index 0000000..0a50061 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/ImageUnavailable.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png new file mode 100644 index 0000000..16f1bde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html new file mode 100644 index 0000000..e06c9e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js similarity index 100% rename from MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js new file mode 100644 index 0000000..684c2dc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js @@ -0,0 +1,19 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a){"use strict";function b(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function d(a,b,e){var f,g;if(a)if(y(a))for(f in a)"prototype"==f||"length"==f||"name"==f||a.hasOwnProperty&&!a.hasOwnProperty(f)||b.call(e,a[f],f,a);else if(Wd(a)||c(a)){var h="object"!=typeof a;for(f=0,g=a.length;g>f;f++)(h||f in a)&&b.call(e,a[f],f,a)}else if(a.forEach&&a.forEach!==d)a.forEach(b,e,a);else if(u(a))for(f in a)b.call(e,a[f],f,a);else if("function"==typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&b.call(e,a[f],f,a);else for(f in a)Fd.call(a,f)&&b.call(e,a[f],f,a);return a}function e(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(t(g)||y(g))for(var j=Object.keys(g),k=0,l=j.length;l>k;k++){var m=j[k],n=g[m];c&&t(n)?x(n)?a[m]=new Date(n.valueOf()):z(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):J(n)?a[m]=n.clone():(t(a[m])||(a[m]=Wd(n)?[]:{}),i(a[m],[n],!0)):a[m]=n}}return h(a,d),a}function j(a){return i(a,Od.call(arguments,1),!1)}function k(a){return i(a,Od.call(arguments,1),!0)}function l(a){return parseInt(a,10)}function m(a,b){return j(Object.create(a),b)}function n(){}function o(a){return a}function p(a){return function(){return a}}function q(a){return y(a.toString)&&a.toString!==Rd}function r(a){return"undefined"==typeof a}function s(a){return"undefined"!=typeof a}function t(a){return null!==a&&"object"==typeof a}function u(a){return null!==a&&"object"==typeof a&&!Sd(a)}function v(a){return"string"==typeof a}function w(a){return"number"==typeof a}function x(a){return"[object Date]"===Rd.call(a)}function y(a){return"function"==typeof a}function z(a){return"[object RegExp]"===Rd.call(a)}function A(a){return a&&a.window===a}function B(a){return a&&a.$evalAsync&&a.$watch}function C(a){return"[object File]"===Rd.call(a)}function D(a){return"[object FormData]"===Rd.call(a)}function E(a){return"[object Blob]"===Rd.call(a)}function F(a){return"boolean"==typeof a}function G(a){return a&&y(a.then)}function H(a){return a&&w(a.length)&&Xd.test(Rd.call(a))}function I(a){return"[object ArrayBuffer]"===Rd.call(a)}function J(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function K(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function N(a,b){function c(a,b){var c,d=b.$$hashKey;if(Wd(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(u(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Fd.call(a,c)&&(b[c]=e(a[c]));return h(b,d),b}function e(a){if(!t(a))return a;var b=g.indexOf(a);if(-1!==b)return i[b];if(A(a)||B(a))throw Td("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d=!1,e=f(a);return void 0===e&&(e=Wd(a)?[]:Object.create(Sd(a)),d=!0),g.push(a),i.push(e),d?c(a,e):e}function f(a){switch(Rd.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c;case"[object Blob]":return new a.constructor([a],{type:a.type})}return y(a.cloneNode)?a.cloneNode(!0):void 0}var g=[],i=[];if(b){if(H(b)||I(b))throw Td("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Td("cpi","Can't copy! Source and destination are identical.");return Wd(b)?b.length=0:d(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),g.push(a),i.push(b),c(a,b)}return e(a)}function O(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Wd(a)){if(x(a))return x(b)?O(a.getTime(),b.getTime()):!1;if(z(a))return z(b)?a.toString()==b.toString():!1;if(B(a)||B(b)||A(a)||A(b)||Wd(b)||x(b)||z(b))return!1;e=oa();for(d in a)if("$"!==d.charAt(0)&&!y(a[d])){if(!O(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&s(b[d])&&!y(b[d]))return!1;return!0}if(!Wd(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!O(a[d],b[d]))return!1;return!0}}return!1}function P(a,b,c){return a.concat(Od.call(b,c))}function Q(a,b){return Od.call(a,b||0)}function R(a,b){var c=arguments.length>2?Q(arguments,2):[];return!y(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,P(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function S(b,c){var d=c;return"string"==typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?d=void 0:A(c)?d="$WINDOW":c&&a.document===c?d="$DOCUMENT":B(c)&&(d="$SCOPE"),d}function T(a,b){return r(a)?void 0:(w(b)||(b=b?2:null),JSON.stringify(a,S,b))}function U(a){return v(a)?JSON.parse(a):a}function V(a,b){a=a.replace(ae,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function W(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function X(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=V(b,d);return W(a,c*(e-d))}function Y(a){a=Ld(a).clone();try{a.empty()}catch(b){}var c=Ld("
    ").append(a).html();try{return a[0].nodeType===ge?Gd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Gd(b)})}catch(b){return Gd(c)}}function Z(a){try{return decodeURIComponent(a)}catch(b){}}function $(a){var b={};return d((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=Z(d),s(d)&&(e=s(e)?Z(e):!0,Fd.call(b,d)?Wd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function _(a){var b=[];return d(a,function(a,c){Wd(a)?d(a,function(a){b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}),b.length?b.join("&"):""}function aa(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ca(a,b){var c,d,e=be.length;for(d=0;e>d;++d)if(c=be[d]+b,v(c=a.getAttribute(c)))return c;return null}function da(a,b){var c,e,f={};d(be,function(b){var d=b+"app";!c&&a.hasAttribute&&a.hasAttribute(d)&&(c=a,e=a.getAttribute(d))}),d(be,function(b){var d,f=b+"app";!c&&(d=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=d,e=d.getAttribute(f))}),c&&(f.strictDi=null!==ca(c,"strict-di"),b(c,e?[e]:[],f))}function ea(b,c,e){t(e)||(e={});var f={strictDi:!1};e=j(f,e);var g=function(){if(b=Ld(b),b.injector()){var d=b[0]===a.document?"document":Y(b);throw Td("btstrpd","App already bootstrapped with this element '{0}'",d.replace(//,">"))}c=c||[],c.unshift(["$provide",function(a){a.value("$rootElement",b)}]),e.debugInfoEnabled&&c.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),c.unshift("ng");var f=db(c,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),Ud.resumeBootstrap=function(a){return d(a,function(a){c.push(a)}),g()},void(y(Ud.resumeDeferredBootstrap)&&Ud.resumeDeferredBootstrap()))}function fa(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ga(a){var b=Ud.element(a).injector();if(!b)throw Td("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ha(a,b){return b=b||"_",a.replace(ce,function(a,c){return(c?b:"")+a.toLowerCase()})}function ia(){var b;if(!de){var c=_d();Md=r(c)?a.jQuery:c?a[c]:void 0,Md&&Md.fn.on?(Ld=Md,j(Md.fn,{scope:ze.scope,isolateScope:ze.isolateScope,controller:ze.controller,injector:ze.injector,inheritedData:ze.inheritedData}),b=Md.cleanData,Md.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Md._data(d,"events"),c&&c.$destroy&&Md(d).triggerHandler("$destroy");b(a)}):Ld=Da,Ud.element=Ld,de=!0}}function ja(a,b,c){if(!a)throw Td("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function ka(a,b,c){return c&&Wd(a)&&(a=a[a.length-1]),ja(y(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function la(a,b){if("hasOwnProperty"===a)throw Td("badname","hasOwnProperty is not a valid {0} name",b)}function ma(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&y(a)?R(f,a):a}function na(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Ld(Od.call(a,0,e))),b.push(c));return b||a}function oa(){return Object.create(null)}function pa(a){function c(a,b,c){return a[b]||(a[b]=c())}var d=b("$injector"),e=b("ng"),f=c(a,"angular",Object);return f.$$minErr=f.$$minErr||b,c(f,"module",function(){var a={};return function(b,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(b,"module"),f&&a.hasOwnProperty(b)&&(a[b]=null),c(a,b,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function c(a,c){return function(d,f){return f&&y(f)&&(f.$$moduleName=b),e.push([a,c,arguments]),k}}if(!f)throw d("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",b);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:b,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:c("$provide","decorator"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),component:c("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function qa(a,b){if(Wd(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(t(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function ra(a){var b=[];return JSON.stringify(a,function(a,c){if(c=S(a,c),t(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function sa(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):r(a)?"undefined":"string"!=typeof a?ra(a):a}function ta(c){j(c,{bootstrap:ea,copy:N,extend:j,merge:k,equals:O,element:Ld,forEach:d,injector:db,noop:n,bind:R,toJson:T,fromJson:U,identity:o,isUndefined:r,isDefined:s,isString:v,isFunction:y,isObject:t,isNumber:w,isElement:J,isArray:Wd,version:ke,isDate:x,lowercase:Gd,uppercase:Hd,callbacks:{counter:0},getTestability:ga,$$minErr:b,$$csp:$d,reloadWithDebugInfo:fa}),(Nd=pa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:yc}),a.provider("$compile",ob).directive({a:Hf,input:$f,textarea:$f,form:Mf,script:Vg,select:Yg,style:$g,option:Zg,ngBind:bg,ngBindHtml:dg,ngBindTemplate:cg,ngClass:fg,ngClassEven:hg,ngClassOdd:gg,ngCloak:ig,ngController:jg,ngForm:Nf,ngHide:Og,ngIf:mg,ngInclude:ng,ngInit:pg,ngNonBindable:Fg,ngPluralize:Jg,ngRepeat:Kg,ngShow:Ng,ngStyle:Pg,ngSwitch:Qg,ngSwitchWhen:Rg,ngSwitchDefault:Sg,ngOptions:Ig,ngTransclude:Ug,ngModel:Cg,ngList:qg,ngChange:eg,pattern:ah,ngPattern:ah,required:_g,ngRequired:_g,minlength:ch,ngMinlength:ch,maxlength:bh,ngMaxlength:bh,ngValue:ag,ngModelOptions:Eg}).directive({ngInclude:og}).directive(If).directive(kg),a.provider({$anchorScroll:eb,$animate:Pe,$animateCss:Se,$$animateJs:Ne,$$animateQueue:Oe,$$AnimateRunner:Re,$$animateAsyncRun:Qe,$browser:kb,$cacheFactory:lb,$controller:ub,$document:vb,$exceptionHandler:wb,$filter:Mc,$$forceReflow:Ye,$interpolate:Kb,$interval:Lb,$http:Gb,$httpParamSerializer:yb,$httpParamSerializerJQLike:zb,$httpBackend:Ib,$xhrFactory:Hb,$location:$b,$log:_b,$parse:sc,$rootScope:xc,$q:tc,$$q:uc,$sce:Cc,$sceDelegate:Bc,$sniffer:Dc,$templateCache:mb,$templateRequest:Ec,$$testability:Fc,$timeout:Gc,$window:Jc,$$rAF:wc,$$jqLite:Ya,$$HashMap:De,$$cookieReader:Lc})}])}function ua(){return++me}function va(a){return a.replace(pe,function(a,b,c,d){return d?c.toUpperCase():c}).replace(qe,"Moz$1")}function wa(a){return!ue.test(a)}function xa(a){var b=a.nodeType;return b===ee||!b||b===ie}function ya(a){for(var b in le[a.ng339])return!0;return!1}function za(a){for(var b=0,c=a.length;c>b;b++)Ha(a[b])}function Aa(a,b){var c,e,f,g,h=b.createDocumentFragment(),i=[];if(wa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),e=(ve.exec(a)||["",""])[1].toLowerCase(),f=xe[e]||xe._default,c.innerHTML=f[1]+a.replace(we,"<$1>")+f[2],g=f[0];g--;)c=c.lastChild;i=P(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",d(i,function(a){h.appendChild(a)}),h}function Ba(b,c){c=c||a.document;var d;return(d=te.exec(b))?[c.createElement(d[1])]:(d=Aa(b,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(v(a)&&(a=Yd(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw se("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ha(c[d])}function Ga(a,b,c,e){if(s(e))throw se("offargs","jqLite#off() does not support the `selector` argument");var f=Ia(a),g=f&&f.events,h=f&&f.handle;if(h)if(b){var i=function(b){var d=g[b];s(c)&&M(d||[],c),s(c)&&d&&d.length>0||(oe(a,b,h),delete g[b])};d(b.split(" "),function(a){i(a),re[a]&&i(re[a])})}else for(b in g)"$destroy"!==b&&oe(a,b,h),delete g[b]}function Ha(a,b){var c=a.ng339,d=c&&le[c];if(d){if(b)return void delete d.data[b];d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Ga(a)),delete le[c],a.ng339=void 0}}function Ia(a,b){var c=a.ng339,d=c&&le[c];return b&&!d&&(a.ng339=c=ua(),d=le[c]={events:{},data:{},handle:void 0}),d}function Ja(a,b,c){if(xa(a)){var d=s(c),e=!d&&b&&!t(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];j(h,b)}}}function Ka(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function La(a,b){b&&a.setAttribute&&d(b.split(" "),function(b){a.setAttribute("class",Yd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Yd(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");d(b.split(" "),function(a){a=Yd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Yd(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==ie&&(a=a.documentElement);for(var d=Wd(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(s(c=Ld.data(a,d[e])))return c;a=a.parentNode||a.nodeType===je&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Ld(c).on("load",b)}function Ta(a,b){var c=Ae[b.toLowerCase()];return c&&Be[L(a)]&&c}function Ua(a){return Ce[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(r(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Wa;f>1&&(e=qa(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ye.call(a,d))&&c.call(a,b)}function Ya(){this.$get=function(){return j(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||g)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}d(a,this.put,this)}function _a(a){return Function.prototype.toString.call(a)+" "}function ab(a){var b=_a(a).replace(Ie,""),c=b.match(Ee)||b.match(Fe);return c}function bb(a){var b=ab(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b,c){var e,f,g;if("function"==typeof a){if(!(e=a.$inject)){if(e=[],a.length){if(b)throw v(c)&&c||(c=a.name||bb(a)),Je("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);f=ab(a),d(f[1].split(Ge),function(a){a.replace(He,function(a,b,c){e.push(c)})})}a.$inject=e}}else Wd(a)?(g=a.length-1,ka(a[g],"fn"),e=a.slice(0,g)):ka(a,"fn",!0);return e}function db(a,b){function c(a){return function(b,c){return t(b)?void d(b,f(a)):a(b,c)}}function e(a,b){if(la(a,"service"),(y(b)||Wd(b))&&(b=x.instantiate(b)),!b.$get)throw Je("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(r(c))throw Je("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function h(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function i(a,b){return h(a,["$injector",function(a){return a.instantiate(b)}])}function j(a,b){return h(a,p(b),!1)}function k(a,b){la(a,"constant"),w[a]=b,z[a]=b}function l(a,b){var c=x.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function m(a){ja(r(a)||Wd(a),"modulesToLoad","not an array");var b,c=[];return d(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=x.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{v(a)?(b=Nd(a),c=c.concat(m(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):y(a)?c.push(x.invoke(a)):Wd(a)?c.push(x.invoke(a)):ka(a,"module")}catch(e){throw Wd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Je("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function n(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===o)throw Je("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=o,a[b]=c(b,d)}catch(e){throw a[b]===o&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=db.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Je("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Kd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(_a(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Wd(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Wd(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:db.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var o={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:c(e),factory:c(h),service:c(i),value:c(j),constant:c(k),decorator:l}},x=w.$injector=n(w,function(a,b){throw Ud.isString(b)&&s.push(b),Je("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},A=n(z,function(a,b){var c=x.get(a+q,b);return B.invoke(c.$get,c,void 0,a)}),B=A;w["$injector"+q]={$get:p(A)};var C=m(a);return B=A.get("$injector"),B.strictDi=b,d(C,function(a){a&&B.invoke(a)}),B}function eb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===L(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(y(a))a=a();else if(J(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else w(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=v(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Sa(function(){d.$evalAsync(h)})}),h}]}function fb(a,b){return a||b?a?b?(Wd(a)&&(a=a.join(" ")),Wd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function gb(a){for(var b=0;bk&&this.remove(n.key),b}},get:function(a){if(kb;++b)try{sa[b]()}catch(d){a.push(d)}if(sa=void 0,a.length)throw a})}finally{va++}}function I(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a}function J(a,b,c){ua.innerHTML="";var d=ua.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function K(a,b){try{a.addClass(b)}catch(c){}}function N(b,c,d,e,f){b instanceof Ld||(b=Ld(b));for(var g=/\S+/,h=0,i=b.length;i>h;h++){var j=b[h];j.nodeType===ge&&j.nodeValue.match(g)&&Ca(j,b[h]=a.document.createElement("span"))}var k=S(b,c,b,d,e,f);N.$$addScopeClass(b);var l=null;return function(a,c,d){ja(a,"scope"),f&&f.needsNewScope&&(a=a.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=P(h));var i;if(i="html"!==l?Ld(ka(l,Ld("
    ").append(b).html())):c?ze.clone.call(b):b,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return N.$$addScopeInfo(i,a),c&&c(i,a),k&&k(a,i,i,e),i}}function P(a){var b=a&&a[0];return b&&"foreignobject"!==L(b)&&Rd.call(b).match(/SVG/)?"svg":"html"}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,g,h,i,j,k,l,m,p;if(n){var q=c.length;for(p=new Array(q),j=0;jj;)h=p[o[j++]],f=o[j++],g=o[j++],f?(f.scope?(i=a.$new(),N.$$addScopeInfo(Ld(h),i)):i=a,m=f.transcludeOnThisElement?T(a,f.transclude,e):!f.templateOnThisElement&&e?e:!e&&b?T(a,b):null,f(g,i,h,d,m)):g&&g(a,h.childNodes,void 0,e)}for(var h,i,j,k,l,m,n,o=[],p=0;pr;r++){var w=!1,x=!1;j=p[r],k=j.name,n=Yd(j.value),m=qb(k),(o=Aa.test(m))&&(k=k.replace(Ve,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=m.match(Ba);y&&ca(y[1])&&(w=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=qb(k.toLowerCase()),i[l]=k,(o||!c.hasOwnProperty(l))&&(c[l]=n,Ta(a,l)&&(c[l]=!0)),ma(a,b,n,l,o),ba(b,l,"A",d,e,w,x)}if(g=a.className,t(g)&&(g=g.animVal),v(g)&&""!==g)for(;f=u.exec(g);)l=qb(f[2]),ba(b,l,"C",d,e)&&(c[l]=Yd(f[3])),g=g.substr(f.index+f[0].length);break;case ge:if(11===Kd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===ge;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ia(b,a.nodeValue);break;case he:try{f=q.exec(a.nodeValue),f&&(l=qb(f[1]),ba(b,l,"M",d,e)&&(c[l]=Yd(f[2])))}catch(z){}}return b.sort(fa),b}function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Te("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==ee&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Ld(d)}function W(a,b,c){return function(d,e,f,g,h){return e=V(e[0],b,c),a(d,e,f,g,h)}}function X(a,b,c,d,e,f){var g;return a?N(b,c,d,e,f):function(){return g||(g=N(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function Z(a,b,c,f,g,h,i,k,l){function m(a,b,c,d){a&&(c&&(a=W(a,c,d)),a.require=o.require,a.directiveName=p,(z===o||o.$$isolateScope)&&(a=pa(a,{isolateScope:!0})),i.push(a)),b&&(c&&(b=W(b,c,d)),b.require=o.require,b.directiveName=p,(z===o||o.$$isolateScope)&&(b=pa(b,{isolateScope:!0})),k.push(b))}function n(a,f,g,h,l){function m(a,b,c,d){var e;if(B(a)||(d=c,c=b,b=a,a=void 0),F&&(e=u),c||(c=F?C.parent():C),!d)return l(a,b,e,c,M);var f=l.$$slots[d];if(f)return f(a,b,e,c,M);if(r(f))throw Te("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',d,Y(C))}var n,o,p,q,s,u,v,C,D,E;b===g?(D=c,C=c.$$element):(C=Ld(g),D=new I(C,c)),s=f,z?q=f.$new(!0):w&&(s=f.$parent),l&&(v=m,v.$$boundTransclude=l,v.isSlotFilled=function(a){return!!l.$$slots[a]}),x&&(u=_(C,D,v,x,q,f,z)),z&&(N.$$addScopeInfo(C,q,!0,!(A&&(A===z||A===z.$$originalDirective))),N.$$addScopeClass(C,!0),q.$$isolateBindings=z.$$isolateBindings,E=ra(f,D,q,q.$$isolateBindings,z),E.removeWatches&&q.$on("$destroy",E.removeWatches));for(var G in u){var H=x[G],J=u[G],K=H.$$bindings.bindToController;J.identifier&&K?J.bindingInfo=ra(s,D,J.instance,K,H):J.bindingInfo={};var L=J();L!==J.instance&&(J.instance=L,C.data("$"+H.name+"Controller",L),J.bindingInfo.removeWatches&&J.bindingInfo.removeWatches(),J.bindingInfo=ra(s,D,J.instance,K,H))}for(d(x,function(a,b){var c=a.require;a.bindToController&&!Wd(c)&&t(c)&&j(u[b].instance,$(b,c,C,u))}),d(u,function(a){var b=a.instance;if(y(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(c){e(c)}if(y(b.$onInit))try{b.$onInit()}catch(c){e(c)}y(b.$onDestroy)&&s.$on("$destroy",function(){b.$onDestroy()})}),n=0,o=i.length;o>n;n++)p=i[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);var M=f;for(z&&(z.template||null===z.templateUrl)&&(M=q),a&&a(M,g.childNodes,void 0,l),n=k.length-1;n>=0;n--)p=k[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);d(u,function(a){var b=a.instance;y(b.$postLink)&&b.$postLink()})}l=l||{};for(var o,p,q,s,u,v=-Number.MAX_VALUE,w=l.newScopeDirective,x=l.controllerDirectives,z=l.newIsolateScopeDirective,A=l.templateDirective,C=l.nonTlbTranscludeDirective,D=!1,E=!1,F=l.hasElementTranscludeDirective,G=c.$$element=Ld(b),H=h,J=f,K=!1,M=!1,O=0,P=a.length;P>O;O++){o=a[O];var S=o.$$start,T=o.$$end;if(S&&(G=V(b,S,T)),q=void 0,v>o.priority)break;if((u=o.scope)&&(o.templateUrl||(t(u)?(ga("new/isolated scope",z||w,o,G),z=o):ga("new/isolated scope",z,o,G)),w=w||o),p=o.name,!K&&(o.replace&&(o.templateUrl||o.template)||o.transclude&&!o.$$tlb)){for(var Z,ba=O+1;Z=a[ba++];)if(Z.transclude&&!Z.$$tlb||Z.replace&&(Z.templateUrl||Z.template)){M=!0;break}K=!0}if(!o.templateUrl&&o.controller&&(u=o.controller,x=x||oa(),ga("'"+p+"' controller",x[p],o,G),x[p]=o),u=o.transclude)if(D=!0,o.$$tlb||(ga("transclusion",C,o,G),C=o),"element"==u)F=!0,v=o.priority,q=G,G=c.$$element=Ld(N.$$createComment(p,c[p])),b=G[0],na(g,Q(q),b),q[0].$$parentNode=q[0].parentNode,J=X(M,q,f,v,H&&H.name,{nonTlbTranscludeDirective:C});else{var ca=oa();if(q=Ld(Ea(b)).contents(),t(u)){q=[];var fa=oa(),ha=oa();d(u,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,fa[a]=b,ca[b]=null,ha[b]=c}),d(G.contents(),function(a){var b=fa[qb(L(a))];b?(ha[b]=!0,ca[b]=ca[b]||[],ca[b].push(a)):q.push(a)}),d(ha,function(a,b){if(!a)throw Te("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ia in ca)ca[ia]&&(ca[ia]=X(M,ca[ia],f))}G.empty(),J=X(M,q,f,void 0,void 0,{needsNewScope:o.$$isolateScope||o.$$newScope}),J.$$slots=ca}if(o.template)if(E=!0,ga("template",A,o,G),A=o,u=y(o.template)?o.template(G,c):o.template,u=za(u),o.replace){if(H=o,q=wa(u)?[]:sb(ka(o.templateNamespace,Yd(u))),b=q[0],1!=q.length||b.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p,"");na(g,G,b);var ja={$attr:{}},la=U(b,[],ja),ma=a.splice(O+1,a.length-(O+1));(z||w)&&aa(la,z,w),a=a.concat(la).concat(ma),da(c,ja),P=a.length}else G.html(u);if(o.templateUrl)E=!0,ga("template",A,o,G),A=o,o.replace&&(H=o),n=ea(a.splice(O,a.length-O),G,c,g,D&&J,i,k,{controllerDirectives:x,newScopeDirective:w!==o&&w,newIsolateScopeDirective:z,templateDirective:A,nonTlbTranscludeDirective:C}),P=a.length;else if(o.compile)try{s=o.compile(G,c,J);var sa=o.$$originalDirective||o;y(s)?m(null,R(sa,s),S,T):s&&m(R(sa,s.pre),R(sa,s.post),S,T)}catch(ta){e(ta,Y(G))}o.terminal&&(n.terminal=!0,v=Math.max(v,o.priority))}return n.scope=w&&w.scope===!0,n.transcludeOnThisElement=D,n.templateOnThisElement=E,n.transclude=J,l.hasElementTranscludeDirective=F,n}function $(a,b,c,e){var f;if(v(b)){var g=b.match(x),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(f=e&&e[h],f=f&&f.instance),!f){var k="$"+h+"Controller";f=i?c.inheritedData(k):c.data(k)}if(!f&&!j)throw Te("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Wd(b)){f=[];for(var l=0,m=b.length;m>l;l++)f[l]=$(a,b[l],c,e)}else t(b)&&(f={},d(b,function(b,d){f[d]=$(a,b,c,e)}));return f||null}function _(a,b,c,d,e,f,g){var h=oa();for(var j in d){var k=d[j],l={$scope:k===g||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);var n=i(m,l,!0,k.controllerAs);h[k.name]=n,a.data("$"+k.name+"Controller",n.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=m(a[d],{$$isolateScope:b,$$newScope:c})}function ba(a,c,d,f,h,i,j){if(c===h)return null;var n=null;if(k.hasOwnProperty(c))for(var o,p=b.get(c+l),q=0,s=p.length;s>q;q++)try{if(o=p[q],(r(f)||f>o.priority)&&-1!=o.restrict.indexOf(d)){if(i&&(o=m(o,{$$start:i,$$end:j})),!o.$$bindings){var u=o.$$bindings=g(o,o.name);t(u.isolateScope)&&(o.$$isolateBindings=u.isolateScope)}a.push(o),n=o}}catch(v){e(v)}return n}function ca(a){if(k.hasOwnProperty(a))for(var c,d=b.get(a+l),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function da(a,b){var c=b.$attr,e=a.$attr;a.$$element;d(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),d(b,function(b,d){a.hasOwnProperty(d)||"$"===d.charAt(0)||(a[d]=b,"class"!==d&&"style"!==d&&(e[d]=c[d]))})}function ea(a,b,c,e,g,h,i,j){var k,l,n=[],o=b[0],p=a.shift(),q=m(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=y(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),f(r).then(function(f){var m,u,v,w;if(f=za(f),p.replace){if(v=wa(f)?[]:sb(ka(s,Yd(f))),m=v[0],1!=v.length||m.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);u={$attr:{}},na(e,b,m);var x=U(m,[],u);t(p.scope)&&aa(x,!0),a=x.concat(a),da(c,u)}else m=o,b.html(f);for(a.unshift(q),k=Z(a,m,c,g,b,p,h,i,j),d(e,function(a,c){a==m&&(e[c]=b[0])}),l=S(b[0].childNodes,g);n.length;){var y=n.shift(),z=n.shift(),A=n.shift(),B=n.shift(),C=b[0];if(!y.$$destroyed){if(z!==o){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(m)),na(A,Ld(z),C),K(Ld(C),D)}w=k.transcludeOnThisElement?T(y,k.transclude,B):B,k(l,y,C,e,w)}}n=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(n?n.push(b,c,d,f):(k.transcludeOnThisElement&&(f=T(b,k.transclude,e)),k(l,b,c,d,f)))}}function fa(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function la(a,b){if("srcdoc"==b)return A.HTML;var c=L(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?A.RESOURCE_URL:void 0}function ma(a,b,d,e,f){var g=la(a,e);f=w[e]||f;var h=c(d,!0,g,f);if(h){if("multiple"===e&&"select"===L(a))throw Te("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=oa());if(z.test(e))throw Te("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==d&&(h=k&&c(k,!0,g,f),d=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function na(b,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(b)for(e=0,f=b.length;f>e;e++)if(b[e]==g){b[e++]=d;for(var j=e,k=j+h-1,l=b.length;l>j;j++,k++)l>k?b[j]=b[k]:delete b[j];b.length-=h-1,b.context===g&&(b.context=d);break}i&&i.replaceChild(d,g);var m=a.document.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Ld.hasData(g)&&(Ld.data(d,Ld.data(g)),Ld(g).off("$destroy")),Ld.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function pa(a,b){return j(function(){return a.apply(null,arguments)},a,b)}function qa(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,Y(c))}}function ra(a,b,e,f,g){function i(b,c,d){y(e.$onChanges)&&c!==d&&(sa||(a.$$postDigest(H),sa=[]),k||(k={},sa.push(j)),k[b]&&(d=k[b].previousValue),k[b]=new pb(d,c))}function j(){e.$onChanges(k),k=void 0}var k,l=[],m={};return d(f,function(d,f){var j,k,o,p,q,r=d.attrName,s=d.optional,t=d.mode;switch(t){case"@":s||Fd.call(b,r)||(e[f]=b[r]=void 0),b.$observe(r,function(a){if(v(a)||F(a)){var b=e[f];i(f,a,b),e[f]=a}}),b.$$observers[r].$$scope=a,j=b[r],v(j)?e[f]=c(j)(a):F(j)&&(e[f]=j),m[f]=new pb(Ue,e[f]);break;case"=":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]),p=k.literal?O:function(a,b){return a===b||a!==a&&b!==b},o=k.assign||function(){throw j=e[f]=k(a),Te("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[r],r,g.name)},j=e[f]=k(a);var u=function(b){return p(b,e[f])||(p(b,j)?o(a,b=e[f]):e[f]=b),j=b};u.$stateful=!0,q=d.collection?a.$watchCollection(b[r],u):a.$watch(h(b[r],u),null,k.literal),l.push(q);break;case"<":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]);var w=e[f]=k(a);m[f]=new pb(Ue,e[f]),q=a.$watch(k,function(a,b){if(b===a){if(b===w)return;b=w}i(f,a,b),e[f]=a},k.literal),l.push(q);break;case"&":if(k=b.hasOwnProperty(r)?h(b[r]):n,k===n&&s)break;e[f]=function(b){return k(a,b)}}}),{initialChanges:m,removeWatches:l.length&&function(){for(var a=0,b=l.length;b>a;++a)l[a]()}}}var sa,ta=/^\w/,ua=a.document.createElement("div"),va=D;I.prototype={$normalize:qb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=rb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=rb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,f){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),f=i):j&&(this[j]=b,k=j),this[a]=b,f?this.$attr[a]=f:(f=this.$attr[a],f||(this.$attr[a]=f=ha(a,"-"))),g=L(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=G(b,"src"===a);else if("img"===g&&"srcset"===a&&s(b)){for(var l="",m=Yd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),t=0;q>t;t++){var u=2*t;l+=G(Yd(p[u]),!0),l+=" "+Yd(p[u+1])}var v=Yd(p[2*t]).split(/\s/);l+=G(Yd(v[0]),!0),2===v.length&&(l+=" "+Yd(v[1])),this[a]=b=l}c!==!1&&(null===b||r(b)?this.$$element.removeAttr(f):ta.test(f)?this.$$element.attr(f,b):J(this.$$element[0],f,b));var w=this.$$observers;w&&d(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=oa()),e=d[a]||(d[a]=[]);return e.push(b),p.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||r(c[a])||b(c[a])}),function(){M(e,b)}}};var xa=c.startSymbol(),ya=c.endSymbol(),za="{{"==xa&&"}}"==ya?o:function(a){return a.replace(/\{\{/g,xa).replace(/}}/g,ya)},Aa=/^ngAttr[A-Z]/,Ba=/^(.+)Start$/;return N.$$addBindingInfo=C?function(a,b){var c=a.data("$binding")||[];Wd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:n,N.$$addBindingClass=C?function(a){K(a,"ng-binding")}:n,N.$$addScopeInfo=C?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:n,N.$$addScopeClass=C?function(a,b){K(a,b?"ng-isolate-scope":"ng-scope")}:n,N.$$createComment=function(b,c){var d="";return C&&(d=" "+(b||"")+": ",c&&(d+=c+" ")),a.document.createComment(d)},N}]}function pb(a,b){this.previousValue=a,this.currentValue=b}function qb(a){return va(a.replace(Ve,""))}function rb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function sb(a){a=Ld(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===he&&Pd.call(a,b,1)}return a}function tb(a,b){if(b&&v(b))return b;if(v(a)){var c=Xe.exec(a);if(c)return c[3]}}function ub(){var a={},c=!1;this.has=function(b){return a.hasOwnProperty(b)},this.register=function(b,c){la(b,"controller"),t(b)?j(a,b):a[b]=c},this.allowGlobals=function(){c=!0},this.$get=["$injector","$window",function(d,e){function f(a,c,d,e){if(!a||!t(a.$scope))throw b("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,c);a.$scope[c]=d}return function(b,g,h,i){var k,l,m,n;if(h=h===!0,i&&v(i)&&(n=i),v(b)){if(l=b.match(Xe),!l)throw We("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",b);m=l[1],n=n||l[3],b=a.hasOwnProperty(m)?a[m]:ma(g.$scope,m,!0)||(c?ma(e,m,!0):void 0),ka(b,m,!0)}if(h){var o=(Wd(b)?b[b.length-1]:b).prototype;k=Object.create(o||null),n&&f(g,n,k,m||b.name);var p;return p=j(function(){var a=d.invoke(b,k,g,m);return a!==k&&(t(a)||y(a))&&(k=a,n&&f(g,n,k,m||b.name)),k},{instance:k,identifier:n})}return k=d.instantiate(b,g,m),n&&f(g,n,k,m||b.name),k}}]}function vb(){this.$get=["$window",function(a){return Ld(a.document)}]}function wb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function xb(a){return t(a)?x(a)?a.toISOString():T(a):a}function yb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return e(a,function(a,c){null===a||r(a)||(Wd(a)?d(a,function(a){b.push(ba(c)+"="+ba(xb(a)))}):b.push(ba(c)+"="+ba(xb(a))))}),b.join("&")}}}function zb(){this.$get=function(){return function(a){function b(a,f,g){null===a||r(a)||(Wd(a)?d(a,function(a,c){b(a,f+"["+(t(a)?c:"")+"]")}):t(a)&&!x(a)?e(a,function(a,c){b(a,f+(g?"":"[")+c+(g?"":"]"))}):c.push(ba(f)+"="+ba(xb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function Ab(a,b){if(v(a)){var c=a.replace(bf,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ze)||Bb(c))&&(a=U(c))}}return a}function Bb(a){var b=a.match(_e);return b&&af[b[0]].test(a)}function Cb(a){function b(a,b){a&&(e[a]=e[a]?e[a]+", "+b:b)}var c,e=oa();return v(a)?d(a.split("\n"),function(a){c=a.indexOf(":"),b(Gd(Yd(a.substr(0,c))),Yd(a.substr(c+1)))}):t(a)&&d(a,function(a,c){b(Gd(c),Yd(a))}),e}function Db(a){var b;return function(c){if(b||(b=Cb(a)),c){var d=b[Gd(c)];return void 0===d&&(d=null),d}return b}}function Eb(a,b,c,e){return y(e)?e(a,b,c):(d(e,function(d){a=d(a,b,c)}),a)}function Fb(a){return a>=200&&300>a}function Gb(){var a=this.defaults={transformResponse:[Ab],transformRequest:[function(a){return!t(a)||C(a)||E(a)||D(a)?a:T(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:qa($e),put:qa($e),patch:qa($e)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},c=!1;this.useApplyAsync=function(a){return s(a)?(c=!!a,this):c};var e=!0;this.useLegacyPromiseExtensions=function(a){return s(a)?(e=!!a,this):e};var f=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(g,h,i,k,l,m){function n(c){function f(a){var b=j({},a);return b.data=Eb(a.data,a.headers,a.status,i.transformResponse),Fb(a.status)?b:l.reject(b)}function g(a,b){var c,e={};return d(a,function(a,d){y(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a}),e}function h(b){var c,d,e,f=a.headers,h=j({},b.headers);f=j({},f.common,f[Gd(b.method)]);a:for(c in f){d=Gd(c);for(e in h)if(Gd(e)===d)continue a;h[c]=f[c]}return g(h,qa(b))}if(!t(c))throw b("$http")("badreq","Http request configuration must be an object. Received: {0}",c);if(!v(c.url))throw b("$http")("badreq","Http request configuration url must be a string. Received: {0}",c.url);var i=j({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},c);i.headers=h(c),i.method=Hd(i.method),i.paramSerializer=v(i.paramSerializer)?m.get(i.paramSerializer):i.paramSerializer;var k=function(b){var c=b.headers,e=Eb(b.data,Db(c),void 0,b.transformRequest);return r(e)&&d(c,function(a,b){"content-type"===Gd(b)&&delete c[b]}),r(b.withCredentials)&&!r(a.withCredentials)&&(b.withCredentials=a.withCredentials),q(b,e).then(f,f)},n=[k,void 0],o=l.when(i);for(d(x,function(a){(a.request||a.requestError)&&n.unshift(a.request,a.requestError),(a.response||a.responseError)&&n.push(a.response,a.responseError)});n.length;){var p=n.shift(),s=n.shift();o=o.then(p,s)}return e?(o.success=function(a){return ka(a,"fn"),o.then(function(b){a(b.data,b.status,b.headers,i)}),o},o.error=function(a){return ka(a,"fn"),o.then(null,function(b){a(b.data,b.status,b.headers,i)}),o}):(o.success=df("success"),o.error=df("error")),o}function o(a){d(arguments,function(a){n[a]=function(b,c){return n(j({},c||{},{method:a,url:b}))}})}function p(a){d(arguments,function(a){n[a]=function(b,c,d){return n(j({},d||{},{method:a,url:b,data:c}))}})}function q(b,e){function f(a){if(a){var b={};return d(a,function(a,d){b[d]=function(b){function d(){a(b)}c?k.$applyAsync(d):k.$$phase?d():k.$apply(d)}}),b}}function i(a,b,d,e){function f(){j(b,a,d,e)}p&&(Fb(a)?p.put(z,[a,b,Cb(d),e]):p.remove(z)),c?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function j(a,c,d,e){c=c>=-1?c:0,(Fb(c)?v.resolve:v.reject)({data:a,status:c,headers:Db(d),config:b,statusText:e})}function m(a){j(a.data,a.status,qa(a.headers()),a.statusText)}function o(){var a=n.pendingRequests.indexOf(b);-1!==a&&n.pendingRequests.splice(a,1)}var p,q,v=l.defer(),x=v.promise,y=b.headers,z=u(b.url,b.paramSerializer(b.params));if(n.pendingRequests.push(b),x.then(o,o),!b.cache&&!a.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(p=t(b.cache)?b.cache:t(a.cache)?a.cache:w),p&&(q=p.get(z),s(q)?G(q)?q.then(m,m):Wd(q)?j(q[1],q[0],qa(q[2]),q[3]):j(q,200,{},"OK"):p.put(z,x)),r(q)){var A=Ic(b.url)?h()[b.xsrfCookieName||a.xsrfCookieName]:void 0;A&&(y[b.xsrfHeaderName||a.xsrfHeaderName]=A),g(b.method,z,e,i,y,b.timeout,b.withCredentials,b.responseType,f(b.eventHandlers),f(b.uploadEventHandlers))}return x}function u(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=i("$http");a.paramSerializer=v(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var x=[];return d(f,function(a){x.unshift(v(a)?m.get(a):m.invoke(a))}),n.pendingRequests=[],o("get","delete","head","jsonp"),p("post","put","patch"),n.defaults=a,n}]}function Hb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Ib(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Jb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Jb(a,b,c,e,f){function g(a,b,c){var d=f.createElement("script"),g=null;return d.type="text/javascript",d.src=a,d.async=!0,g=function(a){oe(d,"load",g),oe(d,"error",g),f.body.removeChild(d),d=null;var h=-1,i="unknown";a&&("load"!==a.type||e[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ne(d,"load",g),ne(d,"error",g),f.body.appendChild(d),g}return function(f,h,i,j,k,l,m,o,p,q){function t(){w&&w(),x&&x.abort()}function u(b,d,e,f,g){s(A)&&c.cancel(A),w=x=null,b(d,e,f,g),a.$$completeOutstandingRequest(n)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Gd(f)){var v="_"+(e.counter++).toString(36);e[v]=function(a){e[v].data=a,e[v].called=!0};var w=g(h.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(a,b){u(j,a,e[v].data,"",b),e[v]=n})}else{var x=b(f,h);x.open(f,h,!0),d(k,function(a,b){s(a)&&x.setRequestHeader(b,a)}),x.onload=function(){var a=x.statusText||"",b="response"in x?x.response:x.responseText,c=1223===x.status?204:x.status;0===c&&(c=b?200:"file"==Hc(h).protocol?404:0),u(j,c,b,x.getAllResponseHeaders(),a)};var y=function(){u(j,-1,null,null,"")};if(x.onerror=y,x.onabort=y,d(p,function(a,b){x.addEventListener(b,a)}),d(q,function(a,b){x.upload.addEventListener(b,a)}),m&&(x.withCredentials=!0),o)try{x.responseType=o}catch(z){if("json"!==o)throw z}x.send(r(i)?null:i)}if(l>0)var A=c(t,l);else G(l)&&l.then(t)}}function Kb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=T(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function k(f,k,n,o){function q(a){try{return a=G(a),o&&!s(a)?a:h(a)}catch(b){d(ef.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var t;if(!k){var u=g(f);t=p(u),t.exp=f,t.expressions=[],t.$$watchDelegate=i}return t}o=!!o;for(var v,w,x,z=0,A=[],B=[],C=f.length,D=[],E=[];C>z;){if(-1==(v=f.indexOf(a,z))||-1==(w=f.indexOf(b,v+l))){z!==C&&D.push(g(f.substring(z)));break}z!==v&&D.push(g(f.substring(z,v))),x=f.substring(v+l,w),A.push(x),B.push(c(x,q)),z=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&ef.throwNoconcat(f),!k||A.length){var F=function(a){for(var b=0,c=A.length;c>b;b++){if(o&&r(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return j(function(a){var b=0,c=A.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(ef.interr(f,g))}},{exp:f,expressions:A,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);y(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return k.startSymbol=function(){return a},k.endSymbol=function(){return b},k}]}function Lb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?Q(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=s(j)&&!j,r=(q?d:c).defer(),t=r.promise;return i=s(i)?i:0,t.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(t.$$intervalId),delete g[t.$$intervalId]),q||a.$apply()},h),g[t.$$intervalId]=r,t}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Mb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=aa(b[c]);return b.join("/")}function Nb(a,b){var c=Hc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=l(c.port)||gf[c.protocol]||null}function Ob(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Hc(a); +b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=$(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Pb(a,b){return 0===a.lastIndexOf(b,0)}function Qb(a,b){return Pb(b,a)?b.substr(a.length):void 0}function Rb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Sb(a){return a.replace(/(#.+)|#$/,"$1")}function Tb(a){return a.substr(0,Rb(a).lastIndexOf("/")+1)}function Ub(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Vb(a,b,c){this.$$html5=!0,c=c||"",Nb(a,this),this.$$parse=function(a){var c=Qb(b,a);if(!v(c))throw hf("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Ob(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=_(this.$$search),c=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return s(f=Qb(a,d))?(g=f,h=s(f=Qb(c,f))?b+(Qb("/",f)||f):a+g):s(f=Qb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Wb(a,b,c){Nb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return Pb(b,c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Qb(a,d)||Qb(b,d);r(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",r(g)&&(a=d,this.replace())):(f=Qb(c,g),r(f)&&(f=g)),Ob(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Rb(a)==Rb(b)?(this.$$parse(b),!0):!1}}function Xb(a,b,c){this.$$html5=!0,Wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Rb(d)?f=d:(g=Qb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Yb(a){return function(){return this[a]}}function Zb(a,b){return function(c){return r(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function $b(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return s(b)?(a=b,this):a},this.html5Mode=function(a){return F(a)?(b.enabled=a,this):t(a)?(F(a.enabled)&&(b.enabled=a.enabled),F(a.requireBase)&&(b.requireBase=a.requireBase),F(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw hf("nobase","$location in HTML5 mode requires a tag to be present!");l=Ub(n)+(m||"/"),k=e.history?Vb:Xb}else l=Rb(n),k=Wb;var o=Tb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Ld(a.target);"a"!==L(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");t(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Hc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Sb(j.absUrl())!=Sb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return r(Qb(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Sb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Sb(d.url()),b=Sb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function _b(){var a=!0,b=this;this.debugEnabled=function(b){return s(b)?(a=b,this):a},this.$get=["$window",function(c){function e(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function f(a){var b=c.console||{},f=b[a]||b.log||n,g=!1;try{g=!!f.apply}catch(h){}return g?function(){var a=[];return d(arguments,function(b){a.push(e(b))}),f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function ac(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw kf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function bc(a){return a+""}function cc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw kf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw kf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw kf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function dc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===lf||a===mf||a===nf)throw kf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function ec(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw kf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function fc(a,b){return"undefined"!=typeof a?a:b}function gc(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function hc(a,b){var c=a(b);return!c.$stateful}function ic(a,b){var c,e;switch(a.type){case rf.Program:c=!0,d(a.body,function(a){ic(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case rf.Literal:a.constant=!0,a.toWatch=[];break;case rf.UnaryExpression:ic(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case rf.BinaryExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case rf.LogicalExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case rf.ConditionalExpression:ic(a.test,b),ic(a.alternate,b),ic(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case rf.Identifier:a.constant=!1,a.toWatch=[a];break;case rf.MemberExpression:ic(a.object,b),a.computed&&ic(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case rf.CallExpression:c=a.filter?hc(b,a.callee.name):!1,e=[],d(a.arguments,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&hc(b,a.callee.name)?e:[a];break;case rf.AssignmentExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case rf.ArrayExpression:c=!0,e=[],d(a.elements,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ObjectExpression:c=!0,e=[],d(a.properties,function(a){ic(a.value,b),c=c&&a.value.constant&&!a.computed,a.value.constant||e.push.apply(e,a.value.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ThisExpression:a.constant=!1,a.toWatch=[];break;case rf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function jc(a){if(1==a.length){var b=a[0].expression,c=b.toWatch;return 1!==c.length?c:c[0]!==b?c:void 0}}function kc(a){return a.type===rf.Identifier||a.type===rf.MemberExpression}function lc(a){return 1===a.body.length&&kc(a.body[0].expression)?{type:rf.AssignmentExpression,left:a.body[0].expression,right:{type:rf.NGValueParameter},operator:"="}:void 0}function mc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===rf.Literal||a.body[0].expression.type===rf.ArrayExpression||a.body[0].expression.type===rf.ObjectExpression)}function nc(a){return a.constant}function oc(a,b){this.astBuilder=a,this.$filter=b}function pc(a,b){this.astBuilder=a,this.$filter=b}function qc(a){return"constructor"==a}function rc(a){return y(a.valueOf)?a.valueOf():tf.call(a)}function sc(){var a,b,c=oa(),e=oa(),f={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(a,b){f[a]=b},this.setIdentifierFns=function(c,d){return a=c,b=d,this},this.$get=["$filter",function(g){function h(a,b,d){var f,h,j;switch(d=d||u,typeof a){case"string":a=a.trim(),j=a;var q=d?e:c;if(f=q[j],!f){":"===a.charAt(0)&&":"===a.charAt(1)&&(h=!0,a=a.substring(2));var s=d?t:r,v=new qf(s),w=new sf(v,g,s);f=w.parse(a),f.constant?f.$$watchDelegate=o:h?f.$$watchDelegate=f.literal?m:l:f.inputs&&(f.$$watchDelegate=k),d&&(f=i(f)),q[j]=f}return p(f,b);case"function":return p(a,b);default:return p(n,b)}}function i(a){function b(b,c,d,e){var f=u;u=!0;try{return a(b,c,d,e)}finally{u=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=i(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cl;l++)i[l]=j,k[l]=null;return a.$watch(function(a){for(var b=!1,c=0,e=g.length;e>c;c++){var h=g[c](a);(b||(b=!j(h,i[c])))&&(k[c]=h,i[c]=h&&rc(h))}return b&&(f=d(a,void 0,void 0,k)),f},b,c,e)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,y(b)&&b.apply(this,arguments),s(a)&&d.$$postDigest(function(){s(f)&&e()})},c)}function m(a,b,c,e){function f(a){var b=!0;return d(a,function(a){s(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return e(a)},function(a,c,d){h=a,y(b)&&b.call(this,a,c,d),f(a)&&d.$$postDigest(function(){f(h)&&g()})},c)}function o(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function p(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==m&&c!==l,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return s(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==k?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=k,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var q=$d().noUnsafeEval,r={csp:q,expensiveChecks:!1,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},t={csp:q,expensiveChecks:!0,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},u=!1;return h.$$runningExpensiveChecks=function(){return u},h}]}function tc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vc(function(b){a.$evalAsync(b)},b)}]}function uc(){this.$get=["$browser","$exceptionHandler",function(a,b){return vc(function(b){a.defer(b)},b)}]}function vc(a,c){function e(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function g(a){var b,d,e;e=a.pending,a.processScheduled=!1,a.pending=void 0;for(var f=0,g=e.length;g>f;++f){d=e[f][0],b=e[f][a.status];try{y(b)?d.resolve(b(a.value)):1===a.status?d.resolve(a.value):d.reject(a.value)}catch(h){d.reject(h),c(h)}}}function h(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){g(b)}))}function i(){this.promise=new e}function k(a){var b=new i,c=0,e=Wd(a)?[]:{};return d(a,function(a,d){c++,q(a).then(function(a){e.hasOwnProperty(d)||(e[d]=a,--c||b.resolve(e))},function(a){e.hasOwnProperty(d)||b.reject(a)})}),0===c&&b.resolve(e),b.promise}var l=b("$q",TypeError),m=function(){var a=new i;return a.resolve=f(a,a.resolve),a.reject=f(a,a.reject),a.notify=f(a,a.notify),a};j(e.prototype,{then:function(a,b,c){if(r(a)&&r(b)&&r(c))return this;var d=new i;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&h(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return p(b,!0,a)},function(b){return p(b,!1,a)},b)}}),j(i.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(l("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function b(a){i||(i=!0,g.$$resolve(a))}function d(a){i||(i=!0,g.$$reject(a))}var e,g=this,i=!1;try{(t(a)||y(a))&&(e=a&&a.then),y(e)?(this.promise.$$state.status=-1,e.call(a,b,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,h(this.promise.$$state))}catch(j){d(j),c(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,h(this.promise.$$state)},notify:function(b){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(y(a)?a(b):b)}catch(h){c(h)}}})}});var n=function(a){var b=new i;return b.reject(a),b.promise},o=function(a,b){var c=new i;return b?c.resolve(a):c.reject(a),c.promise},p=function(a,b,c){var d=null;try{y(c)&&(d=c())}catch(e){return o(e,!1)}return G(d)?d.then(function(){return o(a,b)},function(a){return o(a,!1)}):o(a,b)},q=function(a,b,c,d){var e=new i;return e.resolve(a),e.promise.then(b,c,d)},s=q,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!y(a))throw l("norslvr","Expected resolverFn, got '{0}'",a);var d=new i;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=m,u.reject=n,u.when=q,u.resolve=s,u.all=k,u}function wc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function xc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=g(),this.$$ChildScope=null}return b.prototype=a,b}var e=10,f=b("$rootScope"),h=null,i=null;this.digestTtl=function(a){return arguments.length&&(e=a),e},this.$get=["$exceptionHandler","$parse","$browser",function(b,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Kd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=g(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(a){if(z.$$phase)throw f("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function q(){z.$$phase=null}function s(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function v(){}function w(){for(;C.length;)try{C.shift()()}catch(a){b(a)}i=null}function x(){null===i&&(i=k.defer(function(){z.$apply(w)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,g=f.$$watchers,i={fn:b,last:v,get:e,exp:d||a,eq:!!c};return h=null,y(b)||(i.fn=n),g||(g=f.$$watchers=[]),g.unshift(i),s(this,1),function(){M(g,i)>=0&&s(f,-1),h=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(f,f,h)):b(f,e,h)}var e=new Array(a.length),f=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(f,f,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,d){f[0]=a,e[0]=c,b(f,a===c?f:e,d)}):(d(a,function(a,b){var d=h.$watch(a,function(a,d){f[b]=a,e[b]=d,i||(i=!0,h.$evalAsync(c))});g.push(d)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function d(a){f=a;var b,d,e,h,i;if(!r(f)){if(t(f))if(c(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],e=i!==i&&h!==h,e||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(d in f)Fd.call(f,d)&&(b++,h=f[d],i=g[d],d in g?(e=i!==i&&h!==h,e||i===h||(l++,g[d]=h)):(q++,g[d]=h,l++));if(q>b){l++;for(d in g)Fd.call(f,d)||(q--,delete g[d])}}else g!==f&&(g=f,l++);return l}}function e(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(t(f))if(c(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,d),n=[],o={},p=!0,q=0;return this.$watch(m,e)},$digest:function(){var a,c,d,g,j,l,m,n,o,r,s,t,u=e,x=this,C=[];p("$digest"),k.$$checkUrlChange(),this===z&&null!==i&&(k.defer.cancel(i),w()),h=null;do{n=!1,r=x;for(var E=0;Eu&&(s=4-u,C[s]||(C[s]=[]),C[s].push({msg:y(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:c,oldVal:d}))}catch(F){b(F)}if(!(o=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(o=r.$$nextSibling);)r=r.$parent}while(r=o);if((n||A.length)&&!u--)throw q(),f("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,C)}while(n||A.length);for(q();De;e++)if(d[e])try{d[e].apply(null,k)}catch(l){b(l)}else d.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,c){var d=this,e=d,f=d,g={name:a,targetScope:d,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!d.$$listenerCount[a])return g;for(var h,i,j,k=P([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){b(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==d&&e.$$nextSibling))for(;e!==d&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var z=new o,A=z.$$asyncQueue=[],B=z.$$postDigestQueue=[],C=z.$$applyAsyncQueue=[],D=0;return z}]}function yc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return s(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return s(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Hc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function zc(a){if("self"===a)return a;if(v(a)){if(a.indexOf("***")>-1)throw uf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Zd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(z(a))return new RegExp("^"+a.source+"$");throw uf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ac(a){var b=[];return s(a)&&d(a,function(a){b.push(zc(a))}),b}function Bc(){this.SCE_CONTEXTS=vf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=Ac(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=Ac(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Ic(b):!!a.exec(b.href)}function e(c){var e,f,g=Hc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw uf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||r(b)||""===b)return b;if("string"!=typeof b)throw uf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||r(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===vf.RESOURCE_URL){if(e(b))return b;throw uf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===vf.HTML)return j(b);throw uf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw uf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[vf.HTML]=f(k),l[vf.CSS]=f(k),l[vf.URL]=f(k),l[vf.JS]=f(k),l[vf.RESOURCE_URL]=f(l[vf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Cc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Kd)throw uf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var e=qa(vf);e.isEnabled=function(){return a},e.trustAs=c.trustAs,e.getTrusted=c.getTrusted,e.valueOf=c.valueOf,a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=o),e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:b(c,function(b){return e.getTrusted(a,b)})};var f=e.parseAs,g=e.getTrusted,h=e.trustAs;return d(vf,function(a,b){var c=Gd(b);e[va("parse_as_"+c)]=function(b){return f(a,b)},e[va("get_trusted_"+c)]=function(b){return g(a,b)},e[va("trust_as_"+c)]=function(b){return h(a,b)}}),e}]}function Dc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=a.chrome&&a.chrome.app&&a.chrome.app.runtime,g=!f&&a.history&&a.history.pushState,h=l((/android (\d+)/.exec(Gd((a.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((a.navigator||{}).userAgent),j=b[0]||{},k=/^(Moz|webkit|ms)(?=[A-Z])/,m=j.body&&j.body.style,n=!1,o=!1;if(m){for(var p in m)if(d=k.exec(p)){c=d[0],c=c[0].toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in m&&"webkit"),n=!!("transition"in m||c+"Transition"in m),o=!!("animation"in m||c+"Animation"in m),!h||n&&o||(n=v(m.webkitTransition),o=v(m.webkitAnimation))}return{history:!(!g||4>h||i),hasEvent:function(a){if("input"===a&&11>=Kd)return!1;if(r(e[a])){var b=j.createElement("div");e[a]="on"+a in b}return e[a]},csp:$d(),vendorPrefix:c,transitions:n,animations:o,android:h}}]}function Ec(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw wf("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,(!v(g)||r(b.get(g)))&&(g=e.getTrustedResourceUrl(g));var k=c.defaults&&c.defaults.transformResponse;return Wd(k)?k=k.filter(function(a){return a!==Ab}):k===Ab&&(k=null),c.get(g,j({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Fc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var e={};return e.findBindings=function(a,b,c){var e=a.getElementsByClassName("ng-binding"),f=[];return d(e,function(a){var e=Ud.element(a).data("$binding");e&&d(e,function(d){if(c){var e=new RegExp("(^|\\s)"+Zd(b)+"(\\s|\\||$)");e.test(d)&&f.push(a)}else-1!=d.indexOf(b)&&f.push(a)})}),f},e.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),r(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Lc(){this.$get=Kc}function Mc(a){function b(e,f){if(t(e)){var g={};return d(e,function(a,c){g[c]=b(c,a)}),g}return a.factory(e+c,f)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Rc),b("date",ed),b("filter",Nc),b("json",fd),b("limitTo",gd),b("lowercase",Ff),b("number",Sc),b("orderBy",id),b("uppercase",Gf)}function Nc(){return function(a,d,e){if(!c(a)){if(null==a)return a;throw b("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Qc(d);switch(h){case"function":f=d;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Oc(d,e,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Oc(a,b,c){var d,e=t(a)&&"$"in a;return b===!0?b=O:y(b)||(b=function(a,b){return r(a)?!1:null===a||null===b?a===b:t(b)||t(a)&&!q(a)?!1:(a=Gd(""+a),b=Gd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!t(d)?Pc(d,a.$,b,!1):Pc(d,a,b,c)}}function Pc(a,b,c,d,e){var f=Qc(a),g=Qc(b);if("string"===g&&"!"===b.charAt(0))return!Pc(a,b.substring(1),c,d);if(Wd(a))return a.some(function(a){return Pc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Pc(a[h],b,c,!0))return!0;return e?!1:Pc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!y(i)&&!r(i)){var j="$"===h,k=j?a:a[h];if(!Pc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Qc(a){return null===a?"null":typeof a}function Rc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return r(c)&&(c=b.CURRENCY_SYM),r(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Vc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Sc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Vc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Tc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(Af))>-1&&(a=a.replace(Af,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==Bf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==Bf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>zf&&(b=b.splice(0,zf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Uc(a,b,c,d){var e=a.d,f=e.length-a.i;b=r(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0){e.splice(Math.max(a.i,g));for(var i=g;ij;j++)e[j]=0}if(h>=5)if(0>g-1){for(var k=0;k>g;k--)e.unshift(0),a.i++;e.unshift(1),a.i++}else e[g-1]++;for(;fl;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Wc(a,b,c,d){var e="";for((0>a||d&&0>=a)&&(d?a=-a+1:(a=-a, +e="-")),a=""+a;a.length0||g>-c)&&(g+=c),0===g&&-12==c&&(g=12),Wc(g,b,d,e)}}function Yc(a,b,c){return function(d,e){var f=d["get"+a](),g=(c?"STANDALONE":"")+(b?"SHORT":""),h=Hd(g+a);return e[h][f]}}function Zc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Wc(Math[d>0?"floor":"ceil"](d/60),2)+Wc(Math.abs(d%60),2)}function $c(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function _c(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function ad(a){return function(b){var c=$c(b.getFullYear()),d=_c(b),e=+d-+c,f=1+Math.round(e/6048e5);return Wc(f,a)}}function bd(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function cd(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function dd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function ed(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=l(b[9]+b[10]),f=l(b[9]+b[11])),g.call(d,l(b[1]),l(b[2])-1,l(b[3]));var i=l(b[4]||0)-e,j=l(b[5]||0)-f,k=l(b[6]||0),m=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,m),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g,h,i="",j=[];if(e=e||"mediumDate",e=a.DATETIME_FORMATS[e]||e,v(c)&&(c=Ef.test(c)?l(c):b(c)),w(c)&&(c=new Date(c)),!x(c)||!isFinite(c.getTime()))return c;for(;e;)h=Df.exec(e),h?(j=P(j,h,1),e=j.pop()):(j.push(e),e=null);var k=c.getTimezoneOffset();return f&&(k=V(f,k),c=X(c,f,!0)),d(j,function(b){g=Cf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function fd(){return function(a,b){return r(b)&&(b=2),T(a,b)}}function gd(){return function(a,b,d){return b=Math.abs(Number(b))===1/0?Number(b):l(b),isNaN(b)?a:(w(a)&&(a=a.toString()),c(a)?(d=!d||isNaN(d)?0:l(d),d=0>d?Math.max(0,a.length+d):d,b>=0?hd(a,d,d+b):0===d?hd(a,b,a.length):hd(a,Math.max(0,d+b),d)):a)}}function hd(a,b,c){return v(a)?a.slice(b,c):Od.call(a,b,c)}function id(a){function d(b){return b.map(function(b){var c=1,d=o;if(y(b))d=b;else if(v(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(c="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(d=a(b),d.constant))){var e=d();d=function(a){return a[e]}}return{get:d,descending:c}})}function e(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a){return y(a.valueOf)&&(a=a.valueOf(),e(a))?a:q(a)&&(a=a.toString(),e(a))?a:a}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"object"===c&&(a=f(a)),{value:a,type:c,index:b}}function h(a,b){var c=0,d=a.type,e=b.type;if(d===e){var f=a.value,g=b.value;"string"===d?(f=f.toLowerCase(),g=g.toLowerCase()):"object"===d&&(t(f)&&(f=a.index),t(g)&&(g=b.index)),f!==g&&(c=g>f?-1:1)}else c=e>d?-1:1;return c}return function(a,e,f,i){function j(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:l.map(function(c){return g(c.get(a),b)})}}function k(a,b){for(var c=0,d=l.length;d>c;c++){var e=n(a.predicateValues[c],b.predicateValues[c]);if(e)return e*l[c].descending*m}return n(a.tieBreaker,b.tieBreaker)*m}if(null==a)return a;if(!c(a))throw b("orderBy")("notarray","Expected array but received: {0}",a);Wd(e)||(e=[e]),0===e.length&&(e=["+"]);var l=d(e),m=f?-1:1,n=y(i)?i:h,o=Array.prototype.map.call(a,j);return o.sort(k),a=o.map(function(a){return a.value})}}function jd(a){return y(a)&&(a={link:a}),a.restrict=a.restrict||"AC",p(a)}function kd(a,b){a.$name=b}function ld(a,b,c,e,f){var g=this,h=[];g.$error={},g.$$success={},g.$pending=void 0,g.$name=f(b.name||b.ngForm||"")(c),g.$dirty=!1,g.$pristine=!0,g.$valid=!0,g.$invalid=!1,g.$submitted=!1,g.$$parentForm=Jf,g.$rollbackViewValue=function(){d(h,function(a){a.$rollbackViewValue()})},g.$commitViewValue=function(){d(h,function(a){a.$commitViewValue()})},g.$addControl=function(a){la(a.$name,"input"),h.push(a),a.$name&&(g[a.$name]=a),a.$$parentForm=g},g.$$renameControl=function(a,b){var c=a.$name;g[c]===a&&delete g[c],g[b]=a,a.$name=b},g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name],d(g.$pending,function(b,c){g.$setValidity(c,null,a)}),d(g.$error,function(b,c){g.$setValidity(c,null,a)}),d(g.$$success,function(b,c){g.$setValidity(c,null,a)}),M(h,a),a.$$parentForm=Jf},Ad({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(M(d,c),0===d.length&&delete a[b])},$animate:e}),g.$setDirty=function(){e.removeClass(a,tg),e.addClass(a,ug),g.$dirty=!0,g.$pristine=!1,g.$$parentForm.$setDirty()},g.$setPristine=function(){e.setClass(a,tg,ug+" "+Kf),g.$dirty=!1,g.$pristine=!0,g.$submitted=!1,d(h,function(a){a.$setPristine()})},g.$setUntouched=function(){d(h,function(a){a.$setUntouched()})},g.$setSubmitted=function(){e.addClass(a,Kf),g.$submitted=!0,g.$$parentForm.$setSubmitted()}}function md(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function nd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d)}function od(a,b,c,d,e,f){var g=Gd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Yd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Yf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Xf,function(a){if(!i){var b=this[Ed],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,(b.badInput!==c||b.typeMismatch!==d)&&j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function pd(a,b){if(x(a))return a;if(v(a)){Uf.lastIndex=0;var c=Uf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=$c(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function qd(a,b){return function(c,e){var f,g;if(x(c))return c;if(v(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Of.test(c))return new Date(c);if(a.lastIndex=0,f=a.exec(c))return f.shift(),g=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},d(f,function(a,c){c=p},g.$observe("min",function(a){p=m(a),h.$validate()})}if(s(g.max)||g.ngMax){var q;h.$validators.max=function(a){return!l(a)||r(q)||c(a)<=q},g.$observe("max",function(a){q=m(a),h.$validate()})}}}function sd(a,b,c,d){var e=b[0],f=d.$$hasNativeValidators=t(e.validity);f&&d.$parsers.push(function(a){var c=b.prop(Ed)||{};return c.badInput||c.typeMismatch?void 0:a})}function td(a,b,c,d,e,f){if(sd(a,b,c,d),od(a,b,c,d,e,f),d.$$parserName="number",d.$parsers.push(function(a){return d.$isEmpty(a)?null:Rf.test(a)?parseFloat(a):void 0}),d.$formatters.push(function(a){if(!d.$isEmpty(a)){if(!w(a))throw Ag("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),s(c.min)||c.ngMin){var g;d.$validators.min=function(a){return d.$isEmpty(a)||r(g)||a>=g},c.$observe("min",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),g=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}if(s(c.max)||c.ngMax){var h;d.$validators.max=function(a){return d.$isEmpty(a)||r(h)||h>=a},c.$observe("max",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),h=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}}function ud(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Pf.test(c)}}function vd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Qf.test(c)}}function wd(a,b,c,d){r(c.name)&&b.attr("name",g());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function xd(a,b,c,d,e){var f;if(s(d)){if(f=a(d),!f.constant)throw Ag("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function yd(a,b,c,d,e,f,g,h){var i=xd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=xd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return O(a,i)}),d.$parsers.push(function(a){return a?i:j})}function zd(a,b){return a="ngClass"+a,["$animate",function(c){function e(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&e.push(a))}),h.data("$classCounts",c),e.join(" ")}function m(a,b){var d=e(b,a),f=e(a,b);d=l(d,1),f=l(f,-1),d&&d.length&&c.addClass(h,d),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||(1&g.$index)===b){var c=f(a||[]);if(o){if(!O(a,o)){var d=f(o);m(d,c)}}else j(c)}o=Wd(a)?a.map(function(a){return qa(a)}):qa(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var e=1&c;if(e!==(1&d)){var h=f(g.$eval(i[a]));e===b?j(h):k(h)}})}}}]}function Ad(a){function b(a,b,h){r(b)?c("$pending",a,h):d("$pending",a,h),F(b)?b?(k(g.$error,a,h),j(g.$$success,a,h)):(j(g.$error,a,h),k(g.$$success,a,h)):(k(g.$error,a,h),k(g.$$success,a,h)),g.$pending?(e(xg,!0),g.$valid=g.$invalid=void 0,f("",null)):(e(xg,!1),g.$valid=Bd(g.$error),g.$invalid=!g.$valid,f("",g.$valid));var i;i=g.$pending&&g.$pending[a]?void 0:g.$error[a]?!1:g.$$success[a]?!0:null,f(a,i),g.$$parentForm.$setValidity(a,i,g)}function c(a,b,c){g[a]||(g[a]={}),j(g[a],b,c)}function d(a,b,c){g[a]&&k(g[a],b,c),Bd(g[a])&&(g[a]=void 0)}function e(a,b){b&&!i[a]?(l.addClass(h,a),i[a]=!0):!b&&i[a]&&(l.removeClass(h,a),i[a]=!1)}function f(a,b){a=a?"-"+ha(a,"-"):"",e(rg+a,b===!0),e(sg+a,b===!1)}var g=a.ctrl,h=a.$element,i={},j=a.set,k=a.unset,l=a.$animate;i[sg]=!(i[rg]=h.hasClass(rg)),g.$setValidity=b}function Bd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Cd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Dd=/^\/(.+)\/([a-z]*)$/,Ed="validity",Fd=Object.prototype.hasOwnProperty,Gd=function(a){return v(a)?a.toLowerCase():a},Hd=function(a){return v(a)?a.toUpperCase():a},Id=function(a){return v(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Jd=function(a){return v(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Gd=Id,Hd=Jd);var Kd,Ld,Md,Nd,Od=[].slice,Pd=[].splice,Qd=[].push,Rd=Object.prototype.toString,Sd=Object.getPrototypeOf,Td=b("ng"),Ud=a.angular||(a.angular={}),Vd=0;Kd=a.document.documentMode,n.$inject=[],o.$inject=[];var Wd=Array.isArray,Xd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Yd=function(a){return v(a)?a.trim():a},Zd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=be[c],b=a.document.querySelector("["+d.replace(":","\\:")+"jq]")){e=b.getAttribute(d+"jq");break}return _d.name_=e},ae=/:/g,be=["ng-","data-ng-","ng:","x-ng-"],ce=/[A-Z]/g,de=!1,ee=1,fe=2,ge=3,he=8,ie=9,je=11,ke={full:"1.5.7",major:1,minor:5,dot:7,codeName:"hexagonal-circumvolution"};Da.expando="ng339";var le=Da.cache={},me=1,ne=function(a,b,c){a.addEventListener(b,c,!1)},oe=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var pe=/([\:\-\_]+(.))/g,qe=/^moz([A-Z])/,re={mouseleave:"mouseout",mouseenter:"mouseover"},se=b("jqLite"),te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ue=/<|&#?\w+;/,ve=/<([\w:-]+)/,we=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,xe={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td;var ye=a.Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ze=Da.prototype={ready:function(b){function c(){d||(d=!0,b())}var d=!1;"complete"===a.document.readyState?a.setTimeout(c):(this.on("DOMContentLoaded",c),Da(a).on("load",c))},toString:function(){var a=[];return d(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Ld(a>=0?this[a]:this[this.length+a])},length:0,push:Qd,sort:[].sort,splice:[].splice},Ae={};d("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){Ae[Gd(a)]=a});var Be={};d("input,select,option,textarea,button,form,details".split(","),function(a){Be[a]=!0});var Ce={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};d({data:Ja,removeData:Ha,hasData:ya,cleanData:za},function(a,b){Da[b]=a}),d({data:Ja,inheritedData:Pa,scope:function(a){return Ld.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Ld.data(a,"$isolateScope")||Ld.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){return b=va(b),s(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,c){var d=a.nodeType;if(d!==ge&&d!==fe&&d!==he){var e=Gd(b);if(Ae[e]){if(!s(c))return a[b]||(a.attributes.getNamedItem(b)||n).specified?e:void 0;c?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(s(c))a.setAttribute(b,c);else if(a.getAttribute){var f=a.getAttribute(b,2);return null===f?void 0:f}}},prop:function(a,b,c){return s(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(r(b)){var c=a.nodeType;return c===ee||c===ge?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(r(b)){if(a.multiple&&"select"===L(a)){var c=[];return d(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return r(b)?a.innerHTML:(Fa(a,!0),void(a.innerHTML=b))},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&r(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(t(b)){for(d=0;f>d;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=r(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),d({removeData:Ha,on:function(a,b,c,d){if(s(d))throw se("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xa(a)){var e=Ia(a,!0),f=e.events,g=e.handle;g||(g=e.handle=Va(a,f));for(var h=b.indexOf(" ")>=0?b.split(" "):[b],i=h.length,j=function(b,d,e){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=d,"$destroy"===b||e||ne(a,b,g)),h.push(c)};i--;)b=h[i],re[b]?(j(re[b],Xa),j(b,void 0,!0)):j(b)}},off:Ga,one:function(a,b,c){a=Ld(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,e=a.parentNode;Fa(a),d(new Da(b),function(b){c?e.insertBefore(b,c.nextSibling):e.replaceChild(b,a),c=b})},children:function(a){var b=[];return d(a.childNodes,function(a){a.nodeType===ee&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===ee||c===je){b=new Da(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===ee){var c=a.firstChild;d(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Ld(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&d(b.split(" "),function(b){var d=c;r(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==je?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var e,f,g,h=b.type||b,i=Ia(a),k=i&&i.events,l=k&&k[h];l&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:n,type:h,target:a},b.type&&(e=j(e,b)),f=qa(l),g=c?[e].concat(c):[e],d(f,function(b){e.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)r(e)?(e=a(this[f],b,c,d),s(e)&&(e=Ld(e))):Na(e,a(this[f],b,c,d));return s(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var De=[function(){this.$get=[function(){return $a}]}],Ee=/^([^\(]+?)=>/,Fe=/^[^\(]*\(\s*([^\)]*)\)/m,Ge=/,/,He=/^\s*(_?)(\S+?)\1\s*$/,Ie=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Je=b("$injector");db.$$annotate=cb;var Ke=b("$animate"),Le=1,Me="ng-animate",Ne=function(){this.$get=n},Oe=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,e){function f(a,b,c){var e=!1;return b&&(b=v(b)?b.split(" "):Wd(b)?b:[],d(b,function(b){b&&(e=!0,a[b]=c)})),e}function g(){d(b,function(b){var c=a.get(b);if(c){var e=hb(b.attr("class")),f="",g="";d(c,function(a,b){var c=!!e[b];a!==c&&(a?f+=(f.length?" ":"")+b:g+=(g.length?" ":"")+b)}),d(b,function(a){f&&Ma(a,f),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,d,h){var i=a.get(c)||{},j=f(i,d,!0),k=f(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&e.$$postDigest(g))}return{enabled:n,on:n,off:n,pin:n,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Pe=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Ke("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Me+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw Ke("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Me)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=gb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",ib(f))},move:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",ib(f))},leave:function(b,c){return a.push(b,"leave",ib(c),function(){b.remove()})},addClass:function(b,c,d){return d=ib(d),d.addClass=fb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=ib(d),d.removeClass=fb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=ib(e),e.addClass=fb(e.addClass,c),e.removeClass=fb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=ib(f),f.from=f.from?j(f.from,c):c,f.to=f.to?j(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=fb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Qe=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){of[a]=!0});var pf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},qf=function(a){this.options=a};qf.prototype={constructor:qf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var c=a.charCodeAt(0),d=b.charCodeAt(0);return c>=55296&&56319>=c&&d>=56320&&57343>=d?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw kf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:rf.Program,body:a}},expressionStatement:function(){return{type:rf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:rf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:rf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:rf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:rf.LogicalExpression,operator:"&&", +left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:rf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=N(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:rf.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:rf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:rf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:rf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:rf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.filterChain());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:rf.Identifier,name:a.text}},constant:function(){return{type:rf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:rf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:rf.Property,kind:"init"},this.peek().constant?(a.key=this.constant(),a.computed=!1,this.consume(":"),a.value=this.expression()):this.peek().identifier?(a.key=this.identifier(),a.computed=!1,this.peek(":")?(this.consume(":"),a.value=this.expression()):a.value=a.key):this.peek("[")?(this.consume("["),a.key=this.expression(),this.consume("]"),a.computed=!0,this.consume(":"),a.value=this.expression()):this.throwError("invalid key",this.peek()),b.push(a)}while(this.expect(","));return this.consume("}"),{type:rf.ObjectExpression,properties:b}},throwError:function(a,b){throw kf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},selfReferential:{"this":{type:rf.ThisExpression},$locals:{type:rf.LocalsExpression}}},oc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ic(e,c.$filter);var f,g="";if(this.stage="assign",f=lc(e)){this.state.computing="assign";var h=this.nextId();this.recurse(f,h),this.return_(h),g="fn.assign="+this.generateFunction("assign","s,v,l")}var i=jc(e.body);c.stage="inputs",d(i,function(a,b){var d="fn"+b;c.state[d]={vars:[],body:[],own:{}},c.state.computing=d;var e=c.nextId();c.recurse(a,e),c.return_(e),c.state.inputs.push(d),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var j='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+g+this.watchFns()+"return fn;",k=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",j)(this.$filter,ac,cc,dc,bc,ec,fc,gc,a);return this.state=this.stage=void 0,k.literal=mc(e),k.constant=nc(e),k},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return d(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return d(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,c,e,f,g){var h,i,j,k,l,m=this;if(e=e||n,!g&&s(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,c,e,f,!0));switch(a.type){case rf.Program:d(a.body,function(b,c){m.recurse(b.expression,void 0,void 0,function(a){i=a}),c!==a.body.length-1?m.current().body.push(i,";"):m.return_(i)});break;case rf.Literal:k=this.escape(a.value),this.assign(b,k),e(k);break;case rf.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){i=a}),k=a.operator+"("+this.ifDefined(i,0)+")",this.assign(b,k),e(k);break;case rf.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){h=a}),this.recurse(a.right,void 0,void 0,function(a){i=a}),k="+"===a.operator?this.plus(h,i):"-"===a.operator?this.ifDefined(h,0)+a.operator+this.ifDefined(i,0):"("+h+")"+a.operator+"("+i+")",this.assign(b,k),e(k);break;case rf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case rf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case rf.Identifier:b=b||this.nextId(),c&&(c.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),c.computed=!1,c.name=a.name),ac(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){f&&1!==f&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||qc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case rf.MemberExpression:h=c&&(c.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,h,void 0,function(){m.if_(m.notNull(h),function(){f&&1!==f&&m.addEnsureSafeAssignContext(h),a.computed?(i=m.nextId(),m.recurse(a.property,i),m.getStringValue(i),m.addEnsureSafeMemberName(i),f&&1!==f&&m.if_(m.not(m.computedMember(h,i)),m.lazyAssign(m.computedMember(h,i),"{}")),k=m.ensureSafeObject(m.computedMember(h,i)),m.assign(b,k),c&&(c.computed=!0,c.name=i)):(ac(a.property.name),f&&1!==f&&m.if_(m.not(m.nonComputedMember(h,a.property.name)),m.lazyAssign(m.nonComputedMember(h,a.property.name),"{}")),k=m.nonComputedMember(h,a.property.name),(m.state.expensiveChecks||qc(a.property.name))&&(k=m.ensureSafeObject(k)),m.assign(b,k),c&&(c.computed=!1,c.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!f);break;case rf.CallExpression:b=b||this.nextId(),a.filter?(i=m.filter(a.callee.name),j=[],d(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),j.push(b)}),k=i+"("+j.join(",")+")",m.assign(b,k),e(b)):(i=m.nextId(),h={},j=[],m.recurse(a.callee,i,h,function(){m.if_(m.notNull(i),function(){m.addEnsureSafeFunction(i),d(a.arguments,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(m.ensureSafeObject(a))})}),h.name?(m.state.expensiveChecks||m.addEnsureSafeObject(h.context),k=m.member(h.context,h.name,h.computed)+"("+j.join(",")+")"):k=i+"("+j.join(",")+")",k=m.ensureSafeObject(k),m.assign(b,k)},function(){m.assign(b,"undefined")}),e(b)}));break;case rf.AssignmentExpression:if(i=this.nextId(),h={},!kc(a.left))throw kf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,void 0,h,function(){m.if_(m.notNull(h.context),function(){m.recurse(a.right,i),m.addEnsureSafeObject(m.member(h.context,h.name,h.computed)),m.addEnsureSafeAssignContext(h.context),k=m.member(h.context,h.name,h.computed)+a.operator+i,m.assign(b,k),e(b||k)})},1);break;case rf.ArrayExpression:j=[],d(a.elements,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(a)})}),k="["+j.join(",")+"]",this.assign(b,k),e(k);break;case rf.ObjectExpression:j=[],l=!1,d(a.properties,function(a){a.computed&&(l=!0)}),l?(b=b||this.nextId(),this.assign(b,"{}"),d(a.properties,function(a){a.computed?(h=m.nextId(),m.recurse(a.key,h)):h=a.key.type===rf.Identifier?a.key.name:""+a.key.value,i=m.nextId(),m.recurse(a.value,i),m.assign(m.member(b,h,a.computed),i)})):(d(a.properties,function(b){m.recurse(b.value,a.constant?void 0:m.nextId(),void 0,function(a){j.push(m.escape(b.key.type===rf.Identifier?b.key.name:""+b.key.value)+":"+a)})}),k="{"+j.join(",")+"}",this.assign(b,k)),e(b||k);break;case rf.ThisExpression:this.assign(b,"s"),e("s");break;case rf.LocalsExpression:this.assign(b,"l"),e("l");break;case rf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var c=/[$_a-zA-Z][$_a-zA-Z0-9]*/,d=/[^$_a-zA-Z0-9]/g;return c.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(v(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(w(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw kf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},pc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,ic(e,c.$filter);var f,g;(f=lc(e))&&(g=this.recurse(f));var h,i=jc(e.body);i&&(h=[],d(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];d(e.body,function(a){j.push(c.recurse(a.expression))});var k=0===e.body.length?n:1===e.body.length?j[0]:function(a,b){var c;return d(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=mc(e),k.constant=nc(e),k},recurse:function(a,b,c){var e,f,g,h=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case rf.Literal:return this.value(a.value,b);case rf.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case rf.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case rf.Identifier:return ac(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||qc(a.name),b,c,h.expression);case rf.MemberExpression:return e=this.recurse(a.object,!1,!!c),a.computed||(ac(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,b,c,h.expression):this.nonComputedMember(e,f,h.expensiveChecks,b,c,h.expression);case rf.CallExpression:return g=[],d(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,c,d,e){for(var h=[],i=0;i":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,c,d,e){return function(f,g,h,i){var j=g&&a in g?g:f;d&&1!==d&&j&&!j[a]&&(j[a]={});var k=j?j[a]:void 0;return b&&cc(k,e),c?{context:j,name:a,value:k}:k}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=bc(j),ac(j,e),d&&1!==d&&(ec(l),l&&!l[j]&&(l[j]={})),k=l[j],cc(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,c,d,e,f){return function(g,h,i,j){var k=a(g,h,i,j);e&&1!==e&&(ec(k),k&&!k[b]&&(k[b]={}));var l=null!=k?k[b]:void 0;return(c||qc(b))&&cc(l,f),d?{context:k,name:b,value:l}:l}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var sf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new rf(a,c),this.astCompiler=c.csp?new pc(this.ast,b):new oc(this.ast,b)};sf.prototype={constructor:sf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var tf=Object.prototype.valueOf,uf=b("$sce"),vf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},wf=b("$compile"),xf=a.document.createElement("a"),yf=Hc(a.location.href);Kc.$inject=["$document"],Mc.$inject=["$provide"];var zf=22,Af=".",Bf="0";Rc.$inject=["$locale"],Sc.$inject=["$locale"];var Cf={yyyy:Xc("FullYear",4,0,!1,!0),yy:Xc("FullYear",2,0,!0,!0),y:Xc("FullYear",1,0,!1,!0),MMMM:Yc("Month"),MMM:Yc("Month",!0),MM:Xc("Month",2,1),M:Xc("Month",1,1),LLLL:Yc("Month",!1,!0),dd:Xc("Date",2),d:Xc("Date",1),HH:Xc("Hours",2),H:Xc("Hours",1),hh:Xc("Hours",2,-12),h:Xc("Hours",1,-12),mm:Xc("Minutes",2),m:Xc("Minutes",1),ss:Xc("Seconds",2),s:Xc("Seconds",1),sss:Xc("Milliseconds",3),EEEE:Yc("Day"),EEE:Yc("Day",!0),a:bd,Z:Zc,ww:ad(2),w:ad(1),G:cd,GG:cd,GGG:cd,GGGG:dd},Df=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ef=/^\-?\d+$/;ed.$inject=["$locale"];var Ff=p(Gd),Gf=p(Hd);id.$inject=["$parse"];var Hf=p({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Rd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),If={};d(Ae,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=qb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),If[d]=function(){return{restrict:"A",priority:100,link:e}}}}),d(Ce,function(a,b){If[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Dd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),d(["src","srcset","href"],function(a){var b=qb("ng-"+a);If[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Rd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Kd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Jf={$addControl:n,$$renameControl:kd,$removeControl:n,$setValidity:n,$setDirty:n,$setPristine:n,$setSubmitted:n},Kf="ng-submitted";ld.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Lf=function(a){return["$timeout","$parse",function(b,c){function d(a){return""===a?c('this[""]').assign:c(a).assign||n}var e={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:ld,compile:function(c,e){c.addClass(tg).addClass(rg);var f=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,c,e,g){var h=g[0];if(!("action"in e)){var i=function(b){a.$apply(function(){h.$commitViewValue(),h.$setSubmitted()}),b.preventDefault()};ne(c[0],"submit",i),c.on("$destroy",function(){b(function(){oe(c[0],"submit",i)},0,!1)})}var k=g[1]||h.$$parentForm;k.$addControl(h);var l=f?d(h.$name):n;f&&(l(a,h),e.$observe(f,function(b){h.$name!==b&&(l(a,void 0),h.$$parentForm.$$renameControl(h,b),(l=d(h.$name))(a,h))})),c.on("$destroy",function(){h.$$parentForm.$removeControl(h),l(a,void 0),j(h,Jf)})}}}};return e}]},Mf=Lf(),Nf=Lf(!0),Of=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Pf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Qf=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Rf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sf=/^(\d{4,})-(\d{2})-(\d{2})$/,Tf=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Uf=/^(\d{4,})-W(\d\d)$/,Vf=/^(\d{4,})-(\d\d)$/,Wf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xf="keydown wheel mousedown",Yf=oa();d("date,datetime-local,month,time,week".split(","),function(a){Yf[a]=!0});var Zf={text:nd,date:rd("date",Sf,qd(Sf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":rd("datetimelocal",Tf,qd(Tf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:rd("time",Wf,qd(Wf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:rd("week",Uf,pd,"yyyy-Www"),month:rd("month",Vf,qd(Vf,["yyyy","MM"]),"yyyy-MM"),number:td,url:ud,email:vd,radio:wd,checkbox:yd,hidden:n,button:n,submit:n,reset:n,file:n},$f=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Zf[Gd(g.type)]||Zf.text)(e,f,g,h[0],b,a,c,d)}}}}],_f=/^(true|false|\d+)$/,ag=function(){return{restrict:"A",priority:100,compile:function(a,b){return _f.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},bg=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=r(a)?"":a})}}}}],cg=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=r(a)?"":a})}}}}],dg=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],eg=p({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),fg=zd("",!0),gg=zd("Odd",0),hg=zd("Even",1),ig=jd({compile:function(a,b){b.$set("ngCloak",void 0),a.removeClass("ng-cloak")}}),jg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],kg={},lg={blur:!0,focus:!0};d("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=qb("ng-"+a);kg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};lg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var mg=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.$$createComment("end ngIf",e.ngIf),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=na(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],ng=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ud.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!s(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],og=["$compile",function(b){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Rd.call(d[0]).match(/SVG/)?(d.empty(),void b(Aa(f.template,a.document).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void b(d.contents())(c))}}}],pg=jd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),qg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,c,e){var f=b.attr(c.$attr.ngList)||", ",g="false"!==c.ngTrim,h=g?Yd(f):f,i=function(a){if(!r(a)){var b=[];return a&&d(a.split(h),function(a){a&&b.push(g?Yd(a):a)}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Wd(a)?a.join(f):void 0}),e.$isEmpty=function(a){return!a||!a.length}}}},rg="ng-valid",sg="ng-invalid",tg="ng-pristine",ug="ng-dirty",vg="ng-untouched",wg="ng-touched",xg="ng-pending",yg="ng-empty",zg="ng-not-empty",Ag=b("ngModel"),Bg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,c,e,f,g,h,i,j,k){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=k(c.name||"",!1)(a),this.$$parentForm=Jf;var l,m=f(c.ngModel),o=m.assign,p=m,q=o,t=null,u=this;this.$$setOptions=function(a){if(u.$options=a,a&&a.getterSetter){var b=f(c.ngModel+"()"),d=f(c.ngModel+"($$$p)");p=function(a){var c=m(a);return y(c)&&(c=b(a)),c},q=function(a,b){y(m(a))?d(a,{$$$p:b}):o(a,b)}}else if(!m.assign)throw Ag("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,Y(e))},this.$render=n,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){u.$isEmpty(a)?(g.removeClass(e,zg),g.addClass(e,yg)):(g.removeClass(e,yg),g.addClass(e,zg))};var v=0;Ad({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:g}),this.$setPristine=function(){u.$dirty=!1,u.$pristine=!0,g.removeClass(e,ug),g.addClass(e,tg)},this.$setDirty=function(){u.$dirty=!0,u.$pristine=!1,g.removeClass(e,tg),g.addClass(e,ug),u.$$parentForm.$setDirty()},this.$setUntouched=function(){u.$touched=!1,u.$untouched=!0,g.setClass(e,vg,wg)},this.$setTouched=function(){u.$touched=!0,u.$untouched=!1,g.setClass(e,wg,vg)},this.$rollbackViewValue=function(){h.cancel(t),u.$viewValue=u.$$lastCommittedViewValue,u.$render()},this.$validate=function(){if(!w(u.$modelValue)||!isNaN(u.$modelValue)){var a=u.$$lastCommittedViewValue,b=u.$$rawModelValue,c=u.$valid,d=u.$modelValue,e=u.$options&&u.$options.allowInvalid;u.$$runValidators(b,a,function(a){e||c===a||(u.$modelValue=a?b:void 0,u.$modelValue!==d&&u.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function e(){var a=u.$$parserName||"parse";return r(l)?(h(a,null),!0):(l||(d(u.$validators,function(a,b){h(b,null)}),d(u.$asyncValidators,function(a,b){h(b,null)})),h(a,l),l)}function f(){var c=!0;return d(u.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),c?!0:(d(u.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var c=[],e=!0;d(u.$asyncValidators,function(d,f){var g=d(a,b);if(!G(g))throw Ag("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",g);h(f,void 0),c.push(g.then(function(){h(f,!0)},function(){e=!1,h(f,!1)}))}),c.length?j.all(c).then(function(){i(e)},n):i(!0)}function h(a,b){k===v&&u.$setValidity(a,b)}function i(a){k===v&&c(a)}v++;var k=v;return e()&&f()?void g():void i(!1)},this.$commitViewValue=function(){var a=u.$viewValue;h.cancel(t),(u.$$lastCommittedViewValue!==a||""===a&&u.$$hasNativeValidators)&&(u.$$updateEmptyClasses(a),u.$$lastCommittedViewValue=a,u.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){u.$modelValue!==f&&u.$$writeModelToScope()}var c=u.$$lastCommittedViewValue,d=c;if(l=r(d)?void 0:!0)for(var e=0;ef;f++){var i=a===c?f:c[f],j=a[i],k=x(j,i),l=q(j,k);if(b.push(l),h[2]||h[1]){var m=s(d,k);b.push(m)}if(h[4]){var n=u(d,k);b.push(n)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],f=g(c),h=f.length,i=0;h>i;i++){var j=c===f?i:f[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new e(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Ud.copy(a.viewValue):a.viewValue}}}}}function h(a,c,f,h){function k(a,b){var c=i.cloneNode(!1);b.appendChild(c),l(a,c)}function l(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=x&&o.readValue();if(x)for(var b=x.items.length-1;b>=0;b--){var d=x.items[b];Ra(d.group?d.element.parentNode:d.element)}x=y.getOptions();var e={};if(v&&c.prepend(n),x.items.forEach(function(a){var b;s(a.group)?(b=e[a.group],b||(b=j.cloneNode(!1),z.appendChild(b),b.label=a.group,e[a.group]=b),k(a,b)):k(a,z)}),c[0].appendChild(z),p.$render(),!p.$isEmpty(a)){var f=o.readValue(),g=y.trackBy||q;(g?O(a,f):a===f)||(p.$setViewValue(f),p.$render())}}for(var n,o=h[0],p=h[1],q=f.multiple,r=0,t=c.children(),u=t.length;u>r;r++)if(""===t[r].value){n=t.eq(r);break}var v=!!n,w=Ld(i.cloneNode(!1));w.val("?");var x,y=g(f.ngOptions,c,a),z=e[0].createDocumentFragment(),A=function(){v||c.prepend(n),c.val(""),n.prop("selected",!0),n.attr("selected",!0)},B=function(){v||n.remove()},C=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},D=function(){w.remove()};q?(p.$isEmpty=function(a){return!a||0===a.length},o.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&(b.element.selected=!0)})},o.readValue=function(){var a=c.val()||[],b=[];return d(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&a.$watchCollection(function(){return Wd(p.$viewValue)?p.$viewValue.map(function(a){return y.getTrackByValue(a)}):void 0},function(){p.$render()})):(o.writeValue=function(a){var b=x.getOptionFromViewValue(a);b?(c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(D(),A()):(B(),C())},o.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),x.getViewValueFromOption(a)):null},y.trackBy&&a.$watch(function(){return y.getTrackByValue(p.$viewValue)},function(){p.$render()})),v?(n.remove(),b(n)(a),n.removeClass("ng-scope")):n=Ld(i.cloneNode(!1)),c.empty(),m(),a.$watchCollection(y.getWatchables,m)}var i=a.document.createElement("option"),j=a.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=n},post:h}}}],Jg=["$locale","$interpolate","$log",function(a,b,c){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),o=i.offset||0,p=g.$eval(m)||{},q={},s=b.startSymbol(),t=b.endSymbol(),u=s+l+"-"+o+t,v=Ud.noop;d(i,function(a,b){var c=f.exec(b);if(c){var d=(c[1]?"-":"")+Gd(c[2]);p[d]=h.attr(i.$attr[b])}}),d(p,function(a,c){q[c]=b(a.replace(e,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in p||(d=a.pluralCat(d-o)),d!==k&&!(e&&w(k)&&isNaN(k))){v();var f=q[d];r(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=n,j()):v=g.$watch(f,j),k=d}})}}}],Kg=["$parse","$animate","$compile",function(a,e,f){var g="$$NG_REMOVED",h=b("ngRepeat"),i=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},j=function(a){return a.clone[0]},k=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(b,l){var m=l.ngRepeat,n=f.$$createComment("end ngRepeat",m),o=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!o)throw h("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var p=o[1],q=o[2],r=o[3],s=o[4];if(o=p.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!o)throw h("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var t=o[3]||o[1],u=o[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw h("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",r);var v,w,x,y,z={$id:Za};return s?v=a(s):(x=function(a,b){return Za(b)},y=function(a){return a}),function(a,b,f,l,o){v&&(w=function(b,c,d){return u&&(z[u]=b),z[t]=c,z.$index=d,v(a,z)});var p=oa();a.$watchCollection(q,function(f){var l,q,s,v,z,A,B,C,D,E,F,G,H=b[0],I=oa();if(r&&(a[r]=f),c(f))D=f,C=w||x;else{C=w||y,D=[];for(var J in f)Fd.call(f,J)&&"$"!==J.charAt(0)&&D.push(J)}for(v=D.length,F=new Array(v),l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],B=C(z,A,l),p[B])E=p[B],delete p[B],I[B]=E,F[l]=E;else{if(I[B])throw d(F,function(a){a&&a.scope&&(p[a.id]=a)}),h("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,B,A);F[l]={id:B,scope:void 0,clone:void 0},I[B]=!0}for(var K in p){if(E=p[K],G=na(E.clone),e.leave(G),G[0].parentNode)for(l=0,q=G.length;q>l;l++)G[l][g]=!0;E.scope.$destroy()}for(l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],E=F[l],E.scope){s=H;do s=s.nextSibling;while(s&&s[g]);j(E)!=s&&e.move(na(E.clone),null,H),H=k(E),i(E.scope,l,t,A,u,z,v)}else o(function(a,b){E.scope=b;var c=n.cloneNode(!1);a[a.length++]=c,e.enter(a,null,H),H=c,E.clone=a,I[E.id]=E,i(E.scope,l,t,A,u,z,v)});p=I})}}}}],Lg="ng-hide",Mg="ng-hide-animate",Ng=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Lg,{tempClasses:Mg})})}}}],Og=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Lg,{tempClasses:Mg})})}}}],Pg=jd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&d(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Qg=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,e,f,g){var h=f.ngSwitch||f.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var e,f;for(e=0,f=k.length;f>e;++e)a.cancel(k[e]);for(k.length=0,e=0,f=l.length;f>e;++e){var h=na(j[e].clone);l[e].$destroy();var n=k[e]=a.leave(h);n.then(m(k,e))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&d(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Rg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Sg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Tg=b("ngTransclude"),Ug=jd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Tg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Vg=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Wg={$setViewValue:n,$render:n},Xg=["$element","$scope",function(b,c){var d=this,e=new $a;d.ngModelCtrl=Wg,d.unknownOption=Ld(a.document.createElement("option")),d.renderUnknownOption=function(a){var c="? "+Za(a)+" ?";d.unknownOption.val(c),b.prepend(d.unknownOption),b.val(c)},c.$on("$destroy",function(){d.renderUnknownOption=n}),d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()},d.readValue=function(){return d.removeUnknownOption(),b.val()},d.writeValue=function(a){d.hasOption(a)?(d.removeUnknownOption(),b.val(a),""===a&&d.emptyOption.prop("selected",!0)):null==a&&d.emptyOption?(d.removeUnknownOption(),b.val("")):d.renderUnknownOption(a)},d.addOption=function(a,b){if(b[0].nodeType!==he){la(a,'"option value"'),""===a&&(d.emptyOption=b);var c=e.get(a)||0;e.put(a,c+1),d.ngModelCtrl.$render(),Cd(b)}},d.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(d.emptyOption=void 0)):e.put(a,b-1))},d.hasOption=function(a){return!!e.get(a)},d.registerOption=function(a,b,c,e,f){if(e){var g;c.$observe("value",function(a){s(g)&&d.removeOption(g),g=a,d.addOption(a,b)})}else f?a.$watch(f,function(a,e){c.$set("value",a),e!==a&&d.removeOption(e),d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value),d.ngModelCtrl.$render()})}}],Yg=function(){function a(a,b,c,e){var f=e[1];if(f){var g=e[0];if(g.ngModelCtrl=f,b.on("change",function(){a.$apply(function(){f.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return d(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);d(b.find("option"),function(a){a.selected=s(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==f.$viewValue||O(h,f.$viewValue)||(h=qa(f.$viewValue),f.$render()),i=f.$viewValue}),f.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Xg,priority:1,link:{pre:a,post:b}}},Zg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(s(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],$g=p({restrict:"E",terminal:!1}),_g=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},ah=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){if(v(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw b("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",g,a,Y(c));f=a||void 0,e.$validate()}),e.$validators.pattern=function(a,b){return e.$isEmpty(b)||r(f)||f.test(b)}}}}},bh=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=l(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},ch=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=l(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void a.console:(ia(),ta(Ud),Ud.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function c(a,c){var d=c;void 0===d&&(d=Math.min(b(a),3));var e=Math.pow(10,d),f=(a*e|0)%e;return{v:d,f:f}}var d={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var e=0|a,f=c(a,b);return 1==e&&0==f.v?d.ONE:d.OTHER}})}]),void Ld(a.document).ready(function(){da(a.document,ea)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/"); +var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){ +switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n, +content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0), +null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this); +return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),function(a){"use strict";a.module("uuid4",[]).factory("uuid4",function(){var a=function(a){return Math.pow(2,a)},b=(a(4),a(6)),c=a(8),d=a(12),e=(a(14),a(16)),f=a(32),g=(a(40),a(48),function(a,b){return Math.floor(Math.random()*(b-a+1))+a}),h=function(){return g(0,b-1)},i=function(){return g(0,c-1)},j=function(){return g(0,d-1)},k=function(){return g(0,e-1)},l=function(){return g(0,f-1)},m=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},n=function(a,b,c){a=String(a),c=c?c:"0";for(var d=b-a.length;d>0;d>>>=1,c+=c)1&d&&(a=c+a);return a},o=function(a,b,c,d,e,f){var g=n(a.toString(16),8)+"-"+n(b.toString(16),4)+"-"+n(c.toString(16),4)+"-"+n(d.toString(16),2)+n(e.toString(16),2)+"-"+n(f.toString(16),12);return g};return{generate:function(){return o(l(),k(),16384|j(),128|h(),i(),m())},validate:function(a){var b=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return b.test(a)}}})}(angular),angular.module("angular.css.injector",[]).provider("cssInjector",["$interpolateProvider",function(a){function b(b,d,e){var f,g=angular.element(document.getElementsByTagName("head")[0]);d.$on("$locationChangeStart",function(){c===!0&&k()});var h=function(){void 0===f&&(f=e.scope())},i=function(c){if(h(),void 0===f.injectedStylesheets)f.injectedStylesheets=[],g.append(b("")(f));else for(var d in f.injectedStylesheets)if(f.injectedStylesheets[d].href==c)return;f.injectedStylesheets.push({href:c})},j=function(a){if(h(),f.injectedStylesheets)for(var b=0;b0}})}(),function(){angular.module("leodido.luhn",[]).service("luhn",function(){var a=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]];this.check=function(b){if(!b)return!1;for(var c=b.length,d=0,e=0;c--;)e+=a[d][parseInt(b.charAt(c),10)],d^=1;return 0===e%10&&e>0}})}(),function(a,b,c){"object"==typeof exports?module.exports=exports=b(require("./core"),require("./x64-core"),require("./lib-typedarrays"),require("./enc-utf16"),require("./enc-base64"),require("./md5"),require("./sha1"),require("./sha256"),require("./sha224"),require("./sha512"),require("./sha384"),require("./sha3"),require("./ripemd160"),require("./hmac"),require("./pbkdf2"),require("./evpkdf"),require("./cipher-core"),require("./mode-cfb"),require("./mode-ctr"),require("./mode-ctr-gladman"),require("./mode-ofb"),require("./mode-ecb"),require("./pad-ansix923"),require("./pad-iso10126"),require("./pad-iso97971"),require("./pad-zeropadding"),require("./pad-nopadding"),require("./format-hex"),require("./aes"),require("./tripledes"),require("./rc4"),require("./rabbit"),require("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],b):a.CryptoJS=b(a.CryptoJS)}(this,function(a){return a}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.ES6Promise=b()}(this,function(){"use strict";function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){U=a}function d(a){V=a}function e(){return function(){return process.nextTick(j)}}function f(){return function(){T(j)}}function g(){var a=0,b=new Y(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){return a.port2.postMessage(0)}}function i(){var a=setTimeout;return function(){return a(j,1)}}function j(){for(var a=0;S>a;a+=2){var b=_[a],c=_[a+1];b(c),_[a]=void 0,_[a+1]=void 0}S=0}function k(){try{var a=require,b=a("vertx");return T=b.runOnLoop||b.runOnContext,f()}catch(c){return i()}}function l(a,b){var c=arguments,d=this,e=new this.constructor(n);void 0===e[ba]&&G(e);var f=d._state;return f?!function(){var a=c[f-1];V(function(){return D(f,e,a,d._result)})}():z(d,e,a,b),e}function m(a){var b=this;if(a&&"object"==typeof a&&a.constructor===b)return a;var c=new b(n);return v(c,a),c}function n(){}function o(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function q(a){try{return a.then}catch(b){return fa.error=b,fa}}function r(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function s(a,b,c){V(function(a){var d=!1,e=r(c,b,function(c){d||(d=!0,b!==c?v(a,c):x(a,c))},function(b){d||(d=!0,y(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,y(a,e))},a)}function t(a,b){b._state===da?x(a,b._result):b._state===ea?y(a,b._result):z(b,void 0,function(b){return v(a,b)},function(b){return y(a,b)})}function u(a,c,d){c.constructor===a.constructor&&d===l&&c.constructor.resolve===m?t(a,c):d===fa?y(a,fa.error):void 0===d?x(a,c):b(d)?s(a,c,d):x(a,c)}function v(b,c){b===c?y(b,o()):a(c)?u(b,c,q(c)):x(b,c)}function w(a){a._onerror&&a._onerror(a._result),A(a)}function x(a,b){a._state===ca&&(a._result=b,a._state=da,0!==a._subscribers.length&&V(A,a))}function y(a,b){a._state===ca&&(a._state=ea,a._result=b,V(w,a))}function z(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+da]=c,e[f+ea]=d,0===f&&a._state&&V(A,a)}function A(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;gf;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})}function L(a){var b=this,c=new b(n);return y(c,a),c}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function O(a){this[ba]=F(),this._result=this._state=void 0,this._subscribers=[],n!==a&&("function"!=typeof a&&M(),this instanceof O?E(this,a):N())}function P(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(b){throw new Error("polyfill failed because global object is unavailable in this environment")}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(b){}if("[object Promise]"===d&&!c.cast)return}a.Promise=O}var Q=void 0;Q=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var R=Q,S=0,T=void 0,U=void 0,V=function(a,b){_[S]=a,_[S+1]=b,S+=2,2===S&&(U?U(j):aa())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,_=new Array(1e3),aa=void 0;aa=Z?e():Y?g():$?h():void 0===W&&"function"==typeof require?k():i();var ba=Math.random().toString(36).substring(16),ca=void 0,da=1,ea=2,fa=new B,ga=new B,ha=0;return H.prototype._enumerate=function(){for(var a=this.length,b=this._input,c=0;this._state===ca&&a>c;c++)this._eachEntry(b[c],c)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor,d=c.resolve;if(d===m){var e=q(a);if(e===l&&a._state!==ca)this._settledAt(a._state,b,a._result);else if("function"!=typeof e)this._remaining--,this._result[b]=a;else if(c===O){var f=new c(n);u(f,a,e),this._willSettleAt(f,b)}else this._willSettleAt(new c(function(b){return b(a)}),b)}else this._willSettleAt(d(a),b)},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===ca&&(this._remaining--,a===ea?y(d,c):this._result[b]=c),0===this._remaining&&x(d,this._result)},H.prototype._willSettleAt=function(a,b){var c=this;z(a,void 0,function(a){return c._settledAt(da,b,a)},function(a){return c._settledAt(ea,b,a)})},O.all=J,O.race=K,O.resolve=m,O.reject=L,O._setScheduler=c,O._setAsap=d,O._asap=V,O.prototype={constructor:O,then:l,"catch":function(a){return this.then(null,a)}},P(),O.polyfill=P,O.Promise=O,O}),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b},setCountries:function(b){a=b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this),function(a,b){"object"==typeof exports?module.exports=exports=b():"function"==typeof define&&define.amd?define([],b):a.CryptoJS=b()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<>>6-i%4*2,l=j|k;g[h>>>2]|=l<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){ +var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.lengthq;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.lengthk;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<o?m^=1<a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<>>32-z,p=y<>>32-z;else var o=y<>>64-z,p=x<>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.pad.NoPadding={pad:function(){},unpad:function(){}},function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b); +},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a}),function(){function a(a,b){var c=a.split("."),d=ta;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){function c(){}c.prototype=b.prototype,a.ha=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.ma=function(a,c,d){for(var e=Array(arguments.length-2),f=2;fb?1:b>a?-1:0}function g(a){var b,c=[],d=0;for(b in a)c[d++]=a[b];return c}function h(a,b){this.b=a,this.a={};for(var c=0;c=0?(a=a.substring(b),a=a.replace(Sa,""),b=a.search(Ra),b>=0&&(a=a.substring(0,b))):a="",a}function D(a){return 2>a.length?!1:ea(Va,a)}function E(a){return ea(Ta,a)?G(a,La):G(a,Ja)}function F(a){var b=E(a.toString());d(a),a.a(b)}function G(a,b){for(var d,e=new c,f=a.length,g=0;f>g;++g)d=a.charAt(g),d=b[d.toUpperCase()],null!=d&&e.a(d);return e.toString()}function H(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ia}function I(a,b,c){if(0==o(b,2)&&m(b,5)){var d=p(b,5);if(0e;++e){c=a[e];var f=q(c,3);if((0==f||0==b.search(o(c,3,f-1)))&&(f=new RegExp(o(c,1)),ea(f,b)))return c}return null}function P(a,b,c,d){var e=p(b,2),f=new RegExp(o(b,1)),g=p(b,5),h="";return 2==c&&null!=d&&0g;g++){d=c[g];var h=S(a,d);if(m(h,23)){if(0==e.search(o(h,23))){c=d;break a}}else if(-1!=R(e,h)){c=d;break a}}c=null}return c}function X(a){return a=Ha[a],null==a?"ZZ":a[0]}function Y(a,b){var c=S(a,b);if(null==c)throw"Invalid region code: "+b;return p(c,10)}function Z(a,b){return ea(a,b)?0:0==b.search(a)?3:2}function $(a){var b=eb,c=L(a);return a=p(a,1),a in Ha?(b=J(b,a,X(a)),b=o(b,1),b=p(b,3),Z(b,c)):1}function _(a,b){var c=a.toString();if(0==c.length||"0"==c.charAt(0))return 0;for(var d,e=c.length,f=1;3>=f&&e>=f;++f)if(d=parseInt(c.substring(0,f),10),d in Ha)return b.a(c.substring(f)),d;return 0}function aa(a,b,e,f,g){if(0==a.length)return 0;a=new c(a);var h;null!=b&&(h=o(b,11)),null==h&&(h="NonMatch");var i=a.toString();if(0==i.length)h=20;else if(Oa.test(i))i=i.replace(Oa,""),d(a),a.a(E(i)),h=1;else{if(i=new RegExp(h),F(a),h=a.toString(),0==h.search(i)){var i=h.match(i)[0].length,j=h.substring(i).match(Pa);j&&null!=j[1]&&0=a.b.length)throw"Phone number too short after IDD";if(e=_(a,e),0!=e)return r(g,1,e),e;throw"Invalid country calling code"}if(null!=b&&(h=p(b,10),i=""+h,j=a.toString(),0==j.lastIndexOf(i,0))){var k=new c(j.substring(i.length)),j=o(b,1),i=new RegExp(p(j,2));if(ba(k,b,null),b=k.toString(),j=p(j,3),!ea(i,a.toString())&&ea(i,b)||3==Z(j,a.toString()))return e.a(b),f&&r(g,6,10),r(g,1,h),h}return r(g,1,0),0}function ba(a,b,c){var d=a.toString(),e=d.length,f=o(b,15);if(0!=e&&null!=f&&0!=f.length&&(f=new RegExp("^(?:"+f+")"),e=f.exec(d))){var g,h=RegExp;g=o(b,1),g=p(g,2),h=new h(g),g=ea(h,d);var i=e.length-1;b=o(b,16),null==b||0==b.length||null==e[i]||0==e[i].length?(!g||ea(h,d.substring(e[0].length)))&&(null!=c&&i>0&&null!=e[i]&&c.a(e[1]),a.b=""+d.substring(e[0].length)):(d=d.replace(f,b),(!g||ea(h,d))&&(null!=c&&i>0&&c.a(e[1]),a.b=""+d))}}function ca(a,b){var c=eb;if(!H(b)&&00){var i=h+15;if("+"==b.charAt(i)){var j=b.indexOf(";",i);j>0?g.a(b.substring(i,j)):g.a(b.substring(i))}i=b.indexOf("tel:"),g.a(b.substring(i>=0?i+4:0,h))}else g.a(C(b));if(h=g.toString(),i=h.indexOf(";isub="),i>0&&(d(g),g.a(h.substring(0,i))),!D(g.toString()))throw"The string supplied did not seem to be a phone number";if(h=g.toString(),!(H(e)||null!=h&&0=0&&D(b.substring(0,i)))for(var j=b.match(Ua),k=j.length,l=1;k>l;++l)if(null!=j[l]&&0b.b.length)throw"The string supplied is too short to be a phone number";if(null!=i&&(a=new c,e=new c(b.toString()),ba(e,i,a),g=e.toString(),i=o(i,1),i=p(i,3),2!=Z(i,g)&&(b=e,f&&r(h,7,a.toString()))),f=b.toString(),a=f.length,2>a)throw"The string supplied is too short to be a phone number";if(a>17)throw"The string supplied is too long to be a phone number";if(1c;++c){var e=a.f[c],f=p(e,1);if(a.v==f)return!1;var g;g=a;var h=e,i=p(h,1);if(-1!=i.indexOf("|"))g=!1;else{i=i.replace(ab,"\\d"),i=i.replace(bb,"\\d"),d(g.m);var j;j=g;var h=p(h,2),k="999999999999999".match(i)[0];k.lengthf;++f){var g=a.f[f];0==q(g,3)?c.push(a.f[f]):(g=o(g,3,Math.min(d,q(g,3)-1)),0==b.search(g)&&c.push(a.f[f]))}a.f=c}function ja(a,b){a.i.a(b);var c=b;if(Pa.test(c)||1==a.i.b.length&&Na.test(c)){var e,c=b;"+"==c?(e=c,a.u.a(c)):(e=Ja[c],a.u.a(e),a.a.a(e)),b=e}else a.j=!1,a.ga=!0;if(!a.j){if(!a.ga)if(qa(a)){if(ra(a))return ka(a)}else if(0d;++d){var e=a.f[d],f=p(e,1);if(new RegExp("^(?:"+f+")$").test(b))return a.$=db.test(o(e,4)),b=b.replace(new RegExp(f,"g"),o(e,2)),ma(a,b)}return""}function ma(a,b){var c=a.b.b.length;return a.$&&c>0&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function na(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0e;++e){var f,g=c[e];(f=!m(a.g,12)||a.o||o(g,6))||(f=p(g,4),f=0==f.length||$a.test(f)),f&&(f=p(g,2),cb.test(f)&&a.f.push(g))}return ia(a,b),b=la(a),00){for(var d="",e=0;c>e;e++)d=sa(a,b.charAt(e));return a.j?ma(a,d):a.i.toString()}return a.b.toString()}function pa(a){var b,c=a.a.toString(),e=0;return 1!=o(a.g,10)?b=!1:(b=a.a.toString(),b="1"==b.charAt(0)&&"0"!=b.charAt(1)&&"1"!=b.charAt(1)),b?(e=1,a.b.a("1").a(" "),a.o=!0):m(a.g,15)&&(b=new RegExp("^(?:"+o(a.g,15)+")"),b=c.match(b),null!=b&&null!=b[0]&&0c?Math.max(0,a.length+c):c,"string"==typeof a)return"string"==typeof b&&1==b.length?a.indexOf(b,c):-1;for(;c=g?f=e:(d=d.substring(0,g),d=G(d,Ja),0==d.length?f=e:(i=i.clone(),s(i,4),d=[i],i=p(c,1),e=L(c),i in Ha?(f=J(f,i,X(i)),g="",g=O(d,e),null==g?g=e:(d=g.clone(),g=p(g,4),0f;++f)e=c,e.ea=ja(e,a.charAt(f)),e=e.ea;return e})}(),!function(a){a.module("cwill747.phonenumber",[]).directive("phoneNumber",["$log",function(a){function b(a){return a?a.replace(/([^0-9|+])/g,""):a}function c(b,c){var d=b;try{d=phoneUtils.formatAsTyped(b,c)}catch(e){a.debug(e)}return d}return{restrict:"A",require:"?ngModel",scope:{countryCode:"=",nonFormatted:"=?"},controllerAs:"",controller:function(){this.countryCode=this.countryCode||"us"},link:function(d,e,f,g){function h(a){return g.$isEmpty(a)?a:c(b(a),d.countryCode)}function i(a){if(g.$isEmpty(a))return d.nonFormatted="",a;var c=j(a);if(c===a)return a;var e=l.selectionStart,f=l.selectionEnd+c.length-a.length;return a.lengthc.length+1&&(e-=c.length-a.length),g.$setViewValue(c),g.$render(),l.setSelectionRange(e,f),b(c)}function j(a){var e=b(a);d.nonFormatted=e;var f="";return f=e&&e.length>1?c(e,d.countryCode):e,f.trim()}function k(b){var c=!1;try{c=phoneUtils.isValidNumberForRegion(b,d.countryCode)}catch(e){a.debug(e)}var f=g.$isEmpty(b)||c;return g.$setValidity("phoneNumber",f),b}var l=e[0];d.$watch("countryCode",function(){g.$modelValue=g.$viewValue+" "}),g.$formatters.push(h),g.$formatters.push(k),g.$parsers.push(i),g.$parsers.push(k)}}}])}(angular); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css new file mode 100644 index 0000000..61d7d29 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;cursor:pointer;text-decoration:none}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;background-color:#d6d6d6;padding:0}*,a :focus{outline:0}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{background-color:#FFF}.app-body{display:none}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.marginless-listgroup{margin-bottom:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px;box-sizing:content-box}.channel-list-container,.text-list-container{padding-left:5px;padding-right:5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.channel-list-container{height:40px;line-height:40px}.left-aligned-list-value-label{float:left;height:100%;text-align:left}.mp-version,.right-aligned-list-value-label{float:right}.mp-version,.poweredByMOLPay{height:20px}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.credit-disclaimer{padding:5px;font-weight:200;color:#595959;font-size:small}.close-button,.proceed-button{color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.proceed-button{background-color:#72529b;font-size:larger;border-radius:4px}button[disabled],html input[disabled]{opacity:.4;-moz-opacity:.4;background-color:gray}.close-button{background-color:#72529b;border-radius:4px}.molpay-disclaimer-container{padding:15px}.mp-version{color:#818285;font-size:8px;display:table;font-weight:700}.mp-version span{display:table-cell;vertical-align:bottom}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.new-credit-card-switch,.new-credit-card-switch .knob,.new-credit-card-switch span{height:28px;min-height:28px}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);min-height:480px;min-height:80vw;overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);min-height:480px;min-height:80vw;overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px;min-height:44px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b;min-height:28px;height:28px}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0;min-height:28px;height:28px}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}}.list-group-item-sandboxed{background-color:#ddd;padding:5px}.list-group-item-sandboxed a,.list-group-item-sandboxed input,.list-group-item-sandboxed span{padding:5px;float:left;color:#000;font-size:14px}.list-group-item-sandboxed input{max-width:40%}.btn-group-sandboxed{float:right}.btn-group-sandboxed label{color:#595959;background-color:#fff;border-color:#ddd}.btn-group-sandboxed .btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#72529b;border-color:#72529b} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-android-permissions/www/permissions.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-android-permissions/www/permissions.js new file mode 100644 index 0000000..8789ddc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-android-permissions/www/permissions.js @@ -0,0 +1,190 @@ +cordova.define("cordova-plugin-android-permissions.Permissions", function(require, exports, module) { +var permissionsName = 'Permissions'; + +function Permissions() { + + this.ACCESS_CHECKIN_PROPERTIES = 'android.permission.ACCESS_CHECKIN_PROPERTIES'; + this.ACCESS_COARSE_LOCATION = 'android.permission.ACCESS_COARSE_LOCATION'; + this.ACCESS_FINE_LOCATION = 'android.permission.ACCESS_FINE_LOCATION'; + this.ACCESS_LOCATION_EXTRA_COMMANDS = 'android.permission.ACCESS_LOCATION_EXTRA_COMMANDS'; + this.ACCESS_MOCK_LOCATION = 'android.permission.ACCESS_MOCK_LOCATION'; + this.ACCESS_NETWORK_STATE = 'android.permission.ACCESS_NETWORK_STATE'; + this.ACCESS_SURFACE_FLINGER = 'android.permission.ACCESS_SURFACE_FLINGER'; + this.ACCESS_WIFI_STATE = 'android.permission.ACCESS_WIFI_STATE'; + this.ACCOUNT_MANAGER = 'android.permission.ACCOUNT_MANAGER'; + this.ADD_VOICEMAIL = 'com.android.voicemail.permission.ADD_VOICEMAIL'; + this.AUTHENTICATE_ACCOUNTS = 'android.permission.AUTHENTICATE_ACCOUNTS'; + this.BATTERY_STATS = 'android.permission.BATTERY_STATS'; + this.BIND_ACCESSIBILITY_SERVICE = 'android.permission.BIND_ACCESSIBILITY_SERVICE'; + this.BIND_APPWIDGET = 'android.permission.BIND_APPWIDGET'; + this.BIND_CARRIER_MESSAGING_SERVICE = 'android.permission.BIND_CARRIER_MESSAGING_SERVICE'; + this.BIND_DEVICE_ADMIN = 'android.permission.BIND_DEVICE_ADMIN'; + this.BIND_DREAM_SERVICE = 'android.permission.BIND_DREAM_SERVICE'; + this.BIND_INPUT_METHOD = 'android.permission.BIND_INPUT_METHOD'; + this.BIND_NFC_SERVICE = 'android.permission.BIND_NFC_SERVICE'; + this.BIND_NOTIFICATION_LISTENER_SERVICE = 'android.permission.BIND_NOTIFICATION_LISTENER_SERVICE'; + this.BIND_PRINT_SERVICE = 'android.permission.BIND_PRINT_SERVICE'; + this.BIND_REMOTEVIEWS = 'android.permission.BIND_REMOTEVIEWS'; + this.BIND_TEXT_SERVICE = 'android.permission.BIND_TEXT_SERVICE'; + this.BIND_TV_INPUT = 'android.permission.BIND_TV_INPUT'; + this.BIND_VOICE_INTERACTION = 'android.permission.BIND_VOICE_INTERACTION'; + this.BIND_VPN_SERVICE = 'android.permission.BIND_VPN_SERVICE'; + this.BIND_WALLPAPER = 'android.permission.BIND_WALLPAPER'; + this.BLUETOOTH = 'android.permission.BLUETOOTH'; + this.BLUETOOTH_ADMIN = 'android.permission.BLUETOOTH_ADMIN'; + this.BLUETOOTH_PRIVILEGED = 'android.permission.BLUETOOTH_PRIVILEGED'; + this.BODY_SENSORS = 'android.permission.BODY_SENSORS'; + this.BRICK = 'android.permission.BRICK'; + this.BROADCAST_PACKAGE_REMOVED = 'android.permission.BROADCAST_PACKAGE_REMOVED'; + this.BROADCAST_SMS = 'android.permission.BROADCAST_SMS'; + this.BROADCAST_STICKY = 'android.permission.BROADCAST_STICKY'; + this.BROADCAST_WAP_PUSH = 'android.permission.BROADCAST_WAP_PUSH'; + this.CALL_PHONE = 'android.permission.CALL_PHONE'; + this.CALL_PRIVILEGED = 'android.permission.CALL_PRIVILEGED'; + this.CAMERA = 'android.permission.CAMERA'; + this.CAPTURE_AUDIO_OUTPUT = 'android.permission.CAPTURE_AUDIO_OUTPUT'; + this.CAPTURE_SECURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_SECURE_VIDEO_OUTPUT'; + this.CAPTURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_VIDEO_OUTPUT'; + this.CHANGE_COMPONENT_ENABLED_STATE = 'android.permission.CHANGE_COMPONENT_ENABLED_STATE'; + this.CHANGE_CONFIGURATION = 'android.permission.CHANGE_CONFIGURATION'; + this.CHANGE_NETWORK_STATE = 'android.permission.CHANGE_NETWORK_STATE'; + this.CHANGE_WIFI_MULTICAST_STATE = 'android.permission.CHANGE_WIFI_MULTICAST_STATE'; + this.CHANGE_WIFI_STATE = 'android.permission.CHANGE_WIFI_STATE'; + this.CLEAR_APP_CACHE = 'android.permission.CLEAR_APP_CACHE'; + this.CLEAR_APP_USER_DATA = 'android.permission.CLEAR_APP_USER_DATA'; + this.CONTROL_LOCATION_UPDATES = 'android.permission.CONTROL_LOCATION_UPDATES'; + this.DELETE_CACHE_FILES = 'android.permission.DELETE_CACHE_FILES'; + this.DELETE_PACKAGES = 'android.permission.DELETE_PACKAGES'; + this.DEVICE_POWER = 'android.permission.DEVICE_POWER'; + this.DIAGNOSTIC = 'android.permission.DIAGNOSTIC'; + this.DISABLE_KEYGUARD = 'android.permission.DISABLE_KEYGUARD'; + this.DUMP = 'android.permission.DUMP'; + this.EXPAND_STATUS_BAR = 'android.permission.EXPAND_STATUS_BAR'; + this.FACTORY_TEST = 'android.permission.FACTORY_TEST'; + this.FLASHLIGHT = 'android.permission.FLASHLIGHT'; + this.FORCE_BACK = 'android.permission.FORCE_BACK'; + this.GET_ACCOUNTS = 'android.permission.GET_ACCOUNTS'; + this.GET_PACKAGE_SIZE = 'android.permission.GET_PACKAGE_SIZE'; + this.GET_TASKS = 'android.permission.GET_TASKS'; + this.GET_TOP_ACTIVITY_INFO = 'android.permission.GET_TOP_ACTIVITY_INFO'; + this.GLOBAL_SEARCH = 'android.permission.GLOBAL_SEARCH'; + this.HARDWARE_TEST = 'android.permission.HARDWARE_TEST'; + this.INJECT_EVENTS = 'android.permission.INJECT_EVENTS'; + this.INSTALL_LOCATION_PROVIDER = 'android.permission.INSTALL_LOCATION_PROVIDER'; + this.INSTALL_PACKAGES = 'android.permission.INSTALL_PACKAGES'; + this.INSTALL_SHORTCUT = 'com.android.launcher.permission.INSTALL_SHORTCUT'; + this.INTERNAL_SYSTEM_WINDOW = 'android.permission.INTERNAL_SYSTEM_WINDOW'; + this.INTERNET = 'android.permission.INTERNET'; + this.KILL_BACKGROUND_PROCESSES = 'android.permission.KILL_BACKGROUND_PROCESSES'; + this.LOCATION_HARDWARE = 'android.permission.LOCATION_HARDWARE'; + this.MANAGE_ACCOUNTS = 'android.permission.MANAGE_ACCOUNTS'; + this.MANAGE_APP_TOKENS = 'android.permission.MANAGE_APP_TOKENS'; + this.MANAGE_DOCUMENTS = 'android.permission.MANAGE_DOCUMENTS'; + this.MASTER_CLEAR = 'android.permission.MASTER_CLEAR'; + this.MEDIA_CONTENT_CONTROL = 'android.permission.MEDIA_CONTENT_CONTROL'; + this.MODIFY_AUDIO_SETTINGS = 'android.permission.MODIFY_AUDIO_SETTINGS'; + this.MODIFY_PHONE_STATE = 'android.permission.MODIFY_PHONE_STATE'; + this.MOUNT_FORMAT_FILESYSTEMS = 'android.permission.MOUNT_FORMAT_FILESYSTEMS'; + this.MOUNT_UNMOUNT_FILESYSTEMS = 'android.permission.MOUNT_UNMOUNT_FILESYSTEMS'; + this.NFC = 'android.permission.NFC'; + this.PERSISTENT_ACTIVITY = 'android.permission.PERSISTENT_ACTIVITY'; + this.PROCESS_OUTGOING_CALLS = 'android.permission.PROCESS_OUTGOING_CALLS'; + this.READ_CALENDAR = 'android.permission.READ_CALENDAR'; + this.READ_CALL_LOG = 'android.permission.READ_CALL_LOG'; + this.READ_CONTACTS = 'android.permission.READ_CONTACTS'; + this.READ_EXTERNAL_STORAGE = 'android.permission.READ_EXTERNAL_STORAGE'; + this.READ_FRAME_BUFFER = 'android.permission.READ_FRAME_BUFFER'; + this.READ_HISTORY_BOOKMARKS = 'com.android.browser.permission.READ_HISTORY_BOOKMARKS'; + this.READ_INPUT_STATE = 'android.permission.READ_INPUT_STATE'; + this.READ_LOGS = 'android.permission.READ_LOGS'; + this.READ_PHONE_STATE = 'android.permission.READ_PHONE_STATE'; + this.READ_PROFILE = 'android.permission.READ_PROFILE'; + this.READ_SMS = 'android.permission.READ_SMS'; + this.READ_SOCIAL_STREAM = 'android.permission.READ_SOCIAL_STREAM'; + this.READ_SYNC_SETTINGS = 'android.permission.READ_SYNC_SETTINGS'; + this.READ_SYNC_STATS = 'android.permission.READ_SYNC_STATS'; + this.READ_USER_DICTIONARY = 'android.permission.READ_USER_DICTIONARY'; + this.READ_VOICEMAIL = 'com.android.voicemail.permission.READ_VOICEMAIL'; + this.REBOOT = 'android.permission.REBOOT'; + this.RECEIVE_BOOT_COMPLETED = 'android.permission.RECEIVE_BOOT_COMPLETED'; + this.RECEIVE_MMS = 'android.permission.RECEIVE_MMS'; + this.RECEIVE_SMS = 'android.permission.RECEIVE_SMS'; + this.RECEIVE_WAP_PUSH = 'android.permission.RECEIVE_WAP_PUSH'; + this.RECORD_AUDIO = 'android.permission.RECORD_AUDIO'; + this.REORDER_TASKS = 'android.permission.REORDER_TASKS'; + this.RESTART_PACKAGES = 'android.permission.RESTART_PACKAGES'; + this.SEND_RESPOND_VIA_MESSAGE = 'android.permission.SEND_RESPOND_VIA_MESSAGE'; + this.SEND_SMS = 'android.permission.SEND_SMS'; + this.SET_ACTIVITY_WATCHER = 'android.permission.SET_ACTIVITY_WATCHER'; + this.SET_ALARM = 'com.android.alarm.permission.SET_ALARM'; + this.SET_ALWAYS_FINISH = 'android.permission.SET_ALWAYS_FINISH'; + this.SET_ANIMATION_SCALE = 'android.permission.SET_ANIMATION_SCALE'; + this.SET_DEBUG_APP = 'android.permission.SET_DEBUG_APP'; + this.SET_ORIENTATION = 'android.permission.SET_ORIENTATION'; + this.SET_POINTER_SPEED = 'android.permission.SET_POINTER_SPEED'; + this.SET_PREFERRED_APPLICATIONS = 'android.permission.SET_PREFERRED_APPLICATIONS'; + this.SET_PROCESS_LIMIT = 'android.permission.SET_PROCESS_LIMIT'; + this.SET_TIME = 'android.permission.SET_TIME'; + this.SET_TIME_ZONE = 'android.permission.SET_TIME_ZONE'; + this.SET_WALLPAPER = 'android.permission.SET_WALLPAPER'; + this.SET_WALLPAPER_HINTS = 'android.permission.SET_WALLPAPER_HINTS'; + this.SIGNAL_PERSISTENT_PROCESSES = 'android.permission.SIGNAL_PERSISTENT_PROCESSES'; + this.STATUS_BAR = 'android.permission.STATUS_BAR'; + this.SUBSCRIBED_FEEDS_READ = 'android.permission.SUBSCRIBED_FEEDS_READ'; + this.SUBSCRIBED_FEEDS_WRITE = 'android.permission.SUBSCRIBED_FEEDS_WRITE'; + this.SYSTEM_ALERT_WINDOW = 'android.permission.SYSTEM_ALERT_WINDOW'; + this.TRANSMIT_IR = 'android.permission.TRANSMIT_IR'; + this.UNINSTALL_SHORTCUT = 'com.android.launcher.permission.UNINSTALL_SHORTCUT'; + this.UPDATE_DEVICE_STATS = 'android.permission.UPDATE_DEVICE_STATS'; + this.USE_CREDENTIALS = 'android.permission.USE_CREDENTIALS'; + this.USE_SIP = 'android.permission.USE_SIP'; + this.VIBRATE = 'android.permission.VIBRATE'; + this.WAKE_LOCK = 'android.permission.WAKE_LOCK'; + this.WRITE_APN_SETTINGS = 'android.permission.WRITE_APN_SETTINGS'; + this.WRITE_CALENDAR = 'android.permission.WRITE_CALENDAR'; + this.WRITE_CALL_LOG = 'android.permission.WRITE_CALL_LOG'; + this.WRITE_CONTACTS = 'android.permission.WRITE_CONTACTS'; + this.WRITE_EXTERNAL_STORAGE = 'android.permission.WRITE_EXTERNAL_STORAGE'; + this.WRITE_GSERVICES = 'android.permission.WRITE_GSERVICES'; + this.WRITE_HISTORY_BOOKMARKS = 'com.android.browser.permission.WRITE_HISTORY_BOOKMARKS'; + this.WRITE_PROFILE = 'android.permission.WRITE_PROFILE'; + this.WRITE_SECURE_SETTINGS = 'android.permission.WRITE_SECURE_SETTINGS'; + this.WRITE_SETTINGS = 'android.permission.WRITE_SETTINGS'; + this.WRITE_SMS = 'android.permission.WRITE_SMS'; + this.WRITE_SOCIAL_STREAM = 'android.permission.WRITE_SOCIAL_STREAM'; + this.WRITE_SYNC_SETTINGS = 'android.permission.WRITE_SYNC_SETTINGS'; + this.WRITE_USER_DICTIONARY = 'android.permission.WRITE_USER_DICTIONARY'; + this.WRITE_VOICEMAIL = 'com.android.voicemail.permission.WRITE_VOICEMAIL'; +} + +function deprecated(name) { + console.warn("Calling cordova.plugins.permissions." + name + " with the successCallback as first argument is deprecated"); + console.warn("The new signature is '" + name + "(permission, successCallback, errorCallback)'"); +} + +Permissions.prototype = { + hasPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("hasPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'hasPermission', [permission]); + }, + requestPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("requestPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermission', [permission]); + }, + requestPermissions: function(permissions, successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermissions', permissions); + } +}; +module.exports = new Permissions(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..d609f8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,117 @@ +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + hide: function (eventname) { + exec(null, null, "InAppBrowser", "hide", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/test/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/test/tests.js new file mode 100644 index 0000000..09a1793 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/test/tests.js @@ -0,0 +1,64 @@ +cordova.define("cordova-plugin-x-toast.tests", function(require, exports, module) { +exports.defineAutoTests = function() { + + var fail = function (done) { + expect(true).toBe(false); + done(); + }, + succeed = function (done) { + expect(true).toBe(true); + done(); + }; + + describe('Plugin availability', function () { + it("window.plugins.toast should exist", function() { + expect(window.plugins.toast).toBeDefined(); + }); + }); + + describe('API functions', function () { + it("should define show", function() { + expect(window.plugins.toast.show).toBeDefined(); + }); + + it("should define showWithOptions", function() { + expect(window.plugins.toast.showWithOptions).toBeDefined(); + }); + + it("should define optionsBuilder", function() { + expect(window.plugins.toast.optionsBuilder).toBeDefined(); + }); + + it("should define showShortTop", function() { + expect(window.plugins.toast.showShortTop).toBeDefined(); + }); + + it("should define showShortCenter", function() { + expect(window.plugins.toast.showShortCenter).toBeDefined(); + }); + + it("should define showShortBottom", function() { + expect(window.plugins.toast.showShortBottom).toBeDefined(); + }); + + it("should define showLongTop", function() { + expect(window.plugins.toast.showLongTop).toBeDefined(); + }); + + it("should define showLongCenter", function() { + expect(window.plugins.toast.showLongCenter).toBeDefined(); + }); + + it("should define showLongBottom", function() { + expect(window.plugins.toast.showLongBottom).toBeDefined(); + }); + }); + + describe('Invalid usage', function () { + it("should fail due to an invalid position", function(done) { + window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); + }); + }); +}; + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js new file mode 100644 index 0000000..685c677 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js @@ -0,0 +1,101 @@ +cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { +function Toast() { +} + +Toast.prototype.optionsBuilder = function () { + + // defaults + var message = null; + var duration = "short"; + var position = "center"; + var addPixelsY = 0; + + return { + withMessage: function(m) { + message = m.toString(); + return this; + }, + + withDuration: function(d) { + duration = d.toString(); + return this; + }, + + withPosition: function(p) { + position = p; + return this; + }, + + withAddPixelsY: function(y) { + addPixelsY = y; + return this; + }, + + build: function() { + return { + message: message, + duration: duration, + position: position, + addPixelsY: addPixelsY + }; + } + }; +}; + + +Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { + options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); + options.message = options.message.toString(); + cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); +}; + +Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { + this.showWithOptions( + this.optionsBuilder() + .withMessage(message) + .withDuration(duration) + .withPosition(position) + .build(), + successCallback, + errorCallback); +}; + +Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { + this.show(message, "short", "top", successCallback, errorCallback); +}; + +Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { + this.show(message, "short", "center", successCallback, errorCallback); +}; + +Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { + this.show(message, "short", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { + this.show(message, "long", "top", successCallback, errorCallback); +}; + +Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { + this.show(message, "long", "center", successCallback, errorCallback); +}; + +Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { + this.show(message, "long", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.hide = function (successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, "Toast", "hide", []); +}; + +Toast.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.toast = new Toast(); + return window.plugins.toast; +}; + +cordova.addConstructor(Toast.install); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js new file mode 100644 index 0000000..7596c6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js @@ -0,0 +1,183 @@ +cordova.define("cordova-save-image-gallery.saveImageGallery", function(require, exports, module) { +/** + * @file saveImageGallery PhoneGap/Cordova plugin + * @author Alejandro Gómez + * @author Tommy-Carlos Williams + * @author Simba Zhang + * @author StefanoMagrassi + * @copyright Alejandro Gómez - 2016. All rights reserved. + * @license MIT + */ + +var exec = require('cordova/exec'); + +// Consts +var SERVICE = 'SaveImageGallery'; +var SAVE_BASE64_IMAGE_ACTION = 'saveImageDataToLibrary'; +var REMOVE_IMAGE_ACTION = 'removeImageFromLibrary'; +var DEFAULTS = {prefix: 'img_', mediaScanner: true, format: 'JPG', quality: 100}; + + +var ImageSaver = function () { + +}; + + +/** + * Constants. + */ +ImageSaver.FORMAT_JPG = 'jpg'; +ImageSaver.FORMAT_PNG = 'png'; + +/** + * Saves base64 data as image. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Base64 img. + * prefix: String + * format: 'JPG' or 'PNG' - defaults to 'JPG' + * mediaScanner: BOOLEAN. If true, the image will be created in the temporal directory. Otherwise the image will + * be created in the photo album. - defaults to true + * quality: FLOAT (from 0 to 100). - defaults to 100 + * @param {function} [success] + * @param {function} [fail] + * @return The path of the file. + */ + +ImageSaver.prototype.saveBase64Image = function (options, success, fail) { + var actionArgs = prepareSaveBase64Args(options); + + return exec(ok(success), error(fail), SERVICE, SAVE_BASE64_IMAGE_ACTION, actionArgs); +}; + +/** + * Remove an image from a given path. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Image location. + * @param {function} [success] + * @param {function} [fail] + * @return + */ + +ImageSaver.prototype.removeImage = function (options, success, fail) { + var actionArgs = prepareRemoveImageArgs(options); + + return exec(ok(success), error(fail), SERVICE, REMOVE_IMAGE_ACTION, actionArgs); +}; + +/** + * Gets success callback if it is defined and not null. + * Otherwise returns a simple console.log. + * @private + * @param {[function|undefined|null]} success + * @return {function} + */ +function ok(success) { + if (typeof success !== 'function') { + return console.log; + } + + return success; +} + +/** + * Gets fail callback if it is defined and not null. + * Otherwise returns a simple console.error. + * @private + * @param {[function|undefined|null]} fail + * @return {function} + */ +function error(fail) { + if (typeof fail !== 'function') { + return console.error; + } + + return fail; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [filePath] + */ +function prepareRemoveImageArgs(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace('file://', '').replace('file:/', '/'); + args.push(options.data); + + return args; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [base64String, filePrefix, mediaScannerEnabled, format, quality] + */ +function prepareSaveBase64Args(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace(/data:image\/png;base64,/, '').replace(/data:image\/jpeg;base64,/, '').replace( + /data:image\/jpg;base64,/, ''); + args.push(options.data); + + // preparing prefix + if (!options.prefix) { + options.prefix = DEFAULTS.prefix; + } + args.push(options.prefix); + + // preparing mediaScanner + if (options.mediaScanner === undefined || options.mediaScanner === null) { + options.mediaScanner = DEFAULTS.mediaScanner; + } + args.push(options.mediaScanner); + + // preparing format + if (!options.format) { + options.format = DEFAULTS.format; + } + args.push(options.format); + + // preparing quality + if (!options.quality || (!isNaN(options.quality) && options.quality <= 0)) { + options.quality = DEFAULTS.quality; + } + args.push(options.quality); + + return args; +} + + +window.ImageSaver = ImageSaver; +window.imageSaver = new ImageSaver(); +module.exports = new ImageSaver(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..59d3f90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/assets/www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,3 @@ +cordova.define("molpay-mobile-xdk-cordova.MOLPay", function(require, exports, module) { +function MOLPay(){window.open=cordova.InAppBrowser.open}Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var a=this.length-1;a>=0;a--)this[a]&&this[a].parentElement&&this[a].parentElement.removeChild(this[a])};var isInternalDebugging=!1,moduleId="molpay-mobile-xdk-cordova",wrapperVersion="0",molpaySdkUrl="molpay-mobile-xdk-www/index.html",mpopenmolpaywindow="mpopenmolpaywindow://",mptransactionresults="mptransactionresults://",mprunscriptonpopup="mprunscriptonpopup://",mpcloseallwindows="mpcloseallwindows://",mppinstructioncapture="mppinstructioncapture://",molpayresulturl="MOLPay/result.php",molpaynbepayurl="MOLPay/nbepay.php",b4results='"msgType":"B4"',c6results='"msgType":"C6"',molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!1,hideFrame=function(a){a.style.visibility="hidden",a.style.position="absolute",a.style.width="0px",a.style.height="0px"},showFrame=function(a){a.style.visibility="visible",a.style.position="absolute",a.style.width="100%",a.style.height="100%"},postMolpayResultHandler=function(a){var b=a;if(b){var c=new RegExp(""),h=d.match(e);if(d&&h&&f.exec(d)&&g.exec(d))for(var i=h.length-1;i>=0;i--)b=f.exec(d).index,c=g.exec(d).index,d=d.substring(0,b)+""+d.substring(c+1);return d};b=e(b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(g=JSON.parse(b))){var h=g.tranID;h&&mainUiFrame.contentWindow.transactionRequestWithTransactionId(h)}}},createBankUiWindow=function(a){var b="data:text/html;base64,"+a;bankUiWindow=window.open(b,"_blank","location=no,hardwareback=no,disallowoverscroll=yes,toolbarposition=top,transitionstyle=crossdissolve");var c=function(a){mainUiFrame.contentWindow.transactionRequest(),bankUiWindow.removeEventListener("exit",c)};bankUiWindow.addEventListener("exit",c);var d=function(a){var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){var b;if(mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url}),b=new RegExp(molpaynbepayurl),a&&b.test(a.url))var c=10,d=0,f=setInterval(function(){g()},1e3),g=function(){d++,d>c?clearInterval(f):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0],c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){function b(){window.plugins.toast.showWithOptions({message:"Image saved success!",duration:1e3,position:"bottom"})}function c(){window.plugins.toast.showWithOptions({message:"Image saved fail!",duration:1e3,position:"bottom"})}function d(){var a=cordova.plugins.permissions;c();var b=function(){c()};a.requestPermission(a.WRITE_EXTERNAL_STORAGE,function(a){a.hasPermission?k():b()},b)}var e,f;if(a&&a.indexOf(mpopenmolpaywindow)>-1)f=new RegExp(mpopenmolpaywindow,"g"),e=a.replace(f,""),e&&e.length>0&&createBankUiWindow(e);else if(a&&a.indexOf(mpcloseallwindows)>-1)bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1){if(f=new RegExp(mptransactionresults,"g"),e=a.replace(f,""),e&&e.length>0){var g=window.atob(e),h=JSON.stringify(JSON.parse(g));transactionResultCallback(h),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}}else if(a&&a.indexOf(mppinstructioncapture)>-1){f=new RegExp(mppinstructioncapture,"g"),e=a.replace(f,"");var i=JSON.parse(atob(e)),j={data:i.base64ImageUrlData,prefix:i.filename,format:"PNG",quality:100,mediaScanner:!0};window.imageSaver.saveBase64Image(j,function(a){b()},d);var k=function(){window.imageSaver.saveBase64Image(j,function(a){b()},function(a){c()})}}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(f=new RegExp(mprunscriptonpopup,"g"),e=a.replace(f,""),e&&e.length>0)){var l=window.atob(e);bankUiWindow.executeScript({code:l},function(a){})}},testCredentialsCallback=function(a,b){testMerchantCredentialsCallback(a,b),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayChannelRequestFrame&&molpayChannelRequestFrame.remove()},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isClosingMolpay=!1;try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayDiv=document.getElementById("molpay"),molpayDiv.style.width="100%",molpayDiv.style.padding="0px",molpayDiv.style.border="0px",mainUiFrame=document.createElement("iframe");var d=function(a){mainUiFrame.contentWindow.updateSdkData(JSON.stringify(molpayPaymentDetails),inAppCallback),mainUiFrame.removeEventListener("load",d)};mainUiFrame.style.border="0px",mainUiFrame.style.padding="0px",mainUiFrame.style.width="100%",mainUiFrame.style.height="100%",mainUiFrame.id="mainUiFrame",mainUiFrame.allowScriptAccess="always",mainUiFrame.setAttribute("src",molpaySdkUrl),molpayDiv.appendChild(mainUiFrame),mainUiFrame.addEventListener("load",d)},MOLPay.prototype.transactionRequest=function(a,b){try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayTransactionRequestFrame=document.createElement("iframe");var d=function(a){molpayTransactionRequestFrame.contentWindow.updateSdkData(molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame.removeEventListener("load",d)};molpayTransactionRequestFrame.id="molpayTransactionRequestFrame",molpayTransactionRequestFrame.allowScriptAccess="always",molpayTransactionRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document.body.appendChild(molpayTransactionRequestFrame),molpayTransactionRequestFrame.addEventListener("load",d)},MOLPay.prototype.closeMolpay=function(){mainUiFrame.contentWindow.closemolpay()},MOLPay.prototype.testMerchantCredentials=function(a,b){b&&(testMerchantCredentialsCallback=b),molpayChannelRequestFrame=document.createElement("iframe");var c=function(b){molpayChannelRequestFrame.contentWindow.testMerchantCredentials(a,testCredentialsCallback),molpayChannelRequestFrame.removeEventListener("load",c)};molpayChannelRequestFrame.allowScriptAccess="always",molpayChannelRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayChannelRequestFrame),document.body.appendChild(molpayChannelRequestFrame),molpayChannelRequestFrame.addEventListener("load",c)};var molpay=new MOLPay;module.exports=molpay; +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/build.gradle b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/build.gradle new file mode 100644 index 0000000..f83b74c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/build.gradle @@ -0,0 +1,313 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +apply plugin: 'com.android.application' + +buildscript { + repositories { + mavenCentral() + jcenter() + } + + // Switch the Android Gradle plugin version requirement depending on the + // installed version of Gradle. This dependency is documented at + // http://tools.android.com/tech-docs/new-build-system/version-compatibility + // and https://issues.apache.org/jira/browse/CB-8143 + dependencies { + classpath 'com.android.tools.build:gradle:2.2.1' + } +} + +// Allow plugins to declare Maven dependencies via build-extras.gradle. +allprojects { + repositories { + mavenCentral(); + jcenter() + } +} + +task wrapper(type: Wrapper) { + gradleVersion = '2.14.1' +} + +// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties. +// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html +ext { + apply from: 'CordovaLib/cordova.gradle' + // The value for android.compileSdkVersion. + if (!project.hasProperty('cdvCompileSdkVersion')) { + cdvCompileSdkVersion = null; + } + // The value for android.buildToolsVersion. + if (!project.hasProperty('cdvBuildToolsVersion')) { + cdvBuildToolsVersion = null; + } + // Sets the versionCode to the given value. + if (!project.hasProperty('cdvVersionCode')) { + cdvVersionCode = null + } + // Sets the minSdkVersion to the given value. + if (!project.hasProperty('cdvMinSdkVersion')) { + cdvMinSdkVersion = null + } + // Whether to build architecture-specific APKs. + if (!project.hasProperty('cdvBuildMultipleApks')) { + cdvBuildMultipleApks = null + } + // .properties files to use for release signing. + if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) { + cdvReleaseSigningPropertiesFile = null + } + // .properties files to use for debug signing. + if (!project.hasProperty('cdvDebugSigningPropertiesFile')) { + cdvDebugSigningPropertiesFile = null + } + // Set by build.js script. + if (!project.hasProperty('cdvBuildArch')) { + cdvBuildArch = null + } + + // Plugin gradle extensions can append to this to have code run at the end. + cdvPluginPostBuildExtras = [] +} + +// PLUGIN GRADLE EXTENSIONS START +// PLUGIN GRADLE EXTENSIONS END + +def hasBuildExtras = file('build-extras.gradle').exists() +if (hasBuildExtras) { + apply from: 'build-extras.gradle' +} + +// Set property defaults after extension .gradle files. +if (ext.cdvCompileSdkVersion == null) { + ext.cdvCompileSdkVersion = privateHelpers.getProjectTarget() +} +if (ext.cdvBuildToolsVersion == null) { + ext.cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() +} +if (ext.cdvDebugSigningPropertiesFile == null && file('debug-signing.properties').exists()) { + ext.cdvDebugSigningPropertiesFile = 'debug-signing.properties' +} +if (ext.cdvReleaseSigningPropertiesFile == null && file('release-signing.properties').exists()) { + ext.cdvReleaseSigningPropertiesFile = 'release-signing.properties' +} + +// Cast to appropriate types. +ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean(); +ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : Integer.parseInt('' + cdvMinSdkVersion) +ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode) + +def computeBuildTargetName(debugBuild) { + def ret = 'assemble' + if (cdvBuildMultipleApks && cdvBuildArch) { + def arch = cdvBuildArch == 'arm' ? 'armv7' : cdvBuildArch + ret += '' + arch.toUpperCase().charAt(0) + arch.substring(1); + } + return ret + (debugBuild ? 'Debug' : 'Release') +} + +// Make cdvBuild a task that depends on the debug/arch-sepecific task. +task cdvBuildDebug +cdvBuildDebug.dependsOn { + return computeBuildTargetName(true) +} + +task cdvBuildRelease +cdvBuildRelease.dependsOn { + return computeBuildTargetName(false) +} + +task cdvPrintProps << { + println('cdvCompileSdkVersion=' + cdvCompileSdkVersion) + println('cdvBuildToolsVersion=' + cdvBuildToolsVersion) + println('cdvVersionCode=' + cdvVersionCode) + println('cdvMinSdkVersion=' + cdvMinSdkVersion) + println('cdvBuildMultipleApks=' + cdvBuildMultipleApks) + println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile) + println('cdvDebugSigningPropertiesFile=' + cdvDebugSigningPropertiesFile) + println('cdvBuildArch=' + cdvBuildArch) + println('computedVersionCode=' + android.defaultConfig.versionCode) + android.productFlavors.each { flavor -> + println('computed' + flavor.name.capitalize() + 'VersionCode=' + flavor.versionCode) + } +} + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + jniLibs.srcDirs = ['libs'] + } + } + + defaultConfig { + versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode")) + applicationId privateHelpers.extractStringFromManifest("package") + + if (cdvMinSdkVersion != null) { + minSdkVersion cdvMinSdkVersion + } + } + + lintOptions { + abortOnError false; + } + + compileSdkVersion cdvCompileSdkVersion + buildToolsVersion cdvBuildToolsVersion + + if (Boolean.valueOf(cdvBuildMultipleApks)) { + productFlavors { + armv7 { + versionCode defaultConfig.versionCode*10 + 2 + ndk { + abiFilters "armeabi-v7a", "" + } + } + x86 { + versionCode defaultConfig.versionCode*10 + 4 + ndk { + abiFilters "x86", "" + } + } + all { + ndk { + abiFilters "all", "" + } + } + } + } + /* + + ELSE NOTHING! DON'T MESS WITH THE VERSION CODE IF YOU DON'T HAVE TO! + + else if (!cdvVersionCode) { + def minSdkVersion = cdvMinSdkVersion ?: privateHelpers.extractIntFromManifest("minSdkVersion") + // Vary versionCode by the two most common API levels: + // 14 is ICS, which is the lowest API level for many apps. + // 20 is Lollipop, which is the lowest API level for the updatable system webview. + if (minSdkVersion >= 20) { + defaultConfig.versionCode += 9 + } else if (minSdkVersion >= 14) { + defaultConfig.versionCode += 8 + } + } + */ + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_6 + targetCompatibility JavaVersion.VERSION_1_6 + } + + if (cdvReleaseSigningPropertiesFile) { + signingConfigs { + release { + // These must be set or Gradle will complain (even if they are overridden). + keyAlias = "" + keyPassword = "__unset" // And these must be set to non-empty in order to have the signing step added to the task graph. + storeFile = null + storePassword = "__unset" + } + } + buildTypes { + release { + signingConfig signingConfigs.release + } + } + addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release) + } + if (cdvDebugSigningPropertiesFile) { + addSigningProps(cdvDebugSigningPropertiesFile, signingConfigs.debug) + } +} + +dependencies { + compile fileTree(dir: 'libs', include: '*.jar') + // SUB-PROJECT DEPENDENCIES START + debugCompile(project(path: "CordovaLib", configuration: "debug")) + releaseCompile(project(path: "CordovaLib", configuration: "release")) + // SUB-PROJECT DEPENDENCIES END +} + +def promptForReleaseKeyPassword() { + if (!cdvReleaseSigningPropertiesFile) { + return; + } + if ('__unset'.equals(android.signingConfigs.release.storePassword)) { + android.signingConfigs.release.storePassword = privateHelpers.promptForPassword('Enter key store password: ') + } + if ('__unset'.equals(android.signingConfigs.release.keyPassword)) { + android.signingConfigs.release.keyPassword = privateHelpers.promptForPassword('Enter key password: '); + } +} + +gradle.taskGraph.whenReady { taskGraph -> + taskGraph.getAllTasks().each() { task -> + if (task.name == 'validateReleaseSigning' || task.name == 'validateSigningRelease') { + promptForReleaseKeyPassword() + } + } +} + +def addSigningProps(propsFilePath, signingConfig) { + def propsFile = file(propsFilePath) + def props = new Properties() + propsFile.withReader { reader -> + props.load(reader) + } + + def storeFile = new File(props.get('key.store') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'storeFile')) + if (!storeFile.isAbsolute()) { + storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile()) + } + if (!storeFile.exists()) { + throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath()) + } + signingConfig.keyAlias = props.get('key.alias') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'keyAlias') + signingConfig.keyPassword = props.get('keyPassword', props.get('key.alias.password', signingConfig.keyPassword)) + signingConfig.storeFile = storeFile + signingConfig.storePassword = props.get('storePassword', props.get('key.store.password', signingConfig.storePassword)) + def storeType = props.get('storeType', props.get('key.store.type', '')) + if (!storeType) { + def filename = storeFile.getName().toLowerCase(); + if (filename.endsWith('.p12') || filename.endsWith('.pfx')) { + storeType = 'pkcs12' + } else { + storeType = signingConfig.storeType // "jks" + } + } + signingConfig.storeType = storeType +} + +for (def func : cdvPluginPostBuildExtras) { + func() +} + +// This can be defined within build-extras.gradle as: +// ext.postBuildExtras = { ... code here ... } +if (hasProperty('postBuildExtras')) { + postBuildExtras() +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/.jshintrc new file mode 100644 index 0000000..89a121c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/.jshintrc @@ -0,0 +1,10 @@ +{ + "node": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": true + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/Api.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/Api.js new file mode 100644 index 0000000..8e4711c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/Api.js @@ -0,0 +1,415 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var path = require('path'); +var Q = require('q'); + +var AndroidProject = require('./lib/AndroidProject'); +var AndroidStudio = require('./lib/AndroidStudio'); +var PluginManager = require('cordova-common').PluginManager; + +var CordovaLogger = require('cordova-common').CordovaLogger; +var selfEvents = require('cordova-common').events; + +var PLATFORM = 'android'; + + +function setupEvents(externalEventEmitter) { + if (externalEventEmitter) { + // This will make the platform internal events visible outside + selfEvents.forwardEventsTo(externalEventEmitter); + return externalEventEmitter; + } + + // There is no logger if external emitter is not present, + // so attach a console logger + CordovaLogger.get().subscribe(selfEvents); + return selfEvents; +} + + +/** + * Class, that acts as abstraction over particular platform. Encapsulates the + * platform's properties and methods. + * + * Platform that implements own PlatformApi instance _should implement all + * prototype methods_ of this class to be fully compatible with cordova-lib. + * + * The PlatformApi instance also should define the following field: + * + * * platform: String that defines a platform name. + */ +function Api(platform, platformRootDir, events) { + this.platform = PLATFORM; + this.root = path.resolve(__dirname, '..'); + + setupEvents(events); + + var self = this; + + this.locations = { + root: self.root, + www: path.join(self.root, 'assets/www'), + res: path.join(self.root, 'res'), + platformWww: path.join(self.root, 'platform_www'), + configXml: path.join(self.root, 'res/xml/config.xml'), + defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'), + strings: path.join(self.root, 'res/values/strings.xml'), + manifest: path.join(self.root, 'AndroidManifest.xml'), + build: path.join(self.root, 'build'), + // NOTE: Due to platformApi spec we need to return relative paths here + cordovaJs: 'bin/templates/project/assets/www/cordova.js', + cordovaJsSrc: 'cordova-js-src' + }; + + // XXX Override some locations for Android Studio projects + if(AndroidStudio.isAndroidStudioProject(self.root) === true) { + selfEvents.emit('log', 'Android Studio project detected'); + this.android_studio = true; + this.locations.configXml = path.join(self.root, 'app/src/main/res/xml/config.xml'); + this.locations.strings = path.join(self.root, 'app/src/main/res/xml/strings.xml'); + this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml'); + this.locations.www = path.join(self.root, 'app/src/main/assets/www'); + this.locations.res = path.join(self.root, 'app/src/main/res'); + } +} + +/** + * Installs platform to specified directory and creates a platform project. + * + * @param {String} destination Destination directory, where insatll platform to + * @param {ConfigParser} [config] ConfgiParser instance, used to retrieve + * project creation options, such as package id and project name. + * @param {Object} [options] An options object. The most common options are: + * @param {String} [options.customTemplate] A path to custom template, that + * should override the default one from platform. + * @param {Boolean} [options.link] Flag that indicates that platform's + * sources will be linked to installed platform instead of copying. + * @param {EventEmitter} [events] An EventEmitter instance that will be used for + * logging purposes. If no EventEmitter provided, all events will be logged to + * console + * + * @return {Promise} Promise either fulfilled with PlatformApi + * instance or rejected with CordovaError. + */ +Api.createPlatform = function (destination, config, options, events) { + events = setupEvents(events); + var result; + try { + result = require('../../lib/create') + .create(destination, config, options, events) + .then(function (destination) { + var PlatformApi = require(path.resolve(destination, 'cordova/Api')); + return new PlatformApi(PLATFORM, destination, events); + }); + } + catch (e) { + events.emit('error','createPlatform is not callable from the android project API.'); + throw(e); + } + return result; +}; + +/** + * Updates already installed platform. + * + * @param {String} destination Destination directory, where platform installed + * @param {Object} [options] An options object. The most common options are: + * @param {String} [options.customTemplate] A path to custom template, that + * should override the default one from platform. + * @param {Boolean} [options.link] Flag that indicates that platform's + * sources will be linked to installed platform instead of copying. + * @param {EventEmitter} [events] An EventEmitter instance that will be used for + * logging purposes. If no EventEmitter provided, all events will be logged to + * console + * + * @return {Promise} Promise either fulfilled with PlatformApi + * instance or rejected with CordovaError. + */ +Api.updatePlatform = function (destination, options, events) { + events = setupEvents(events); + var result; + try { + result = require('../../lib/create') + .update(destination, options, events) + .then(function (destination) { + var PlatformApi = require(path.resolve(destination, 'cordova/Api')); + return new PlatformApi('android', destination, events); + }); + } + catch (e) { + events.emit('error','updatePlatform is not callable from the android project API, you will need to do this manually.'); + throw(e); + } + return result; +}; + +/** + * Gets a CordovaPlatform object, that represents the platform structure. + * + * @return {CordovaPlatform} A structure that contains the description of + * platform's file structure and other properties of platform. + */ +Api.prototype.getPlatformInfo = function () { + var result = {}; + result.locations = this.locations; + result.root = this.root; + result.name = this.platform; + result.version = require('./version'); + result.projectConfig = this._config; + + return result; +}; + +/** + * Updates installed platform with provided www assets and new app + * configuration. This method is required for CLI workflow and will be called + * each time before build, so the changes, made to app configuration and www + * code, will be applied to platform. + * + * @param {CordovaProject} cordovaProject A CordovaProject instance, that defines a + * project structure and configuration, that should be applied to platform + * (contains project's www location and ConfigParser instance for project's + * config). + * + * @return {Promise} Return a promise either fulfilled, or rejected with + * CordovaError instance. + */ +Api.prototype.prepare = function (cordovaProject, prepareOptions) { + return require('./lib/prepare').prepare.call(this, cordovaProject, prepareOptions); +}; + +/** + * Installs a new plugin into platform. This method only copies non-www files + * (sources, libs, etc.) to platform. It also doesn't resolves the + * dependencies of plugin. Both of handling of www files, such as assets and + * js-files and resolving dependencies are the responsibility of caller. + * + * @param {PluginInfo} plugin A PluginInfo instance that represents plugin + * that will be installed. + * @param {Object} installOptions An options object. Possible options below: + * @param {Boolean} installOptions.link: Flag that specifies that plugin + * sources will be symlinked to app's directory instead of copying (if + * possible). + * @param {Object} installOptions.variables An object that represents + * variables that will be used to install plugin. See more details on plugin + * variables in documentation: + * https://cordova.apache.org/docs/en/4.0.0/plugin_ref_spec.md.html + * + * @return {Promise} Return a promise either fulfilled, or rejected with + * CordovaError instance. + */ +Api.prototype.addPlugin = function (plugin, installOptions) { + var project = AndroidProject.getProjectFile(this.root); + var self = this; + + installOptions = installOptions || {}; + installOptions.variables = installOptions.variables || {}; + // Add PACKAGE_NAME variable into vars + if (!installOptions.variables.PACKAGE_NAME) { + installOptions.variables.PACKAGE_NAME = project.getPackageName(); + } + + if(this.android_studio === true) { + installOptions.android_studio = true; + } + + return Q() + .then(function () { + //CB-11964: Do a clean when installing the plugin code to get around + //the Gradle bug introduced by the Android Gradle Plugin Version 2.2 + //TODO: Delete when the next version of Android Gradle plugin comes out + + // Since clean doesn't just clean the build, it also wipes out www, we need + // to pass additional options. + + // Do some basic argument parsing + var opts = {}; + + // Skip cleaning prepared files when not invoking via cordova CLI. + opts.noPrepare = true; + + if(!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) { + return self.clean(opts); + } + }) + .then(function () { + return PluginManager.get(self.platform, self.locations, project) + .addPlugin(plugin, installOptions); + }) + .then(function () { + if (plugin.getFrameworks(this.platform).length === 0) return; + + selfEvents.emit('verbose', 'Updating build files since android plugin contained '); + require('./lib/builders/builders').getBuilder('gradle').prepBuildFiles(); + }.bind(this)) + // CB-11022 Return truthy value to prevent running prepare after + .thenResolve(true); +}; + +/** + * Removes an installed plugin from platform. + * + * Since method accepts PluginInfo instance as input parameter instead of plugin + * id, caller shoud take care of managing/storing PluginInfo instances for + * future uninstalls. + * + * @param {PluginInfo} plugin A PluginInfo instance that represents plugin + * that will be installed. + * + * @return {Promise} Return a promise either fulfilled, or rejected with + * CordovaError instance. + */ +Api.prototype.removePlugin = function (plugin, uninstallOptions) { + var project = AndroidProject.getProjectFile(this.root); + + if(uninstallOptions && uninstallOptions.usePlatformWww === true && this.android_studio === true) { + uninstallOptions.usePlatformWww = false; + uninstallOptions.android_studio = true; + } + + return PluginManager.get(this.platform, this.locations, project) + .removePlugin(plugin, uninstallOptions) + .then(function () { + if (plugin.getFrameworks(this.platform).length === 0) return; + + selfEvents.emit('verbose', 'Updating build files since android plugin contained '); + require('./lib/builders/builders').getBuilder('gradle').prepBuildFiles(); + }.bind(this)) + // CB-11022 Return truthy value to prevent running prepare after + .thenResolve(true); +}; + +/** + * Builds an application package for current platform. + * + * @param {Object} buildOptions A build options. This object's structure is + * highly depends on platform's specific. The most common options are: + * @param {Boolean} buildOptions.debug Indicates that packages should be + * built with debug configuration. This is set to true by default unless the + * 'release' option is not specified. + * @param {Boolean} buildOptions.release Indicates that packages should be + * built with release configuration. If not set to true, debug configuration + * will be used. + * @param {Boolean} buildOptions.device Specifies that built app is intended + * to run on device + * @param {Boolean} buildOptions.emulator: Specifies that built app is + * intended to run on emulator + * @param {String} buildOptions.target Specifies the device id that will be + * used to run built application. + * @param {Boolean} buildOptions.nobuild Indicates that this should be a + * dry-run call, so no build artifacts will be produced. + * @param {String[]} buildOptions.archs Specifies chip architectures which + * app packages should be built for. List of valid architectures is depends on + * platform. + * @param {String} buildOptions.buildConfig The path to build configuration + * file. The format of this file is depends on platform. + * @param {String[]} buildOptions.argv Raw array of command-line arguments, + * passed to `build` command. The purpose of this property is to pass a + * platform-specific arguments, and eventually let platform define own + * arguments processing logic. + * + * @return {Promise} A promise either fulfilled with an array of build + * artifacts (application packages) if package was built successfully, + * or rejected with CordovaError. The resultant build artifact objects is not + * strictly typed and may conatin arbitrary set of fields as in sample below. + * + * { + * architecture: 'x86', + * buildType: 'debug', + * path: '/path/to/build', + * type: 'app' + * } + * + * The return value in most cases will contain only one item but in some cases + * there could be multiple items in output array, e.g. when multiple + * arhcitectures is specified. + */ +Api.prototype.build = function (buildOptions) { + var self = this; + return require('./lib/check_reqs').run() + .then(function () { + return require('./lib/build').run.call(self, buildOptions); + }) + .then(function (buildResults) { + // Cast build result to array of build artifacts + return buildResults.apkPaths.map(function (apkPath) { + return { + buildType: buildResults.buildType, + buildMethod: buildResults.buildMethod, + path: apkPath, + type: 'apk' + }; + }); + }); +}; + +/** + * Builds an application package for current platform and runs it on + * specified/default device. If no 'device'/'emulator'/'target' options are + * specified, then tries to run app on default device if connected, otherwise + * runs the app on emulator. + * + * @param {Object} runOptions An options object. The structure is the same + * as for build options. + * + * @return {Promise} A promise either fulfilled if package was built and ran + * successfully, or rejected with CordovaError. + */ +Api.prototype.run = function(runOptions) { + var self = this; + return require('./lib/check_reqs').run() + .then(function () { + return require('./lib/run').run.call(self, runOptions); + }); +}; + +/** + * Cleans out the build artifacts from platform's directory, and also + * cleans out the platform www directory if called without options specified. + * + * @return {Promise} Return a promise either fulfilled, or rejected with + * CordovaError. + */ +Api.prototype.clean = function(cleanOptions) { + var self = this; + return require('./lib/check_reqs').run() + .then(function () { + return require('./lib/build').runClean.call(self, cleanOptions); + }) + .then(function () { + return require('./lib/prepare').clean.call(self, cleanOptions); + }); +}; + + + +/** + * Performs a requirements check for current platform. Each platform defines its + * own set of requirements, which should be resolved before platform can be + * built successfully. + * + * @return {Promise} Promise, resolved with set of Requirement + * objects for current platform. + */ +Api.prototype.requirements = function() { + return require('./lib/check_reqs').check_all(); +}; + +module.exports = Api; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/android_sdk_version b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/android_sdk_version new file mode 100755 index 0000000..547f41b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/android_sdk_version @@ -0,0 +1,29 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var android_sdk_version = require('./lib/android_sdk_version'); + +android_sdk_version.run().done(null, function(err) { + console.log(err); + process.exit(2); +}); + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build new file mode 100755 index 0000000..222e84a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var args = process.argv; +var Api = require('./Api'); +var nopt = require('nopt'); +var path = require('path'); + +// Support basic help commands +if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) + require('./lib/build').help(); + +// Do some basic argument parsing +var buildOpts = nopt({ + 'verbose' : Boolean, + 'silent' : Boolean, + 'debug' : Boolean, + 'release' : Boolean, + 'nobuild': Boolean, + 'buildConfig' : path +}, { 'd' : '--verbose' }); + +// Make buildOptions compatible with PlatformApi build method spec +buildOpts.argv = buildOpts.argv.original; + +require('./loggingHelper').adjustLoggerLevel(buildOpts); + +new Api().build(buildOpts) +.catch(function(err) { + console.error(err.stack); + process.exit(2); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build.bat new file mode 100644 index 0000000..46e966a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/build.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0build" +IF EXIST %script_path% ( + node %script_path% %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs new file mode 100755 index 0000000..372a383 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs @@ -0,0 +1,31 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var check_reqs = require('./lib/check_reqs'); + +check_reqs.run().done( + function success() { + console.log('Looks like your environment fully supports cordova-android development!'); + }, function fail(err) { + console.log(err); + process.exit(2); + } +); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs.bat new file mode 100644 index 0000000..cb2c6f5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/check_reqs.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0check_reqs" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2 + EXIT /B 1 +) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean new file mode 100755 index 0000000..22065cc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean @@ -0,0 +1,51 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Api = require('./Api'); +var path = require('path'); +var nopt = require('nopt'); + +// Support basic help commands +if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { + console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); + console.log('Cleans the project directory.'); + process.exit(0); +} + +// Do some basic argument parsing +var opts = nopt({ + 'verbose' : Boolean, + 'silent' : Boolean +}, { 'd' : '--verbose' }); + +// Make buildOptions compatible with PlatformApi clean method spec +opts.argv = opts.argv.original; + +// Skip cleaning prepared files when not invoking via cordova CLI. +opts.noPrepare = true; + +require('./loggingHelper').adjustLoggerLevel(opts); + +new Api().clean(opts) +.catch(function(err) { + console.error(err.stack); + process.exit(2); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean.bat new file mode 100644 index 0000000..445ef6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/clean.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0clean" +IF EXIST %script_path% ( + node %script_path% %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/defaults.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/defaults.xml new file mode 100644 index 0000000..5286ab9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/defaults.xml @@ -0,0 +1,26 @@ + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/Adb.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/Adb.js new file mode 100644 index 0000000..84ae707 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/Adb.js @@ -0,0 +1,105 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var os = require('os'); +var events = require('cordova-common').events; +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; + +var Adb = {}; + +function isDevice(line) { + return line.match(/\w+\tdevice/) && !line.match(/emulator/); +} + +function isEmulator(line) { + return line.match(/device/) && line.match(/emulator/); +} + +/** + * Lists available/connected devices and emulators + * + * @param {Object} opts Various options + * @param {Boolean} opts.emulators Specifies whether this method returns + * emulators only + * + * @return {Promise} list of available/connected + * devices/emulators + */ +Adb.devices = function (opts) { + return spawn('adb', ['devices'], {cwd: os.tmpdir()}) + .then(function(output) { + return output.split('\n').filter(function (line) { + // Filter out either real devices or emulators, depending on options + return (line && opts && opts.emulators) ? isEmulator(line) : isDevice(line); + }).map(function (line) { + return line.replace(/\tdevice/, '').replace('\r', ''); + }); + }); +}; + +Adb.install = function (target, packagePath, opts) { + events.emit('verbose', 'Installing apk ' + packagePath + ' on target ' + target + '...'); + var args = ['-s', target, 'install']; + if (opts && opts.replace) args.push('-r'); + return spawn('adb', args.concat(packagePath), {cwd: os.tmpdir()}) + .then(function(output) { + // 'adb install' seems to always returns no error, even if installation fails + // so we catching output to detect installation failure + if (output.match(/Failure/)) { + if (output.match(/INSTALL_PARSE_FAILED_NO_CERTIFICATES/)) { + output += '\n\n' + 'Sign the build using \'-- --keystore\' or \'--buildConfig\'' + + ' or sign and deploy the unsigned apk manually using Android tools.'; + } else if (output.match(/INSTALL_FAILED_VERSION_DOWNGRADE/)) { + output += '\n\n' + 'You\'re trying to install apk with a lower versionCode that is already installed.' + + '\nEither uninstall an app or increment the versionCode.'; + } + + return Q.reject(new CordovaError('Failed to install apk to device: ' + output)); + } + }); +}; + +Adb.uninstall = function (target, packageId) { + events.emit('verbose', 'Uninstalling package ' + packageId + ' from target ' + target + '...'); + return spawn('adb', ['-s', target, 'uninstall', packageId], {cwd: os.tmpdir()}); +}; + +Adb.shell = function (target, shellCommand) { + events.emit('verbose', 'Running adb shell command "' + shellCommand + '" on target ' + target + '...'); + var args = ['-s', target, 'shell']; + shellCommand = shellCommand.split(/\s+/); + return spawn('adb', args.concat(shellCommand), {cwd: os.tmpdir()}) + .catch(function (output) { + return Q.reject(new CordovaError('Failed to execute shell command "' + + shellCommand + '"" on device: ' + output)); + }); +}; + +Adb.start = function (target, activityName) { + events.emit('verbose', 'Starting application "' + activityName + '" on target ' + target + '...'); + return Adb.shell(target, 'am start -W -a android.intent.action.MAIN -n' + activityName) + .catch(function (output) { + return Q.reject(new CordovaError('Failed to start application "' + + activityName + '"" on device: ' + output)); + }); +}; + +module.exports = Adb; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidManifest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidManifest.js new file mode 100644 index 0000000..8248f59 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidManifest.js @@ -0,0 +1,161 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var fs = require('fs'); +var et = require('elementtree'); +var xml= require('cordova-common').xmlHelpers; + +var DEFAULT_ORIENTATION = 'default'; + +/** Wraps an AndroidManifest file */ +function AndroidManifest(path) { + this.path = path; + this.doc = xml.parseElementtreeSync(path); + if (this.doc.getroot().tag !== 'manifest') { + throw new Error('AndroidManifest at ' + path + ' has incorrect root node name (expected "manifest")'); + } +} + +AndroidManifest.prototype.getVersionName = function() { + return this.doc.getroot().attrib['android:versionName']; +}; + +AndroidManifest.prototype.setVersionName = function(versionName) { + this.doc.getroot().attrib['android:versionName'] = versionName; + return this; +}; + +AndroidManifest.prototype.getVersionCode = function() { + return this.doc.getroot().attrib['android:versionCode']; +}; + +AndroidManifest.prototype.setVersionCode = function(versionCode) { + this.doc.getroot().attrib['android:versionCode'] = versionCode; + return this; +}; + +AndroidManifest.prototype.getPackageId = function() { + /*jshint -W069 */ + return this.doc.getroot().attrib['package']; + /*jshint +W069 */ +}; + +AndroidManifest.prototype.setPackageId = function(pkgId) { + /*jshint -W069 */ + this.doc.getroot().attrib['package'] = pkgId; + /*jshint +W069 */ + return this; +}; + +AndroidManifest.prototype.getActivity = function() { + var activity = this.doc.getroot().find('./application/activity'); + return { + getName: function () { + return activity.attrib['android:name']; + }, + setName: function (name) { + if (!name) { + delete activity.attrib['android:name']; + } else { + activity.attrib['android:name'] = name; + } + return this; + }, + getOrientation: function () { + return activity.attrib['android:screenOrientation']; + }, + setOrientation: function (orientation) { + if (!orientation || orientation.toLowerCase() === DEFAULT_ORIENTATION) { + delete activity.attrib['android:screenOrientation']; + } else { + activity.attrib['android:screenOrientation'] = orientation; + } + return this; + }, + getLaunchMode: function () { + return activity.attrib['android:launchMode']; + }, + setLaunchMode: function (launchMode) { + if (!launchMode) { + delete activity.attrib['android:launchMode']; + } else { + activity.attrib['android:launchMode'] = launchMode; + } + return this; + } + }; +}; + +['minSdkVersion', 'maxSdkVersion', 'targetSdkVersion'] +.forEach(function(sdkPrefName) { + // Copy variable reference to avoid closure issues + var prefName = sdkPrefName; + + AndroidManifest.prototype['get' + capitalize(prefName)] = function() { + var usesSdk = this.doc.getroot().find('./uses-sdk'); + return usesSdk && usesSdk.attrib['android:' + prefName]; + }; + + AndroidManifest.prototype['set' + capitalize(prefName)] = function(prefValue) { + var usesSdk = this.doc.getroot().find('./uses-sdk'); + + if (!usesSdk && prefValue) { // if there is no required uses-sdk element, we should create it first + usesSdk = new et.Element('uses-sdk'); + this.doc.getroot().append(usesSdk); + } + + if (prefValue) { + usesSdk.attrib['android:' + prefName] = prefValue; + } + + return this; + }; +}); + +AndroidManifest.prototype.getDebuggable = function() { + return this.doc.getroot().find('./application').attrib['android:debuggable'] === 'true'; +}; + +AndroidManifest.prototype.setDebuggable = function(value) { + var application = this.doc.getroot().find('./application'); + if (value) { + application.attrib['android:debuggable'] = 'true'; + } else { + // The default value is "false", so we can remove attribute at all. + delete application.attrib['android:debuggable']; + } + return this; +}; + +/** + * Writes manifest to disk syncronously. If filename is specified, then manifest + * will be written to that file + * + * @param {String} [destPath] File to write manifest to. If omitted, + * manifest will be written to file it has been read from. + */ +AndroidManifest.prototype.write = function(destPath) { + fs.writeFileSync(destPath || this.path, this.doc.write({indent: 4}), 'utf-8'); +}; + +module.exports = AndroidManifest; + +function capitalize (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidProject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidProject.js new file mode 100644 index 0000000..fa1c612 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidProject.js @@ -0,0 +1,210 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var fs = require('fs'); +var path = require('path'); +var properties_parser = require('properties-parser'); +var AndroidManifest = require('./AndroidManifest'); +var AndroidStudio = require('./AndroidStudio'); +var pluginHandlers = require('./pluginHandlers'); + +var projectFileCache = {}; + +function addToPropertyList(projectProperties, key, value) { + var i = 1; + while (projectProperties.get(key + '.' + i)) + i++; + + projectProperties.set(key + '.' + i, value); + projectProperties.dirty = true; +} + +function removeFromPropertyList(projectProperties, key, value) { + var i = 1; + var currentValue; + while ((currentValue = projectProperties.get(key + '.' + i))) { + if (currentValue === value) { + while ((currentValue = projectProperties.get(key + '.' + (i + 1)))) { + projectProperties.set(key + '.' + i, currentValue); + i++; + } + projectProperties.set(key + '.' + i); + break; + } + i++; + } + projectProperties.dirty = true; +} + +function getRelativeLibraryPath (parentDir, subDir) { + var libraryPath = path.relative(parentDir, subDir); + return (path.sep == '\\') ? libraryPath.replace(/\\/g, '/') : libraryPath; +} + +function AndroidProject(projectDir) { + this._propertiesEditors = {}; + this._subProjectDirs = {}; + this._dirty = false; + this.projectDir = projectDir; + this.platformWww = path.join(this.projectDir, 'platform_www'); + this.www = path.join(this.projectDir, 'assets/www'); + if(AndroidStudio.isAndroidStudioProject(projectDir) === true) { + this.www = path.join(this.projectDir, 'app/src/main/assets/www'); + } +} + +AndroidProject.getProjectFile = function (projectDir) { + if (!projectFileCache[projectDir]) { + projectFileCache[projectDir] = new AndroidProject(projectDir); + } + + return projectFileCache[projectDir]; +}; + +AndroidProject.purgeCache = function (projectDir) { + if (projectDir) { + delete projectFileCache[projectDir]; + } else { + projectFileCache = {}; + } +}; + +/** + * Reads the package name out of the Android Manifest file + * + * @param {String} projectDir The absolute path to the directory containing the project + * + * @return {String} The name of the package + */ +AndroidProject.prototype.getPackageName = function() { + var manifestPath = path.join(this.projectDir, 'AndroidManifest.xml'); + if(AndroidStudio.isAndroidStudioProject(this.projectDir) === true) { + manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml'); + } + return new AndroidManifest(manifestPath).getPackageId(); +}; + +AndroidProject.prototype.getCustomSubprojectRelativeDir = function(plugin_id, src) { + // All custom subprojects are prefixed with the last portion of the package id. + // This is to avoid collisions when opening multiple projects in Eclipse that have subprojects with the same name. + var packageName = this.getPackageName(); + var lastDotIndex = packageName.lastIndexOf('.'); + var prefix = packageName.substring(lastDotIndex + 1); + var subRelativeDir = path.join(plugin_id, prefix + '-' + path.basename(src)); + return subRelativeDir; +}; + +AndroidProject.prototype.addSubProject = function(parentDir, subDir) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var subProjectFile = path.resolve(subDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + // TODO: Setting the target needs to happen only for pre-3.7.0 projects + if (fs.existsSync(subProjectFile)) { + var subProperties = this._getPropertiesFile(subProjectFile); + subProperties.set('target', parentProperties.get('target')); + subProperties.dirty = true; + this._subProjectDirs[subDir] = true; + } + addToPropertyList(parentProperties, 'android.library.reference', getRelativeLibraryPath(parentDir, subDir)); + + this._dirty = true; +}; + +AndroidProject.prototype.removeSubProject = function(parentDir, subDir) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + removeFromPropertyList(parentProperties, 'android.library.reference', getRelativeLibraryPath(parentDir, subDir)); + delete this._subProjectDirs[subDir]; + this._dirty = true; +}; + +AndroidProject.prototype.addGradleReference = function(parentDir, subDir) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + addToPropertyList(parentProperties, 'cordova.gradle.include', getRelativeLibraryPath(parentDir, subDir)); + this._dirty = true; +}; + +AndroidProject.prototype.removeGradleReference = function(parentDir, subDir) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + removeFromPropertyList(parentProperties, 'cordova.gradle.include', getRelativeLibraryPath(parentDir, subDir)); + this._dirty = true; +}; + +AndroidProject.prototype.addSystemLibrary = function(parentDir, value) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + addToPropertyList(parentProperties, 'cordova.system.library', value); + this._dirty = true; +}; + +AndroidProject.prototype.removeSystemLibrary = function(parentDir, value) { + var parentProjectFile = path.resolve(parentDir, 'project.properties'); + var parentProperties = this._getPropertiesFile(parentProjectFile); + removeFromPropertyList(parentProperties, 'cordova.system.library', value); + this._dirty = true; +}; + +AndroidProject.prototype.write = function() { + if (!this._dirty) { + return; + } + this._dirty = false; + + for (var filename in this._propertiesEditors) { + var editor = this._propertiesEditors[filename]; + if (editor.dirty) { + fs.writeFileSync(filename, editor.toString()); + editor.dirty = false; + } + } +}; + +AndroidProject.prototype._getPropertiesFile = function (filename) { + if (!this._propertiesEditors[filename]) { + if (fs.existsSync(filename)) { + this._propertiesEditors[filename] = properties_parser.createEditor(filename); + } else { + this._propertiesEditors[filename] = properties_parser.createEditor(); + } + } + + return this._propertiesEditors[filename]; +}; + +AndroidProject.prototype.getInstaller = function (type) { + return pluginHandlers.getInstaller(type); +}; + +AndroidProject.prototype.getUninstaller = function (type) { + return pluginHandlers.getUninstaller(type); +}; + +/* + * This checks if an Android project is clean or has old build artifacts + */ + +AndroidProject.prototype.isClean = function() { + var build_path = path.join(this.projectDir, 'build'); + //If the build directory doesn't exist, it's clean + return !(fs.existsSync(build_path)); +}; + +module.exports = AndroidProject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidStudio.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidStudio.js new file mode 100644 index 0000000..335b334 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/AndroidStudio.js @@ -0,0 +1,42 @@ +/* + * This is a simple routine that checks if project is an Android Studio Project + * + * @param {String} root Root folder of the project + */ + +/*jshint esnext: false */ + +var path = require('path'); +var fs = require('fs'); +var CordovaError = require('cordova-common').CordovaError; + +module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) { + var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res', 'project.properties', 'platform_www']; + var androidStudioFiles = ['app', 'gradle', 'app/src/main/res']; + + // assume it is an AS project and not an Eclipse project + var isEclipse = false; + var isAS = true; + + if(!fs.existsSync(root)) { + throw new CordovaError('AndroidStudio.js:inAndroidStudioProject root does not exist: ' + root); + } + + // if any of the following exists, then we are not an ASProj + eclipseFiles.forEach(function(file) { + if(fs.existsSync(path.join(root, file))) { + isEclipse = true; + } + }); + + // if it is NOT an eclipse project, check that all required files exist + if(!isEclipse) { + androidStudioFiles.forEach(function(file){ + if(!fs.existsSync(path.join(root, file))) { + console.log('missing file :: ' + file); + isAS = false; + } + }); + } + return (!isEclipse && isAS); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/android_sdk_version.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/android_sdk_version.js new file mode 100755 index 0000000..79af272 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/android_sdk_version.js @@ -0,0 +1,64 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var child_process = require('child_process'), + Q = require('q'); + +var get_highest_sdk = function(results){ + var reg = /\d+/; + var apiLevels = []; + for(var i=0;i 0) { + events.emit('warn', '\'keystore\' and \'alias\' need to be specified to generate a signed archive.'); + } + } + + return ret; +} + +/* + * Builds the project with the specifed options + * Returns a promise. + */ +module.exports.runClean = function(options) { + var opts = parseOpts(options, null, this.root); + var builder = builders.getBuilder(opts.buildMethod); + return builder.prepEnv(opts) + .then(function() { + return builder.clean(opts); + }); +}; + +/** + * Builds the project with the specifed options. + * + * @param {BuildOptions} options A set of options. See PlatformApi.build + * method documentation for reference. + * @param {Object} optResolvedTarget A deployment target. Used to pass + * target architecture from upstream 'run' call. TODO: remove this option in + * favor of setting buildOptions.archs field. + * + * @return {Promise} Promise, resolved with built packages + * information. + */ +module.exports.run = function(options, optResolvedTarget) { + var opts = parseOpts(options, optResolvedTarget, this.root); + var builder = builders.getBuilder(opts.buildMethod); + return builder.prepEnv(opts) + .then(function() { + if (opts.prepEnv) { + events.emit('verbose', 'Build file successfully prepared.'); + return; + } + return builder.build(opts) + .then(function() { + var apkPaths = builder.findOutputApks(opts.buildType, opts.arch); + events.emit('log', 'Built the following apk(s): \n\t' + apkPaths.join('\n\t')); + return { + apkPaths: apkPaths, + buildType: opts.buildType, + buildMethod: opts.buildMethod + }; + }); + }); +}; + +/* + * Detects the architecture of a device/emulator + * Returns "arm" or "x86". + */ +module.exports.detectArchitecture = function(target) { + function helper() { + return Adb.shell(target, 'cat /proc/cpuinfo') + .then(function(output) { + return /intel/i.exec(output) ? 'x86' : 'arm'; + }); + } + // It sometimes happens (at least on OS X), that this command will hang forever. + // To fix it, either unplug & replug device, or restart adb server. + return helper() + .timeout(1000, new CordovaError('Device communication timed out. Try unplugging & replugging the device.')) + .then(null, function(err) { + if (/timed out/.exec('' + err)) { + // adb kill-server doesn't seem to do the trick. + // Could probably find a x-platform version of killall, but I'm not actually + // sure that this scenario even happens on non-OSX machines. + events.emit('verbose', 'adb timed out while detecting device/emulator architecture. Killing adb and trying again.'); + return spawn('killall', ['adb']) + .then(function() { + return helper() + .then(null, function() { + // The double kill is sadly often necessary, at least on mac. + events.emit('warn', 'adb timed out a second time while detecting device/emulator architecture. Killing adb and trying again.'); + return spawn('killall', ['adb']) + .then(function() { + return helper() + .then(null, function() { + return Q.reject(new CordovaError('adb timed out a third time while detecting device/emulator architecture. Try unplugging & replugging the device.')); + }); + }); + }); + }, function() { + // For non-killall OS's. + return Q.reject(err); + }); + } + throw err; + }); +}; + +module.exports.findBestApkForArchitecture = function(buildResults, arch) { + var paths = buildResults.apkPaths.filter(function(p) { + var apkName = path.basename(p); + if (buildResults.buildType == 'debug') { + return /-debug/.exec(apkName); + } + return !/-debug/.exec(apkName); + }); + var archPattern = new RegExp('-' + arch); + var hasArchPattern = /-x86|-arm/; + for (var i = 0; i < paths.length; ++i) { + var apkName = path.basename(paths[i]); + if (hasArchPattern.exec(apkName)) { + if (archPattern.exec(apkName)) { + return paths[i]; + } + } else { + return paths[i]; + } + } + throw new Error('Could not find apk architecture: ' + arch + ' build-type: ' + buildResults.buildType); +}; + +function PackageInfo(keystore, alias, storePassword, password, keystoreType) { + this.keystore = { + 'name': 'key.store', + 'value': keystore + }; + this.alias = { + 'name': 'key.alias', + 'value': alias + }; + if (storePassword) { + this.storePassword = { + 'name': 'key.store.password', + 'value': storePassword + }; + } + if (password) { + this.password = { + 'name': 'key.alias.password', + 'value': password + }; + } + if (keystoreType) { + this.keystoreType = { + 'name': 'key.store.type', + 'value': keystoreType + }; + } +} + +PackageInfo.prototype = { + toProperties: function() { + var self = this; + var result = ''; + Object.keys(self).forEach(function(key) { + result += self[key].name; + result += '='; + result += self[key].value.replace(/\\/g, '\\\\'); + result += '\n'; + }); + return result; + } +}; + +module.exports.help = function() { + console.log('Usage: ' + path.relative(process.cwd(), path.join('../build')) + ' [flags] [Signed APK flags]'); + console.log('Flags:'); + console.log(' \'--debug\': will build project in debug mode (default)'); + console.log(' \'--release\': will build project for release'); + console.log(' \'--ant\': will build project with ant'); + console.log(' \'--gradle\': will build project with gradle (default)'); + console.log(' \'--nobuild\': will skip build process (useful when using run command)'); + console.log(' \'--prepenv\': don\'t build, but copy in build scripts where necessary'); + console.log(' \'--versionCode=#\': Override versionCode for this build. Useful for uploading multiple APKs. Requires --gradle.'); + console.log(' \'--minSdkVersion=#\': Override minSdkVersion for this build. Useful for uploading multiple APKs. Requires --gradle.'); + console.log(' \'--gradleArg=\': Extra args to pass to the gradle command. Use one flag per arg. Ex. --gradleArg=-PcdvBuildMultipleApks=true'); + console.log(''); + console.log('Signed APK flags (overwrites debug/release-signing.proprties) :'); + console.log(' \'--keystore=\': Key store used to build a signed archive. (Required)'); + console.log(' \'--alias=\': Alias for the key store. (Required)'); + console.log(' \'--storePassword=\': Password for the key store. (Optional - prompted)'); + console.log(' \'--password=\': Password for the key. (Optional - prompted)'); + console.log(' \'--keystoreType\': Type of the keystore. (Optional)'); + process.exit(0); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/AntBuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/AntBuilder.js new file mode 100644 index 0000000..4e0f71a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/AntBuilder.js @@ -0,0 +1,156 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); +var util = require('util'); +var shell = require('shelljs'); +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; +var check_reqs = require('../check_reqs'); + +var SIGNING_PROPERTIES = '-signing.properties'; +var MARKER = 'YOUR CHANGES WILL BE ERASED!'; +var TEMPLATE = + '# This file is automatically generated.\n' + + '# Do not modify this file -- ' + MARKER + '\n'; + +var GenericBuilder = require('./GenericBuilder'); + +function AntBuilder (projectRoot) { + GenericBuilder.call(this, projectRoot); + + this.binDirs = {ant: this.binDirs.ant}; +} + +util.inherits(AntBuilder, GenericBuilder); + +AntBuilder.prototype.getArgs = function(cmd, opts) { + var args = [cmd, '-f', path.join(this.root, 'build.xml')]; + // custom_rules.xml is required for incremental builds. + if (hasCustomRules(this.root)) { + args.push('-Dout.dir=ant-build', '-Dgen.absolute.dir=ant-gen'); + } + if(opts.packageInfo) { + args.push('-propertyfile=' + path.join(this.root, opts.buildType + SIGNING_PROPERTIES)); + } + return args; +}; + +AntBuilder.prototype.prepEnv = function(opts) { + var self = this; + return check_reqs.check_ant() + .then(function() { + // Copy in build.xml on each build so that: + // A) we don't require the Android SDK at project creation time, and + // B) we always use the SDK's latest version of it. + /*jshint -W069 */ + var sdkDir = process.env['ANDROID_HOME']; + /*jshint +W069 */ + var buildTemplate = fs.readFileSync(path.join(sdkDir, 'tools', 'lib', 'build.template'), 'utf8'); + function writeBuildXml(projectPath) { + var newData = buildTemplate.replace('PROJECT_NAME', self.extractRealProjectNameFromManifest()); + fs.writeFileSync(path.join(projectPath, 'build.xml'), newData); + if (!fs.existsSync(path.join(projectPath, 'local.properties'))) { + fs.writeFileSync(path.join(projectPath, 'local.properties'), TEMPLATE); + } + } + writeBuildXml(self.root); + var propertiesObj = self.readProjectProperties(); + var subProjects = propertiesObj.libs; + for (var i = 0; i < subProjects.length; ++i) { + writeBuildXml(path.join(self.root, subProjects[i])); + } + if (propertiesObj.systemLibs.length > 0) { + throw new CordovaError('Project contains at least one plugin that requires a system library. This is not supported with ANT. Use gradle instead.'); + } + + var propertiesFile = opts.buildType + SIGNING_PROPERTIES; + var propertiesFilePath = path.join(self.root, propertiesFile); + if (opts.packageInfo) { + fs.writeFileSync(propertiesFilePath, TEMPLATE + opts.packageInfo.toProperties()); + } else if(isAutoGenerated(propertiesFilePath)) { + shell.rm('-f', propertiesFilePath); + } + }); +}; + +/* + * Builds the project with ant. + * Returns a promise. + */ +AntBuilder.prototype.build = function(opts) { + // Without our custom_rules.xml, we need to clean before building. + var ret = Q(); + if (!hasCustomRules(this.root)) { + // clean will call check_ant() for us. + ret = this.clean(opts); + } + + var args = this.getArgs(opts.buildType == 'debug' ? 'debug' : 'release', opts); + return check_reqs.check_ant() + .then(function() { + return spawn('ant', args, {stdio: 'pipe'}); + }).progress(function (stdio){ + if (stdio.stderr) { + process.stderr.write(stdio.stderr); + } else { + process.stdout.write(stdio.stdout); + } + }).catch(function (error) { + if (error.toString().indexOf('Unable to resolve project target') >= 0) { + return check_reqs.check_android_target(error).then(function() { + // If due to some odd reason - check_android_target succeeds + // we should still fail here. + return Q.reject(error); + }); + } + return Q.reject(error); + }); +}; + +AntBuilder.prototype.clean = function(opts) { + var args = this.getArgs('clean', opts); + var self = this; + return check_reqs.check_ant() + .then(function() { + return spawn('ant', args, {stdio: 'inherit'}); + }) + .then(function () { + shell.rm('-rf', path.join(self.root, 'out')); + + ['debug', 'release'].forEach(function(config) { + var propertiesFilePath = path.join(self.root, config + SIGNING_PROPERTIES); + if(isAutoGenerated(propertiesFilePath)){ + shell.rm('-f', propertiesFilePath); + } + }); + }); +}; + +module.exports = AntBuilder; + +function hasCustomRules(projectRoot) { + return fs.existsSync(path.join(projectRoot, 'custom_rules.xml')); +} + +function isAutoGenerated(file) { + return fs.existsSync(file) && fs.readFileSync(file, 'utf8').indexOf(MARKER) > 0; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GenericBuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GenericBuilder.js new file mode 100644 index 0000000..362da43 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GenericBuilder.js @@ -0,0 +1,147 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var CordovaError = require('cordova-common').CordovaError; + +function GenericBuilder (projectDir) { + this.root = projectDir || path.resolve(__dirname, '../../..'); + this.binDirs = { + ant: path.join(this.root, hasCustomRules(this.root) ? 'ant-build' : 'bin'), + gradle: path.join(this.root, 'build', 'outputs', 'apk') + }; +} + +function hasCustomRules(projectRoot) { + return fs.existsSync(path.join(projectRoot, 'custom_rules.xml')); +} + +GenericBuilder.prototype.prepEnv = function() { + return Q(); +}; + +GenericBuilder.prototype.build = function() { + events.emit('log', 'Skipping build...'); + return Q(null); +}; + +GenericBuilder.prototype.clean = function() { + return Q(); +}; + +GenericBuilder.prototype.findOutputApks = function(build_type, arch) { + var self = this; + return Object.keys(this.binDirs) + .reduce(function (result, builderName) { + var binDir = self.binDirs[builderName]; + return result.concat(findOutputApksHelper(binDir, build_type, builderName === 'ant' ? null : arch)); + }, []) + .sort(apkSorter); +}; + +GenericBuilder.prototype.readProjectProperties = function () { + function findAllUniq(data, r) { + var s = {}; + var m; + while ((m = r.exec(data))) { + s[m[1]] = 1; + } + return Object.keys(s); + } + + var data = fs.readFileSync(path.join(this.root, 'project.properties'), 'utf8'); + return { + libs: findAllUniq(data, /^\s*android\.library\.reference\.\d+=(.*)(?:\s|$)/mg), + gradleIncludes: findAllUniq(data, /^\s*cordova\.gradle\.include\.\d+=(.*)(?:\s|$)/mg), + systemLibs: findAllUniq(data, /^\s*cordova\.system\.library\.\d+=(.*)(?:\s|$)/mg) + }; +}; + +GenericBuilder.prototype.extractRealProjectNameFromManifest = function () { + var manifestPath = path.join(this.root, 'AndroidManifest.xml'); + var manifestData = fs.readFileSync(manifestPath, 'utf8'); + var m = / 1 && arch) { + ret = ret.filter(function(p) { + return path.basename(p).indexOf('-' + arch) != -1; + }); + } + + return ret; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GradleBuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GradleBuilder.js new file mode 100644 index 0000000..f415646 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/GradleBuilder.js @@ -0,0 +1,266 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var util = require('util'); +var path = require('path'); +var shell = require('shelljs'); +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; +var check_reqs = require('../check_reqs'); + +var GenericBuilder = require('./GenericBuilder'); + +var MARKER = 'YOUR CHANGES WILL BE ERASED!'; +var SIGNING_PROPERTIES = '-signing.properties'; +var TEMPLATE = + '# This file is automatically generated.\n' + + '# Do not modify this file -- ' + MARKER + '\n'; + +function GradleBuilder (projectRoot) { + GenericBuilder.call(this, projectRoot); + + this.binDirs = {gradle: this.binDirs.gradle}; +} + +util.inherits(GradleBuilder, GenericBuilder); + +GradleBuilder.prototype.getArgs = function(cmd, opts) { + if (cmd == 'release') { + cmd = 'cdvBuildRelease'; + } else if (cmd == 'debug') { + cmd = 'cdvBuildDebug'; + } + var args = [cmd, '-b', path.join(this.root, 'build.gradle')]; + if (opts.arch) { + args.push('-PcdvBuildArch=' + opts.arch); + } + + // 10 seconds -> 6 seconds + args.push('-Dorg.gradle.daemon=true'); + // to allow dex in process + args.push('-Dorg.gradle.jvmargs=-Xmx2048m'); + // allow NDK to be used - required by Gradle 1.5 plugin + args.push('-Pandroid.useDeprecatedNdk=true'); + args.push.apply(args, opts.extraArgs); + // Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet): + // args.push('-Dorg.gradle.parallel=true'); + return args; +}; + +// Makes the project buildable, minus the gradle wrapper. +GradleBuilder.prototype.prepBuildFiles = function() { + // Update the version of build.gradle in each dependent library. + var pluginBuildGradle = path.join(this.root, 'cordova', 'lib', 'plugin-build.gradle'); + var propertiesObj = this.readProjectProperties(); + var subProjects = propertiesObj.libs; + var checkAndCopy = function(subProject, root) { + var subProjectGradle = path.join(root, subProject, 'build.gradle'); + // This is the future-proof way of checking if a file exists + // This must be synchronous to satisfy a Travis test + try { + fs.accessSync(subProjectGradle, fs.F_OK); + } catch (e) { + shell.cp('-f', pluginBuildGradle, subProjectGradle); + } + }; + for (var i = 0; i < subProjects.length; ++i) { + if (subProjects[i] !== 'CordovaLib') { + checkAndCopy(subProjects[i], this.root); + } + } + var name = this.extractRealProjectNameFromManifest(); + //Remove the proj.id/name- prefix from projects: https://issues.apache.org/jira/browse/CB-9149 + var settingsGradlePaths = subProjects.map(function(p){ + var realDir=p.replace(/[/\\]/g, ':'); + var libName=realDir.replace(name+'-',''); + var str='include ":'+libName+'"\n'; + if(realDir.indexOf(name+'-')!==-1) + str+='project(":'+libName+'").projectDir = new File("'+p+'")\n'; + return str; + }); + + // Write the settings.gradle file. + fs.writeFileSync(path.join(this.root, 'settings.gradle'), + '// GENERATED FILE - DO NOT EDIT\n' + + 'include ":"\n' + settingsGradlePaths.join('')); + // Update dependencies within build.gradle. + var buildGradle = fs.readFileSync(path.join(this.root, 'build.gradle'), 'utf8'); + var depsList = ''; + var root = this.root; + var insertExclude = function(p) { + var gradlePath = path.join(root, p, 'build.gradle'); + var projectGradleFile = fs.readFileSync(gradlePath, 'utf-8'); + if(projectGradleFile.indexOf('CordovaLib') != -1) { + depsList += '{\n exclude module:("CordovaLib")\n }\n'; + } + else { + depsList +='\n'; + } + }; + subProjects.forEach(function(p) { + console.log('Subproject Path: ' + p); + var libName=p.replace(/[/\\]/g, ':').replace(name+'-',''); + depsList += ' debugCompile(project(path: "' + libName + '", configuration: "debug"))'; + insertExclude(p); + depsList += ' releaseCompile(project(path: "' + libName + '", configuration: "release"))'; + insertExclude(p); + }); + // For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390 + var SYSTEM_LIBRARY_MAPPINGS = [ + [/^\/?extras\/android\/support\/(.*)$/, 'com.android.support:support-$1:+'], + [/^\/?google\/google_play_services\/libproject\/google-play-services_lib\/?$/, 'com.google.android.gms:play-services:+'] + ]; + propertiesObj.systemLibs.forEach(function(p) { + var mavenRef; + // It's already in gradle form if it has two ':'s + if (/:.*:/.exec(p)) { + mavenRef = p; + } else { + for (var i = 0; i < SYSTEM_LIBRARY_MAPPINGS.length; ++i) { + var pair = SYSTEM_LIBRARY_MAPPINGS[i]; + if (pair[0].exec(p)) { + mavenRef = p.replace(pair[0], pair[1]); + break; + } + } + if (!mavenRef) { + throw new CordovaError('Unsupported system library (does not work with gradle): ' + p); + } + } + depsList += ' compile "' + mavenRef + '"\n'; + }); + buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + depsList + ' $2'); + var includeList = ''; + propertiesObj.gradleIncludes.forEach(function(includePath) { + includeList += 'apply from: "' + includePath + '"\n'; + }); + buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + includeList + '$2'); + fs.writeFileSync(path.join(this.root, 'build.gradle'), buildGradle); +}; + +GradleBuilder.prototype.prepEnv = function(opts) { + var self = this; + return check_reqs.check_gradle() + .then(function() { + return self.prepBuildFiles(); + }).then(function() { + // Copy the gradle wrapper on each build so that: + // A) we don't require the Android SDK at project creation time, and + // B) we always use the SDK's latest version of it. + // check_reqs ensures that this is set. + /*jshint -W069 */ + var sdkDir = process.env['ANDROID_HOME']; + /*jshint +W069 */ + var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper'); + if (process.platform == 'win32') { + shell.rm('-f', path.join(self.root, 'gradlew.bat')); + shell.cp(path.join(wrapperDir, 'gradlew.bat'), self.root); + } else { + shell.rm('-f', path.join(self.root, 'gradlew')); + shell.cp(path.join(wrapperDir, 'gradlew'), self.root); + } + shell.rm('-rf', path.join(self.root, 'gradle', 'wrapper')); + shell.mkdir('-p', path.join(self.root, 'gradle')); + shell.cp('-r', path.join(wrapperDir, 'gradle', 'wrapper'), path.join(self.root, 'gradle')); + + // If the gradle distribution URL is set, make sure it points to version we want. + // If it's not set, do nothing, assuming that we're using a future version of gradle that we don't want to mess with. + // For some reason, using ^ and $ don't work. This does the job, though. + var distributionUrlRegex = /distributionUrl.*zip/; + /*jshint -W069 */ + var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-2.14.1-all.zip'; + /*jshint +W069 */ + var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties'); + shell.chmod('u+w', gradleWrapperPropertiesPath); + shell.sed('-i', distributionUrlRegex, 'distributionUrl='+distributionUrl, gradleWrapperPropertiesPath); + + var propertiesFile = opts.buildType + SIGNING_PROPERTIES; + var propertiesFilePath = path.join(self.root, propertiesFile); + if (opts.packageInfo) { + fs.writeFileSync(propertiesFilePath, TEMPLATE + opts.packageInfo.toProperties()); + } else if (isAutoGenerated(propertiesFilePath)) { + shell.rm('-f', propertiesFilePath); + } + }); +}; + +/* + * Builds the project with gradle. + * Returns a promise. + */ +GradleBuilder.prototype.build = function(opts) { + var wrapper = path.join(this.root, 'gradlew'); + var args = this.getArgs(opts.buildType == 'debug' ? 'debug' : 'release', opts); + + return spawn(wrapper, args, {stdio: 'pipe'}) + .progress(function (stdio){ + if (stdio.stderr) { + /* + * Workaround for the issue with Java printing some unwanted information to + * stderr instead of stdout. + * This function suppresses 'Picked up _JAVA_OPTIONS' message from being + * printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for + * explanation. + */ + var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(stdio.stderr.toString()); + if (suppressThisLine) { + return; + } + process.stderr.write(stdio.stderr); + } else { + process.stdout.write(stdio.stdout); + } + }).catch(function (error) { + if (error.toString().indexOf('failed to find target with hash string') >= 0) { + return check_reqs.check_android_target(error).then(function() { + // If due to some odd reason - check_android_target succeeds + // we should still fail here. + return Q.reject(error); + }); + } + return Q.reject(error); + }); +}; + +GradleBuilder.prototype.clean = function(opts) { + var builder = this; + var wrapper = path.join(this.root, 'gradlew'); + var args = builder.getArgs('clean', opts); + return Q().then(function() { + return spawn(wrapper, args, {stdio: 'inherit'}); + }) + .then(function () { + shell.rm('-rf', path.join(builder.root, 'out')); + + ['debug', 'release'].forEach(function(config) { + var propertiesFilePath = path.join(builder.root, config + SIGNING_PROPERTIES); + if(isAutoGenerated(propertiesFilePath)){ + shell.rm('-f', propertiesFilePath); + } + }); + }); +}; + +module.exports = GradleBuilder; + +function isAutoGenerated(file) { + return fs.existsSync(file) && fs.readFileSync(file, 'utf8').indexOf(MARKER) > 0; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/builders.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/builders.js new file mode 100644 index 0000000..4921c49 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/builders/builders.js @@ -0,0 +1,47 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var CordovaError = require('cordova-common').CordovaError; + +var knownBuilders = { + ant: 'AntBuilder', + gradle: 'GradleBuilder', + none: 'GenericBuilder' +}; + +/** + * Helper method that instantiates and returns a builder for specified build + * type. + * + * @param {String} builderType Builder name to construct and return. Must + * be one of 'ant', 'gradle' or 'none' + * + * @return {Builder} A builder instance for specified build type. + */ +module.exports.getBuilder = function (builderType, projectRoot) { + if (!knownBuilders[builderType]) + throw new CordovaError('Builder ' + builderType + ' is not supported.'); + + try { + var Builder = require('./' + knownBuilders[builderType]); + return new Builder(projectRoot); + } catch (err) { + throw new CordovaError('Failed to instantiate ' + knownBuilders[builderType] + ' builder: ' + err); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/check_reqs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/check_reqs.js new file mode 100644 index 0000000..ac6fa4c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/check_reqs.js @@ -0,0 +1,344 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true */ + +var shelljs = require('shelljs'), + child_process = require('child_process'), + Q = require('q'), + path = require('path'), + fs = require('fs'), + ROOT = path.join(__dirname, '..', '..'); +var CordovaError = require('cordova-common').CordovaError; + +var isWindows = process.platform == 'win32'; + +function forgivingWhichSync(cmd) { + try { + return fs.realpathSync(shelljs.which(cmd)); + } catch (e) { + return ''; + } +} + +function tryCommand(cmd, errMsg, catchStderr) { + var d = Q.defer(); + child_process.exec(cmd, function(err, stdout, stderr) { + if (err) d.reject(new CordovaError(errMsg)); + // Sometimes it is necessary to return an stderr instead of stdout in case of success, since + // some commands prints theirs output to stderr instead of stdout. 'javac' is the example + else d.resolve((catchStderr ? stderr : stdout).trim()); + }); + return d.promise; +} + +// Get valid target from framework/project.properties +module.exports.get_target = function() { + function extractFromFile(filePath) { + var target = shelljs.grep(/\btarget=/, filePath); + if (!target) { + throw new Error('Could not find android target within: ' + filePath); + } + return target.split('=')[1].trim(); + } + if (fs.existsSync(path.join(ROOT, 'framework', 'project.properties'))) { + return extractFromFile(path.join(ROOT, 'framework', 'project.properties')); + } + if (fs.existsSync(path.join(ROOT, 'project.properties'))) { + // if no target found, we're probably in a project and project.properties is in ROOT. + return extractFromFile(path.join(ROOT, 'project.properties')); + } + throw new Error('Could not find android target. File missing: ' + path.join(ROOT, 'project.properties')); +}; + +// Returns a promise. Called only by build and clean commands. +module.exports.check_ant = function() { + return tryCommand('ant -version', 'Failed to run "ant -version", make sure you have ant installed and added to your PATH.') + .then(function (output) { + // Parse Ant version from command output + return /version ((?:\d+\.)+(?:\d+))/i.exec(output)[1]; + }); +}; + +// Returns a promise. Called only by build and clean commands. +module.exports.check_gradle = function() { + var sdkDir = process.env['ANDROID_HOME']; + if (!sdkDir) + return Q.reject(new CordovaError('Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.\n' + + 'Might need to install Android SDK or set up \'ANDROID_HOME\' env variable.')); + + var wrapperDir = path.join(sdkDir, 'tools', 'templates', 'gradle', 'wrapper'); + if (!fs.existsSync(wrapperDir)) { + return Q.reject(new CordovaError('Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.\n' + + 'Looked here: ' + wrapperDir)); + } + return Q.when(); +}; + +// Returns a promise. +module.exports.check_java = function() { + var javacPath = forgivingWhichSync('javac'); + var hasJavaHome = !!process.env['JAVA_HOME']; + return Q().then(function() { + if (hasJavaHome) { + // Windows java installer doesn't add javac to PATH, nor set JAVA_HOME (ugh). + if (!javacPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['JAVA_HOME'], 'bin'); + } + } else { + if (javacPath) { + var msg = 'Failed to find \'JAVA_HOME\' environment variable. Try setting setting it manually.'; + // OS X has a command for finding JAVA_HOME. + if (fs.existsSync('/usr/libexec/java_home')) { + return tryCommand('/usr/libexec/java_home', msg) + .then(function(stdout) { + process.env['JAVA_HOME'] = stdout.trim(); + }); + } else { + // See if we can derive it from javac's location. + // fs.realpathSync is require on Ubuntu, which symplinks from /usr/bin -> JDK + var maybeJavaHome = path.dirname(path.dirname(javacPath)); + if (fs.existsSync(path.join(maybeJavaHome, 'lib', 'tools.jar'))) { + process.env['JAVA_HOME'] = maybeJavaHome; + } else { + throw new CordovaError(msg); + } + } + } else if (isWindows) { + // Try to auto-detect java in the default install paths. + var oldSilent = shelljs.config.silent; + shelljs.config.silent = true; + var firstJdkDir = + shelljs.ls(process.env['ProgramFiles'] + '\\java\\jdk*')[0] || + shelljs.ls('C:\\Program Files\\java\\jdk*')[0] || + shelljs.ls('C:\\Program Files (x86)\\java\\jdk*')[0]; + shelljs.config.silent = oldSilent; + if (firstJdkDir) { + // shelljs always uses / in paths. + firstJdkDir = firstJdkDir.replace(/\//g, path.sep); + if (!javacPath) { + process.env['PATH'] += path.delimiter + path.join(firstJdkDir, 'bin'); + } + process.env['JAVA_HOME'] = firstJdkDir; + } + } + } + }).then(function() { + var msg = + 'Failed to run "javac -version", make sure that you have a JDK installed.\n' + + 'You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.\n'; + if (process.env['JAVA_HOME']) { + msg += 'Your JAVA_HOME is invalid: ' + process.env['JAVA_HOME'] + '\n'; + } + // We use tryCommand with catchStderr = true, because + // javac writes version info to stderr instead of stdout + return tryCommand('javac -version', msg, true) + .then(function (output) { + //Let's check for at least Java 8, and keep it future proof so we can support Java 10 + var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.)(?:\d+))/i.exec(output); + return match && match[1]; + }); + }); +}; + +// Returns a promise. +module.exports.check_android = function() { + return Q().then(function() { + var androidCmdPath = forgivingWhichSync('android'); + var adbInPath = !!forgivingWhichSync('adb'); + var hasAndroidHome = !!process.env['ANDROID_HOME'] && fs.existsSync(process.env['ANDROID_HOME']); + function maybeSetAndroidHome(value) { + if (!hasAndroidHome && fs.existsSync(value)) { + hasAndroidHome = true; + process.env['ANDROID_HOME'] = value; + } + } + if (!hasAndroidHome && !androidCmdPath) { + if (isWindows) { + // Android Studio 1.0 installer + maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'sdk')); + maybeSetAndroidHome(path.join(process.env['ProgramFiles'], 'Android', 'sdk')); + // Android Studio pre-1.0 installer + maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'android-studio', 'sdk')); + maybeSetAndroidHome(path.join(process.env['ProgramFiles'], 'Android', 'android-studio', 'sdk')); + // Stand-alone installer + maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'android-sdk')); + maybeSetAndroidHome(path.join(process.env['ProgramFiles'], 'Android', 'android-sdk')); + } else if (process.platform == 'darwin') { + // Android Studio 1.0 installer + maybeSetAndroidHome(path.join(process.env['HOME'], 'Library', 'Android', 'sdk')); + // Android Studio pre-1.0 installer + maybeSetAndroidHome('/Applications/Android Studio.app/sdk'); + // Stand-alone zip file that user might think to put under /Applications + maybeSetAndroidHome('/Applications/android-sdk-macosx'); + maybeSetAndroidHome('/Applications/android-sdk'); + } + if (process.env['HOME']) { + // Stand-alone zip file that user might think to put under their home directory + maybeSetAndroidHome(path.join(process.env['HOME'], 'android-sdk-macosx')); + maybeSetAndroidHome(path.join(process.env['HOME'], 'android-sdk')); + } + } + if (hasAndroidHome && !androidCmdPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'tools'); + } + if (androidCmdPath && !hasAndroidHome) { + var parentDir = path.dirname(androidCmdPath); + var grandParentDir = path.dirname(parentDir); + if (path.basename(parentDir) == 'tools') { + process.env['ANDROID_HOME'] = path.dirname(parentDir); + hasAndroidHome = true; + } else if (fs.existsSync(path.join(grandParentDir, 'tools', 'android'))) { + process.env['ANDROID_HOME'] = grandParentDir; + hasAndroidHome = true; + } else { + throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + + 'Detected \'android\' command at ' + parentDir + ' but no \'tools\' directory found near.\n' + + 'Try reinstall Android SDK or update your PATH to include path to valid SDK directory.'); + } + } + if (hasAndroidHome && !adbInPath) { + process.env['PATH'] += path.delimiter + path.join(process.env['ANDROID_HOME'], 'platform-tools'); + } + if (!process.env['ANDROID_HOME']) { + throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' + + 'Failed to find \'android\' command in your \'PATH\'. Try update your \'PATH\' to include path to valid SDK directory.'); + } + if (!fs.existsSync(process.env['ANDROID_HOME'])) { + throw new CordovaError('\'ANDROID_HOME\' environment variable is set to non-existent path: ' + process.env['ANDROID_HOME'] + + '\nTry update it manually to point to valid SDK directory.'); + } + return hasAndroidHome; + }); +}; + +module.exports.getAbsoluteAndroidCmd = function () { + var cmd = forgivingWhichSync('android'); + if (process.platform === 'win32') { + return '"' + cmd + '"'; + } + return cmd.replace(/(\s)/g, '\\$1'); +}; + +module.exports.check_android_target = function(originalError) { + // valid_target can look like: + // android-19 + // android-L + // Google Inc.:Google APIs:20 + // Google Inc.:Glass Development Kit Preview:20 + var valid_target = module.exports.get_target(); + var msg = 'Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.'; + return tryCommand('android list targets --compact', msg) + .then(function(output) { + var targets = output.split('\n'); + if (targets.indexOf(valid_target) >= 0) { + return targets; + } + + var androidCmd = module.exports.getAbsoluteAndroidCmd(); + var msg = 'Please install Android target: "' + valid_target + '".\n\n' + + 'Hint: Open the SDK manager by running: ' + androidCmd + '\n' + + 'You will require:\n' + + '1. "SDK Platform" for ' + valid_target + '\n' + + '2. "Android SDK Platform-tools (latest)\n' + + '3. "Android SDK Build-tools" (latest)'; + if (originalError) { + msg = originalError + '\n' + msg; + } + throw new CordovaError(msg); + }); +}; + +// Returns a promise. +module.exports.run = function() { + return Q.all([this.check_java(), this.check_android()]) + .then(function(values) { + console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']); + console.log('JAVA_HOME=' + process.env['JAVA_HOME']); + + if (!values[0]) { + throw new CordovaError('Requirements check failed for JDK 1.8 or greater'); + } + + + if (!values[1]) { + throw new CordovaError('Requirements check failed for Android SDK'); + } + }); +}; + + +/** + * Object thar represents one of requirements for current platform. + * @param {String} id The unique identifier for this requirements. + * @param {String} name The name of requirements. Human-readable field. + * @param {String} version The version of requirement installed. In some cases could be an array of strings + * (for example, check_android_target returns an array of android targets installed) + * @param {Boolean} installed Indicates whether the requirement is installed or not + */ +var Requirement = function (id, name, version, installed) { + this.id = id; + this.name = name; + this.installed = installed || false; + this.metadata = { + version: version, + }; +}; + +/** + * Methods that runs all checks one by one and returns a result of checks + * as an array of Requirement objects. This method intended to be used by cordova-lib check_reqs method + * + * @return Promise Array of requirements. Due to implementation, promise is always fulfilled. + */ +module.exports.check_all = function() { + + var requirements = [ + new Requirement('java', 'Java JDK'), + new Requirement('androidSdk', 'Android SDK'), + new Requirement('androidTarget', 'Android target'), + new Requirement('gradle', 'Gradle') + ]; + + var checkFns = [ + this.check_java, + this.check_android, + this.check_android_target, + this.check_gradle + ]; + + // Then execute requirement checks one-by-one + return checkFns.reduce(function (promise, checkFn, idx) { + // Update each requirement with results + var requirement = requirements[idx]; + return promise.then(checkFn) + .then(function (version) { + requirement.installed = true; + requirement.metadata.version = version; + }, function (err) { + requirement.metadata.reason = err instanceof Error ? err.message : err; + }); + }, Q()) + .then(function () { + // When chain is completed, return requirements array to upstream API + return requirements; + }); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/device.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/device.js new file mode 100644 index 0000000..4b171db --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/device.js @@ -0,0 +1,120 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), + build = require('./build'); +var path = require('path'); +var Adb = require('./Adb'); +var AndroidManifest = require('./AndroidManifest'); +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; +var events = require('cordova-common').events; + +/** + * Returns a promise for the list of the device ID's found + * @param lookHarder When true, try restarting adb if no devices are found. + */ +module.exports.list = function(lookHarder) { + return Adb.devices() + .then(function(list) { + if (list.length === 0 && lookHarder) { + // adb kill-server doesn't seem to do the trick. + // Could probably find a x-platform version of killall, but I'm not actually + // sure that this scenario even happens on non-OSX machines. + return spawn('killall', ['adb']) + .then(function() { + events.emit('verbose', 'Restarting adb to see if more devices are detected.'); + return Adb.devices(); + }, function() { + // For non-killall OS's. + return list; + }); + } + return list; + }); +}; + +module.exports.resolveTarget = function(target) { + return this.list(true) + .then(function(device_list) { + if (!device_list || !device_list.length) { + return Q.reject(new CordovaError('Failed to deploy to device, no devices found.')); + } + // default device + target = target || device_list[0]; + + if (device_list.indexOf(target) < 0) { + return Q.reject('ERROR: Unable to find target \'' + target + '\'.'); + } + + return build.detectArchitecture(target) + .then(function(arch) { + return { target: target, arch: arch, isEmulator: false }; + }); + }); +}; + +/* + * Installs a previously built application on the device + * and launches it. + * Returns a promise. + */ +module.exports.install = function(target, buildResults) { + return Q().then(function() { + if (target && typeof target == 'object') { + return target; + } + return module.exports.resolveTarget(target); + }).then(function(resolvedTarget) { + var apk_path = build.findBestApkForArchitecture(buildResults, resolvedTarget.arch); + var manifest = new AndroidManifest(path.join(__dirname, '../../AndroidManifest.xml')); + var pkgName = manifest.getPackageId(); + var launchName = pkgName + '/.' + manifest.getActivity().getName(); + events.emit('log', 'Using apk: ' + apk_path); + events.emit('log', 'Package name: ' + pkgName); + + return Adb.install(resolvedTarget.target, apk_path, {replace: true}) + .catch(function (error) { + // CB-9557 CB-10157 only uninstall and reinstall app if the one that + // is already installed on device was signed w/different certificate + if (!/INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES/.test(error.toString())) + throw error; + + events.emit('warn', 'Uninstalling app from device and reinstalling it again because the ' + + 'installed app already signed with different key'); + + // This promise is always resolved, even if 'adb uninstall' fails to uninstall app + // or the app doesn't installed at all, so no error catching needed. + return Adb.uninstall(resolvedTarget.target, pkgName) + .then(function() { + return Adb.install(resolvedTarget.target, apk_path, {replace: true}); + }); + }) + .then(function() { + //unlock screen + return Adb.shell(resolvedTarget.target, 'input keyevent 82'); + }).then(function() { + return Adb.start(resolvedTarget.target, launchName); + }).then(function() { + events.emit('log', 'LAUNCH SUCCESS'); + }); + }); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/emulator.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/emulator.js new file mode 100644 index 0000000..ff1e261 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/emulator.js @@ -0,0 +1,443 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true */ + +var retry = require('./retry'); +var build = require('./build'); +var path = require('path'); +var Adb = require('./Adb'); +var AndroidManifest = require('./AndroidManifest'); +var events = require('cordova-common').events; +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; + +var Q = require('q'); +var os = require('os'); +var child_process = require('child_process'); + +// constants +var ONE_SECOND = 1000; // in milliseconds +var ONE_MINUTE = 60 * ONE_SECOND; // in milliseconds +var INSTALL_COMMAND_TIMEOUT = 5 * ONE_MINUTE; // in milliseconds +var NUM_INSTALL_RETRIES = 3; +var CHECK_BOOTED_INTERVAL = 3 * ONE_SECOND; // in milliseconds +var EXEC_KILL_SIGNAL = 'SIGKILL'; + +/** + * Returns a Promise for a list of emulator images in the form of objects + * { + name : , + path : , + target : , + abi : , + skin : + } + */ +module.exports.list_images = function() { + return spawn('android', ['list', 'avds']) + .then(function(output) { + var response = output.split('\n'); + var emulator_list = []; + for (var i = 1; i < response.length; i++) { + // To return more detailed information use img_obj + var img_obj = {}; + if (response[i].match(/Name:\s/)) { + img_obj['name'] = response[i].split('Name: ')[1].replace('\r', ''); + if (response[i + 1].match(/Device:\s/)) { + i++; + img_obj['device'] = response[i].split('Device: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/Path:\s/)) { + i++; + img_obj['path'] = response[i].split('Path: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/\(API\slevel\s/) || (response[i + 2] && response[i + 2].match(/\(API\slevel\s/))) { + i++; + var secondLine = response[i + 1].match(/\(API\slevel\s/) ? response[i + 1] : ''; + img_obj['target'] = (response[i] + secondLine).split('Target: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/ABI:\s/)) { + i++; + img_obj['abi'] = response[i].split('ABI: ')[1].replace('\r', ''); + } + if (response[i + 1].match(/Skin:\s/)) { + i++; + img_obj['skin'] = response[i].split('Skin: ')[1].replace('\r', ''); + } + + emulator_list.push(img_obj); + } + /* To just return a list of names use this + if (response[i].match(/Name:\s/)) { + emulator_list.push(response[i].split('Name: ')[1].replace('\r', ''); + }*/ + + } + return emulator_list; + }); +}; + +/** + * Will return the closest avd to the projects target + * or undefined if no avds exist. + * Returns a promise. + */ +module.exports.best_image = function() { + return this.list_images() + .then(function(images) { + // Just return undefined if there is no images + if (images.length === 0) return; + + var closest = 9999; + var best = images[0]; + // Loading check_reqs at run-time to avoid test-time vs run-time directory structure difference issue + var project_target = require('./check_reqs').get_target().replace('android-', ''); + for (var i in images) { + var target = images[i].target; + if(target) { + var num = target.split('(API level ')[1].replace(')', ''); + if (num == project_target) { + return images[i]; + } else if (project_target - num < closest && project_target > num) { + closest = project_target - num; + best = images[i]; + } + } + } + return best; + }); +}; + +// Returns a promise. +module.exports.list_started = function() { + return Adb.devices({emulators: true}); +}; + +// Returns a promise. +module.exports.list_targets = function() { + return spawn('android', ['list', 'targets'], {cwd: os.tmpdir()}) + .then(function(output) { + var target_out = output.split('\n'); + var targets = []; + for (var i = target_out.length; i >= 0; i--) { + if(target_out[i].match(/id:/)) { + targets.push(targets[i].split(' ')[1]); + } + } + return targets; + }); +}; + +/* + * Gets unused port for android emulator, between 5554 and 5584 + * Returns a promise. + */ +module.exports.get_available_port = function () { + var self = this; + + return self.list_started() + .then(function (emulators) { + for (var p = 5584; p >= 5554; p-=2) { + if (emulators.indexOf('emulator-' + p) === -1) { + events.emit('verbose', 'Found available port: ' + p); + return p; + } + } + throw new CordovaError('Could not find an available avd port'); + }); +}; + +/* + * Starts an emulator with the given ID, + * and returns the started ID of that emulator. + * If no ID is given it will use the first image available, + * if no image is available it will error out (maybe create one?). + * If no boot timeout is given or the value is negative it will wait forever for + * the emulator to boot + * + * Returns a promise. + */ +module.exports.start = function(emulator_ID, boot_timeout) { + var self = this; + + return Q().then(function() { + if (emulator_ID) return Q(emulator_ID); + + return self.best_image() + .then(function(best) { + if (best && best.name) { + events.emit('warn', 'No emulator specified, defaulting to ' + best.name); + return best.name; + } + + // Loading check_reqs at run-time to avoid test-time vs run-time directory structure difference issue + var androidCmd = require('./check_reqs').getAbsoluteAndroidCmd(); + return Q.reject(new CordovaError('No emulator images (avds) found.\n' + + '1. Download desired System Image by running: ' + androidCmd + ' sdk\n' + + '2. Create an AVD by running: ' + androidCmd + ' avd\n' + + 'HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver\n')); + }); + }).then(function(emulatorId) { + return self.get_available_port() + .then(function (port) { + var args = ['-avd', emulatorId, '-port', port]; + // Don't wait for it to finish, since the emulator will probably keep running for a long time. + child_process + .spawn('emulator', args, { stdio: 'inherit', detached: true }) + .unref(); + + // wait for emulator to start + events.emit('log', 'Waiting for emulator to start...'); + return self.wait_for_emulator(port); + }); + }).then(function(emulatorId) { + if (!emulatorId) + return Q.reject(new CordovaError('Failed to start emulator')); + + //wait for emulator to boot up + process.stdout.write('Waiting for emulator to boot (this may take a while)...'); + return self.wait_for_boot(emulatorId, boot_timeout) + .then(function(success) { + if (success) { + events.emit('log','BOOT COMPLETE'); + //unlock screen + return Adb.shell(emulatorId, 'input keyevent 82') + .then(function() { + //return the new emulator id for the started emulators + return emulatorId; + }); + } else { + // We timed out waiting for the boot to happen + return null; + } + }); + }); +}; + +/* + * Waits for an emulator to boot on a given port. + * Returns this emulator's ID in a promise. + */ +module.exports.wait_for_emulator = function(port) { + var self = this; + return Q().then(function() { + var emulator_id = 'emulator-' + port; + return Adb.shell(emulator_id, 'getprop dev.bootcomplete') + .then(function (output) { + if (output.indexOf('1') >= 0) { + return emulator_id; + } + return self.wait_for_emulator(port); + }, function (error) { + if (error && error.message && + (error.message.indexOf('not found') > -1) || + error.message.indexOf('device offline') > -1) { + // emulator not yet started, continue waiting + return self.wait_for_emulator(port); + } else { + // something unexpected has happened + throw error; + } + }); + }); +}; + +/* + * Waits for the core android process of the emulator to start. Returns a + * promise that resolves to a boolean indicating success. Not specifying a + * time_remaining or passing a negative value will cause it to wait forever + */ +module.exports.wait_for_boot = function(emulator_id, time_remaining) { + var self = this; + return Adb.shell(emulator_id, 'ps') + .then(function(output) { + if (output.match(/android\.process\.acore/)) { + return true; + } else if (time_remaining === 0) { + return false; + } else { + process.stdout.write('.'); + + // Check at regular intervals + return Q.delay(time_remaining < CHECK_BOOTED_INTERVAL ? time_remaining : CHECK_BOOTED_INTERVAL).then(function() { + var updated_time = time_remaining >= 0 ? Math.max(time_remaining - CHECK_BOOTED_INTERVAL, 0) : time_remaining; + return self.wait_for_boot(emulator_id, updated_time); + }); + } + }); +}; + +/* + * Create avd + * TODO : Enter the stdin input required to complete the creation of an avd. + * Returns a promise. + */ +module.exports.create_image = function(name, target) { + console.log('Creating new avd named ' + name); + if (target) { + return spawn('android', ['create', 'avd', '--name', name, '--target', target]) + .then(null, function(error) { + console.error('ERROR : Failed to create emulator image : '); + console.error(' Do you have the latest android targets including ' + target + '?'); + console.error(error); + }); + } else { + console.log('WARNING : Project target not found, creating avd with a different target but the project may fail to install.'); + return spawn('android', ['create', 'avd', '--name', name, '--target', this.list_targets()[0]]) + .then(function() { + // TODO: This seems like another error case, even though it always happens. + console.error('ERROR : Unable to create an avd emulator, no targets found.'); + console.error('Ensure you have targets available by running the "android" command'); + return Q.reject(); + }, function(error) { + console.error('ERROR : Failed to create emulator image : '); + console.error(error); + }); + } +}; + +module.exports.resolveTarget = function(target) { + return this.list_started() + .then(function(emulator_list) { + if (emulator_list.length < 1) { + return Q.reject('No running Android emulators found, please start an emulator before deploying your project.'); + } + + // default emulator + target = target || emulator_list[0]; + if (emulator_list.indexOf(target) < 0) { + return Q.reject('Unable to find target \'' + target + '\'. Failed to deploy to emulator.'); + } + + return build.detectArchitecture(target) + .then(function(arch) { + return {target:target, arch:arch, isEmulator:true}; + }); + }); +}; + +/* + * Installs a previously built application on the emulator and launches it. + * If no target is specified, then it picks one. + * If no started emulators are found, error out. + * Returns a promise. + */ +module.exports.install = function(givenTarget, buildResults) { + + var target; + var manifest = new AndroidManifest(path.join(__dirname, '../../AndroidManifest.xml')); + var pkgName = manifest.getPackageId(); + + // resolve the target emulator + return Q().then(function () { + if (givenTarget && typeof givenTarget == 'object') { + return givenTarget; + } else { + return module.exports.resolveTarget(givenTarget); + } + + // set the resolved target + }).then(function (resolvedTarget) { + target = resolvedTarget; + + // install the app + }).then(function () { + // This promise is always resolved, even if 'adb uninstall' fails to uninstall app + // or the app doesn't installed at all, so no error catching needed. + return Q.when() + .then(function() { + + var apk_path = build.findBestApkForArchitecture(buildResults, target.arch); + var execOptions = { + cwd: os.tmpdir(), + timeout: INSTALL_COMMAND_TIMEOUT, // in milliseconds + killSignal: EXEC_KILL_SIGNAL + }; + + events.emit('log', 'Using apk: ' + apk_path); + events.emit('log', 'Package name: ' + pkgName); + events.emit('verbose', 'Installing app on emulator...'); + + // A special function to call adb install in specific environment w/ specific options. + // Introduced as a part of fix for http://issues.apache.org/jira/browse/CB-9119 + // to workaround sporadic emulator hangs + function adbInstallWithOptions(target, apk, opts) { + events.emit('verbose', 'Installing apk ' + apk + ' on ' + target + '...'); + + var command = 'adb -s ' + target + ' install -r "' + apk + '"'; + return Q.promise(function (resolve, reject) { + child_process.exec(command, opts, function(err, stdout, stderr) { + if (err) reject(new CordovaError('Error executing "' + command + '": ' + stderr)); + // adb does not return an error code even if installation fails. Instead it puts a specific + // message to stdout, so we have to use RegExp matching to detect installation failure. + else if (/Failure/.test(stdout)) { + if (stdout.match(/INSTALL_PARSE_FAILED_NO_CERTIFICATES/)) { + stdout += 'Sign the build using \'-- --keystore\' or \'--buildConfig\'' + + ' or sign and deploy the unsigned apk manually using Android tools.'; + } else if (stdout.match(/INSTALL_FAILED_VERSION_DOWNGRADE/)) { + stdout += 'You\'re trying to install apk with a lower versionCode that is already installed.' + + '\nEither uninstall an app or increment the versionCode.'; + } + + reject(new CordovaError('Failed to install apk to emulator: ' + stdout)); + } else resolve(stdout); + }); + }); + } + + function installPromise () { + return adbInstallWithOptions(target.target, apk_path, execOptions) + .catch(function (error) { + // CB-9557 CB-10157 only uninstall and reinstall app if the one that + // is already installed on device was signed w/different certificate + if (!/INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES/.test(error.toString())) + throw error; + + events.emit('warn', 'Uninstalling app from device and reinstalling it because the ' + + 'currently installed app was signed with different key'); + + // This promise is always resolved, even if 'adb uninstall' fails to uninstall app + // or the app doesn't installed at all, so no error catching needed. + return Adb.uninstall(target.target, pkgName) + .then(function() { + return adbInstallWithOptions(target.target, apk_path, execOptions); + }); + }); + } + + return retry.retryPromise(NUM_INSTALL_RETRIES, installPromise) + .then(function (output) { + events.emit('log', 'INSTALL SUCCESS'); + }); + }); + // unlock screen + }).then(function () { + + events.emit('verbose', 'Unlocking screen...'); + return Adb.shell(target.target, 'input keyevent 82'); + }).then(function () { + Adb.start(target.target, pkgName + '/.' + manifest.getActivity().getName()); + // report success or failure + }).then(function (output) { + events.emit('log', 'LAUNCH SUCCESS'); + }); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device new file mode 100755 index 0000000..fc4b784 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device @@ -0,0 +1,42 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var device = require('./device'), + args = process.argv; + +if(args.length > 2) { + var install_target; + if (args[2].substring(0, 9) == '--target=') { + install_target = args[2].substring(9, args[2].length); + device.install(install_target).done(null, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); + } else { + console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); + process.exit(2); + } +} else { + device.install().done(null, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device.bat new file mode 100644 index 0000000..ac7214a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-device.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0install-device" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator new file mode 100755 index 0000000..aa2a34f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator @@ -0,0 +1,38 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var emulator = require('./emulator'), + args = process.argv; + +var install_target; +if(args.length > 2) { + if (args[2].substring(0, 9) == '--target=') { + install_target = args[2].substring(9, args[2].length); + } else { + console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); + process.exit(2); + } +} + +emulator.install(install_target).done(null, function(err) { + console.error('ERROR: ' + err); + process.exit(2); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator.bat new file mode 100644 index 0000000..1ec6779 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/install-emulator.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0install-emulator" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices new file mode 100755 index 0000000..fa84d7f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices @@ -0,0 +1,34 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var devices = require('./device'); + +// Usage support for when args are given +require('../lib/check_reqs').check_android().then(function() { + devices.list().done(function(device_list) { + device_list && device_list.forEach(function(dev) { + console.log(dev); + }); + }, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices.bat new file mode 100644 index 0000000..c0bcdd9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-devices.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0list-devices" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images new file mode 100755 index 0000000..03c827f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images @@ -0,0 +1,34 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var emulators = require('./emulator'); + +// Usage support for when args are given +require('../lib/check_reqs').check_android().then(function() { + emulators.list_images().done(function(emulator_list) { + emulator_list && emulator_list.forEach(function(emu) { + console.log(emu.name); + }); + }, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images.bat new file mode 100644 index 0000000..661cbf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-emulator-images.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0list-emulator-images" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators new file mode 100755 index 0000000..a890dec --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators @@ -0,0 +1,34 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var emulators = require('./emulator'); + +// Usage support for when args are given +require('../lib/check_reqs').check_android().then(function() { + emulators.list_started().done(function(emulator_list) { + emulator_list && emulator_list.forEach(function(emu) { + console.log(emu); + }); + }, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators.bat new file mode 100644 index 0000000..a4e88f7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/list-started-emulators.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0list-started-emulators" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/log.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/log.js new file mode 100644 index 0000000..ebf836d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/log.js @@ -0,0 +1,56 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var path = require('path'), + os = require('os'), + Q = require('q'), + child_process = require('child_process'), + ROOT = path.join(__dirname, '..', '..'); + +/* + * Starts running logcat in the shell. + * Returns a promise. + */ +module.exports.run = function() { + var d = Q.defer(); + var adb = child_process.spawn('adb', ['logcat'], {cwd: os.tmpdir()}); + + adb.stdout.on('data', function(data) { + var lines = data ? data.toString().split('\n') : []; + var out = lines.filter(function(x) { return x.indexOf('nativeGetEnabledTags') < 0; }); + console.log(out.join('\n')); + }); + + adb.stderr.on('data', console.error); + adb.on('close', function(code) { + if (code > 0) { + d.reject('Failed to run logcat command.'); + } else d.resolve(); + }); + + return d.promise; +}; + +module.exports.help = function() { + console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'log'))); + console.log('Gives the logcat output on the command line.'); + process.exit(0); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/plugin-build.gradle b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/plugin-build.gradle new file mode 100644 index 0000000..d1c6336 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/plugin-build.gradle @@ -0,0 +1,70 @@ +/* Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +// GENERATED FILE! DO NOT EDIT! + +buildscript { + repositories { + mavenCentral() + jcenter() + } + + // Switch the Android Gradle plugin version requirement depending on the + // installed version of Gradle. This dependency is documented at + // http://tools.android.com/tech-docs/new-build-system/version-compatibility + // and https://issues.apache.org/jira/browse/CB-8143 + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0+' + } +} + +apply plugin: 'com.android.library' + +dependencies { + compile fileTree(dir: 'libs', include: '*.jar') + debugCompile project(path: ":CordovaLib", configuration: "debug") + releaseCompile project(path: ":CordovaLib", configuration: "release") +} + +android { + compileSdkVersion cdvCompileSdkVersion + buildToolsVersion cdvBuildToolsVersion + publishNonDefault true + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_6 + targetCompatibility JavaVersion.VERSION_1_6 + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + jniLibs.srcDirs = ['libs'] + } + } +} + +if (file('build-extras.gradle').exists()) { + apply from: 'build-extras.gradle' +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/pluginHandlers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/pluginHandlers.js new file mode 100644 index 0000000..5e745fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/pluginHandlers.js @@ -0,0 +1,308 @@ +/* + * + * Copyright 2013 Anis Kadri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint unused: vars */ + +var fs = require('fs'); +var path = require('path'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var CordovaError = require('cordova-common').CordovaError; + +var handlers = { + 'source-file':{ + install:function(obj, plugin, project, options) { + if (!obj.src) throw new CordovaError(generateAttributeError('src', 'source-file', plugin.id)); + if (!obj.targetDir) throw new CordovaError(generateAttributeError('target-dir', 'source-file', plugin.id)); + + var dest = path.join(obj.targetDir, path.basename(obj.src)); + + if(options && options.android_studio === true) { + dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src)); + } + + if (options && options.force) { + copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); + } else { + copyNewFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); + } + }, + uninstall:function(obj, plugin, project, options) { + var dest = path.join(obj.targetDir, path.basename(obj.src)); + + if(options && options.android_studio === true) { + dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src)); + } + + deleteJava(project.projectDir, dest); + } + }, + 'lib-file':{ + install:function(obj, plugin, project, options) { + var dest = path.join('libs', path.basename(obj.src)); + if(options && options.android_studio === true) { + dest = path.join('app/libs', path.basename(obj.src)); + } + copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); + }, + uninstall:function(obj, plugin, project, options) { + var dest = path.join('libs', path.basename(obj.src)); + if(options && options.android_studio === true) { + dest = path.join('app/libs', path.basename(obj.src)); + } + removeFile(project.projectDir, dest); + } + }, + 'resource-file':{ + install:function(obj, plugin, project, options) { + copyFile(plugin.dir, obj.src, project.projectDir, path.normalize(obj.target), !!(options && options.link)); + }, + uninstall:function(obj, plugin, project, options) { + removeFile(project.projectDir, path.normalize(obj.target)); + } + }, + 'framework': { + install:function(obj, plugin, project, options) { + var src = obj.src; + if (!src) throw new CordovaError(generateAttributeError('src', 'framework', plugin.id)); + + events.emit('verbose', 'Installing Android library: ' + src); + var parentDir = obj.parent ? path.resolve(project.projectDir, obj.parent) : project.projectDir; + var subDir; + + if (obj.custom) { + var subRelativeDir = project.getCustomSubprojectRelativeDir(plugin.id, src); + copyNewFile(plugin.dir, src, project.projectDir, subRelativeDir, !!(options && options.link)); + subDir = path.resolve(project.projectDir, subRelativeDir); + } else { + obj.type = 'sys'; + subDir = src; + } + + if (obj.type == 'gradleReference') { + project.addGradleReference(parentDir, subDir); + } else if (obj.type == 'sys') { + project.addSystemLibrary(parentDir, subDir); + } else { + project.addSubProject(parentDir, subDir); + } + }, + uninstall:function(obj, plugin, project, options) { + var src = obj.src; + if (!src) throw new CordovaError(generateAttributeError('src', 'framework', plugin.id)); + + events.emit('verbose', 'Uninstalling Android library: ' + src); + var parentDir = obj.parent ? path.resolve(project.projectDir, obj.parent) : project.projectDir; + var subDir; + + if (obj.custom) { + var subRelativeDir = project.getCustomSubprojectRelativeDir(plugin.id, src); + removeFile(project.projectDir, subRelativeDir); + subDir = path.resolve(project.projectDir, subRelativeDir); + // If it's the last framework in the plugin, remove the parent directory. + var parDir = path.dirname(subDir); + if (fs.existsSync(parDir) && fs.readdirSync(parDir).length === 0) { + fs.rmdirSync(parDir); + } + } else { + obj.type = 'sys'; + subDir = src; + } + + if (obj.type == 'gradleReference') { + project.removeGradleReference(parentDir, subDir); + } else if (obj.type == 'sys') { + project.removeSystemLibrary(parentDir, subDir); + } else { + project.removeSubProject(parentDir, subDir); + } + } + }, + asset:{ + install:function(obj, plugin, project, options) { + if (!obj.src) { + throw new CordovaError(generateAttributeError('src', 'asset', plugin.id)); + } + if (!obj.target) { + throw new CordovaError(generateAttributeError('target', 'asset', plugin.id)); + } + + copyFile(plugin.dir, obj.src, project.www, obj.target); + if (options && options.usePlatformWww) { + // CB-11022 copy file to both directories if usePlatformWww is specified + copyFile(plugin.dir, obj.src, project.platformWww, obj.target); + } + }, + uninstall:function(obj, plugin, project, options) { + var target = obj.target || obj.src; + + if (!target) throw new CordovaError(generateAttributeError('target', 'asset', plugin.id)); + + removeFileF(path.resolve(project.www, target)); + removeFileF(path.resolve(project.www, 'plugins', plugin.id)); + if (options && options.usePlatformWww) { + // CB-11022 remove file from both directories if usePlatformWww is specified + removeFileF(path.resolve(project.platformWww, target)); + removeFileF(path.resolve(project.platformWww, 'plugins', plugin.id)); + } + } + }, + 'js-module': { + install: function (obj, plugin, project, options) { + // Copy the plugin's files into the www directory. + var moduleSource = path.resolve(plugin.dir, obj.src); + var moduleName = plugin.id + '.' + (obj.name || path.basename(obj.src, path.extname (obj.src))); + + // Read in the file, prepend the cordova.define, and write it back out. + var scriptContent = fs.readFileSync(moduleSource, 'utf-8').replace(/^\ufeff/, ''); // Window BOM + if (moduleSource.match(/.*\.json$/)) { + scriptContent = 'module.exports = ' + scriptContent; + } + scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) {\n' + scriptContent + '\n});\n'; + + var wwwDest = path.resolve(project.www, 'plugins', plugin.id, obj.src); + shell.mkdir('-p', path.dirname(wwwDest)); + fs.writeFileSync(wwwDest, scriptContent, 'utf-8'); + + if (options && options.usePlatformWww) { + // CB-11022 copy file to both directories if usePlatformWww is specified + var platformWwwDest = path.resolve(project.platformWww, 'plugins', plugin.id, obj.src); + shell.mkdir('-p', path.dirname(platformWwwDest)); + fs.writeFileSync(platformWwwDest, scriptContent, 'utf-8'); + } + }, + uninstall: function (obj, plugin, project, options) { + var pluginRelativePath = path.join('plugins', plugin.id, obj.src); + removeFileAndParents(project.www, pluginRelativePath); + if (options && options.usePlatformWww) { + // CB-11022 remove file from both directories if usePlatformWww is specified + removeFileAndParents(project.platformWww, pluginRelativePath); + } + } + } +}; + +module.exports.getInstaller = function (type) { + if (handlers[type] && handlers[type].install) { + return handlers[type].install; + } + + events.emit('verbose', '<' + type + '> is not supported for android plugins'); +}; + +module.exports.getUninstaller = function(type) { + if (handlers[type] && handlers[type].uninstall) { + return handlers[type].uninstall; + } + + events.emit('verbose', '<' + type + '> is not supported for android plugins'); +}; + +function copyFile (plugin_dir, src, project_dir, dest, link) { + src = path.resolve(plugin_dir, src); + if (!fs.existsSync(src)) throw new CordovaError('"' + src + '" not found!'); + + // check that src path is inside plugin directory + var real_path = fs.realpathSync(src); + var real_plugin_path = fs.realpathSync(plugin_dir); + if (real_path.indexOf(real_plugin_path) !== 0) + throw new CordovaError('File "' + src + '" is located outside the plugin directory "' + plugin_dir + '"'); + + dest = path.resolve(project_dir, dest); + + // check that dest path is located in project directory + if (dest.indexOf(project_dir) !== 0) + throw new CordovaError('Destination "' + dest + '" for source file "' + src + '" is located outside the project'); + + shell.mkdir('-p', path.dirname(dest)); + if (link) { + symlinkFileOrDirTree(src, dest); + } else if (fs.statSync(src).isDirectory()) { + // XXX shelljs decides to create a directory when -R|-r is used which sucks. http://goo.gl/nbsjq + shell.cp('-Rf', src+'/*', dest); + } else { + shell.cp('-f', src, dest); + } +} + +// Same as copy file but throws error if target exists +function copyNewFile (plugin_dir, src, project_dir, dest, link) { + var target_path = path.resolve(project_dir, dest); + if (fs.existsSync(target_path)) + throw new CordovaError('"' + target_path + '" already exists!'); + + copyFile(plugin_dir, src, project_dir, dest, !!link); +} + +function symlinkFileOrDirTree(src, dest) { + if (fs.existsSync(dest)) { + shell.rm('-Rf', dest); + } + + if (fs.statSync(src).isDirectory()) { + shell.mkdir('-p', dest); + fs.readdirSync(src).forEach(function(entry) { + symlinkFileOrDirTree(path.join(src, entry), path.join(dest, entry)); + }); + } + else { + fs.symlinkSync(path.relative(fs.realpathSync(path.dirname(dest)), src), dest); + } +} + +// checks if file exists and then deletes. Error if doesn't exist +function removeFile (project_dir, src) { + var file = path.resolve(project_dir, src); + shell.rm('-Rf', file); +} + +// deletes file/directory without checking +function removeFileF (file) { + shell.rm('-Rf', file); +} + +// Sometimes we want to remove some java, and prune any unnecessary empty directories +function deleteJava (project_dir, destFile) { + removeFileAndParents(project_dir, destFile, 'src'); +} + +function removeFileAndParents (baseDir, destFile, stopper) { + stopper = stopper || '.'; + var file = path.resolve(baseDir, destFile); + if (!fs.existsSync(file)) return; + + removeFileF(file); + + // check if directory is empty + var curDir = path.dirname(file); + + while(curDir !== path.resolve(baseDir, stopper)) { + if(fs.existsSync(curDir) && fs.readdirSync(curDir).length === 0) { + fs.rmdirSync(curDir); + curDir = path.resolve(curDir, '..'); + } else { + // directory not empty...do nothing + break; + } + } +} + +function generateAttributeError(attribute, element, id) { + return 'Required attribute "' + attribute + '" not specified in <' + element + '> element from plugin: ' + id; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/prepare.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/prepare.js new file mode 100644 index 0000000..10a69ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/prepare.js @@ -0,0 +1,431 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var AndroidManifest = require('./AndroidManifest'); +var xmlHelpers = require('cordova-common').xmlHelpers; +var CordovaError = require('cordova-common').CordovaError; +var ConfigParser = require('cordova-common').ConfigParser; +var FileUpdater = require('cordova-common').FileUpdater; +var PlatformJson = require('cordova-common').PlatformJson; +var PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger; +var PluginInfoProvider = require('cordova-common').PluginInfoProvider; + +module.exports.prepare = function (cordovaProject, options) { + var self = this; + + var platformJson = PlatformJson.load(this.locations.root, this.platform); + var munger = new PlatformMunger(this.platform, this.locations.root, platformJson, new PluginInfoProvider()); + + this._config = updateConfigFilesFrom(cordovaProject.projectConfig, munger, this.locations); + + // Update own www dir with project's www assets and plugins' assets and js-files + return Q.when(updateWww(cordovaProject, this.locations)) + .then(function () { + // update project according to config.xml changes. + return updateProjectAccordingTo(self._config, self.locations); + }) + .then(function () { + updateIcons(cordovaProject, path.relative(cordovaProject.root, self.locations.res)); + updateSplashes(cordovaProject, path.relative(cordovaProject.root, self.locations.res)); + }) + .then(function () { + events.emit('verbose', 'Prepared android project successfully'); + }); +}; + +module.exports.clean = function (options) { + // A cordovaProject isn't passed into the clean() function, because it might have + // been called from the platform shell script rather than the CLI. Check for the + // noPrepare option passed in by the non-CLI clean script. If that's present, or if + // there's no config.xml found at the project root, then don't clean prepared files. + var projectRoot = path.resolve(this.root, '../..'); + if ((options && options.noPrepare) || !fs.existsSync(this.locations.configXml) || + !fs.existsSync(this.locations.configXml)) { + return Q(); + } + + var projectConfig = new ConfigParser(this.locations.configXml); + + var self = this; + return Q().then(function () { + cleanWww(projectRoot, self.locations); + cleanIcons(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res)); + cleanSplashes(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res)); + }); +}; + +/** + * Updates config files in project based on app's config.xml and config munge, + * generated by plugins. + * + * @param {ConfigParser} sourceConfig A project's configuration that will + * be merged into platform's config.xml + * @param {ConfigChanges} configMunger An initialized ConfigChanges instance + * for this platform. + * @param {Object} locations A map of locations for this platform + * + * @return {ConfigParser} An instance of ConfigParser, that + * represents current project's configuration. When returned, the + * configuration is already dumped to appropriate config.xml file. + */ +function updateConfigFilesFrom(sourceConfig, configMunger, locations) { + events.emit('verbose', 'Generating platform-specific config.xml from defaults for android at ' + locations.configXml); + + // First cleanup current config and merge project's one into own + // Overwrite platform config.xml with defaults.xml. + shell.cp('-f', locations.defaultConfigXml, locations.configXml); + + // Then apply config changes from global munge to all config files + // in project (including project's config) + configMunger.reapply_global_munge().save_all(); + + events.emit('verbose', 'Merging project\'s config.xml into platform-specific android config.xml'); + // Merge changes from app's config.xml into platform's one + var config = new ConfigParser(locations.configXml); + xmlHelpers.mergeXml(sourceConfig.doc.getroot(), + config.doc.getroot(), 'android', /*clobber=*/true); + + config.write(); + return config; +} + +/** + * Logs all file operations via the verbose event stream, indented. + */ +function logFileOp(message) { + events.emit('verbose', ' ' + message); +} + +/** + * Updates platform 'www' directory by replacing it with contents of + * 'platform_www' and app www. Also copies project's overrides' folder into + * the platform 'www' folder + * + * @param {Object} cordovaProject An object which describes cordova project. + * @param {Object} destinations An object that contains destination + * paths for www files. + */ +function updateWww(cordovaProject, destinations) { + var sourceDirs = [ + path.relative(cordovaProject.root, cordovaProject.locations.www), + path.relative(cordovaProject.root, destinations.platformWww) + ]; + + // If project contains 'merges' for our platform, use them as another overrides + var merges_path = path.join(cordovaProject.root, 'merges', 'android'); + if (fs.existsSync(merges_path)) { + events.emit('verbose', 'Found "merges/android" folder. Copying its contents into the android project.'); + sourceDirs.push(path.join('merges', 'android')); + } + + var targetDir = path.relative(cordovaProject.root, destinations.www); + events.emit( + 'verbose', 'Merging and updating files from [' + sourceDirs.join(', ') + '] to ' + targetDir); + FileUpdater.mergeAndUpdateDir( + sourceDirs, targetDir, { rootDir: cordovaProject.root }, logFileOp); +} + +/** + * Cleans all files from the platform 'www' directory. + */ +function cleanWww(projectRoot, locations) { + var targetDir = path.relative(projectRoot, locations.www); + events.emit('verbose', 'Cleaning ' + targetDir); + + // No source paths are specified, so mergeAndUpdateDir() will clear the target directory. + FileUpdater.mergeAndUpdateDir( + [], targetDir, { rootDir: projectRoot, all: true }, logFileOp); +} + +/** + * Updates project structure and AndroidManifest according to project's configuration. + * + * @param {ConfigParser} platformConfig A project's configuration that will + * be used to update project + * @param {Object} locations A map of locations for this platform + */ +function updateProjectAccordingTo(platformConfig, locations) { + // Update app name by editing res/values/strings.xml + var name = platformConfig.name(); + var strings = xmlHelpers.parseElementtreeSync(locations.strings); + strings.find('string[@name="app_name"]').text = name.replace(/\'/g, '\\\''); + fs.writeFileSync(locations.strings, strings.write({indent: 4}), 'utf-8'); + events.emit('verbose', 'Wrote out android application name "' + name + '" to ' + locations.strings); + + // Java packages cannot support dashes + var pkg = (platformConfig.android_packageName() || platformConfig.packageName()).replace(/-/g, '_'); + + var manifest = new AndroidManifest(locations.manifest); + var orig_pkg = manifest.getPackageId(); + + manifest.getActivity() + .setOrientation(platformConfig.getPreference('orientation')) + .setLaunchMode(findAndroidLaunchModePreference(platformConfig)); + + manifest.setVersionName(platformConfig.version()) + .setVersionCode(platformConfig.android_versionCode() || default_versionCode(platformConfig.version())) + .setPackageId(pkg) + .setMinSdkVersion(platformConfig.getPreference('android-minSdkVersion', 'android')) + .setMaxSdkVersion(platformConfig.getPreference('android-maxSdkVersion', 'android')) + .setTargetSdkVersion(platformConfig.getPreference('android-targetSdkVersion', 'android')) + .write(); + + var javaPattern = path.join(locations.root, 'src', orig_pkg.replace(/\./g, '/'), '*.java'); + var java_files = shell.ls(javaPattern).filter(function(f) { + return shell.grep(/extends\s+CordovaActivity/g, f); + }); + + if (java_files.length === 0) { + throw new CordovaError('No Java files found that extend CordovaActivity.'); + } else if(java_files.length > 1) { + events.emit('log', 'Multiple candidate Java files that extend CordovaActivity found. Guessing at the first one, ' + java_files[0]); + } + + var destFile = path.join(locations.root, 'src', pkg.replace(/\./g, '/'), path.basename(java_files[0])); + shell.mkdir('-p', path.dirname(destFile)); + shell.sed(/package [\w\.]*;/, 'package ' + pkg + ';', java_files[0]).to(destFile); + events.emit('verbose', 'Wrote out Android package name "' + pkg + '" to ' + destFile); + + if (orig_pkg !== pkg) { + // If package was name changed we need to remove old java with main activity + shell.rm('-Rf',java_files[0]); + // remove any empty directories + var currentDir = path.dirname(java_files[0]); + var sourcesRoot = path.resolve(locations.root, 'src'); + while(currentDir !== sourcesRoot) { + if(fs.existsSync(currentDir) && fs.readdirSync(currentDir).length === 0) { + fs.rmdirSync(currentDir); + currentDir = path.resolve(currentDir, '..'); + } else { + break; + } + } + } +} + +// Consturct the default value for versionCode as +// PATCH + MINOR * 100 + MAJOR * 10000 +// see http://developer.android.com/tools/publishing/versioning.html +function default_versionCode(version) { + var nums = version.split('-')[0].split('.'); + var versionCode = 0; + if (+nums[0]) { + versionCode += +nums[0] * 10000; + } + if (+nums[1]) { + versionCode += +nums[1] * 100; + } + if (+nums[2]) { + versionCode += +nums[2]; + } + + events.emit('verbose', 'android-versionCode not found in config.xml. Generating a code based on version in config.xml (' + version + '): ' + versionCode); + return versionCode; +} + +function getImageResourcePath(resourcesDir, type, density, name, sourceName) { + if (/\.9\.png$/.test(sourceName)) { + name = name.replace(/\.png$/, '.9.png'); + } + var resourcePath = path.join(resourcesDir, (density ? type + '-' + density : type), name); + return resourcePath; +} + +function updateSplashes(cordovaProject, platformResourcesDir) { + var resources = cordovaProject.projectConfig.getSplashScreens('android'); + + // if there are "splash" elements in config.xml + if (resources.length === 0) { + events.emit('verbose', 'This app does not have splash screens defined'); + return; + } + + var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'drawable', 'screen.png'); + + var hadMdpi = false; + resources.forEach(function (resource) { + if (!resource.density) { + return; + } + if (resource.density == 'mdpi') { + hadMdpi = true; + } + var targetPath = getImageResourcePath( + platformResourcesDir, 'drawable', resource.density, 'screen.png', path.basename(resource.src)); + resourceMap[targetPath] = resource.src; + }); + + // There's no "default" drawable, so assume default == mdpi. + if (!hadMdpi && resources.defaultResource) { + var targetPath = getImageResourcePath( + platformResourcesDir, 'drawable', 'mdpi', 'screen.png', path.basename(resources.defaultResource.src)); + resourceMap[targetPath] = resources.defaultResource.src; + } + + events.emit('verbose', 'Updating splash screens at ' + platformResourcesDir); + FileUpdater.updatePaths( + resourceMap, { rootDir: cordovaProject.root }, logFileOp); +} + +function cleanSplashes(projectRoot, projectConfig, platformResourcesDir) { + var resources = projectConfig.getSplashScreens('android'); + if (resources.length > 0) { + var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'drawable', 'screen.png'); + events.emit('verbose', 'Cleaning splash screens at ' + platformResourcesDir); + + // No source paths are specified in the map, so updatePaths() will delete the target files. + FileUpdater.updatePaths( + resourceMap, { rootDir: projectRoot, all: true }, logFileOp); + } +} + +function updateIcons(cordovaProject, platformResourcesDir) { + var icons = cordovaProject.projectConfig.getIcons('android'); + + // if there are icon elements in config.xml + if (icons.length === 0) { + events.emit('verbose', 'This app does not have launcher icons defined'); + return; + } + + var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'icon.png'); + + var android_icons = {}; + var default_icon; + // http://developer.android.com/design/style/iconography.html + var sizeToDensityMap = { + 36: 'ldpi', + 48: 'mdpi', + 72: 'hdpi', + 96: 'xhdpi', + 144: 'xxhdpi', + 192: 'xxxhdpi' + }; + // find the best matching icon for a given density or size + // @output android_icons + var parseIcon = function(icon, icon_size) { + // do I have a platform icon for that density already + var density = icon.density || sizeToDensityMap[icon_size]; + if (!density) { + // invalid icon defition ( or unsupported size) + return; + } + var previous = android_icons[density]; + if (previous && previous.platform) { + return; + } + android_icons[density] = icon; + }; + + // iterate over all icon elements to find the default icon and call parseIcon + for (var i=0; i 0) { + var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'icon.png'); + events.emit('verbose', 'Cleaning icons at ' + platformResourcesDir); + + // No source paths are specified in the map, so updatePaths() will delete the target files. + FileUpdater.updatePaths( + resourceMap, { rootDir: projectRoot, all: true }, logFileOp); + } +} + +/** + * Gets a map containing resources of a specified name from all drawable folders in a directory. + */ +function mapImageResources(rootDir, subDir, type, resourceName) { + var pathMap = {}; + shell.ls(path.join(rootDir, subDir, type + '-*')) + .forEach(function (drawableFolder) { + var imagePath = path.join(subDir, path.basename(drawableFolder), resourceName); + pathMap[imagePath] = null; + }); + return pathMap; +} + +/** + * Gets and validates 'AndroidLaunchMode' prepference from config.xml. Returns + * preference value and warns if it doesn't seems to be valid + * + * @param {ConfigParser} platformConfig A configParser instance for + * platform. + * + * @return {String} Preference's value from config.xml or + * default value, if there is no such preference. The default value is + * 'singleTop' + */ +function findAndroidLaunchModePreference(platformConfig) { + var launchMode = platformConfig.getPreference('AndroidLaunchMode'); + if (!launchMode) { + // Return a default value + return 'singleTop'; + } + + var expectedValues = ['standard', 'singleTop', 'singleTask', 'singleInstance']; + var valid = expectedValues.indexOf(launchMode) >= 0; + if (!valid) { + // Note: warn, but leave the launch mode as developer wanted, in case the list of options changes in the future + events.emit('warn', 'Unrecognized value for AndroidLaunchMode preference: ' + + launchMode + '. Expected values are: ' + expectedValues.join(', ')); + } + + return launchMode; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/retry.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/retry.js new file mode 100644 index 0000000..3cb4927 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/retry.js @@ -0,0 +1,68 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint node: true */ + +'use strict'; + +var events = require('cordova-common').events; + +/* + * Retry a promise-returning function a number of times, propagating its + * results on success or throwing its error on a failed final attempt. + * + * @arg {Number} attemts_left - The number of times to retry the passed call. + * @arg {Function} promiseFunction - A function that returns a promise. + * @arg {...} - Arguments to pass to promiseFunction. + * + * @returns {Promise} + */ +module.exports.retryPromise = function (attemts_left, promiseFunction) { + + // NOTE: + // get all trailing arguments, by skipping the first two (attemts_left and + // promiseFunction) because they shouldn't get passed to promiseFunction + var promiseFunctionArguments = Array.prototype.slice.call(arguments, 2); + + return promiseFunction.apply(undefined, promiseFunctionArguments).then( + + // on success pass results through + function onFulfilled(value) { + return value; + }, + + // on rejection either retry, or throw the error + function onRejected(error) { + + attemts_left -= 1; + + if (attemts_left < 1) { + throw error; + } + + events.emit('verbose', 'A retried call failed. Retrying ' + attemts_left + ' more time(s).'); + + // retry call self again with the same arguments, except attemts_left is now lower + var fullArguments = [attemts_left, promiseFunction].concat(promiseFunctionArguments); + return module.exports.retryPromise.apply(undefined, fullArguments); + } + ); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/run.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/run.js new file mode 100644 index 0000000..214a1e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/run.js @@ -0,0 +1,141 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint loopfunc:true */ + +var path = require('path'), + build = require('./build'), + emulator = require('./emulator'), + device = require('./device'), + Q = require('q'), + events = require('cordova-common').events; + +function getInstallTarget(runOptions) { + var install_target; + if (runOptions.target) { + install_target = runOptions.target; + } else if (runOptions.device) { + install_target = '--device'; + } else if (runOptions.emulator) { + install_target = '--emulator'; + } + + return install_target; +} + +/** + * Runs the application on a device if available. If no device is found, it will + * use a started emulator. If no started emulators are found it will attempt + * to start an avd. If no avds are found it will error out. + * + * @param {Object} runOptions various run/build options. See Api.js build/run + * methods for reference. + * + * @return {Promise} + */ + module.exports.run = function(runOptions) { + + var self = this; + var install_target = getInstallTarget(runOptions); + + return Q() + .then(function() { + if (!install_target) { + // no target given, deploy to device if available, otherwise use the emulator. + return device.list() + .then(function(device_list) { + if (device_list.length > 0) { + events.emit('warn', 'No target specified, deploying to device \'' + device_list[0] + '\'.'); + install_target = device_list[0]; + } else { + events.emit('warn', 'No target specified and no devices found, deploying to emulator'); + install_target = '--emulator'; + } + }); + } + }).then(function() { + if (install_target == '--device') { + return device.resolveTarget(null); + } else if (install_target == '--emulator') { + // Give preference to any already started emulators. Else, start one. + return emulator.list_started() + .then(function(started) { + return started && started.length > 0 ? started[0] : emulator.start(); + }).then(function(emulatorId) { + return emulator.resolveTarget(emulatorId); + }); + } + // They specified a specific device/emulator ID. + return device.list() + .then(function(devices) { + if (devices.indexOf(install_target) > -1) { + return device.resolveTarget(install_target); + } + return emulator.list_started() + .then(function(started_emulators) { + if (started_emulators.indexOf(install_target) > -1) { + return emulator.resolveTarget(install_target); + } + return emulator.list_images() + .then(function(avds) { + // if target emulator isn't started, then start it. + for (var avd in avds) { + if (avds[avd].name == install_target) { + return emulator.start(install_target) + .then(function(emulatorId) { + return emulator.resolveTarget(emulatorId); + }); + } + } + return Q.reject('Target \'' + install_target + '\' not found, unable to run project'); + }); + }); + }); + }).then(function(resolvedTarget) { + // Better just call self.build, but we're doing some processing of + // build results (according to platformApi spec) so they are in different + // format than emulator.install expects. + // TODO: Update emulator/device.install to handle this change + return build.run.call(self, runOptions, resolvedTarget) + .then(function(buildResults) { + if (resolvedTarget.isEmulator) { + return emulator.wait_for_boot(resolvedTarget.target) + .then(function () { + return emulator.install(resolvedTarget, buildResults); + }); + } + return device.install(resolvedTarget, buildResults); + }); + }); +}; + +module.exports.help = function() { + console.log('Usage: ' + path.relative(process.cwd(), process.argv[1]) + ' [options]'); + console.log('Build options :'); + console.log(' --debug : Builds project in debug mode'); + console.log(' --release : Builds project in release mode'); + console.log(' --nobuild : Runs the currently built project without recompiling'); + console.log('Deploy options :'); + console.log(' --device : Will deploy the built project to a device'); + console.log(' --emulator : Will deploy the built project to an emulator if one exists'); + console.log(' --target= : Installs to the target with the specified id.'); + process.exit(0); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator new file mode 100755 index 0000000..f96bdc3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator @@ -0,0 +1,39 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var emulator = require('./emulator'), + args = process.argv; + +var install_target; +if(args.length > 2) { + if (args[2].substring(0, 9) == '--target=') { + install_target = args[2].substring(9, args[2].length); + } else { + console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); + process.exit(2); + } +} + +emulator.start(install_target).done(null, function(err) { + console.error('ERROR: ' + err); + process.exit(2); +}); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator.bat new file mode 100644 index 0000000..9329d95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/lib/start-emulator.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0start-emulator" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log new file mode 100755 index 0000000..47f0605 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log @@ -0,0 +1,36 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var log = require('./lib/log'), + reqs = require('./lib/check_reqs'), + args = process.argv; + +// Usage support for when args are given +if(args.length > 2) { + log.help(); +} else { + reqs.run().done(function() { + return log.run(); + }, function(err) { + console.error('ERROR: ' + err); + process.exit(2); + }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log.bat b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log.bat new file mode 100644 index 0000000..4b2b434 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/log.bat @@ -0,0 +1,26 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License. + +@ECHO OFF +SET script_path="%~dp0log" +IF EXIST %script_path% ( + node %script_path% %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/loggingHelper.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/loggingHelper.js new file mode 100644 index 0000000..32b2ee0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/loggingHelper.js @@ -0,0 +1,18 @@ +var CordovaLogger = require('cordova-common').CordovaLogger; + +module.exports = { + adjustLoggerLevel: function (opts) { + if (opts instanceof Array) { + opts.silent = opts.indexOf('--silent') !== -1; + opts.verbose = opts.indexOf('--verbose') !== -1; + } + + if (opts.silent) { + CordovaLogger.get().setLevel('error'); + } + + if (opts.verbose) { + CordovaLogger.get().setLevel('verbose'); + } + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/README.md new file mode 100644 index 0000000..99746fe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/abbrev.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/abbrev.js new file mode 100644 index 0000000..69cfeac --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/abbrev.js @@ -0,0 +1,62 @@ + +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/package.json new file mode 100644 index 0000000..e997ac0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/abbrev/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt" + ] + ], + "_from": "abbrev@>=1.0.0 <2.0.0", + "_id": "abbrev@1.0.9", + "_inCache": true, + "_installable": true, + "_location": "/abbrev", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/istanbul", + "/nopt" + ], + "_resolved": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "_shrinkwrap": null, + "_spec": "abbrev@1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^5.7.2" + }, + "directories": {}, + "dist": { + "shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" + }, + "files": [ + "abbrev.js" + ], + "gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f", + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "abbrev", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "test": "tap test.js --cov" + }, + "version": "1.0.9" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.jshintrc new file mode 100644 index 0000000..248c542 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.jshintrc @@ -0,0 +1,4 @@ +{ + "laxcomma": true, + "asi": true +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/History.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/History.md new file mode 100644 index 0000000..aea8aaf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/History.md @@ -0,0 +1,23 @@ + +0.3.1 / 2016-01-14 +================== + + * add MIT LICENSE file (#23, @kasicka) + * preserve chaining after redundant style-method calls (#19, @drewblaisdell) + * package: add "license" field (#16, @BenjaminTsai) + +0.3.0 / 2014-05-09 +================== + + * package: remove "test" script and "devDependencies" + * package: remove "engines" section + * pacakge: remove "bin" section + * package: beautify + * examples: remove `starwars` example (#15) + * Documented goto, horizontalAbsolute, and eraseLine methods in README.md (#12, @Jammerwoch) + * add `.jshintrc` file + +< 0.3.0 +======= + + * Prehistoric diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/LICENSE new file mode 100644 index 0000000..2ea4dc5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/README.md new file mode 100644 index 0000000..6ce1940 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/README.md @@ -0,0 +1,98 @@ +ansi.js +========= +### Advanced ANSI formatting tool for Node.js + +`ansi.js` is a module for Node.js that provides an easy-to-use API for +writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do +fancy things in a terminal window, like render text in colors, delete characters, +lines, the entire window, or hide and show the cursor, and lots more! + +#### Features: + + * 256 color support for the terminal! + * Make a beep sound from your terminal! + * Works with *any* writable `Stream` instance. + * Allows you to move the cursor anywhere on the terminal window. + * Allows you to delete existing contents from the terminal window. + * Allows you to hide and show the cursor. + * Converts CSS color codes and RGB values into ANSI escape codes. + * Low-level; you are in control of when escape codes are used, it's not abstracted. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install ansi +``` + + +Example +------- + +``` js +var ansi = require('ansi') + , cursor = ansi(process.stdout) + +// You can chain your calls forever: +cursor + .red() // Set font color to red + .bg.grey() // Set background color to grey + .write('Hello World!') // Write 'Hello World!' to stdout + .bg.reset() // Reset the bgcolor before writing the trailing \n, + // to avoid Terminal glitches + .write('\n') // And a final \n to wrap things up + +// Rendering modes are persistent: +cursor.hex('#660000').bold().underline() + +// You can use the regular logging functions, text will be green: +console.log('This is blood red, bold text') + +// To reset just the foreground color: +cursor.fg.reset() + +console.log('This will still be bold') + +// to go to a location (x,y) on the console +// note: 1-indexed, not 0-indexed: +cursor.goto(10, 5).write('Five down, ten over') + +// to clear the current line: +cursor.horizontalAbsolute(0).eraseLine().write('Starting again') + +// to go to a different column on the current line: +cursor.horizontalAbsolute(5).write('column five') + +// Clean up after yourself! +cursor.reset() +``` + + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/beep/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/beep/index.js new file mode 100755 index 0000000..c1ec929 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/beep/index.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +/** + * Invokes the terminal "beep" sound once per second on every exact second. + */ + +process.title = 'beep' + +var cursor = require('../../')(process.stdout) + +function beep () { + cursor.beep() + setTimeout(beep, 1000 - (new Date()).getMilliseconds()) +} + +setTimeout(beep, 1000 - (new Date()).getMilliseconds()) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/clear/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/clear/index.js new file mode 100755 index 0000000..6ac21ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/clear/index.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node + +/** + * Like GNU ncurses "clear" command. + * https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c + */ + +process.title = 'clear' + +function lf () { return '\n' } + +require('../../')(process.stdout) + .write(Array.apply(null, Array(process.stdout.getWindowSize()[1])).map(lf).join('')) + .eraseData(2) + .goto(1, 1) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/cursorPosition.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/cursorPosition.js new file mode 100755 index 0000000..50f9644 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/cursorPosition.js @@ -0,0 +1,32 @@ +#!/usr/bin/env node + +var tty = require('tty') +var cursor = require('../')(process.stdout) + +// listen for the queryPosition report on stdin +process.stdin.resume() +raw(true) + +process.stdin.once('data', function (b) { + var match = /\[(\d+)\;(\d+)R$/.exec(b.toString()) + if (match) { + var xy = match.slice(1, 3).reverse().map(Number) + console.error(xy) + } + + // cleanup and close stdin + raw(false) + process.stdin.pause() +}) + + +// send the query position request code to stdout +cursor.queryPosition() + +function raw (mode) { + if (process.stdin.setRawMode) { + process.stdin.setRawMode(mode) + } else { + tty.setRawMode(mode) + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/progress/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/progress/index.js new file mode 100644 index 0000000..d28dbda --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/examples/progress/index.js @@ -0,0 +1,87 @@ +#!/usr/bin/env node + +var assert = require('assert') + , ansi = require('../../') + +function Progress (stream, width) { + this.cursor = ansi(stream) + this.delta = this.cursor.newlines + this.width = width | 0 || 10 + this.open = '[' + this.close = ']' + this.complete = '█' + this.incomplete = '_' + + // initial render + this.progress = 0 +} + +Object.defineProperty(Progress.prototype, 'progress', { + get: get + , set: set + , configurable: true + , enumerable: true +}) + +function get () { + return this._progress +} + +function set (v) { + this._progress = Math.max(0, Math.min(v, 100)) + + var w = this.width - this.complete.length - this.incomplete.length + , n = w * (this._progress / 100) | 0 + , i = w - n + , com = c(this.complete, n) + , inc = c(this.incomplete, i) + , delta = this.cursor.newlines - this.delta + + assert.equal(com.length + inc.length, w) + + if (delta > 0) { + this.cursor.up(delta) + this.delta = this.cursor.newlines + } + + this.cursor + .horizontalAbsolute(0) + .eraseLine(2) + .fg.white() + .write(this.open) + .fg.grey() + .bold() + .write(com) + .resetBold() + .write(inc) + .fg.white() + .write(this.close) + .fg.reset() + .write('\n') +} + +function c (char, length) { + return Array.apply(null, Array(length)).map(function () { + return char + }).join('') +} + + + + +// Usage +var width = parseInt(process.argv[2], 10) || process.stdout.getWindowSize()[0] / 2 + , p = new Progress(process.stdout, width) + +;(function tick () { + p.progress += Math.random() * 5 + p.cursor + .eraseLine(2) + .write('Progress: ') + .bold().write(p.progress.toFixed(2)) + .write('%') + .resetBold() + .write('\n') + if (p.progress < 100) + setTimeout(tick, 100) +})() diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/lib/ansi.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/lib/ansi.js new file mode 100644 index 0000000..b1714e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/ansi/lib/ansi.js @@ -0,0 +1,405 @@ + +/** + * References: + * + * - http://en.wikipedia.org/wiki/ANSI_escape_code + * - http://www.termsys.demon.co.uk/vtansi.htm + * + */ + +/** + * Module dependencies. + */ + +var emitNewlineEvents = require('./newlines') + , prefix = '\x1b[' // For all escape codes + , suffix = 'm' // Only for color codes + +/** + * The ANSI escape sequences. + */ + +var codes = { + up: 'A' + , down: 'B' + , forward: 'C' + , back: 'D' + , nextLine: 'E' + , previousLine: 'F' + , horizontalAbsolute: 'G' + , eraseData: 'J' + , eraseLine: 'K' + , scrollUp: 'S' + , scrollDown: 'T' + , savePosition: 's' + , restorePosition: 'u' + , queryPosition: '6n' + , hide: '?25l' + , show: '?25h' +} + +/** + * Rendering ANSI codes. + */ + +var styles = { + bold: 1 + , italic: 3 + , underline: 4 + , inverse: 7 +} + +/** + * The negating ANSI code for the rendering modes. + */ + +var reset = { + bold: 22 + , italic: 23 + , underline: 24 + , inverse: 27 +} + +/** + * The standard, styleable ANSI colors. + */ + +var colors = { + white: 37 + , black: 30 + , blue: 34 + , cyan: 36 + , green: 32 + , magenta: 35 + , red: 31 + , yellow: 33 + , grey: 90 + , brightBlack: 90 + , brightRed: 91 + , brightGreen: 92 + , brightYellow: 93 + , brightBlue: 94 + , brightMagenta: 95 + , brightCyan: 96 + , brightWhite: 97 +} + + +/** + * Creates a Cursor instance based off the given `writable stream` instance. + */ + +function ansi (stream, options) { + if (stream._ansicursor) { + return stream._ansicursor + } else { + return stream._ansicursor = new Cursor(stream, options) + } +} +module.exports = exports = ansi + +/** + * The `Cursor` class. + */ + +function Cursor (stream, options) { + if (!(this instanceof Cursor)) { + return new Cursor(stream, options) + } + if (typeof stream != 'object' || typeof stream.write != 'function') { + throw new Error('a valid Stream instance must be passed in') + } + + // the stream to use + this.stream = stream + + // when 'enabled' is false then all the functions are no-ops except for write() + this.enabled = options && options.enabled + if (typeof this.enabled === 'undefined') { + this.enabled = stream.isTTY + } + this.enabled = !!this.enabled + + // then `buffering` is true, then `write()` calls are buffered in + // memory until `flush()` is invoked + this.buffering = !!(options && options.buffering) + this._buffer = [] + + // controls the foreground and background colors + this.fg = this.foreground = new Colorer(this, 0) + this.bg = this.background = new Colorer(this, 10) + + // defaults + this.Bold = false + this.Italic = false + this.Underline = false + this.Inverse = false + + // keep track of the number of "newlines" that get encountered + this.newlines = 0 + emitNewlineEvents(stream) + stream.on('newline', function () { + this.newlines++ + }.bind(this)) +} +exports.Cursor = Cursor + +/** + * Helper function that calls `write()` on the underlying Stream. + * Returns `this` instead of the write() return value to keep + * the chaining going. + */ + +Cursor.prototype.write = function (data) { + if (this.buffering) { + this._buffer.push(arguments) + } else { + this.stream.write.apply(this.stream, arguments) + } + return this +} + +/** + * Buffer `write()` calls into memory. + * + * @api public + */ + +Cursor.prototype.buffer = function () { + this.buffering = true + return this +} + +/** + * Write out the in-memory buffer. + * + * @api public + */ + +Cursor.prototype.flush = function () { + this.buffering = false + var str = this._buffer.map(function (args) { + if (args.length != 1) throw new Error('unexpected args length! ' + args.length); + return args[0]; + }).join(''); + this._buffer.splice(0); // empty + this.write(str); + return this +} + + +/** + * The `Colorer` class manages both the background and foreground colors. + */ + +function Colorer (cursor, base) { + this.current = null + this.cursor = cursor + this.base = base +} +exports.Colorer = Colorer + +/** + * Write an ANSI color code, ensuring that the same code doesn't get rewritten. + */ + +Colorer.prototype._setColorCode = function setColorCode (code) { + var c = String(code) + if (this.current === c) return + this.cursor.enabled && this.cursor.write(prefix + c + suffix) + this.current = c + return this +} + + +/** + * Set up the positional ANSI codes. + */ + +Object.keys(codes).forEach(function (name) { + var code = String(codes[name]) + Cursor.prototype[name] = function () { + var c = code + if (arguments.length > 0) { + c = toArray(arguments).map(Math.round).join(';') + code + } + this.enabled && this.write(prefix + c) + return this + } +}) + +/** + * Set up the functions for the rendering ANSI codes. + */ + +Object.keys(styles).forEach(function (style) { + var name = style[0].toUpperCase() + style.substring(1) + , c = styles[style] + , r = reset[style] + + Cursor.prototype[style] = function () { + if (this[name]) return this + this.enabled && this.write(prefix + c + suffix) + this[name] = true + return this + } + + Cursor.prototype['reset' + name] = function () { + if (!this[name]) return this + this.enabled && this.write(prefix + r + suffix) + this[name] = false + return this + } +}) + +/** + * Setup the functions for the standard colors. + */ + +Object.keys(colors).forEach(function (color) { + var code = colors[color] + + Colorer.prototype[color] = function () { + this._setColorCode(this.base + code) + return this.cursor + } + + Cursor.prototype[color] = function () { + return this.foreground[color]() + } +}) + +/** + * Makes a beep sound! + */ + +Cursor.prototype.beep = function () { + this.enabled && this.write('\x07') + return this +} + +/** + * Moves cursor to specific position + */ + +Cursor.prototype.goto = function (x, y) { + x = x | 0 + y = y | 0 + this.enabled && this.write(prefix + y + ';' + x + 'H') + return this +} + +/** + * Resets the color. + */ + +Colorer.prototype.reset = function () { + this._setColorCode(this.base + 39) + return this.cursor +} + +/** + * Resets all ANSI formatting on the stream. + */ + +Cursor.prototype.reset = function () { + this.enabled && this.write(prefix + '0' + suffix) + this.Bold = false + this.Italic = false + this.Underline = false + this.Inverse = false + this.foreground.current = null + this.background.current = null + return this +} + +/** + * Sets the foreground color with the given RGB values. + * The closest match out of the 216 colors is picked. + */ + +Colorer.prototype.rgb = function (r, g, b) { + var base = this.base + 38 + , code = rgb(r, g, b) + this._setColorCode(base + ';5;' + code) + return this.cursor +} + +/** + * Same as `cursor.fg.rgb(r, g, b)`. + */ + +Cursor.prototype.rgb = function (r, g, b) { + return this.foreground.rgb(r, g, b) +} + +/** + * Accepts CSS color codes for use with ANSI escape codes. + * For example: `#FF000` would be bright red. + */ + +Colorer.prototype.hex = function (color) { + return this.rgb.apply(this, hex(color)) +} + +/** + * Same as `cursor.fg.hex(color)`. + */ + +Cursor.prototype.hex = function (color) { + return this.foreground.hex(color) +} + + +// UTIL FUNCTIONS // + +/** + * Translates a 255 RGB value to a 0-5 ANSI RGV value, + * then returns the single ANSI color code to use. + */ + +function rgb (r, g, b) { + var red = r / 255 * 5 + , green = g / 255 * 5 + , blue = b / 255 * 5 + return rgb5(red, green, blue) +} + +/** + * Turns rgb 0-5 values into a single ANSI color code to use. + */ + +function rgb5 (r, g, b) { + var red = Math.round(r) + , green = Math.round(g) + , blue = Math.round(b) + return 16 + (red*36) + (green*6) + blue +} + +/** + * Accepts a hex CSS color code string (# is optional) and + * translates it into an Array of 3 RGB 0-255 values, which + * can then be used with rgb(). + */ + +function hex (color) { + var c = color[0] === '#' ? color.substring(1) : color + , r = c.substring(0, 2) + , g = c.substring(2, 4) + , b = c.substring(4, 6) + return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)] +} + +/** + * Turns an array-like object into a real array. + */ + +function toArray (a) { + var i = 0 + , l = a.length + , rtn = [] + for (; i 0) { + var len = data.length + , i = 0 + // now try to calculate any deltas + if (typeof data == 'string') { + for (; i=0.3.1 <0.4.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "ansi@>=0.3.1 <0.4.0", + "_id": "ansi@0.3.1", + "_inCache": true, + "_installable": true, + "_location": "/ansi", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi@^0.3.1", + "scope": null, + "escapedName": "ansi", + "name": "ansi", + "rawSpec": "^0.3.1", + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "_shrinkwrap": null, + "_spec": "ansi@^0.3.1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "bugs": { + "url": "https://github.com/TooTallNate/ansi.js/issues" + }, + "dependencies": {}, + "description": "Advanced ANSI formatting tool for Node.js", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "tarball": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + }, + "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", + "homepage": "https://github.com/TooTallNate/ansi.js#readme", + "keywords": [ + "ansi", + "formatting", + "cursor", + "color", + "terminal", + "rgb", + "256", + "stream" + ], + "license": "MIT", + "main": "./lib/ansi.js", + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/ansi.js.git" + }, + "scripts": {}, + "version": "0.3.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.npmignore new file mode 100644 index 0000000..ae5d8c3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/LICENSE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/README.md new file mode 100644 index 0000000..08e918c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/index.js new file mode 100644 index 0000000..e8d8587 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/index.js @@ -0,0 +1,58 @@ +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/package.json new file mode 100644 index 0000000..25e4fa8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/balanced-match/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "balanced-match@^0.4.1", + "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion" + ] + ], + "_from": "balanced-match@>=0.4.1 <0.5.0", + "_id": "balanced-match@0.4.2", + "_inCache": true, + "_installable": true, + "_location": "/balanced-match", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "2.15.8", + "_phantomChildren": {}, + "_requested": { + "raw": "balanced-match@^0.4.1", + "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", + "_shrinkwrap": null, + "_spec": "balanced-match@^0.4.1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "dependencies": {}, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "balanced-match", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "test": "make test" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "0.4.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/.travis.yml new file mode 100644 index 0000000..939cb51 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/LICENSE.MIT b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/LICENSE.MIT new file mode 100644 index 0000000..96d3f68 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/LICENSE.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/README.md new file mode 100644 index 0000000..ed31d1a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/README.md @@ -0,0 +1,31 @@ +base64-js +========= + +`base64-js` does basic base64 encoding/decoding in pure JS. + +[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) + +[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js) + +Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. + +Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. + +## install + +With [npm](https://npmjs.org) do: + +`npm install base64-js` + +## methods + +`var base64 = require('base64-js')` + +`base64` has two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/bench/bench.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/bench/bench.js new file mode 100644 index 0000000..0689e08 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/bench/bench.js @@ -0,0 +1,19 @@ +var random = require('crypto').pseudoRandomBytes + +var b64 = require('../') +var fs = require('fs') +var path = require('path') +var data = random(1e6).toString('base64') +//fs.readFileSync(path.join(__dirname, 'example.b64'), 'ascii').split('\n').join('') +var start = Date.now() +var raw = b64.toByteArray(data) +var middle = Date.now() +var data = b64.fromByteArray(raw) +var end = Date.now() + +console.log('decode ms, decode ops/ms, encode ms, encode ops/ms') +console.log( + middle - start, data.length / (middle - start), + end - middle, data.length / (end - middle)) +//console.log(data) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/lib/b64.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/lib/b64.js new file mode 100644 index 0000000..46001d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/lib/b64.js @@ -0,0 +1,124 @@ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/package.json new file mode 100644 index 0000000..61922bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "base64-js@0.0.8", + "scope": null, + "escapedName": "base64-js", + "name": "base64-js", + "rawSpec": "0.0.8", + "spec": "0.0.8", + "type": "version" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/plist" + ] + ], + "_from": "base64-js@0.0.8", + "_id": "base64-js@0.0.8", + "_inCache": true, + "_installable": true, + "_location": "/base64-js", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "_npmVersion": "2.1.16", + "_phantomChildren": {}, + "_requested": { + "raw": "base64-js@0.0.8", + "scope": null, + "escapedName": "base64-js", + "name": "base64-js", + "rawSpec": "0.0.8", + "spec": "0.0.8", + "type": "version" + }, + "_requiredBy": [ + "/plist" + ], + "_resolved": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", + "_shrinkwrap": null, + "_spec": "base64-js@0.0.8", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist", + "author": { + "name": "T. Jameson Little", + "email": "t.jameson.little@gmail.com" + }, + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "dependencies": {}, + "description": "Base64 encoding/decoding in pure JS", + "devDependencies": { + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", + "tarball": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz" + }, + "engines": { + "node": ">= 0.4" + }, + "gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f", + "homepage": "https://github.com/beatgammit/base64-js", + "license": "MIT", + "main": "lib/b64.js", + "maintainers": [ + { + "name": "beatgammit", + "email": "t.jameson.little@gmail.com" + }, + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "name": "base64-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "chrome/4..latest", + "firefox/3..latest", + "safari/5.1..latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "version": "0.0.8" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/convert.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/convert.js new file mode 100644 index 0000000..60b09c0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/convert.js @@ -0,0 +1,51 @@ +var test = require('tape'), + b64 = require('../lib/b64'), + checks = [ + 'a', + 'aa', + 'aaa', + 'hi', + 'hi!', + 'hi!!', + 'sup', + 'sup?', + 'sup?!' + ]; + +test('convert to base64 and back', function (t) { + t.plan(checks.length); + + for (var i = 0; i < checks.length; i++) { + var check = checks[i], + b64Str, + arr, + str; + + b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0); })); + + arr = b64.toByteArray(b64Str); + str = map(arr, function (byte) { return String.fromCharCode(byte); }).join(''); + + t.equal(check, str, 'Checked ' + check); + } + +}); + +function map (arr, callback) { + var res = [], + kValue, + mappedValue; + + for (var k = 0, len = arr.length; k < len; k++) { + if ((typeof arr === 'string' && !!arr.charAt(k))) { + kValue = arr.charAt(k); + mappedValue = callback(kValue, k, arr); + res[k] = mappedValue; + } else if (typeof arr !== 'string' && k in arr) { + kValue = arr[k]; + mappedValue = callback(kValue, k, arr); + res[k] = mappedValue; + } + } + return res; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/url-safe.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/url-safe.js new file mode 100644 index 0000000..dc437e9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/base64-js/test/url-safe.js @@ -0,0 +1,18 @@ +var test = require('tape'), + b64 = require('../lib/b64'); + +test('decode url-safe style base64 strings', function (t) { + var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff]; + + var actual = b64.toByteArray('//++/++/++//'); + for (var i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + actual = b64.toByteArray('__--_--_--__'); + for (var i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.js new file mode 100644 index 0000000..b6347bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.js @@ -0,0 +1,1213 @@ +var bigInt = (function (undefined) { + "use strict"; + + var BASE = 1e7, + LOG_BASE = 7, + MAX_INT = 9007199254740992, + MAX_INT_ARR = smallToArray(MAX_INT), + LOG_MAX_INT = Math.log(MAX_INT); + + function Integer(v, radix) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 ? parseValue(v) : parseBase(v, radix); + return parseValue(v); + } + + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + BigInteger.prototype = Object.create(Integer.prototype); + + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + SmallInteger.prototype = Object.create(Integer.prototype); + + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + + function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes + if (n < 1e7) + return [n]; + if (n < 1e14) + return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + + function arrayToSmall(arr) { // If BASE changes this function may need to change + trim(arr); + var length = arr.length; + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: return 0; + case 1: return arr[0]; + case 2: return arr[0] + arr[1] * BASE; + default: return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + return arr; + } + + function trim(v) { + var i = v.length; + while (v[--i] === 0); + v.length = i + 1; + } + + function createArray(length) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger + var x = new Array(length); + var i = -1; + while (++i < length) { + x[i] = 0; + } + return x; + } + + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + + function add(a, b) { // assumes a and b are arrays with a.length >= b.length + var l_a = a.length, + l_b = b.length, + r = new Array(l_a), + carry = 0, + base = BASE, + sum, i; + for (i = 0; i < l_b; i++) { + sum = a[i] + b[i] + carry; + carry = sum >= base ? 1 : 0; + r[i] = sum - carry * base; + } + while (i < l_a) { + sum = a[i] + carry; + carry = sum === base ? 1 : 0; + r[i++] = sum - carry * base; + } + if (carry > 0) r.push(carry); + return r; + } + + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + + function addSmall(a, carry) { // assumes a is array, carry is number with 0 <= carry < MAX_INT + var l = a.length, + r = new Array(l), + base = BASE, + sum, i; + for (i = 0; i < l; i++) { + sum = a[i] - base + carry; + carry = Math.floor(sum / base); + r[i] = sum - carry * base; + carry += 1; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + BigInteger.prototype.add = function (v) { + var value, n = parseValue(v); + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + return new BigInteger(addAny(a, b), this.sign); + }; + BigInteger.prototype.plus = BigInteger.prototype.add; + + SmallInteger.prototype.add = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + var b = n.value; + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + SmallInteger.prototype.plus = SmallInteger.prototype.add; + + function subtract(a, b) { // assumes a and b are arrays with a >= b + var a_l = a.length, + b_l = b.length, + r = new Array(a_l), + borrow = 0, + base = BASE, + i, difference; + for (i = 0; i < b_l; i++) { + difference = a[i] - borrow - b[i]; + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + r[i] = difference; + } + for (i = b_l; i < a_l; i++) { + difference = a[i] - borrow; + if (difference < 0) difference += base; + else { + r[i++] = difference; + break; + } + r[i] = difference; + } + for (; i < a_l; i++) { + r[i] = a[i]; + } + trim(r); + return r; + } + + function subtractAny(a, b, sign) { + var value, isSmall; + if (compareAbs(a, b) >= 0) { + value = subtract(a,b); + } else { + value = subtract(b, a); + sign = !sign; + } + value = arrayToSmall(value); + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + return new BigInteger(value, sign); + } + + function subtractSmall(a, b, sign) { // assumes a is array, b is number with 0 <= b < MAX_INT + var l = a.length, + r = new Array(l), + carry = -b, + base = BASE, + i, difference; + for (i = 0; i < l; i++) { + difference = a[i] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i] = difference < 0 ? difference + base : difference; + } + r = arrayToSmall(r); + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } return new BigInteger(r, sign); + } + + BigInteger.prototype.subtract = function (v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) + return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + BigInteger.prototype.minus = BigInteger.prototype.subtract; + + SmallInteger.prototype.subtract = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + var b = n.value; + if (n.isSmall) { + return new SmallInteger(a - b); + } + return subtractSmall(b, Math.abs(a), a >= 0); + }; + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + + BigInteger.prototype.negate = function () { + return new BigInteger(this.value, !this.sign); + }; + SmallInteger.prototype.negate = function () { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + + BigInteger.prototype.abs = function () { + return new BigInteger(this.value, false); + }; + SmallInteger.prototype.abs = function () { + return new SmallInteger(Math.abs(this.value)); + }; + + function multiplyLong(a, b) { + var a_l = a.length, + b_l = b.length, + l = a_l + b_l, + r = createArray(l), + base = BASE, + product, carry, i, a_i, b_j; + for (i = 0; i < a_l; ++i) { + a_i = a[i]; + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + trim(r); + return r; + } + + function multiplySmall(a, b) { // assumes a is array, b is number with |b| < BASE + var l = a.length, + r = new Array(l), + base = BASE, + carry = 0, + product, i; + for (i = 0; i < l; i++) { + product = a[i] * b + carry; + carry = Math.floor(product / base); + r[i] = product - carry * base; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + function shiftLeft(x, n) { + var r = []; + while (n-- > 0) r.push(0); + return r.concat(x); + } + + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + + var b = x.slice(n), + a = x.slice(0, n), + d = y.slice(n), + c = y.slice(0, n); + + var ac = multiplyKaratsuba(a, c), + bd = multiplyKaratsuba(b, d), + abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } + + // The following function is derived from a surface fit of a graph plotting the performance difference + // between long multiplication and karatsuba multiplication versus the lengths of the two arrays. + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0; + } + + BigInteger.prototype.multiply = function (v) { + var value, n = parseValue(v), + a = this.value, b = n.value, + sign = this.sign !== n.sign, + abs; + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + b = smallToArray(abs); + } + if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + + BigInteger.prototype.times = BigInteger.prototype.multiply; + + function multiplySmallAndArray(a, b, sign) { // a >= 0 + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + SmallInteger.prototype._multiplyBySmall = function (a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + BigInteger.prototype._multiplyBySmall = function (a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + SmallInteger.prototype.multiply = function (v) { + return parseValue(v)._multiplyBySmall(this); + }; + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + + function square(a) { + var l = a.length, + r = createArray(l + l), + base = BASE, + product, carry, i, a_i, a_j; + for (i = 0; i < l; i++) { + a_i = a[i]; + for (var j = 0; j < l; j++) { + a_j = a[j]; + product = a_i * a_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + trim(r); + return r; + } + + BigInteger.prototype.square = function () { + return new BigInteger(square(this.value), false); + }; + + SmallInteger.prototype.square = function () { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + + function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes. + var a_l = a.length, + b_l = b.length, + base = BASE, + result = createArray(b.length), + divisorMostSignificantDigit = b[b_l - 1], + // normalization + lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), + remainder = multiplySmall(a, lambda), + divisor = multiplySmall(b, lambda), + quotientDigit, shift, carry, borrow, i, l, q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } + // quotientDigit <= base - 1 + carry = 0; + borrow = 0; + l = divisor.length; + for (i = 0; i < l; i++) { + carry += quotientDigit * divisor[i]; + q = Math.floor(carry / base); + borrow += remainder[shift + i] - (carry - q * base); + carry = q; + if (borrow < 0) { + remainder[shift + i] = borrow + base; + borrow = -1; + } else { + remainder[shift + i] = borrow; + borrow = 0; + } + } + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + for (i = 0; i < l; i++) { + carry += remainder[shift + i] - base + divisor[i]; + if (carry < 0) { + remainder[shift + i] = carry + base; + carry = 0; + } else { + remainder[shift + i] = carry; + carry = 1; + } + } + borrow += carry; + } + result[shift] = quotientDigit; + } + // denormalization + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + + function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/ + // Performs faster than divMod1 on larger input sizes. + var a_l = a.length, + b_l = b.length, + result = [], + part = [], + base = BASE, + guess, xlen, highx, highy, check; + while (a_l) { + part.unshift(a[--a_l]); + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + if (xlen > b_l) { + highx = (highx + 1) * base; + } + guess = Math.ceil(highx / highy); + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + result.push(guess); + part = subtract(part, check); + } + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + + function divModSmall(value, lambda) { + var length = value.length, + quotient = createArray(length), + base = BASE, + i, q, remainder, divisor; + remainder = 0; + for (i = length - 1; i >= 0; --i) { + divisor = remainder * base + value[i]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i] = q | 0; + } + return [quotient, remainder | 0]; + } + + function divModAny(self, v) { + var value, n = parseValue(v); + var a = self.value, b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + if (self.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + return [Integer[0], self]; + } + if (n.isSmall) { + if (b === 1) return [self, Integer[0]]; + if (b == -1) return [self.negate(), Integer[0]]; + var abs = Math.abs(b); + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self.sign) remainder = -remainder; + if (typeof quotient === "number") { + if (self.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)]; + } + b = smallToArray(abs); + } + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self]; + if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]]; + + // divMod1 is faster on smaller input sizes + if (a.length + b.length <= 200) + value = divMod1(a, b); + else value = divMod2(a, b); + + quotient = value[0]; + var qSign = self.sign !== n.sign, + mod = value[1], + mSign = self.sign; + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + return [quotient, mod]; + } + + BigInteger.prototype.divmod = function (v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + + BigInteger.prototype.divide = function (v) { + return divModAny(this, v)[0]; + }; + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + + BigInteger.prototype.mod = function (v) { + return divModAny(this, v)[1]; + }; + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + + BigInteger.prototype.pow = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value, + value, x, y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.sign) { + return Integer[0]; + } + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) + return new SmallInteger(truncate(value)); + } + x = this; + y = Integer[1]; + while (true) { + if (b & 1 === 1) { + y = y.times(x); + --b; + } + if (b === 0) break; + b /= 2; + x = x.square(); + } + return y; + }; + SmallInteger.prototype.pow = BigInteger.prototype.pow; + + BigInteger.prototype.modPow = function (exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], + base = this.mod(mod); + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + return r; + }; + SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + for (var i = a.length - 1; i >= 0; i--) { + if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1; + } + return 0; + } + + BigInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + SmallInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = Math.abs(this.value), + b = n.value; + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + return -1; + }; + + BigInteger.prototype.compare = function (v) { + // See discussion about comparison with Infinity: + // https://github.com/peterolson/BigInteger.js/issues/61 + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + if (n.isSmall) { + return this.sign ? -1 : 1; + } + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + + SmallInteger.prototype.compare = function (v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + return a < 0 ? 1 : -1; + }; + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + + BigInteger.prototype.equals = function (v) { + return this.compare(v) === 0; + }; + SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + + BigInteger.prototype.notEquals = function (v) { + return this.compare(v) !== 0; + }; + SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + + BigInteger.prototype.greater = function (v) { + return this.compare(v) > 0; + }; + SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + + BigInteger.prototype.lesser = function (v) { + return this.compare(v) < 0; + }; + SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + + BigInteger.prototype.greaterOrEquals = function (v) { + return this.compare(v) >= 0; + }; + SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + + BigInteger.prototype.lesserOrEquals = function (v) { + return this.compare(v) <= 0; + }; + SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + + BigInteger.prototype.isEven = function () { + return (this.value[0] & 1) === 0; + }; + SmallInteger.prototype.isEven = function () { + return (this.value & 1) === 0; + }; + + BigInteger.prototype.isOdd = function () { + return (this.value[0] & 1) === 1; + }; + SmallInteger.prototype.isOdd = function () { + return (this.value & 1) === 1; + }; + + BigInteger.prototype.isPositive = function () { + return !this.sign; + }; + SmallInteger.prototype.isPositive = function () { + return this.value > 0; + }; + + BigInteger.prototype.isNegative = function () { + return this.sign; + }; + SmallInteger.prototype.isNegative = function () { + return this.value < 0; + }; + + BigInteger.prototype.isUnit = function () { + return false; + }; + SmallInteger.prototype.isUnit = function () { + return Math.abs(this.value) === 1; + }; + + BigInteger.prototype.isZero = function () { + return false; + }; + SmallInteger.prototype.isZero = function () { + return this.value === 0; + }; + BigInteger.prototype.isDivisibleBy = function (v) { + var n = parseValue(v); + var value = n.value; + if (value === 0) return false; + if (value === 1) return true; + if (value === 2) return this.isEven(); + return this.mod(n).equals(Integer[0]); + }; + SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(25)) return true; + // we don't know if it's prime: let the other functions figure it out + } + + BigInteger.prototype.isPrime = function () { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(), + nPrev = n.prev(); + var a = [2, 3, 5, 7, 11, 13, 17, 19], + b = nPrev, + d, t, i, x; + while (b.isEven()) b = b.divide(2); + for (i = 0; i < a.length; i++) { + x = bigInt(a[i]).modPow(b, n); + if (x.equals(Integer[1]) || x.equals(nPrev)) continue; + for (t = true, d = b; t && d.lesser(nPrev) ; d = d.multiply(2)) { + x = x.square().mod(n); + if (x.equals(nPrev)) t = false; + } + if (t) return false; + } + return true; + }; + SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + + BigInteger.prototype.isProbablePrime = function (iterations) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(); + var t = iterations === undefined ? 5 : iterations; + // use the Fermat primality test + for (var i = 0; i < t; i++) { + var a = bigInt.randBetween(2, n.minus(2)); + if (!a.modPow(n.prev(), n).isUnit()) return false; // definitely composite + } + return true; // large chance of being prime + }; + SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + + BigInteger.prototype.modInv = function (n) { + var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; + while (!newR.equals(bigInt.zero)) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + if (t.compare(0) === -1) { + t = t.add(n); + } + return t; + } + SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + + BigInteger.prototype.next = function () { + var value = this.value; + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + return new BigInteger(addSmall(value, 1), this.sign); + }; + SmallInteger.prototype.next = function () { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + + BigInteger.prototype.prev = function () { + var value = this.value; + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + return subtractSmall(value, 1, this.sign); + }; + SmallInteger.prototype.prev = function () { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + + var powersOfTwo = [1]; + while (powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; + + function shift_isSmall(n) { + return ((typeof n === "number" || typeof n === "string") && +Math.abs(n) <= BASE) || + (n instanceof BigInteger && n.value.length <= 1); + } + + BigInteger.prototype.shiftLeft = function (n) { + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + n = +n; + if (n < 0) return this.shiftRight(-n); + var result = this; + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + return result.multiply(powersOfTwo[n]); + }; + SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + + BigInteger.prototype.shiftRight = function (n) { + var remQuo; + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + n = +n; + if (n < 0) return this.shiftLeft(-n); + var result = this; + while (n >= powers2Length) { + if (result.isZero()) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, + yRem = ySign ? y.not() : y; + var xBits = [], yBits = []; + var xStop = false, yStop = false; + while (!xStop || !yStop) { + if (xRem.isZero()) { // virtual sign extension for simulating two's complement + xStop = true; + xBits.push(xSign ? 1 : 0); + } + else if (xSign) xBits.push(xRem.isEven() ? 1 : 0); // two's complement for negative numbers + else xBits.push(xRem.isEven() ? 0 : 1); + + if (yRem.isZero()) { + yStop = true; + yBits.push(ySign ? 1 : 0); + } + else if (ySign) yBits.push(yRem.isEven() ? 1 : 0); + else yBits.push(yRem.isEven() ? 0 : 1); + + xRem = xRem.over(2); + yRem = yRem.over(2); + } + var result = []; + for (var i = 0; i < xBits.length; i++) result.push(fn(xBits[i], yBits[i])); + var sum = bigInt(result.pop()).negate().times(bigInt(2).pow(result.length)); + while (result.length) { + sum = sum.add(bigInt(result.pop()).times(bigInt(2).pow(result.length))); + } + return sum; + } + + BigInteger.prototype.not = function () { + return this.negate().prev(); + }; + SmallInteger.prototype.not = BigInteger.prototype.not; + + BigInteger.prototype.and = function (n) { + return bitwise(this, n, function (a, b) { return a & b; }); + }; + SmallInteger.prototype.and = BigInteger.prototype.and; + + BigInteger.prototype.or = function (n) { + return bitwise(this, n, function (a, b) { return a | b; }); + }; + SmallInteger.prototype.or = BigInteger.prototype.or; + + BigInteger.prototype.xor = function (n) { + return bitwise(this, n, function (a, b) { return a ^ b; }); + }; + SmallInteger.prototype.xor = BigInteger.prototype.xor; + + var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + function roughLOB(n) { // get lowestOneBit (rough) + // SmallInteger: return Min(lowestOneBit(n), 1 << 30) + // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7] + var v = n.value, x = typeof v === "number" ? v | LOBMASK_I : v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + function min(a,b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], d, t; + while (a.isEven() && b.isEven()) { + d = Math.min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + if (a.greater(b)) { + t = b; b = a; a = t; + } + b = b.subtract(a); + } while (!b.isZero()); + return c.isUnit() ? a : a.multiply(c); + } + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + function randBetween(a, b) { + a = parseValue(a); + b = parseValue(b); + var low = min(a, b), high = max(a, b); + var range = high.subtract(low); + if (range.isSmall) return low.add(Math.round(Math.random() * range)); + var length = range.value.length - 1; + var result = [], restricted = true; + for (var i = length; i >= 0; i--) { + var top = restricted ? range.value[i] : BASE; + var digit = truncate(Math.random() * top); + result.unshift(digit); + if (digit < top) restricted = false; + } + result = arrayToSmall(result); + return low.add(typeof result === "number" ? new SmallInteger(result) : new BigInteger(result, false)); + } + var parseBase = function (text, base) { + var val = Integer[0], pow = Integer[1], + length = text.length; + if (2 <= base && base <= 36) { + if (length <= LOG_MAX_INT / Math.log(base)) { + return new SmallInteger(parseInt(text, base)); + } + } + base = parseValue(base); + var digits = []; + var i; + var isNegative = text[0] === "-"; + for (i = isNegative ? 1 : 0; i < text.length; i++) { + var c = text[i].toLowerCase(), + charCode = c.charCodeAt(0); + if (48 <= charCode && charCode <= 57) digits.push(parseValue(c)); + else if (97 <= charCode && charCode <= 122) digits.push(parseValue(c.charCodeAt(0) - 87)); + else if (c === "<") { + var start = i; + do { i++; } while (text[i] !== ">"); + digits.push(parseValue(text.slice(start + 1, i))); + } + else throw new Error(c + " is not a valid character"); + } + digits.reverse(); + for (i = 0; i < digits.length; i++) { + val = val.add(digits[i].times(pow)); + pow = pow.times(base); + } + return isNegative ? val.negate() : val; + }; + + function stringify(digit) { + var v = digit.value; + if (typeof v === "number") v = [v]; + if (v.length === 1 && v[0] <= 35) { + return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0]); + } + return "<" + v + ">"; + } + function toBase(n, base) { + base = bigInt(base); + if (base.isZero()) { + if (n.isZero()) return "0"; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + if (base.equals(-1)) { + if (n.isZero()) return "0"; + if (n.isNegative()) return new Array(1 - n).join("10"); + return "1" + new Array(+n).join("01"); + } + var minusSign = ""; + if (n.isNegative() && base.isPositive()) { + minusSign = "-"; + n = n.abs(); + } + if (base.equals(1)) { + if (n.isZero()) return "0"; + return minusSign + new Array(+n + 1).join(1); + } + var out = []; + var left = n, divmod; + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + out.push(stringify(digit)); + } + out.push(stringify(left)); + return minusSign + out.reverse().join(""); + } + + BigInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix !== 10) return toBase(this, radix); + var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit; + while (--l >= 0) { + digit = String(v[l]); + str += zeros.slice(digit.length) + digit; + } + var sign = this.sign ? "-" : ""; + return sign + str; + }; + SmallInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix != 10) return toBase(this, radix); + return String(this.value); + }; + + BigInteger.prototype.valueOf = function () { + return +this.toString(); + }; + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + + SmallInteger.prototype.valueOf = function () { + return this.value; + }; + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) + return new SmallInteger(x); + throw "Invalid integer: " + v; + } + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += (new Array(exp + 1)).join("0"); + v = text; + } + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + var r = [], max = v.length, l = LOG_BASE, min = max - l; + while (max > 0) { + r.push(+v.slice(min, max)); + min -= l; + if (min < 0) min = 0; + max -= l; + } + trim(r); + return new BigInteger(r, sign); + } + + function parseNumberValue(v) { + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + return parseStringValue(v.toString()); + } + + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + if (typeof v === "string") { + return parseStringValue(v); + } + return v; + } + // Pre-define numbers in range [-999,999] + for (var i = 0; i < 1000; i++) { + Integer[i] = new SmallInteger(i); + if (i > 0) Integer[-i] = new SmallInteger(-i); + } + // Backwards compatibility + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + Integer.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger; }; + Integer.randBetween = randBetween; + return Integer; +})(); + +// Node.js check +if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { + module.exports = bigInt; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.min.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.min.js new file mode 100644 index 0000000..222d2c0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/BigInteger.min.js @@ -0,0 +1 @@ +var bigInt=function(e){"use strict";function o(e,t){return typeof e=="undefined"?o[0]:typeof t!="undefined"?+t===10?Y(e):$(e,t):Y(e)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function a(e){this.value=e,this.sign=e<0,this.isSmall=!0}function f(e){return-r0?Math.floor(e):Math.ceil(e)}function v(e,n){var r=e.length,i=n.length,s=new Array(r),o=0,u=t,a,f;for(f=0;f=u?1:0,s[f]=a-o*u;while(f0&&s.push(o),s}function m(e,t){return e.length>=t.length?v(e,t):v(t,e)}function g(e,n){var r=e.length,i=new Array(r),s=t,o,u;for(u=0;u0)i[u++]=n%s,n=Math.floor(n/s);return i}function y(e,n){var r=e.length,i=n.length,s=new Array(r),o=0,u=t,a,f;for(a=0;a=0?r=y(e,t):(r=y(t,e),n=!n),r=c(r),typeof r=="number"?(n&&(r=-r),new a(r)):new u(r,n)}function w(e,n,r){var i=e.length,s=new Array(i),o=-n,f=t,l,h;for(l=0;l0)i[a++]=o%s,o=Math.floor(o/s);return i}function x(e,t){var n=[];while(t-->0)n.push(0);return n.concat(e)}function T(e,t){var n=Math.max(e.length,t.length);if(n<=30)return E(e,t);n=Math.ceil(n/2);var r=e.slice(n),i=e.slice(0,n),s=t.slice(n),o=t.slice(0,n),u=T(i,o),a=T(r,s),f=T(m(i,r),m(o,s)),l=m(m(u,x(y(y(f,u),a),n)),x(a,2*n));return h(l),l}function N(e,t){return-0.012*e-.012*t+15e-6*e*t>0}function C(e,n,r){return e=0;d--){h=s-1,f[d+i]!==u&&(h=Math.floor((f[d+i]*s+f[d+i-1])/u)),v=0,m=0,y=l.length;for(g=0;gi&&(l=(l+1)*u),a=Math.ceil(l/h);do{p=S(n,a);if(_(p,o)<=0)break;a--}while(a);s.push(a),o=y(o,p)}return s.reverse(),[c(s),c(o)]}function O(e,n){var r=e.length,i=p(r),s=t,o,u,a,f;a=0;for(o=r-1;o>=0;--o)f=a*s+e[o],u=d(f/n),a=f-u*n,i[o]=u|0;return[i,a|0]}function M(e,n){var r,i=Y(n),s=e.value,f=i.value,h;if(f===0)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new a(d(s/f)),new a(s%f)]:[o[0],e];if(i.isSmall){if(f===1)return[e,o[0]];if(f==-1)return[e.negate(),o[0]];var p=Math.abs(f);if(pt.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}function D(e){var t=e.abs();if(t.isUnit())return!1;if(t.equals(2)||t.equals(3)||t.equals(5))return!0;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return!1;if(t.lesser(25))return!0}function j(e){return(typeof e=="number"||typeof e=="string")&&+Math.abs(e)<=t||e instanceof u&&e.value.length<=1}function F(e,t,n){t=Y(t);var r=e.isNegative(),i=t.isNegative(),s=r?e.not():e,o=i?t.not():t,u=[],a=[],f=!1,l=!1;while(!f||!l)s.isZero()?(f=!0,u.push(r?1:0)):r?u.push(s.isEven()?1:0):u.push(s.isEven()?0:1),o.isZero()?(l=!0,a.push(i?1:0)):i?a.push(o.isEven()?1:0):a.push(o.isEven()?0:1),s=s.over(2),o=o.over(2);var c=[];for(var h=0;h=0;h--){var p=l?s.value[h]:t,v=d(Math.random()*p);f.unshift(v),v"}function K(e,t){t=bigInt(t);if(t.isZero()){if(e.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1))return e.isZero()?"0":e.isNegative()?(new Array(1-e)).join("10"):"1"+(new Array(+e)).join("01");var n="";e.isNegative()&&t.isPositive()&&(n="-",e=e.abs());if(t.equals(1))return e.isZero()?"0":n+(new Array(+e+1)).join(1);var r=[],i=e,s;while(i.isNegative()||i.compareAbs(t)>=0){s=i.divmod(t),i=s.quotient;var o=s.remainder;o.isNegative()&&(o=t.minus(o).abs(),i=i.next()),r.push(J(o))}return r.push(J(i)),n+r.reverse().join("")}function Q(e){if(f(+e)){var t=+e;if(t===d(t))return new a(t);throw"Invalid integer: "+e}var r=e[0]==="-";r&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(i.length===2){var s=i[1];s[0]==="+"&&(s=s.slice(1)),s=+s;if(s!==d(s)||!f(s))throw new Error("Invalid integer: "+s+" is not a valid exponent.");var o=i[0],l=o.indexOf(".");l>=0&&(s-=o.length-l-1,o=o.slice(0,l)+o.slice(l+1));if(s<0)throw new Error("Cannot include negative exponent part for integers");o+=(new Array(s+1)).join("0"),e=o}var c=/^([0-9][0-9]*)$/.test(e);if(!c)throw new Error("Invalid integer: "+e);var p=[],v=e.length,m=n,g=v-m;while(v>0)p.push(+e.slice(g,v)),g-=m,g<0&&(g=0),v-=m;return h(p),new u(p,r)}function G(e){if(f(e)){if(e!==d(e))throw new Error(e+" is not an integer.");return new a(e)}return Q(e.toString())}function Y(e){return typeof e=="number"?G(e):typeof e=="string"?Q(e):e}var t=1e7,n=7,r=9007199254740992,i=l(r),s=Math.log(r);u.prototype=Object.create(o.prototype),a.prototype=Object.create(o.prototype),u.prototype.add=function(e){var t,n=Y(e);if(this.sign!==n.sign)return this.subtract(n.negate());var r=this.value,i=n.value;return n.isSmall?new u(g(r,Math.abs(i)),this.sign):new u(m(r,i),this.sign)},u.prototype.plus=u.prototype.add,a.prototype.add=function(e){var t=Y(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(f(n+r))return new a(n+r);r=l(Math.abs(r))}return new u(g(r,Math.abs(n)),n<0)},a.prototype.plus=a.prototype.add,u.prototype.subtract=function(e){var t=Y(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?w(n,Math.abs(r),this.sign):b(n,r,this.sign)},u.prototype.minus=u.prototype.subtract,a.prototype.subtract=function(e){var t=Y(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new a(n-r):w(r,Math.abs(n),n>=0)},a.prototype.minus=a.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},a.prototype.negate=function(){var e=this.sign,t=new a(-this.value);return t.sign=!e,t},u.prototype.abs=function(){return new u(this.value,!1)},a.prototype.abs=function(){return new a(Math.abs(this.value))},u.prototype.multiply=function(e){var n,r=Y(e),i=this.value,s=r.value,a=this.sign!==r.sign,f;if(r.isSmall){if(s===0)return o[0];if(s===1)return this;if(s===-1)return this.negate();f=Math.abs(s);if(fr?1:-1):-1},u.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),n=this.value,r=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:_(n,r)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,a.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),n=this.value,r=t.value;return t.isSmall?n==r?0:n>r?1:-1:n<0!==t.sign?n<0?-1:1:n<0?1:-1},a.prototype.compareTo=a.prototype.compare,u.prototype.equals=function(e){return this.compare(e)===0},a.prototype.eq=a.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return this.compare(e)!==0},a.prototype.neq=a.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},a.prototype.gt=a.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return this.compare(e)<0},a.prototype.lt=a.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},a.prototype.geq=a.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},a.prototype.leq=a.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(this.value[0]&1)===0},a.prototype.isEven=function(){return(this.value&1)===0},u.prototype.isOdd=function(){return(this.value[0]&1)===1},a.prototype.isOdd=function(){return(this.value&1)===1},u.prototype.isPositive=function(){return!this.sign},a.prototype.isPositive=function(){return this.value>0},u.prototype.isNegative=function(){return this.sign},a.prototype.isNegative=function(){return this.value<0},u.prototype.isUnit=function(){return!1},a.prototype.isUnit=function(){return Math.abs(this.value)===1},u.prototype.isZero=function(){return!1},a.prototype.isZero=function(){return this.value===0},u.prototype.isDivisibleBy=function(e){var t=Y(e),n=t.value;return n===0?!1:n===1?!0:n===2?this.isEven():this.mod(t).equals(o[0])},a.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(){var t=D(this);if(t!==e)return t;var n=this.abs(),r=n.prev(),i=[2,3,5,7,11,13,17,19],s=r,u,a,f,l;while(s.isEven())s=s.divide(2);for(f=0;f-r?new a(e-1):new u(i,!0)};var P=[1];while(P[P.length-1]<=t)P.push(2*P[P.length-1]);var H=P.length,B=P[H-1];u.prototype.shiftLeft=function(e){if(!j(e))throw new Error(String(e)+" is too large for shifting.");e=+e;if(e<0)return this.shiftRight(-e);var t=this;while(e>=H)t=t.multiply(B),e-=H-1;return t.multiply(P[e])},a.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t;if(!j(e))throw new Error(String(e)+" is too large for shifting.");e=+e;if(e<0)return this.shiftLeft(-e);var n=this;while(e>=H){if(n.isZero())return n;t=M(n,B),n=t[1].isNegative()?t[0].prev():t[0],e-=H-1}return t=M(n,P[e]),t[1].isNegative()?t[0].prev():t[0]},a.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},a.prototype.not=u.prototype.not,u.prototype.and=function(e){return F(this,e,function(e,t){return e&t})},a.prototype.and=u.prototype.and,u.prototype.or=function(e){return F(this,e,function(e,t){return e|t})},a.prototype.or=u.prototype.or,u.prototype.xor=function(e){return F(this,e,function(e,t){return e^t})},a.prototype.xor=u.prototype.xor;var I=1<<30,q=(t&-t)*(t&-t)|I,$=function(e,t){var n=o[0],r=o[1],i=e.length;if(2<=t&&t<=36&&i<=s/Math.log(t))return new a(parseInt(e,t));t=Y(t);var u=[],f,l=e[0]==="-";for(f=l?1:0;f");u.push(Y(e.slice(p+1,f)))}}u.reverse();for(f=0;f=0)o=String(n[r]),i+=s.slice(o.length)+o;var u=this.sign?"-":"";return u+i},a.prototype.toString=function(t){return t===e&&(t=10),t!=10?K(this,t):String(this.value)},u.prototype.valueOf=function(){return+this.toString()},u.prototype.toJSNumber=u.prototype.valueOf,a.prototype.valueOf=function(){return this.value},a.prototype.toJSNumber=a.prototype.valueOf;for(var Z=0;Z<1e3;Z++)o[Z]=new a(Z),Z>0&&(o[-Z]=new a(-Z));return o.one=o[1],o.zero=o[0],o.minusOne=o[-1],o.max=U,o.min=z,o.gcd=W,o.lcm=X,o.isInstance=function(e){return e instanceof u||e instanceof a},o.randBetween=V,o}();typeof module!="undefined"&&module.hasOwnProperty("exports")&&(module.exports=bigInt); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/README.md new file mode 100644 index 0000000..51eb657 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/README.md @@ -0,0 +1,513 @@ +# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url] + +[travis-url]: https://travis-ci.org/peterolson/BigInteger.js +[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master +[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master +[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github +[downloads-url]: https://www.npmjs.com/package/big-integer +[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg + +**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations. + +## Installation + +If you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it: + + + +If you are using node, you can install BigInteger with [npm](https://npmjs.org/). + + npm install big-integer + +Then you can include it in your code: + + var bigInt = require("big-integer"); + + +## Usage +### `bigInt(number, [base])` + +You can create a bigInt by calling the `bigInt` function. You can pass in + + - a string, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - a Javascript number, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - another bigInt. + - nothing, and it will return `bigInt.zero`. + + If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters "a-z" and "A-Z" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`). + +Examples: + + var zero = bigInt(); + var ninetyThree = bigInt(93); + var largeNumber = bigInt("75643564363473453456342378564387956906736546456235345"); + var googol = bigInt("1e100"); + var bigNumber = bigInt(largeNumber); + + var maximumByte = bigInt("FF", 16); + var fiftyFiveGoogol = bigInt("<55>0", googol); + +Note that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings. + +### Method Chaining + +Note that bigInt operations return bigInts, which allows you to chain methods, for example: + + var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses) + +### Constants + +There are three named constants already stored that you do not have to construct with the `bigInt` function yourself: + + - `bigInt.one`, equivalent to `bigInt(1)` + - `bigInt.zero`, equivalent to `bigInt(0)` + - `bigInt.minusOne`, equivalent to `bigInt(-1)` + +The numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example: + + - `bigInt[-999]`, equivalent to `bigInt(-999)` + - `bigInt[256]`, equivalent to `bigInt(256)` + +### Methods + +#### `abs()` + +Returns the absolute value of a bigInt. + + - `bigInt(-45).abs()` => `45` + - `bigInt(45).abs()` => `45` + +#### `add(number)` + +Performs addition. + + - `bigInt(5).add(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `and(number)` + +Performs the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(6).and(3)` => `2` + - `bigInt(6).and(-3)` => `4` + +#### `compare(number)` + +Performs a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`. + + - `bigInt(5).compare(5)` => `0` + - `bigInt(5).compare(4)` => `1` + - `bigInt(4).compare(5)` => `-1` + +#### `compareAbs(number)` + +Performs a comparison between the absolute value of two numbers. + + - `bigInt(5).compareAbs(-5)` => `0` + - `bigInt(5).compareAbs(4)` => `1` + - `bigInt(4).compareAbs(-5)` => `-1` + +#### `compareTo(number)` + +Alias for the `compare` method. + +#### `divide(number)` + +Performs integer division, disregarding the remainder. + + - `bigInt(59).divide(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `divmod(number)` + +Performs division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }` + - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `eq(number)` + +Alias for the `equals` method. + +#### `equals(number)` + +Checks if two numbers are equal. + + - `bigInt(5).equals(5)` => `true` + - `bigInt(4).equals(7)` => `false` + +#### `geq(number)` + +Alias for the `greaterOrEquals` method. + + +#### `greater(number)` + +Checks if the first number is greater than the second. + + - `bigInt(5).greater(6)` => `false` + - `bigInt(5).greater(5)` => `false` + - `bigInt(5).greater(4)` => `true` + +#### `greaterOrEquals(number)` + +Checks if the first number is greater than or equal to the second. + + - `bigInt(5).greaterOrEquals(6)` => `false` + - `bigInt(5).greaterOrEquals(5)` => `true` + - `bigInt(5).greaterOrEquals(4)` => `true` + +#### `gt(number)` + +Alias for the `greater` method. + +#### `isDivisibleBy(number)` + +Returns `true` if the first number is divisible by the second number, `false` otherwise. + + - `bigInt(999).isDivisibleBy(333)` => `true` + - `bigInt(99).isDivisibleBy(5)` => `false` + +#### `isEven()` + +Returns `true` if the number is even, `false` otherwise. + + - `bigInt(6).isEven()` => `true` + - `bigInt(3).isEven()` => `false` + +#### `isNegative()` + +Returns `true` if the number is negative, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(-23).isNegative()` => `true` + - `bigInt(50).isNegative()` => `false` + +#### `isOdd()` + +Returns `true` if the number is odd, `false` otherwise. + + - `bigInt(13).isOdd()` => `true` + - `bigInt(40).isOdd()` => `false` + +#### `isPositive()` + +Return `true` if the number is positive, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(54).isPositive()` => `true` + - `bigInt(-1).isPositive()` => `false` + +#### `isPrime()` + +Returns `true` if the number is prime, `false` otherwise. + + - `bigInt(5).isPrime()` => `true` + - `bigInt(6).isPrime()` => `false` + +#### `isProbablePrime([iterations])` + +Returns `true` if the number is very likely to be positive, `false` otherwise. +Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive. +This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test). + + - `bigInt(5).isProbablePrime()` => `true` + - `bigInt(49).isProbablePrime()` => `false` + - `bigInt(1729).isProbablePrime(50)` => `false` + +Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results. + +For example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`. + +#### `isUnit()` + +Returns `true` if the number is `1` or `-1`, `false` otherwise. + + - `bigInt.one.isUnit()` => `true` + - `bigInt.minusOne.isUnit()` => `true` + - `bigInt(5).isUnit()` => `false` + +#### `isZero()` + +Return `true` if the number is `0` or `-0`, `false` otherwise. + + - `bigInt.zero.isZero()` => `true` + - `bigInt("-0").isZero()` => `true` + - `bigInt(50).isZero()` => `false` + +#### `leq(number)` + +Alias for the `lesserOrEquals` method. + +#### `lesser(number)` + +Checks if the first number is lesser than the second. + + - `bigInt(5).lesser(6)` => `true` + - `bigInt(5).lesser(5)` => `false` + - `bigInt(5).lesser(4)` => `false` + +#### `lesserOrEquals(number)` + +Checks if the first number is less than or equal to the second. + + - `bigInt(5).lesserOrEquals(6)` => `true` + - `bigInt(5).lesserOrEquals(5)` => `true` + - `bigInt(5).lesserOrEquals(4)` => `false` + +#### `lt(number)` + +Alias for the `lesser` method. + +#### `minus(number)` + +Alias for the `subtract` method. + + - `bigInt(3).minus(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `mod(number)` + +Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).mod(5)` => `4` + - `bigInt(-5).mod(2)` => `-1` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `modInv(mod)` + +Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`. + + - `bigInt(3).modInv(11)` => `4` + - `bigInt(42).modInv(2017)` => `1969` + +#### `modPow(exp, mod)` + +Takes the number to the power `exp` modulo `mod`. + + - `bigInt(10).modPow(3, 30)` => `10` + +#### `multiply(number)` + +Performs multiplication. + + - `bigInt(111).multiply(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `neq(number)` + +Alias for the `notEquals` method. + +#### `next()` + +Adds one to the number. + + - `bigInt(6).next()` => `7` + +#### `not()` + +Performs the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(10).not()` => `-11` + - `bigInt(0).not()` => `-1` + +#### `notEquals(number)` + +Checks if two numbers are not equal. + + - `bigInt(5).notEquals(5)` => `false` + - `bigInt(4).notEquals(7)` => `true` + +#### `or(number)` + +Performs the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(13).or(10)` => `15` + - `bigInt(13).or(-8)` => `-3` + +#### `over(number)` + +Alias for the `divide` method. + + - `bigInt(59).over(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `plus(number)` + +Alias for the `add` method. + + - `bigInt(5).plus(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `pow(number)` + +Performs exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`. + + - `bigInt(16).pow(16)` => `18446744073709551616` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation) + +#### `prev(number)` + +Subtracts one from the number. + + - `bigInt(6).prev()` => `5` + +#### `remainder(number)` + +Alias for the `mod` method. + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `shiftLeft(n)` + +Shifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftLeft(2)` => `32` + - `bigInt(8).shiftLeft(-2)` => `2` + +#### `shiftRight(n)` + +Shifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftRight(2)` => `2` + - `bigInt(8).shiftRight(-2)` => `32` + +#### `square()` + +Squares the number + + - `bigInt(3).square()` => `9` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring) + +#### `subtract(number)` + +Performs subtraction. + + - `bigInt(3).subtract(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `times(number)` + +Alias for the `multiply` method. + + - `bigInt(111).times(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `toJSNumber()` + +Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt("18446744073709551616").toJSNumber()` => `18446744073709552000` + +#### `xor(number)` + +Performs the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(12).xor(5)` => `9` + - `bigInt(12).xor(-5)` => `-9` + +### Static Methods + +#### `gcd(a, b)` + +Finds the greatest common denominator of `a` and `b`. + + - `bigInt.gcd(42,56)` => `14` + +#### `isInstance(x)` + +Returns `true` if `x` is a BigInteger, `false` otherwise. + + - `bigInt.isInstance(bigInt(14))` => `true` + - `bigInt.isInstance(14)` => `false` + +#### `lcm(a,b)` + +Finds the least common multiple of `a` and `b`. + + - `bigInt.lcm(21, 6)` => `42` + +#### `max(a,b)` + +Returns the largest of `a` and `b`. + + - `bigInt.max(77, 432)` => `432` + +#### `min(a,b)` + +Returns the smallest of `a` and `b`. + + - `bigInt.min(77, 432)` => `77` + +#### `randBetween(min, max)` + +Returns a random number between `min` and `max`. + + - `bigInt.randBetween("-1e100", "1e100")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745` + + +### Override Methods + +#### `toString(radix = 10)` + +Converts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`. + + - `bigInt("1e9").toString()` => `"1000000000"` + - `bigInt("1e9").toString(16)` => `"3b9aca00"` + +**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string. + + - `bigInt("999999999999999999").toString()` => `"999999999999999999"` + - `String(bigInt("999999999999999999"))` => `"999999999999999999"` + - `bigInt("999999999999999999") + ""` => `1000000000000000000` + +Bases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets. + + - `bigInt(567890).toString(100)` => `"<56><78><90>"` + +Negative bases are also supported. + + - `bigInt(12345).toString(-10)` => `"28465"` + +Base 1 and base -1 are also supported. + + - `bigInt(-15).toString(1)` => `"-111111111111111"` + - `bigInt(-15).toString(-1)` => `"101010101010101010101010101010"` + +Base 0 is only allowed for the number zero. + + - `bigInt(0).toString(0)` => `0` + - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString) + +#### `valueOf()` + +Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion: + + - `bigInt("100") + bigInt("200") === 300; //true` + +## Contributors + +To contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting. + +The unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html). + +There are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/). + +## License + +This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/). \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/bower.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/bower.json new file mode 100644 index 0000000..c7c7291 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/bower.json @@ -0,0 +1,30 @@ +{ + "name": "big-integer", + "description": "An arbitrary length integer library for Javascript", + "main": "./BigInteger.js", + "authors": [ + "Peter Olson" + ], + "license": "Unlicense", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "homepage": "https://github.com/peterolson/BigInteger.js", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "coverage", + "spec", + "tests" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/package.json new file mode 100644 index 0000000..b604dbe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/big-integer/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser" + ] + ], + "_from": "big-integer@>=1.6.7 <2.0.0", + "_id": "big-integer@1.6.16", + "_inCache": true, + "_installable": true, + "_location": "/big-integer", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/big-integer-1.6.16.tgz_1473665148825_0.5824211346916854" + }, + "_npmUser": { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/bplist-parser" + ], + "_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.16.tgz", + "_shasum": "0ca30b58013db46b10084a09242ca1d8954724cc", + "_shrinkwrap": null, + "_spec": "big-integer@^1.6.7", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser", + "author": { + "name": "Peter Olson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "bin": {}, + "bugs": { + "url": "https://github.com/peterolson/BigInteger.js/issues" + }, + "contributors": [], + "dependencies": {}, + "description": "An arbitrary length integer library for Javascript", + "devDependencies": { + "coveralls": "^2.11.4", + "jasmine": "2.1.x", + "jasmine-core": "^2.3.4", + "karma": "^0.13.3", + "karma-coverage": "^0.4.2", + "karma-jasmine": "^0.3.6", + "karma-phantomjs-launcher": "~0.1" + }, + "directories": {}, + "dist": { + "shasum": "0ca30b58013db46b10084a09242ca1d8954724cc", + "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.16.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "09b50ab4e701a2ec4d403fa3ecf12ae327227190", + "homepage": "https://github.com/peterolson/BigInteger.js#readme", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "license": "Unlicense", + "main": "./BigInteger", + "maintainers": [ + { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + } + ], + "name": "big-integer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/peterolson/BigInteger.js.git" + }, + "scripts": { + "test": "karma start my.conf.js" + }, + "version": "1.6.16" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/.npmignore new file mode 100644 index 0000000..a9b46ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/README.md new file mode 100644 index 0000000..37e5e1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/bplistParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/bplistParser.js new file mode 100644 index 0000000..f8335bc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,357 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java + +var fs = require('fs'); +var bigInt = require("big-integer"); +var debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +var EPOCH = 978307200000; + +// UID object definition +var UID = exports.UID = function(id) { + this.UID = id; +} + +var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { + function tryParseBuffer(buffer) { + var err = null; + var result; + try { + result = parseBuffer(buffer); + } catch (ex) { + err = ex; + } + callback(err, result); + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } else { + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { return callback(err); } + tryParseBuffer(data); + }); + } +}; + +var parseBuffer = exports.parseBuffer = function (buffer) { + var result = {}; + + // check header + var header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + var trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + var offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + var objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + var numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + var topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + var offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + var offsetTable = []; + + for (var i = 0; i < numObjects; i++) { + var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + var offset = offsetTable[tableOffset]; + var type = buffer[offset]; + var objType = (type & 0xF0) >> 4; //First 4 bits + var objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function bufferToHexString(buffer) { + var str = ''; + var i; + for (i = 0; i < buffer.length; i++) { + if (buffer[i] != 0x00) { + break; + } + } + for (; i < buffer.length; i++) { + var part = '00' + buffer[i].toString(16); + str += part.substr(part.length - 2); + } + return str; + } + + function parseInteger() { + var length = Math.pow(2, objInfo); + if (length > 4) { + var data = buffer.slice(offset + 1, offset + 1 + length); + var str = bufferToHexString(data); + return bigInt(str, 16); + } if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseUID() { + var length = objInfo + 1; + if (length < exports.maxObjectSize) { + return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length))); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseReal() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + var realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + else if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + var dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + var dataoffset = 1; + var length = objInfo; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + var enc = "utf8"; + var length = objInfo; + var stroffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + var stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + var plistString = new Buffer(buffer.slice(offset + stroffset, offset + stroffset + length)); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseArray() { + var length = objInfo; + var arrayoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + var array = []; + for (var i = 0; i < length; i++) { + var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + var length = objInfo; + var dictoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + var dict = {}; + for (var i = 0; i < length; i++) { + var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + var key = parseObject(keyRef); + var val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + var l = 0; + for (var i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + var data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + var len = buffer.length; + for (var i = 0; i < len; i += 2) { + var a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/package.json new file mode 100644 index 0000000..8865539 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "bplist-parser@^0.1.0", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "bplist-parser@>=0.1.0 <0.2.0", + "_id": "bplist-parser@0.1.1", + "_inCache": true, + "_installable": true, + "_location": "/bplist-parser", + "_nodeVersion": "5.1.0", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "3.4.0", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-parser@^0.1.0", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "_shrinkwrap": null, + "_spec": "bplist-parser@^0.1.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Joe Ferner", + "email": "joe.ferner@nearinfinity.com" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-parser/issues" + }, + "dependencies": { + "big-integer": "^1.6.7" + }, + "description": "Binary plist parser.", + "devDependencies": { + "nodeunit": "~0.9.1" + }, + "directories": {}, + "dist": { + "shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz" + }, + "gitHead": "c4f22650de2cc95edd21a6e609ff0654a2b951bd", + "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme", + "keywords": [ + "bplist", + "plist", + "parser" + ], + "license": "MIT", + "main": "bplistParser.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.1.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/airplay.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/airplay.bplist new file mode 100644 index 0000000..931adea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/airplay.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/iTunes-small.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/iTunes-small.bplist new file mode 100644 index 0000000..b7edb14 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/iTunes-small.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.bplist new file mode 100644 index 0000000..6da9c04 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.xml new file mode 100644 index 0000000..cc6cb03 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/int64.xml @@ -0,0 +1,10 @@ + + + + + zero + 0 + int64item + 12345678901234567890 + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/parseTest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/parseTest.js new file mode 100644 index 0000000..67e7bfa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/parseTest.js @@ -0,0 +1,159 @@ +'use strict'; + +// tests are adapted from https://github.com/TooTallNate/node-plist + +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplist = require('../'); + +module.exports = { + 'iTunes Small': function (test) { + var file = path.join(__dirname, "iTunes-small.bplist"); + var startTime1 = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); + var dict = dicts[0]; + test.equal(dict['Application Version'], "9.0.3"); + test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); + test.done(); + }); + }, + + 'sample1': function (test) { + var file = path.join(__dirname, "sample1.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); + test.done(); + }); + }, + + 'sample2': function (test) { + var file = path.join(__dirname, "sample2.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); + test.done(); + }); + }, + + 'airplay': function (test) { + var file = path.join(__dirname, "airplay.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['duration'], 5555.0495000000001); + test.equal(dict['position'], 4.6269989039999997); + test.done(); + }); + }, + + 'utf16': function (test) { + var file = path.join(__dirname, "utf16.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], 'sellStuff'); + test.equal(dict['CFBundleShortVersionString'], '2.6.1'); + test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); + test.done(); + }); + }, + + 'utf16chinese': function (test) { + var file = path.join(__dirname, "utf16_chinese.plist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], '天翼阅读'); + test.equal(dict['CFBundleDisplayName'], '天翼阅读'); + test.done(); + }); + }, + + + + 'uid': function (test) { + var file = path.join(__dirname, "uid.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.deepEqual(dict['$objects'][1]['NS.keys'], [{UID:2}, {UID:3}, {UID:4}]); + test.deepEqual(dict['$objects'][1]['NS.objects'], [{UID: 5}, {UID:6}, {UID:7}]); + test.deepEqual(dict['$top']['root'], {UID:1}); + test.done(); + }); + }, + + 'int64': function (test) { + var file = path.join(__dirname, "int64.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['zero'], '0'); + test.equal(dict['int64item'], '12345678901234567890'); + test.done(); + }); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample1.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample1.bplist new file mode 100644 index 0000000..5b808ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample1.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample2.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample2.bplist new file mode 100644 index 0000000..fc42979 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/sample2.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/uid.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/uid.bplist new file mode 100644 index 0000000..59f341e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/uid.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16.bplist new file mode 100644 index 0000000..ba4bcfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16_chinese.plist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16_chinese.plist new file mode 100755 index 0000000..ba1e2d7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/bplist-parser/test/utf16_chinese.plist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..1793929 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/README.md @@ -0,0 +1,122 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..955f27c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..33a4d08 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/brace-expansion/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch" + ] + ], + "_from": "brace-expansion@>=1.0.0 <2.0.0", + "_id": "brace-expansion@1.1.6", + "_inCache": true, + "_installable": true, + "_location": "/brace-expansion", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "2.15.8", + "_phantomChildren": {}, + "_requested": { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "_shrinkwrap": null, + "_spec": "brace-expansion@^1.0.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, + "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "name": "brace-expansion", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/.travis.yml new file mode 100644 index 0000000..f1d0f13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/README.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/README.markdown new file mode 100644 index 0000000..408f70a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/example/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/example/map.js new file mode 100644 index 0000000..3365621 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/package.json new file mode 100644 index 0000000..fcb5849 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + { + "raw": "concat-map@0.0.1", + "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion" + ] + ], + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inCache": true, + "_installable": true, + "_location": "/concat-map", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "raw": "concat-map@0.0.1", + "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_shrinkwrap": null, + "_spec": "concat-map@0.0.1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "dependencies": {}, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "homepage": "https://github.com/substack/node-concat-map", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "concat-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "0.0.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/test/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/test/map.js new file mode 100644 index 0000000..fdbd702 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jscs.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jscs.json new file mode 100644 index 0000000..5cc7e26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jscs.json @@ -0,0 +1,24 @@ +{ + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true, + "validateLineBreaks": "LF", + "validateIndentation": 4, + "requireLineFeedAtFileEnd": true, + + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforePostfixUnaryOperators": true, + "requireSpaceAfterLineComment": true, + "requireCapitalizedConstructors": true, + + "disallowSpacesInNamedFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jshintignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jshintignore new file mode 100644 index 0000000..d606f61 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.jshintignore @@ -0,0 +1 @@ +spec/fixtures/* diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.npmignore new file mode 100644 index 0000000..5d14118 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.npmignore @@ -0,0 +1,2 @@ +spec +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.ratignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.ratignore new file mode 100644 index 0000000..26f7205 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/.ratignore @@ -0,0 +1,2 @@ +fixtures +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/README.md new file mode 100644 index 0000000..c5dcfd5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/README.md @@ -0,0 +1,153 @@ + + +# cordova-common +Expoeses shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms. +## Exposed APIs + +### `events` + +Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli + +Usage: +```js +var events = require('cordova-common').events; +events.emit('warn', 'Some warning message') +``` + +There are the following events supported by cordova-cli: `verbose`, `log`, `info`, `warn`, `error`. + +### `CordovaError` + +An error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (`instanceof` check succeeds). + +Usage: + +```js +var CordovaError = require('cordova-common').CordovaError; +throw new CordovaError('Some error message', SOME_ERR_CODE); +``` + +See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes. + +### `ConfigParser` + +Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md). + +Usage: +```js +var ConfigParser = require('cordova-common').ConfigParser; +var appConfig = new ConfigParser('path/to/cordova-app/config.xml'); +console.log(appconfig.name() + ':' + appConfig.version()); +``` + +### `PluginInfoProvider` and `PluginInfo` + +`PluginInfo` is a wrapper for cordova plugins' `plugin.xml` files. This class may be instantiated directly or via `PluginInfoProvider`. The difference is that `PluginInfoProvider` caches `PluginInfo` instances based on plugin source directory. + +Usage: +```js +var PluginInfo: require('cordova-common').PluginInfo; +var PluginInfoProvider: require('cordova-common').PluginInfoProvider; + +// The following instances are equal +var plugin1 = new PluginInfo('path/to/plugin_directory'); +var plugin2 = new PluginInfoProvider().get('path/to/plugin_directory'); + +console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version) +``` + +### `ActionStack` + +Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines. + +Usage: +```js +var ActionStack = require('cordova-common').ActionStack; +var stack = new ActionStack() + +var action1 = stack.createAction(task1, [], task1_reverter, []); +var action2 = stack.createAction(task2, [], task2_reverter, []); + +stack.push(action1); +stack.push(action2); + +stack.process() +.then(function() { + // all actions succeded +}) +.catch(function(error){ + // One of actions failed with error +}) +``` + +### `superspawn` + +Module for spawning child processes with some advanced logic. + +Usage: +```js +var superspawn = require('cordova-common').superspawn; +superspawn.spawn('adb', ['devices']) +.progress(function(data){ + if (data.stderr) + console.error('"adb devices" raised an error: ' + data.stderr); +}) +.then(function(devices){ + // Do something... +}) +``` + +### `xmlHelpers` + +A set of utility methods for dealing with xml files. + +Usage: +```js +var xml = require('cordova-common').xmlHelpers; + +var xmlDoc1 = xml.parseElementtreeSync('some/xml/file'); +var xmlDoc2 = xml.parseElementtreeSync('another/xml/file'); + +xml.mergeXml(doc1, doc2); // doc2 now contains all the nodes from doc1 +``` + +### Other APIs + +The APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines. + +``` +PlatformJson +ConfigChanges +ConfigKeeper +ConfigFile +mungeUtil +``` + +## Setup +* Clone this repository onto your local machine + `git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git` +* In terminal, navigate to the inner cordova-common directory + `cd cordova-lib/cordova-common` +* Install dependencies and npm-link + `npm install && npm link` +* Navigate to cordova-lib directory and link cordova-common + `cd ../cordova-lib && npm link cordova-common && npm install` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/RELEASENOTES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/RELEASENOTES.md new file mode 100644 index 0000000..02dbcee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/RELEASENOTES.md @@ -0,0 +1,87 @@ + +# Cordova-common Release Notes + +### 1.5.1 (Oct 12, 2016) +* [CB-12002](https://issues.apache.org/jira/browse/CB-12002) Add `getAllowIntents()` to `ConfigParser` +* [CB-11998](https://issues.apache.org/jira/browse/CB-11998) `cordova platform add` error with `cordova-common@1.5.0` + +### 1.5.0 (Oct 06, 2016) +* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) Add test case for different `edit-config` targets +* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add `edit-config` to `config.xml` +* [CB-11936](https://issues.apache.org/jira/browse/CB-11936) Support four new **App Transport Security (ATS)** keys +* update `config.xml` location if it is a **Android Studio** project. +* use `array` methods and `object.keys` for iterating. avoiding `for-in` loops +* [CB-11517](https://issues.apache.org/jira/browse/CB-11517) Allow `.folder` matches +* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) check `edit-config` target exists + +### 1.4.1 (Aug 09, 2016) +* Add general purpose `ConfigParser.getAttribute` API +* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common` +* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly +* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it +* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing + +### 1.4.0 (Jul 12, 2016) +* [CB-11023](https://issues.apache.org/jira/browse/CB-11023) Add edit-config functionality + +### 1.3.0 (May 12, 2016) +* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging +* [CB-11194](https://issues.apache.org/jira/browse/CB-11194) Improve cordova load time +* [CB-1117](https://issues.apache.org/jira/browse/CB-1117) Add `FileUpdater` module to `cordova-common`. +* [CB-11131](https://issues.apache.org/jira/browse/CB-11131) Fix `TypeError: message.toUpperCase` is not a function in `CordovaLogger` + +### 1.2.0 (Apr 18, 2016) +* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Save modulesMetadata to both www and platform_www when necessary +* [CB-10833](https://issues.apache.org/jira/browse/CB-10833) Deduplicate common logic for plugin installation/uninstallation +* [CB-10822](https://issues.apache.org/jira/browse/CB-10822) Manage plugins/modules metadata using PlatformJson +* [CB-10940](https://issues.apache.org/jira/browse/CB-10940) Can't add Android platform from path +* [CB-10965](https://issues.apache.org/jira/browse/CB-10965) xml helper allows multiple instances to be merge in config.xml + +### 1.1.1 (Mar 18, 2016) +* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Update test to reflect merging of [CB-9264](https://issues.apache.org/jira/browse/CB-9264) fix +* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Platform-specific configuration preferences don't override global settings +* [CB-9264](https://issues.apache.org/jira/browse/CB-9264) Duplicate entries in `config.xml` +* [CB-10791](https://issues.apache.org/jira/browse/CB-10791) Add `adjustLoggerLevel` to `cordova-common.CordovaLogger` +* [CB-10662](https://issues.apache.org/jira/browse/CB-10662) Add tests for `ConfigParser.getStaticResources` +* [CB-10622](https://issues.apache.org/jira/browse/CB-10622) fix target attribute being ignored for images in `config.xml`. +* [CB-10583](https://issues.apache.org/jira/browse/CB-10583) Protect plugin preferences from adding extra Array properties. + +### 1.1.0 (Feb 16, 2016) +* [CB-10482](https://issues.apache.org/jira/browse/CB-10482) Remove references to windows8 from cordova-lib/cli +* [CB-10430](https://issues.apache.org/jira/browse/CB-10430) Adds forwardEvents method to easily connect two EventEmitters +* [CB-10176](https://issues.apache.org/jira/browse/CB-10176) Adds CordovaLogger class, based on logger module from cordova-cli +* [CB-10052](https://issues.apache.org/jira/browse/CB-10052) Expose child process' io streams via promise progress notification +* [CB-10497](https://issues.apache.org/jira/browse/CB-10497) Prefer .bat over .cmd on windows platform +* [CB-9984](https://issues.apache.org/jira/browse/CB-9984) Bumps plist version and fixes failing cordova-common test + +### 1.0.0 (Oct 29, 2015) + +* [CB-9890](https://issues.apache.org/jira/browse/CB-9890) Documents cordova-common +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Correct cordova-lib -> cordova-common in README +* Pick ConfigParser changes from apache@0c3614e +* [CB-9743](https://issues.apache.org/jira/browse/CB-9743) Removes system frameworks handling from ConfigChanges +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Cleans out code which has been moved to `cordova-common` +* Pick ConfigParser changes from apache@ddb027b +* Picking CordovaError changes from apache@a3b1fca +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Adds tests and fixtures based on existing cordova-lib ones +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Initial implementation for cordova-common + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/cordova-common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/cordova-common.js new file mode 100644 index 0000000..801d510 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/cordova-common.js @@ -0,0 +1,47 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var addProperty = require('./src/util/addProperty'); + +module.exports = { }; + +addProperty(module, 'events', './src/events'); +addProperty(module, 'superspawn', './src/superspawn'); + +addProperty(module, 'ActionStack', './src/ActionStack'); +addProperty(module, 'CordovaError', './src/CordovaError/CordovaError'); +addProperty(module, 'CordovaLogger', './src/CordovaLogger'); +addProperty(module, 'CordovaCheck', './src/CordovaCheck'); +addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext'); +addProperty(module, 'PlatformJson', './src/PlatformJson'); +addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser'); +addProperty(module, 'FileUpdater', './src/FileUpdater'); + +addProperty(module, 'PluginInfo', './src/PluginInfo/PluginInfo'); +addProperty(module, 'PluginInfoProvider', './src/PluginInfo/PluginInfoProvider'); + +addProperty(module, 'PluginManager', './src/PluginManager'); + +addProperty(module, 'ConfigChanges', './src/ConfigChanges/ConfigChanges'); +addProperty(module, 'ConfigKeeper', './src/ConfigChanges/ConfigKeeper'); +addProperty(module, 'ConfigFile', './src/ConfigChanges/ConfigFile'); +addProperty(module, 'mungeUtil', './src/ConfigChanges/munge-util'); + +addProperty(module, 'xmlHelpers', './src/util/xml-helpers'); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/package.json new file mode 100644 index 0000000..e81f478 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + { + "raw": "cordova-common@^1.5.0", + "scope": null, + "escapedName": "cordova-common", + "name": "cordova-common", + "rawSpec": "^1.5.0", + "spec": ">=1.5.0 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android" + ] + ], + "_from": "cordova-common@>=1.5.0 <2.0.0", + "_id": "cordova-common@1.5.1", + "_inCache": true, + "_installable": true, + "_location": "/cordova-common", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cordova-common-1.5.1.tgz_1476725179180_0.39604957425035536" + }, + "_npmUser": { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "cordova-common@^1.5.0", + "scope": null, + "escapedName": "cordova-common", + "name": "cordova-common", + "rawSpec": "^1.5.0", + "spec": ">=1.5.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "file:cordova-dist/tools/cordova-common-1.5.1.tgz", + "_shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3", + "_shrinkwrap": null, + "_spec": "cordova-common@^1.5.0", + "_where": "/Users/steveng/repo/cordova/cordova-android", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB", + "email": "dev@cordova.apache.org" + }, + "contributors": [], + "dependencies": { + "ansi": "^0.3.1", + "bplist-parser": "^0.1.0", + "cordova-registry-mapper": "^1.1.8", + "elementtree": "^0.1.6", + "glob": "^5.0.13", + "minimatch": "^3.0.0", + "osenv": "^0.1.3", + "plist": "^1.2.0", + "q": "^1.4.1", + "semver": "^5.0.1", + "shelljs": "^0.5.3", + "underscore": "^1.8.3", + "unorm": "^1.3.3" + }, + "description": "Apache Cordova tools and platforms shared routines", + "devDependencies": { + "istanbul": "^0.3.17", + "jasmine-node": "^1.14.5", + "jshint": "^2.8.0", + "promise-matchers": "^0.9.6", + "rewire": "^2.5.1" + }, + "directories": {}, + "dist": { + "shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3", + "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.5.1.tgz" + }, + "engineStrict": true, + "engines": { + "node": ">=0.9.9" + }, + "license": "Apache-2.0", + "main": "cordova-common.js", + "maintainers": [ + { + "name": "bowserj", + "email": "bowserj@apache.org" + }, + { + "name": "kotikov.vladimir", + "email": "kotikov.vladimir@gmail.com" + }, + { + "name": "purplecabbage", + "email": "purplecabbage@gmail.com" + }, + { + "name": "shazron", + "email": "shazron@gmail.com" + }, + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + { + "name": "timbarham", + "email": "npmjs@barhams.info" + } + ], + "name": "cordova-common", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git" + }, + "scripts": { + "cover": "node node_modules/istanbul/lib/cli.js cover --root src --print detail node_modules/jasmine-node/bin/jasmine-node -- spec", + "jasmine": "node node_modules/jasmine-node/bin/jasmine-node --captureExceptions --color spec", + "jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec", + "test": "npm run jshint && npm run jasmine" + }, + "version": "1.5.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/.jshintrc new file mode 100644 index 0000000..89a121c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/.jshintrc @@ -0,0 +1,10 @@ +{ + "node": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": true + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js new file mode 100644 index 0000000..5ef6f84 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js @@ -0,0 +1,85 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint quotmark:false */ + +var events = require('./events'), + Q = require('q'); + +function ActionStack() { + this.stack = []; + this.completed = []; +} + +ActionStack.prototype = { + createAction:function(handler, action_params, reverter, revert_params) { + return { + handler:{ + run:handler, + params:action_params + }, + reverter:{ + run:reverter, + params:revert_params + } + }; + }, + push:function(tx) { + this.stack.push(tx); + }, + // Returns a promise. + process:function(platform) { + events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...'); + + while (this.stack.length) { + var action = this.stack.shift(); + var handler = action.handler.run; + var action_params = action.handler.params; + + try { + handler.apply(null, action_params); + } catch(e) { + events.emit('warn', 'Error during processing of action! Attempting to revert...'); + this.stack.unshift(action); + var issue = 'Uh oh!\n'; + // revert completed tasks + while(this.completed.length) { + var undo = this.completed.shift(); + var revert = undo.reverter.run; + var revert_params = undo.reverter.params; + + try { + revert.apply(null, revert_params); + } catch(err) { + events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:'); + issue += 'A reversion action failed: ' + err.message + '\n'; + } + } + e.message = issue + e.message; + return Q.reject(e); + } + this.completed.push(action); + } + events.emit('verbose', 'Action stack processing complete.'); + + return Q(); + } +}; + +module.exports = ActionStack; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js new file mode 100644 index 0000000..6a80730 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js @@ -0,0 +1,544 @@ +/* + * + * Copyright 2013 Anis Kadri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* + * This module deals with shared configuration / dependency "stuff". That is: + * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml. + * - plist files in iOS + * Essentially, any type of shared resources that we need to handle with awareness + * of how potentially multiple plugins depend on a single shared resource, should be + * handled in this module. + * + * The implementation uses an object as a hash table, with "leaves" of the table tracking + * reference counts. + */ + +/* jshint sub:true */ + +var fs = require('fs'), + path = require('path'), + et = require('elementtree'), + semver = require('semver'), + events = require('../events'), + ConfigKeeper = require('./ConfigKeeper'), + CordovaLogger = require('../CordovaLogger'); + +var mungeutil = require('./munge-util'); +var xml_helpers = require('../util/xml-helpers'); + +exports.PlatformMunger = PlatformMunger; + +exports.process = function(plugins_dir, project_dir, platform, platformJson, pluginInfoProvider) { + var munger = new PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider); + munger.process(plugins_dir); + munger.save_all(); +}; + +/****************************************************************************** +* PlatformMunger class +* +* Can deal with config file of a single project. +* Parsed config files are cached in a ConfigKeeper object. +******************************************************************************/ +function PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider) { + this.platform = platform; + this.project_dir = project_dir; + this.config_keeper = new ConfigKeeper(project_dir); + this.platformJson = platformJson; + this.pluginInfoProvider = pluginInfoProvider; +} + +// Write out all unsaved files. +PlatformMunger.prototype.save_all = PlatformMunger_save_all; +function PlatformMunger_save_all() { + this.config_keeper.save_all(); + this.platformJson.save(); +} + +// Apply a munge object to a single config file. +// The remove parameter tells whether to add the change or remove it. +PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge; +function PlatformMunger_apply_file_munge(file, munge, remove) { + var self = this; + + for (var selector in munge.parents) { + for (var xml_child in munge.parents[selector]) { + // this xml child is new, graft it (only if config file exists) + var config_file = self.config_keeper.get(self.project_dir, self.platform, file); + if (config_file.exists) { + if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]); + else config_file.graft_child(selector, munge.parents[selector][xml_child]); + } + } + } +} + + +PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes; +function remove_plugin_changes(pluginInfo, is_top_level) { + var self = this; + var platform_config = self.platformJson.root; + var plugin_vars = is_top_level ? + platform_config.installed_plugins[pluginInfo.id] : + platform_config.dependent_plugins[pluginInfo.id]; + var edit_config_changes = null; + if(pluginInfo.getEditConfigs) { + edit_config_changes = pluginInfo.getEditConfigs(self.platform); + } + + // get config munge, aka how did this plugin change various config files + var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + // global munge looks at all plugins' changes to config files + var global_munge = platform_config.config_munge; + var munge = mungeutil.decrement_munge(global_munge, config_munge); + + for (var file in munge.files) { + // CB-6976 Windows Universal Apps. Compatibility fix for existing plugins. + if (self.platform == 'windows' && file == 'package.appxmanifest' && + !fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) { + // New windows template separate manifest files for Windows10, Windows8.1 and WP8.1 + var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows10.appxmanifest']; + /* jshint loopfunc:true */ + substs.forEach(function(subst) { + events.emit('verbose', 'Applying munge to ' + subst); + self.apply_file_munge(subst, munge.files[file], true); + }); + /* jshint loopfunc:false */ + } + self.apply_file_munge(file, munge.files[file], /* remove = */ true); + } + + // Remove from installed_plugins + self.platformJson.removePlugin(pluginInfo.id, is_top_level); + return self; +} + + +PlatformMunger.prototype.add_plugin_changes = add_plugin_changes; +function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) { + var self = this; + var platform_config = self.platformJson.root; + + var edit_config_changes = null; + if(pluginInfo.getEditConfigs) { + edit_config_changes = pluginInfo.getEditConfigs(self.platform); + } + + var config_munge; + + if (!edit_config_changes || edit_config_changes.length === 0) { + // get config munge, aka how should this plugin change various config files + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars); + } + else { + var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force); + + if (isConflictingInfo.conflictWithConfigxml) { + throw new Error(pluginInfo.id + + ' cannot be added. changes in this plugin conflicts with changes in config.xml. Conflicts must be resolved before plugin can be added.'); + } + if (plugin_force) { + CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.'); + + // remove conflicting munges + var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); + for (var conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + + // force add new munges + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + } + else if(isConflictingInfo.conflictFound) { + throw new Error('There was a conflict trying to modify attributes with in plugin ' + pluginInfo.id + + '. The conflicting plugin, ' + isConflictingInfo.conflictingPlugin + ', already modified the same attributes. The conflict must be resolved before ' + + pluginInfo.id + ' can be added. You may use --force to add the plugin and overwrite the conflicting attributes.'); + } + else { + // no conflicts, will handle edit-config + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + } + } + + self = munge_helper(should_increment, self, platform_config, config_munge); + + // Move to installed/dependent_plugins + self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level); + return self; +} + + +// Handle edit-config changes from config.xml +PlatformMunger.prototype.add_config_changes = add_config_changes; +function add_config_changes(config, should_increment) { + var self = this; + var platform_config = self.platformJson.root; + + var config_munge; + var edit_config_changes = null; + if(config.getEditConfigs) { + edit_config_changes = config.getEditConfigs(self.platform); + } + + if (!edit_config_changes || edit_config_changes.length === 0) { + // There are no edit-config changes to add, return here + return self; + } + else { + var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, true /*always force overwrite other edit-config*/); + + if(isConflictingInfo.conflictFound) { + var conflict_munge; + var conflict_file; + + if (Object.keys(isConflictingInfo.configxmlMunge.files).length !== 0) { + // silently remove conflicting config.xml munges so new munges can be added + conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.configxmlMunge); + for (conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + } + if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) { + CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes'); + + // remove conflicting plugin.xml munges + conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); + for (conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + } + } + // Add config.xml edit-config munges + config_munge = self.generate_config_xml_munge(config, edit_config_changes, 'config.xml'); + } + + self = munge_helper(should_increment, self, platform_config, config_munge); + + // Move to installed/dependent_plugins + return self; +} + +function munge_helper(should_increment, self, platform_config, config_munge) { + // global munge looks at all changes to config files + + // TODO: The should_increment param is only used by cordova-cli and is going away soon. + // If should_increment is set to false, avoid modifying the global_munge (use clone) + // and apply the entire config_munge because it's already a proper subset of the global_munge. + var munge, global_munge; + if (should_increment) { + global_munge = platform_config.config_munge; + munge = mungeutil.increment_munge(global_munge, config_munge); + } else { + global_munge = mungeutil.clone_munge(platform_config.config_munge); + munge = config_munge; + } + + for (var file in munge.files) { + // CB-6976 Windows Universal Apps. Compatibility fix for existing plugins. + if (self.platform == 'windows' && file == 'package.appxmanifest' && + !fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) { + var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows10.appxmanifest']; + /* jshint loopfunc:true */ + substs.forEach(function(subst) { + events.emit('verbose', 'Applying munge to ' + subst); + self.apply_file_munge(subst, munge.files[file]); + }); + /* jshint loopfunc:false */ + } + + self.apply_file_munge(file, munge.files[file]); + } + + return self; +} + + +// Load the global munge from platform json and apply all of it. +// Used by cordova prepare to re-generate some config file from platform +// defaults and the global munge. +PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ; +function reapply_global_munge () { + var self = this; + + var platform_config = self.platformJson.root; + var global_munge = platform_config.config_munge; + for (var file in global_munge.files) { + self.apply_file_munge(file, global_munge.files[file]); + } + + return self; +} + +// generate_plugin_config_munge +// Generate the munge object from config.xml +PlatformMunger.prototype.generate_config_xml_munge = generate_config_xml_munge; +function generate_config_xml_munge(config, edit_config_changes, type) { + + var munge = { files: {} }; + var changes = edit_config_changes; + var id; + + if(!changes) { + return munge; + } + + if (type === 'config.xml') { + id = type; + } + else { + id = config.id; + } + + changes.forEach(function(change) { + change.xmls.forEach(function(xml) { + // 1. stringify each xml + var stringified = (new et.ElementTree(xml)).write({xml_declaration:false}); + // 2. add into munge + if (change.mode) { + mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id }); + } + }); + }); + return munge; +} + + +// generate_plugin_config_munge +// Generate the munge object from plugin.xml + vars +PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge; +function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) { + var self = this; + + vars = vars || {}; + var munge = { files: {} }; + var changes = pluginInfo.getConfigFiles(self.platform); + + if(edit_config_changes) { + Array.prototype.push.apply(changes, edit_config_changes); + } + + // Demux 'package.appxmanifest' into relevant platform-specific appx manifests. + // Only spend the cycles if there are version-specific plugin settings + if (self.platform === 'windows' && + changes.some(function(change) { + return ((typeof change.versions !== 'undefined') || + (typeof change.deviceTarget !== 'undefined')); + })) + { + var manifests = { + 'windows': { + '8.1.0': 'package.windows.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'phone': { + '8.1.0': 'package.phone.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'all': { + '8.1.0': ['package.windows.appxmanifest', 'package.phone.appxmanifest'], + '10.0.0': 'package.windows10.appxmanifest' + } + }; + + var oldChanges = changes; + changes = []; + + oldChanges.forEach(function(change, changeIndex) { + // Only support semver/device-target demux for package.appxmanifest + // Pass through in case something downstream wants to use it + if (change.target !== 'package.appxmanifest') { + changes.push(change); + return; + } + + var hasVersion = (typeof change.versions !== 'undefined'); + var hasTargets = (typeof change.deviceTarget !== 'undefined'); + + // No semver/device-target for this config-file, pass it through + if (!(hasVersion || hasTargets)) { + changes.push(change); + return; + } + + var targetDeviceSet = hasTargets ? change.deviceTarget : 'all'; + if (['windows', 'phone', 'all'].indexOf(targetDeviceSet) === -1) { + // target-device couldn't be resolved, fix it up here to a valid value + targetDeviceSet = 'all'; + } + var knownWindowsVersionsForTargetDeviceSet = Object.keys(manifests[targetDeviceSet]); + + // at this point, 'change' targets package.appxmanifest and has a version attribute + knownWindowsVersionsForTargetDeviceSet.forEach(function(winver) { + // This is a local function that creates the new replacement representing the + // mutation. Used to save code further down. + var createReplacement = function(manifestFile, originalChange) { + var replacement = { + target: manifestFile, + parent: originalChange.parent, + after: originalChange.after, + xmls: originalChange.xmls, + versions: originalChange.versions, + deviceTarget: originalChange.deviceTarget + }; + return replacement; + }; + + // version doesn't satisfy, so skip + if (hasVersion && !semver.satisfies(winver, change.versions)) { + return; + } + + var versionSpecificManifests = manifests[targetDeviceSet][winver]; + if (versionSpecificManifests.constructor === Array) { + // e.g. all['8.1.0'] === ['pkg.windows.appxmanifest', 'pkg.phone.appxmanifest'] + versionSpecificManifests.forEach(function(manifestFile) { + changes.push(createReplacement(manifestFile, change)); + }); + } + else { + // versionSpecificManifests is actually a single string + changes.push(createReplacement(versionSpecificManifests, change)); + } + }); + }); + } + + changes.forEach(function(change) { + change.xmls.forEach(function(xml) { + // 1. stringify each xml + var stringified = (new et.ElementTree(xml)).write({xml_declaration:false}); + // interp vars + if (vars) { + Object.keys(vars).forEach(function(key) { + var regExp = new RegExp('\\$' + key, 'g'); + stringified = stringified.replace(regExp, vars[key]); + }); + } + // 2. add into munge + if (change.mode) { + if (change.mode !== 'remove') { + mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id }); + } + } + else { + mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after }); + } + }); + }); + return munge; +} + +function is_conflicting(editchanges, config_munge, self, force) { + var files = config_munge.files; + var conflictFound = false; + var conflictWithConfigxml = false; + var conflictingMunge = { files: {} }; + var configxmlMunge = { files: {} }; + var conflictingParent; + var conflictingPlugin; + + editchanges.forEach(function(editchange) { + if (files[editchange.file]) { + var parents = files[editchange.file].parents; + var target = parents[editchange.target]; + + // Check if the edit target will resolve to an existing target + if (!target || target.length === 0) { + var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data; + var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target); + var resolveTarget; + + if (resolveEditTarget) { + for (var parent in parents) { + resolveTarget = xml_helpers.resolveParent(file_xml, parent); + if (resolveEditTarget === resolveTarget) { + conflictingParent = parent; + target = parents[parent]; + break; + } + } + } + } + else { + conflictingParent = editchange.target; + } + + if (target && target.length !== 0) { + // conflict has been found + conflictFound = true; + + if (editchange.id === 'config.xml') { + if (target[0].id === 'config.xml') { + // Keep track of config.xml/config.xml edit-config conflicts + mungeutil.deep_add(configxmlMunge, editchange.file, conflictingParent, target[0]); + } + else { + // Keep track of config.xml x plugin.xml edit-config conflicts + mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); + } + } + else { + if (target[0].id === 'config.xml') { + // plugin.xml cannot overwrite config.xml changes even if --force is used + conflictWithConfigxml = true; + return; + } + + if (force) { + // Need to find all conflicts when --force is used, track conflicting munges + mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); + } + else { + // plugin cannot overwrite other plugin changes without --force + conflictingPlugin = target[0].plugin; + return; + } + } + } + } + }); + + return {conflictFound: conflictFound, conflictingPlugin: conflictingPlugin, conflictingMunge: conflictingMunge, + configxmlMunge: configxmlMunge, conflictWithConfigxml:conflictWithConfigxml}; +} + +// Go over the prepare queue and apply the config munges for each plugin +// that has been (un)installed. +PlatformMunger.prototype.process = PlatformMunger_process; +function PlatformMunger_process(plugins_dir) { + var self = this; + var platform_config = self.platformJson.root; + + // Uninstallation first + platform_config.prepare_queue.uninstalled.forEach(function(u) { + var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); + self.remove_plugin_changes(pluginInfo, u.topLevel); + }); + + // Now handle installation + platform_config.prepare_queue.installed.forEach(function(u) { + var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); + self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true, u.force); + }); + + // Empty out installed/ uninstalled queues. + platform_config.prepare_queue.uninstalled = []; + platform_config.prepare_queue.installed = []; +} +/**** END of PlatformMunger ****/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js new file mode 100644 index 0000000..4a58008 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js @@ -0,0 +1,240 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var fs = require('fs'); +var path = require('path'); + +var modules = {}; +var addProperty = require('../util/addProperty'); + +// Use delay loading to ensure plist and other node modules to not get loaded +// on Android, Windows platforms +addProperty(module, 'bplist', 'bplist-parser', modules); +addProperty(module, 'et', 'elementtree', modules); +addProperty(module, 'glob', 'glob', modules); +addProperty(module, 'plist', 'plist', modules); +addProperty(module, 'plist_helpers', '../util/plist-helpers', modules); +addProperty(module, 'xml_helpers', '../util/xml-helpers', modules); + +/****************************************************************************** +* ConfigFile class +* +* Can load and keep various types of config files. Provides some functionality +* specific to some file types such as grafting XML children. In most cases it +* should be instantiated by ConfigKeeper. +* +* For plugin.xml files use as: +* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml'); +* +* TODO: Consider moving it out to a separate file and maybe partially with +* overrides in platform handlers. +******************************************************************************/ +function ConfigFile(project_dir, platform, file_tag) { + this.project_dir = project_dir; + this.platform = platform; + this.file_tag = file_tag; + this.is_changed = false; + + this.load(); +} + +// ConfigFile.load() +ConfigFile.prototype.load = ConfigFile_load; +function ConfigFile_load() { + var self = this; + + // config file may be in a place not exactly specified in the target + var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag); + + if ( !filepath || !fs.existsSync(filepath) ) { + self.exists = false; + return; + } + self.exists = true; + self.mtime = fs.statSync(self.filepath).mtime; + + var ext = path.extname(filepath); + // Windows8 uses an appxmanifest, and wp8 will likely use + // the same in a future release + if (ext == '.xml' || ext == '.appxmanifest') { + self.type = 'xml'; + self.data = modules.xml_helpers.parseElementtreeSync(filepath); + } else { + // plist file + self.type = 'plist'; + // TODO: isBinaryPlist() reads the file and then parse re-reads it again. + // We always write out text plist, not binary. + // Do we still need to support binary plist? + // If yes, use plist.parseStringSync() and read the file once. + self.data = isBinaryPlist(filepath) ? + modules.bplist.parseBuffer(fs.readFileSync(filepath)) : + modules.plist.parse(fs.readFileSync(filepath, 'utf8')); + } +} + +ConfigFile.prototype.save = function ConfigFile_save() { + var self = this; + if (self.type === 'xml') { + fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8'); + } else { + // plist + var regExp = new RegExp('[ \t\r\n]+?', 'g'); + fs.writeFileSync(self.filepath, modules.plist.build(self.data).replace(regExp, '')); + } + self.is_changed = false; +}; + +ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml_child) { + var self = this; + var filepath = self.filepath; + var result; + if (self.type === 'xml') { + var xml_to_graft = [modules.et.XML(xml_child.xml)]; + switch (xml_child.mode) { + case 'merge': + result = modules.xml_helpers.graftXMLMerge(self.data, xml_to_graft, selector, xml_child); + break; + case 'overwrite': + result = modules.xml_helpers.graftXMLOverwrite(self.data, xml_to_graft, selector, xml_child); + break; + case 'remove': + result= true; + break; + default: + result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after); + } + if ( !result) { + throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install'); + } + } else { + // plist file + result = modules.plist_helpers.graftPLIST(self.data, xml_child.xml, selector); + if ( !result ) { + throw new Error('Unable to graft plist "' + filepath + '" during config install'); + } + } + self.is_changed = true; +}; + +ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml_child) { + var self = this; + var filepath = self.filepath; + var result; + if (self.type === 'xml') { + var xml_to_graft = [modules.et.XML(xml_child.xml)]; + switch (xml_child.mode) { + case 'merge': + case 'overwrite': + result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child); + break; + case 'remove': + result = modules.xml_helpers.prunXMLRemove(self.data, selector, xml_to_graft); + break; + default: + result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector); + } + } else { + // plist file + result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector); + } + if (!result) { + var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.'; + throw new Error(err_msg); + } + self.is_changed = true; +}; + +// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards. +// Resolve to a real path in this function. +// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project. +function resolveConfigFilePath(project_dir, platform, file) { + var filepath = path.join(project_dir, file); + var matches; + + if (file.indexOf('*') > -1) { + // handle wildcards in targets using glob. + matches = modules.glob.sync(path.join(project_dir, '**', file)); + if (matches.length) filepath = matches[0]; + + // [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist + if(matches.length > 1 && file.indexOf('-Info.plist')>-1){ + var plistName = getIOSProjectname(project_dir)+'-Info.plist'; + for (var i=0; i < matches.length; i++) { + if(matches[i].indexOf(plistName) > -1){ + filepath = matches[i]; + break; + } + } + } + return filepath; + } + + // special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file. + // TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman. + if (file == 'config.xml') { + if (platform == 'ubuntu') { + filepath = path.join(project_dir, 'config.xml'); + } else if (platform == 'ios') { + var iospath = getIOSProjectname(project_dir); + filepath = path.join(project_dir,iospath, 'config.xml'); + } else if (platform == 'android') { + filepath = path.join(project_dir, 'res', 'xml', 'config.xml'); + } else { + matches = modules.glob.sync(path.join(project_dir, '**', 'config.xml')); + if (matches.length) filepath = matches[0]; + } + return filepath; + } + + // XXX this checks for android studio projects + // only if none of the options above are satisfied does this get called + if(platform === 'android' && !fs.existsSync(filepath)) { + filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml'); + } + + // None of the special cases matched, returning project_dir/file. + return filepath; +} + +// Find out the real name of an iOS project +// TODO: glob is slow, need a better way or caching, or avoid using more than once. +function getIOSProjectname(project_dir) { + var matches = modules.glob.sync(path.join(project_dir, '*.xcodeproj')); + var iospath; + if (matches.length === 1) { + iospath = path.basename(matches[0],'.xcodeproj'); + } else { + var msg; + if (matches.length === 0) { + msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir; + } else { + msg = 'There are multiple *.xcodeproj dirs in ' + project_dir; + } + throw new Error(msg); + } + return iospath; +} + +// determine if a plist file is binary +function isBinaryPlist(filename) { + // I wish there was a synchronous way to read only the first 6 bytes of a + // file. This is wasteful :/ + var buf = '' + fs.readFileSync(filename, 'utf8'); + // binary plists start with a magic header, "bplist" + return buf.substring(0, 6) === 'bplist'; +} + +module.exports = ConfigFile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js new file mode 100644 index 0000000..894e922 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js @@ -0,0 +1,65 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var path = require('path'); +var ConfigFile = require('./ConfigFile'); + +/****************************************************************************** +* ConfigKeeper class +* +* Used to load and store config files to avoid re-parsing and writing them out +* multiple times. +* +* The config files are referred to by a fake path constructed as +* project_dir/platform/file +* where file is the name used for the file in config munges. +******************************************************************************/ +function ConfigKeeper(project_dir, plugins_dir) { + this.project_dir = project_dir; + this.plugins_dir = plugins_dir; + this._cached = {}; +} + +ConfigKeeper.prototype.get = function ConfigKeeper_get(project_dir, platform, file) { + var self = this; + + // This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml + // https://issues.apache.org/jira/browse/CB-6414 + if(file == 'config.xml' && platform == 'android'){ + file = 'res/xml/config.xml'; + } + var fake_path = path.join(project_dir, platform, file); + + if (self._cached[fake_path]) { + return self._cached[fake_path]; + } + // File was not cached, need to load. + var config_file = new ConfigFile(project_dir, platform, file); + self._cached[fake_path] = config_file; + return config_file; +}; + + +ConfigKeeper.prototype.save_all = function ConfigKeeper_save_all() { + var self = this; + Object.keys(self._cached).forEach(function (fake_path) { + var config_file = self._cached[fake_path]; + if (config_file.is_changed) config_file.save(); + }); +}; + +module.exports = ConfigKeeper; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js new file mode 100644 index 0000000..0149bab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js @@ -0,0 +1,163 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var _ = require('underscore'); + +// add the count of [key1][key2]...[keyN] to obj +// return true if it didn't exist before +exports.deep_add = function deep_add(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + return exports.process_munge(obj, true/*createParents*/, function (parentArray, k) { + var found = _.find(parentArray, function(element) { + return element.xml == k.xml; + }); + if (found) { + found.after = found.after || k.after; + found.count += k.count; + } else { + parentArray.push(k); + } + return !found; + }, keys); +}; + +// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0 +// return true if it was removed or not found +exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + var result = exports.process_munge(obj, false/*createParents*/, function (parentArray, k) { + var index = -1; + var found = _.find(parentArray, function (element) { + index++; + return element.xml == k.xml; + }); + if (found) { + if (parentArray[index].oldAttrib) { + k.oldAttrib = _.extend({}, parentArray[index].oldAttrib); + } + found.count -= k.count; + if (found.count > 0) { + return false; + } + else { + parentArray.splice(index, 1); + } + } + return undefined; + }, keys); + + return typeof result === 'undefined' ? true : result; +}; + +// search for [key1][key2]...[keyN] +// return the object or undefined if not found +exports.deep_find = function deep_find(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + return exports.process_munge(obj, false/*createParents?*/, function (parentArray, k) { + return _.find(parentArray, function (element) { + return element.xml == (k.xml || k); + }); + }, keys); +}; + +// Execute func passing it the parent array and the xmlChild key. +// When createParents is true, add the file and parent items they are missing +// When createParents is false, stop and return undefined if the file and/or parent items are missing + +exports.process_munge = function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + var k = keys[0]; + if (keys.length == 1) { + return func(obj, k); + } else if (keys.length == 2) { + if (!obj.parents[k] && !createParents) { + return undefined; + } + obj.parents[k] = obj.parents[k] || []; + return exports.process_munge(obj.parents[k], createParents, func, keys.slice(1)); + } else if (keys.length == 3){ + if (!obj.files[k] && !createParents) { + return undefined; + } + obj.files[k] = obj.files[k] || { parents: {} }; + return exports.process_munge(obj.files[k], createParents, func, keys.slice(1)); + } else { + throw new Error('Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).'); + } +}; + +// All values from munge are added to base as +// base[file][selector][child] += munge[file][selector][child] +// Returns a munge object containing values that exist in munge +// but not in base. +exports.increment_munge = function increment_munge(base, munge) { + var diff = { files: {} }; + + for (var file in munge.files) { + for (var selector in munge.files[file].parents) { + for (var xml_child in munge.files[file].parents[selector]) { + var val = munge.files[file].parents[selector][xml_child]; + // if node not in base, add it to diff and base + // else increment it's value in base without adding to diff + var newlyAdded = exports.deep_add(base, [file, selector, val]); + if (newlyAdded) { + exports.deep_add(diff, file, selector, val); + } + } + } + } + return diff; +}; + +// Update the base munge object as +// base[file][selector][child] -= munge[file][selector][child] +// nodes that reached zero value are removed from base and added to the returned munge +// object. +exports.decrement_munge = function decrement_munge(base, munge) { + var zeroed = { files: {} }; + + for (var file in munge.files) { + for (var selector in munge.files[file].parents) { + for (var xml_child in munge.files[file].parents[selector]) { + var val = munge.files[file].parents[selector][xml_child]; + // if node not in base, add it to diff and base + // else increment it's value in base without adding to diff + var removed = exports.deep_remove(base, [file, selector, val]); + if (removed) { + exports.deep_add(zeroed, file, selector, val); + } + } + } + } + return zeroed; +}; + +// For better readability where used +exports.clone_munge = function clone_munge(munge) { + return exports.increment_munge({}, munge); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js new file mode 100644 index 0000000..6e74ce3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js @@ -0,0 +1,544 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true */ + +var et = require('elementtree'), + xml= require('../util/xml-helpers'), + CordovaError = require('../CordovaError/CordovaError'), + fs = require('fs'), + events = require('../events'); + + +/** Wraps a config.xml file */ +function ConfigParser(path) { + this.path = path; + try { + this.doc = xml.parseElementtreeSync(path); + this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc); + et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0'); + } catch (e) { + console.error('Parsing '+path+' failed'); + throw e; + } + var r = this.doc.getroot(); + if (r.tag !== 'widget') { + throw new CordovaError(path + ' has incorrect root node name (expected "widget", was "' + r.tag + '")'); + } +} + +function getNodeTextSafe(el) { + return el && el.text && el.text.trim(); +} + +function findOrCreate(doc, name) { + var ret = doc.find(name); + if (!ret) { + ret = new et.Element(name); + doc.getroot().append(ret); + } + return ret; +} + +function getCordovaNamespacePrefix(doc){ + var rootAtribs = Object.getOwnPropertyNames(doc.getroot().attrib); + var prefix = 'cdv'; + for (var j = 0; j < rootAtribs.length; j++ ) { + if(rootAtribs[j].indexOf('xmlns:') === 0 && + doc.getroot().attrib[rootAtribs[j]] === 'http://cordova.apache.org/ns/1.0'){ + var strings = rootAtribs[j].split(':'); + prefix = strings[1]; + break; + } + } + return prefix; +} + +/** + * Finds the value of an element's attribute + * @param {String} attributeName Name of the attribute to search for + * @param {Array} elems An array of ElementTree nodes + * @return {String} + */ +function findElementAttributeValue(attributeName, elems) { + + elems = Array.isArray(elems) ? elems : [ elems ]; + + var value = elems.filter(function (elem) { + return elem.attrib.name.toLowerCase() === attributeName.toLowerCase(); + }).map(function (filteredElems) { + return filteredElems.attrib.value; + }).pop(); + + return value ? value : ''; +} + +ConfigParser.prototype = { + getAttribute: function(attr) { + return this.doc.getroot().attrib[attr]; + }, + + packageName: function(id) { + return this.getAttribute('id'); + }, + setPackageName: function(id) { + this.doc.getroot().attrib['id'] = id; + }, + android_packageName: function() { + return this.getAttribute('android-packageName'); + }, + android_activityName: function() { + return this.getAttribute('android-activityName'); + }, + ios_CFBundleIdentifier: function() { + return this.getAttribute('ios-CFBundleIdentifier'); + }, + name: function() { + return getNodeTextSafe(this.doc.find('name')); + }, + setName: function(name) { + var el = findOrCreate(this.doc, 'name'); + el.text = name; + }, + description: function() { + return getNodeTextSafe(this.doc.find('description')); + }, + setDescription: function(text) { + var el = findOrCreate(this.doc, 'description'); + el.text = text; + }, + version: function() { + return this.getAttribute('version'); + }, + windows_packageVersion: function() { + return this.getAttribute('windows-packageVersion'); + }, + android_versionCode: function() { + return this.getAttribute('android-versionCode'); + }, + ios_CFBundleVersion: function() { + return this.getAttribute('ios-CFBundleVersion'); + }, + setVersion: function(value) { + this.doc.getroot().attrib['version'] = value; + }, + author: function() { + return getNodeTextSafe(this.doc.find('author')); + }, + getGlobalPreference: function (name) { + return findElementAttributeValue(name, this.doc.findall('preference')); + }, + setGlobalPreference: function (name, value) { + var pref = this.doc.find('preference[@name="' + name + '"]'); + if (!pref) { + pref = new et.Element('preference'); + pref.attrib.name = name; + this.doc.getroot().append(pref); + } + pref.attrib.value = value; + }, + getPlatformPreference: function (name, platform) { + return findElementAttributeValue(name, this.doc.findall('platform[@name=\'' + platform + '\']/preference')); + }, + getPreference: function(name, platform) { + + var platformPreference = ''; + + if (platform) { + platformPreference = this.getPlatformPreference(name, platform); + } + + return platformPreference ? platformPreference : this.getGlobalPreference(name); + + }, + /** + * Returns all resources for the platform specified. + * @param {String} platform The platform. + * @param {string} resourceName Type of static resources to return. + * "icon" and "splash" currently supported. + * @return {Array} Resources for the platform specified. + */ + getStaticResources: function(platform, resourceName) { + var ret = [], + staticResources = []; + if (platform) { // platform specific icons + this.doc.findall('platform[@name=\'' + platform + '\']/' + resourceName).forEach(function(elt){ + elt.platform = platform; // mark as platform specific resource + staticResources.push(elt); + }); + } + // root level resources + staticResources = staticResources.concat(this.doc.findall(resourceName)); + // parse resource elements + var that = this; + staticResources.forEach(function (elt) { + var res = {}; + res.src = elt.attrib.src; + res.target = elt.attrib.target || undefined; + res.density = elt.attrib['density'] || elt.attrib[that.cdvNamespacePrefix+':density'] || elt.attrib['gap:density']; + res.platform = elt.platform || null; // null means icon represents default icon (shared between platforms) + res.width = +elt.attrib.width || undefined; + res.height = +elt.attrib.height || undefined; + + // default icon + if (!res.width && !res.height && !res.density) { + ret.defaultResource = res; + } + ret.push(res); + }); + + /** + * Returns resource with specified width and/or height. + * @param {number} width Width of resource. + * @param {number} height Height of resource. + * @return {Resource} Resource object or null if not found. + */ + ret.getBySize = function(width, height) { + return ret.filter(function(res) { + if (!res.width && !res.height) { + return false; + } + return ((!res.width || (width == res.width)) && + (!res.height || (height == res.height))); + })[0] || null; + }; + + /** + * Returns resource with specified density. + * @param {string} density Density of resource. + * @return {Resource} Resource object or null if not found. + */ + ret.getByDensity = function(density) { + return ret.filter(function(res) { + return res.density == density; + })[0] || null; + }; + + /** Returns default icons */ + ret.getDefault = function() { + return ret.defaultResource; + }; + + return ret; + }, + + /** + * Returns all icons for specific platform. + * @param {string} platform Platform name + * @return {Resource[]} Array of icon objects. + */ + getIcons: function(platform) { + return this.getStaticResources(platform, 'icon'); + }, + + /** + * Returns all splash images for specific platform. + * @param {string} platform Platform name + * @return {Resource[]} Array of Splash objects. + */ + getSplashScreens: function(platform) { + return this.getStaticResources(platform, 'splash'); + }, + + /** + * Returns all hook scripts for the hook type specified. + * @param {String} hook The hook type. + * @param {Array} platforms Platforms to look for scripts into (root scripts will be included as well). + * @return {Array} Script elements. + */ + getHookScripts: function(hook, platforms) { + var self = this; + var scriptElements = self.doc.findall('./hook'); + + if(platforms) { + platforms.forEach(function (platform) { + scriptElements = scriptElements.concat(self.doc.findall('./platform[@name="' + platform + '"]/hook')); + }); + } + + function filterScriptByHookType(el) { + return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; + } + + return scriptElements.filter(filterScriptByHookType); + }, + /** + * Returns a list of plugin (IDs). + * + * This function also returns any plugin's that + * were defined using the legacy tags. + * @return {string[]} Array of plugin IDs + */ + getPluginIdList: function () { + var plugins = this.doc.findall('plugin'); + var result = plugins.map(function(plugin){ + return plugin.attrib.name; + }); + var features = this.doc.findall('feature'); + features.forEach(function(element ){ + var idTag = element.find('./param[@name="id"]'); + if(idTag){ + result.push(idTag.attrib.value); + } + }); + return result; + }, + getPlugins: function () { + return this.getPluginIdList().map(function (pluginId) { + return this.getPlugin(pluginId); + }, this); + }, + /** + * Adds a plugin element. Does not check for duplicates. + * @name addPlugin + * @function + * @param {object} attributes name and spec are supported + * @param {Array|object} variables name, value or arbitary object + */ + addPlugin: function (attributes, variables) { + if (!attributes && !attributes.name) return; + var el = new et.Element('plugin'); + el.attrib.name = attributes.name; + if (attributes.spec) { + el.attrib.spec = attributes.spec; + } + + // support arbitrary object as variables source + if (variables && typeof variables === 'object' && !Array.isArray(variables)) { + variables = Object.keys(variables) + .map(function (variableName) { + return {name: variableName, value: variables[variableName]}; + }); + } + + if (variables) { + variables.forEach(function (variable) { + el.append(new et.Element('variable', { name: variable.name, value: variable.value })); + }); + } + this.doc.getroot().append(el); + }, + /** + * Retrives the plugin with the given id or null if not found. + * + * This function also returns any plugin's that + * were defined using the legacy tags. + * @name getPlugin + * @function + * @param {String} id + * @returns {object} plugin including any variables + */ + getPlugin: function(id){ + if(!id){ + return undefined; + } + var pluginElement = this.doc.find('./plugin/[@name="' + id + '"]'); + if (null === pluginElement) { + var legacyFeature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..'); + if(legacyFeature){ + events.emit('log', 'Found deprecated feature entry for ' + id +' in config.xml.'); + return featureToPlugin(legacyFeature); + } + return undefined; + } + var plugin = {}; + + plugin.name = pluginElement.attrib.name; + plugin.spec = pluginElement.attrib.spec || pluginElement.attrib.src || pluginElement.attrib.version; + plugin.variables = {}; + var variableElements = pluginElement.findall('variable'); + variableElements.forEach(function(varElement){ + var name = varElement.attrib.name; + var value = varElement.attrib.value; + if(name){ + plugin.variables[name] = value; + } + }); + return plugin; + }, + /** + * Remove the plugin entry with give name (id). + * + * This function also operates on any plugin's that + * were defined using the legacy tags. + * @name removePlugin + * @function + * @param id name of the plugin + */ + removePlugin: function(id){ + if(id){ + var plugins = this.doc.findall('./plugin/[@name="' + id + '"]') + .concat(this.doc.findall('./feature/param[@name="id"][@value="' + id + '"]/..')); + var children = this.doc.getroot().getchildren(); + plugins.forEach(function (plugin) { + var idx = children.indexOf(plugin); + if (idx > -1) { + children.splice(idx, 1); + } + }); + } + }, + + // Add any element to the root + addElement: function(name, attributes) { + var el = et.Element(name); + for (var a in attributes) { + el.attrib[a] = attributes[a]; + } + this.doc.getroot().append(el); + }, + + /** + * Adds an engine. Does not check for duplicates. + * @param {String} name the engine name + * @param {String} spec engine source location or version (optional) + */ + addEngine: function(name, spec){ + if(!name) return; + var el = et.Element('engine'); + el.attrib.name = name; + if(spec){ + el.attrib.spec = spec; + } + this.doc.getroot().append(el); + }, + /** + * Removes all the engines with given name + * @param {String} name the engine name. + */ + removeEngine: function(name){ + var engines = this.doc.findall('./engine/[@name="' +name+'"]'); + for(var i=0; i < engines.length; i++){ + var children = this.doc.getroot().getchildren(); + var idx = children.indexOf(engines[i]); + if(idx > -1){ + children.splice(idx,1); + } + } + }, + getEngines: function(){ + var engines = this.doc.findall('./engine'); + return engines.map(function(engine){ + var spec = engine.attrib.spec || engine.attrib.version; + return { + 'name': engine.attrib.name, + 'spec': spec ? spec : null + }; + }); + }, + /* Get all the access tags */ + getAccesses: function() { + var accesses = this.doc.findall('./access'); + return accesses.map(function(access){ + var minimum_tls_version = access.attrib['minimum-tls-version']; /* String */ + var requires_forward_secrecy = access.attrib['requires-forward-secrecy']; /* Boolean */ + var requires_certificate_transparency = access.attrib['requires-certificate-transparency']; /* Boolean */ + var allows_arbitrary_loads_in_web_content = access.attrib['allows-arbitrary-loads-in-web-content']; /* Boolean */ + var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean */ + var allows_local_networking = access.attrib['allows-local-networking']; /* Boolean */ + + return { + 'origin': access.attrib.origin, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy, + 'requires_certificate_transparency' : requires_certificate_transparency, + 'allows_arbitrary_loads_in_web_content' : allows_arbitrary_loads_in_web_content, + 'allows_arbitrary_loads_in_media' : allows_arbitrary_loads_in_media, + 'allows_local_networking' : allows_local_networking + }; + }); + }, + /* Get all the allow-navigation tags */ + getAllowNavigations: function() { + var allow_navigations = this.doc.findall('./allow-navigation'); + return allow_navigations.map(function(allow_navigation){ + var minimum_tls_version = allow_navigation.attrib['minimum-tls-version']; /* String */ + var requires_forward_secrecy = allow_navigation.attrib['requires-forward-secrecy']; /* Boolean */ + var requires_certificate_transparency = allow_navigation.attrib['requires-certificate-transparency']; /* Boolean */ + + return { + 'href': allow_navigation.attrib.href, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy, + 'requires_certificate_transparency' : requires_certificate_transparency + }; + }); + }, + /* Get all the allow-intent tags */ + getAllowIntents: function() { + var allow_intents = this.doc.findall('./allow-intent'); + return allow_intents.map(function(allow_intent){ + return { + 'href': allow_intent.attrib.href + }; + }); + }, + /* Get all edit-config tags */ + getEditConfigs: function(platform) { + var platform_tag = this.doc.find('./platform[@name="' + platform + '"]'); + var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : []; + + var edit_configs = this.doc.findall('edit-config').concat(platform_edit_configs); + + return edit_configs.map(function(tag) { + var editConfig = + { + file : tag.attrib['file'], + target : tag.attrib['target'], + mode : tag.attrib['mode'], + id : 'config.xml', + xmls : tag.getchildren() + }; + return editConfig; + }); + }, + write:function() { + fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8'); + } +}; + +function featureToPlugin(featureElement) { + var plugin = {}; + plugin.variables = []; + var pluginVersion, + pluginSrc; + + var nodes = featureElement.findall('param'); + nodes.forEach(function (element) { + var n = element.attrib.name; + var v = element.attrib.value; + if (n === 'id') { + plugin.name = v; + } else if (n === 'version') { + pluginVersion = v; + } else if (n === 'url' || n === 'installPath') { + pluginSrc = v; + } else { + plugin.variables[n] = v; + } + }); + + var spec = pluginSrc || pluginVersion; + if (spec) { + plugin.spec = spec; + } + + return plugin; +} +module.exports = ConfigParser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/README.md new file mode 100644 index 0000000..e5cd1bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/README.md @@ -0,0 +1,86 @@ + + +# Cordova-Lib + +## ConfigParser + +wraps a valid cordova config.xml file + +### Usage + +### Include the ConfigParser module in a projet + + var ConfigParser = require('cordova-lib').configparser; + +### Create a new ConfigParser + + var config = new ConfigParser('path/to/config/xml/'); + +### Utility Functions + +#### packageName(id) +returns document root 'id' attribute value +#### Usage + + config.packageName: function(id) + +/* + * sets document root element 'id' attribute to @id + * + * @id - new id value + * + */ +#### setPackageName(id) +set document root 'id' attribute to + function(id) { + this.doc.getroot().attrib['id'] = id; + }, + +### + name: function() { + return getNodeTextSafe(this.doc.find('name')); + }, + setName: function(name) { + var el = findOrCreate(this.doc, 'name'); + el.text = name; + }, + +### read the description element + + config.description() + + var text = "New and improved description of App" + setDescription(text) + +### version management + version() + android_versionCode() + ios_CFBundleVersion() + setVersion() + +### read author element + + config.author(); + +### read preference + + config.getPreference(name); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaCheck.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaCheck.js new file mode 100644 index 0000000..46e733f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaCheck.js @@ -0,0 +1,76 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var fs = require('fs'), + path = require('path'); + +function isRootDir(dir) { + if (fs.existsSync(path.join(dir, 'www'))) { + if (fs.existsSync(path.join(dir, 'config.xml'))) { + // For sure is. + if (fs.existsSync(path.join(dir, 'platforms'))) { + return 2; + } else { + return 1; + } + } + // Might be (or may be under platforms/). + if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) { + return 1; + } + } + return 0; +} + +// Runs up the directory chain looking for a .cordova directory. +// IF it is found we are in a Cordova project. +// Omit argument to use CWD. +function isCordova(dir) { + if (!dir) { + // Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687). + var pwd = process.env.PWD; + var cwd = process.cwd(); + if (pwd && pwd != cwd && pwd != 'undefined') { + return isCordova(pwd) || isCordova(cwd); + } + return isCordova(cwd); + } + var bestReturnValueSoFar = false; + for (var i = 0; i < 1000; ++i) { + var result = isRootDir(dir); + if (result === 2) { + return dir; + } + if (result === 1) { + bestReturnValueSoFar = dir; + } + var parentDir = path.normalize(path.join(dir, '..')); + // Detect fs root. + if (parentDir == dir) { + return bestReturnValueSoFar; + } + dir = parentDir; + } + console.error('Hit an unhandled case in CordovaCheck.isCordova'); + return false; +} + +module.exports = { + findProjectRoot : isCordova +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js new file mode 100644 index 0000000..7262448 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js @@ -0,0 +1,91 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint proto:true */ + +var EOL = require('os').EOL; + +/** + * A derived exception class. See usage example in cli.js + * Based on: + * stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/8460753#8460753 + * @param {String} message Error message + * @param {Number} [code=0] Error code + * @param {CordovaExternalToolErrorContext} [context] External tool error context object + * @constructor + */ +function CordovaError(message, code, context) { + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + this.message = message; + this.code = code || CordovaError.UNKNOWN_ERROR; + this.context = context; +} +CordovaError.prototype.__proto__ = Error.prototype; + +// TODO: Extend error codes according the projects specifics +CordovaError.UNKNOWN_ERROR = 0; +CordovaError.EXTERNAL_TOOL_ERROR = 1; + +/** + * Translates instance's error code number into error code name, e.g. 0 -> UNKNOWN_ERROR + * @returns {string} Error code string name + */ +CordovaError.prototype.getErrorCodeName = function() { + for(var key in CordovaError) { + if(CordovaError.hasOwnProperty(key)) { + if(CordovaError[key] === this.code) { + return key; + } + } + } +}; + +/** + * Converts CordovaError instance to string representation + * @param {Boolean} [isVerbose] Set up verbose mode. Used to provide more + * details including information about error code name and context + * @return {String} Stringified error representation + */ +CordovaError.prototype.toString = function(isVerbose) { + var message = '', codePrefix = ''; + + if(this.code !== CordovaError.UNKNOWN_ERROR) { + codePrefix = 'code: ' + this.code + (isVerbose ? (' (' + this.getErrorCodeName() + ')') : '') + ' '; + } + + if(this.code === CordovaError.EXTERNAL_TOOL_ERROR) { + if(typeof this.context !== 'undefined') { + if(isVerbose) { + message = codePrefix + EOL + this.context.toString(isVerbose) + '\n failed with an error: ' + + this.message + EOL + 'Stack trace: ' + this.stack; + } else { + message = codePrefix + '\'' + this.context.toString(isVerbose) + '\' ' + this.message; + } + } else { + message = 'External tool failed with an error: ' + this.message; + } + } else { + message = isVerbose ? codePrefix + this.stack : codePrefix + this.message; + } + + return message; +}; + +module.exports = CordovaError; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js new file mode 100644 index 0000000..ca9a4aa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js @@ -0,0 +1,48 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +/* jshint proto:true */ + +var path = require('path'); + +/** + * @param {String} cmd Command full path + * @param {String[]} args Command args + * @param {String} [cwd] Command working directory + * @constructor + */ +function CordovaExternalToolErrorContext(cmd, args, cwd) { + this.cmd = cmd; + // Helper field for readability + this.cmdShortName = path.basename(cmd); + this.args = args; + this.cwd = cwd; +} + +CordovaExternalToolErrorContext.prototype.toString = function(isVerbose) { + if(isVerbose) { + return 'External tool \'' + this.cmdShortName + '\'' + + '\nCommand full path: ' + this.cmd + '\nCommand args: ' + this.args + + (typeof this.cwd !== 'undefined' ? '\nCommand cwd: ' + this.cwd : ''); + } + + return this.cmdShortName; +}; + +module.exports = CordovaExternalToolErrorContext; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaLogger.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaLogger.js new file mode 100644 index 0000000..71bc7e8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/CordovaLogger.js @@ -0,0 +1,220 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +var ansi = require('ansi'); +var EventEmitter = require('events').EventEmitter; +var CordovaError = require('./CordovaError/CordovaError'); +var EOL = require('os').EOL; + +var INSTANCE; + +/** + * @class CordovaLogger + * + * Implements logging facility that anybody could use. Should not be + * instantiated directly, `CordovaLogger.get()` method should be used instead + * to acquire logger instance + */ +function CordovaLogger () { + this.levels = {}; + this.colors = {}; + this.stdout = process.stdout; + this.stderr = process.stderr; + + this.stdoutCursor = ansi(this.stdout); + this.stderrCursor = ansi(this.stderr); + + this.addLevel('verbose', 1000, 'grey'); + this.addLevel('normal' , 2000); + this.addLevel('warn' , 2000, 'yellow'); + this.addLevel('info' , 3000, 'blue'); + this.addLevel('error' , 5000, 'red'); + this.addLevel('results' , 10000); + + this.setLevel('normal'); +} + +/** + * Static method to create new or acquire existing instance. + * + * @return {CordovaLogger} Logger instance + */ +CordovaLogger.get = function () { + return INSTANCE || (INSTANCE = new CordovaLogger()); +}; + +CordovaLogger.VERBOSE = 'verbose'; +CordovaLogger.NORMAL = 'normal'; +CordovaLogger.WARN = 'warn'; +CordovaLogger.INFO = 'info'; +CordovaLogger.ERROR = 'error'; +CordovaLogger.RESULTS = 'results'; + +/** + * Emits log message to process' stdout/stderr depending on message's severity + * and current log level. If severity is less than current logger's level, + * then the message is ignored. + * + * @param {String} logLevel The message's log level. The logger should have + * corresponding level added (via logger.addLevel), otherwise + * `CordovaLogger.NORMAL` level will be used. + * @param {String} message The message, that should be logged to process' + * stdio + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.log = function (logLevel, message) { + // if there is no such logLevel defined, or provided level has + // less severity than active level, then just ignore this call and return + if (!this.levels[logLevel] || this.levels[logLevel] < this.levels[this.logLevel]) + // return instance to allow to chain calls + return this; + + var isVerbose = this.logLevel === 'verbose'; + var cursor = this.stdoutCursor; + + if (message instanceof Error || logLevel === CordovaLogger.ERROR) { + message = formatError(message, isVerbose); + cursor = this.stderrCursor; + } + + var color = this.colors[logLevel]; + if (color) { + cursor.bold().fg[color](); + } + + cursor.write(message).reset().write(EOL); + + return this; +}; + +/** + * Adds a new level to logger instance. This method also creates a shortcut + * method to log events with the level provided (i.e. after adding new level + * 'debug', the method `debug(message)`, equal to logger.log('debug', message), + * will be added to logger instance) + * + * @param {String} level A log level name. The levels with the following + * names added by default to every instance: 'verbose', 'normal', 'warn', + * 'info', 'error', 'results' + * @param {Number} severity A number that represents level's severity. + * @param {String} color A valid color name, that will be used to log + * messages with this level. Any CSS color code or RGB value is allowed + * (according to ansi documentation: + * https://github.com/TooTallNate/ansi.js#features) + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.addLevel = function (level, severity, color) { + + this.levels[level] = severity; + + if (color) { + this.colors[level] = color; + } + + // Define own method with corresponding name + if (!this[level]) { + this[level] = this.log.bind(this, level); + } + + return this; +}; + +/** + * Sets the current logger level to provided value. If logger doesn't have level + * with this name, `CordovaLogger.NORMAL` will be used. + * + * @param {String} logLevel Level name. The level with this name should be + * added to logger before. + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.setLevel = function (logLevel) { + this.logLevel = this.levels[logLevel] ? logLevel : CordovaLogger.NORMAL; + + return this; +}; + +/** + * Adjusts the current logger level according to the passed options. + * + * @param {Object|Array} opts An object or args array with options + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.adjustLevel = function (opts) { + if (opts.verbose || (Array.isArray(opts) && opts.indexOf('--verbose') !== -1)) { + this.setLevel('verbose'); + } else if (opts.silent || (Array.isArray(opts) && opts.indexOf('--silent') !== -1)) { + this.setLevel('error'); + } + + return this; +}; + +/** + * Attaches logger to EventEmitter instance provided. + * + * @param {EventEmitter} eventEmitter An EventEmitter instance to attach + * logger to. + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.subscribe = function (eventEmitter) { + + if (!(eventEmitter instanceof EventEmitter)) + throw new Error('Subscribe method only accepts an EventEmitter instance as argument'); + + eventEmitter.on('verbose', this.verbose) + .on('log', this.normal) + .on('info', this.info) + .on('warn', this.warn) + .on('warning', this.warn) + // Set up event handlers for logging and results emitted as events. + .on('results', this.results); + + return this; +}; + +function formatError(error, isVerbose) { + var message = ''; + + if (error instanceof CordovaError) { + message = error.toString(isVerbose); + } else if (error instanceof Error) { + if (isVerbose) { + message = error.stack; + } else { + message = error.message; + } + } else { + // Plain text error message + message = error; + } + + if (typeof message === 'string' && message.toUpperCase().indexOf('ERROR:') !== 0) { + // Needed for backward compatibility with external tools + message = 'Error: ' + message; + } + + return message; +} + +module.exports = CordovaLogger; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js new file mode 100644 index 0000000..8b6876b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js @@ -0,0 +1,416 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +"use strict"; + +var fs = require("fs"); +var path = require("path"); +var shell = require("shelljs"); +var minimatch = require("minimatch"); + +/** + * Logging callback used in the FileUpdater methods. + * @callback loggingCallback + * @param {string} message A message describing a single file update operation. + */ + +/** + * Updates a target file or directory with a source file or directory. (Directory updates are + * not recursive.) Stats for target and source items must be passed in. This is an internal + * helper function used by other methods in this module. + * + * @param {?string} sourcePath Source file or directory to be used to update the + * destination. If the source is null, then the destination is deleted if it exists. + * @param {?fs.Stats} sourceStats An instance of fs.Stats for the source path, or null if + * the source does not exist. + * @param {string} targetPath Required destination file or directory to be updated. If it does + * not exist, it will be created. + * @param {?fs.Stats} targetStats An instance of fs.Stats for the target path, or null if + * the target does not exist. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log) { + var updated = false; + + var rootDir = (options && options.rootDir) || ""; + var copyAll = (options && options.all) || false; + + var targetFullPath = path.join(rootDir || "", targetPath); + + if (sourceStats) { + var sourceFullPath = path.join(rootDir || "", sourcePath); + + if (targetStats) { + // The target exists. But if the directory status doesn't match the source, delete it. + if (targetStats.isDirectory() && !sourceStats.isDirectory()) { + log("rmdir " + targetPath + " (source is a file)"); + shell.rm("-rf", targetFullPath); + targetStats = null; + updated = true; + } else if (!targetStats.isDirectory() && sourceStats.isDirectory()) { + log("delete " + targetPath + " (source is a directory)"); + shell.rm("-f", targetFullPath); + targetStats = null; + updated = true; + } + } + + if (!targetStats) { + if (sourceStats.isDirectory()) { + // The target directory does not exist, so it should be created. + log("mkdir " + targetPath); + shell.mkdir("-p", targetFullPath); + updated = true; + } else if (sourceStats.isFile()) { + // The target file does not exist, so it should be copied from the source. + log("copy " + sourcePath + " " + targetPath + (copyAll ? "" : " (new file)")); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } + } else if (sourceStats.isFile() && targetStats.isFile()) { + // The source and target paths both exist and are files. + if (copyAll) { + // The caller specified all files should be copied. + log("copy " + sourcePath + " " + targetPath); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } else { + // Copy if the source has been modified since it was copied to the target, or if + // the file sizes are different. (The latter catches most cases in which something + // was done to the file after copying.) Comparison is >= rather than > to allow + // for timestamps lacking sub-second precision in some filesystems. + if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() || + sourceStats.size !== targetStats.size) { + log("copy " + sourcePath + " " + targetPath + " (updated file)"); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } + } + } + } else if (targetStats) { + // The target exists but the source is null, so the target should be deleted. + if (targetStats.isDirectory()) { + log("rmdir " + targetPath + (copyAll ? "" : " (no source)")); + shell.rm("-rf", targetFullPath); + } else { + log("delete " + targetPath + (copyAll ? "" : " (no source)")); + shell.rm("-f", targetFullPath); + } + updated = true; + } + + return updated; +} + +/** + * Helper for updatePath and updatePaths functions. Queries stats for source and target + * and ensures target directory exists before copying a file. + */ +function updatePathInternal(sourcePath, targetPath, options, log) { + var rootDir = (options && options.rootDir) || ""; + var targetFullPath = path.join(rootDir, targetPath); + var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null; + var sourceStats = null; + + if (sourcePath) { + // A non-null source path was specified. It should exist. + var sourceFullPath = path.join(rootDir, sourcePath); + if (!fs.existsSync(sourceFullPath)) { + throw new Error("Source path does not exist: " + sourcePath); + } + + sourceStats = fs.statSync(sourceFullPath); + + // Create the target's parent directory if it doesn't exist. + var parentDir = path.dirname(targetFullPath); + if (!fs.existsSync(parentDir)) { + shell.mkdir("-p", parentDir); + } + } + + return updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log); +} + +/** + * Updates a target file or directory with a source file or directory. (Directory updates are + * not recursive.) + * + * @param {?string} sourcePath Source file or directory to be used to update the + * destination. If the source is null, then the destination is deleted if it exists. + * @param {string} targetPath Required destination file or directory to be updated. If it does + * not exist, it will be created. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePath(sourcePath, targetPath, options, log) { + if (sourcePath !== null && typeof sourcePath !== "string") { + throw new Error("A source path (or null) is required."); + } + + if (!targetPath || typeof targetPath !== "string") { + throw new Error("A target path is required."); + } + + log = log || function(message) { }; + + return updatePathInternal(sourcePath, targetPath, options, log); +} + +/** + * Updates files and directories based on a mapping from target paths to source paths. Targets + * with null sources in the map are deleted. + * + * @param {Object} pathMap A dictionary mapping from target paths to source paths. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePaths(pathMap, options, log) { + if (!pathMap || typeof pathMap !== "object" || Array.isArray(pathMap)) { + throw new Error("An object mapping from target paths to source paths is required."); + } + + log = log || function(message) { }; + + var updated = false; + + // Iterate in sorted order to ensure directories are created before files under them. + Object.keys(pathMap).sort().forEach(function (targetPath) { + var sourcePath = pathMap[targetPath]; + updated = updatePathInternal(sourcePath, targetPath, options, log) || updated; + }); + + return updated; +} + +/** + * Updates a target directory with merged files and subdirectories from source directories. + * + * @param {string|string[]} sourceDirs Required source directory or array of source directories + * to be merged into the target. The directories are listed in order of precedence; files in + * directories later in the array supersede files in directories earlier in the array + * (regardless of timestamps). + * @param {string} targetDir Required destination directory to be updated. If it does not exist, + * it will be created. If it exists, newer files from source directories will be copied over, + * and files missing in the source directories will be deleted. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {string|string[]} [options.include] Optional glob string or array of glob strings that + * are tested against both target and source relative paths to determine if they are included + * in the merge-and-update. If unspecified, all items are included. + * @param {string|string[]} [options.exclude] Optional glob string or array of glob strings that + * are tested against both target and source relative paths to determine if they are excluded + * from the merge-and-update. Exclusions override inclusions. If unspecified, no items are + * excluded. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function mergeAndUpdateDir(sourceDirs, targetDir, options, log) { + if (sourceDirs && typeof sourceDirs === "string") { + sourceDirs = [ sourceDirs ]; + } else if (!Array.isArray(sourceDirs)) { + throw new Error("A source directory path or array of paths is required."); + } + + if (!targetDir || typeof targetDir !== "string") { + throw new Error("A target directory path is required."); + } + + log = log || function(message) { }; + + var rootDir = (options && options.rootDir) || ""; + + var include = (options && options.include) || [ "**" ]; + if (typeof include === "string") { + include = [ include ]; + } else if (!Array.isArray(include)) { + throw new Error("Include parameter must be a glob string or array of glob strings."); + } + + var exclude = (options && options.exclude) || []; + if (typeof exclude === "string") { + exclude = [ exclude ]; + } else if (!Array.isArray(exclude)) { + throw new Error("Exclude parameter must be a glob string or array of glob strings."); + } + + // Scan the files in each of the source directories. + var sourceMaps = sourceDirs.map(function (sourceDir) { + return path.join(rootDir, sourceDir); + }).map(function (sourcePath) { + if (!fs.existsSync(sourcePath)) { + throw new Error("Source directory does not exist: " + sourcePath); + } + return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude); + }); + + // Scan the files in the target directory, if it exists. + var targetMap = {}; + var targetFullPath = path.join(rootDir, targetDir); + if (fs.existsSync(targetFullPath)) { + targetMap = mapDirectory(rootDir, targetDir, include, exclude); + } + + var pathMap = mergePathMaps(sourceMaps, targetMap, targetDir); + + var updated = false; + + // Iterate in sorted order to ensure directories are created before files under them. + Object.keys(pathMap).sort().forEach(function (subPath) { + var entry = pathMap[subPath]; + updated = updatePathWithStats( + entry.sourcePath, + entry.sourceStats, + entry.targetPath, + entry.targetStats, + options, + log) || updated; + }); + + return updated; +} + +/** + * Creates a dictionary map of all files and directories under a path. + */ +function mapDirectory(rootDir, subDir, include, exclude) { + var dirMap = { "": { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } }; + mapSubdirectory(rootDir, subDir, "", include, exclude, dirMap); + return dirMap; + + function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) { + var itemMapped = false; + var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir)); + + items.forEach(function(item) { + var relativePath = path.join(relativeDir, item); + if(!matchGlobArray(relativePath, exclude)) { + // Stats obtained here (required at least to know where to recurse in directories) + // are saved for later, where the modified times may also be used. This minimizes + // the number of file I/O operations performed. + var fullPath = path.join(rootDir, subDir, relativePath); + var stats = fs.statSync(fullPath); + + if (stats.isDirectory()) { + // Directories are included if either something under them is included or they + // match an include glob. + if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) || + matchGlobArray(relativePath, include)) { + dirMap[relativePath] = { subDir: subDir, stats: stats }; + itemMapped = true; + } + } else if (stats.isFile()) { + // Files are included only if they match an include glob. + if (matchGlobArray(relativePath, include)) { + dirMap[relativePath] = { subDir: subDir, stats: stats }; + itemMapped = true; + } + } + } + }); + return itemMapped; + } + + function matchGlobArray(path, globs) { + return globs.some(function(elem) { + return minimatch(path, elem, {dot:true}); + }); + } +} + +/** + * Merges together multiple source maps and a target map into a single mapping from + * relative paths to objects with target and source paths and stats. + */ +function mergePathMaps(sourceMaps, targetMap, targetDir) { + // Merge multiple source maps together, along with target path info. + // Entries in later source maps override those in earlier source maps. + // Target stats will be filled in below for targets that exist. + var pathMap = {}; + sourceMaps.forEach(function (sourceMap) { + Object.keys(sourceMap).forEach(function(sourceSubPath){ + var sourceEntry = sourceMap[sourceSubPath]; + pathMap[sourceSubPath] = { + targetPath: path.join(targetDir, sourceSubPath), + targetStats: null, + sourcePath: path.join(sourceEntry.subDir, sourceSubPath), + sourceStats: sourceEntry.stats + }; + }); + }); + + // Fill in target stats for targets that exist, and create entries + // for targets that don't have any corresponding sources. + Object.keys(targetMap).forEach(function(subPath){ + var entry = pathMap[subPath]; + if (entry) { + entry.targetStats = targetMap[subPath].stats; + } else { + pathMap[subPath] = { + targetPath: path.join(targetDir, subPath), + targetStats: targetMap[subPath].stats, + sourcePath: null, + sourceStats: null + }; + } + }); + + return pathMap; +} + +module.exports = { + updatePath: updatePath, + updatePaths: updatePaths, + mergeAndUpdateDir: mergeAndUpdateDir +}; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PlatformJson.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PlatformJson.js new file mode 100644 index 0000000..ab94b5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PlatformJson.js @@ -0,0 +1,278 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var fs = require('fs'); +var path = require('path'); +var shelljs = require('shelljs'); +var mungeutil = require('./ConfigChanges/munge-util'); +var pluginMappernto = require('cordova-registry-mapper').newToOld; +var pluginMapperotn = require('cordova-registry-mapper').oldToNew; + +function PlatformJson(filePath, platform, root) { + this.filePath = filePath; + this.platform = platform; + this.root = fix_munge(root || {}); +} + +PlatformJson.load = function(plugins_dir, platform) { + var filePath = path.join(plugins_dir, platform + '.json'); + var root = null; + if (fs.existsSync(filePath)) { + root = JSON.parse(fs.readFileSync(filePath, 'utf-8')); + } + return new PlatformJson(filePath, platform, root); +}; + +PlatformJson.prototype.save = function() { + shelljs.mkdir('-p', path.dirname(this.filePath)); + fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 4), 'utf-8'); +}; + +/** + * Indicates whether the specified plugin is installed as a top-level (not as + * dependency to others) + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed as top-level, otherwise false. + */ +PlatformJson.prototype.isPluginTopLevel = function(pluginId) { + var installedPlugins = this.root.installed_plugins; + return installedPlugins[pluginId] || + installedPlugins[pluginMappernto[pluginId]] || + installedPlugins[pluginMapperotn[pluginId]]; +}; + +/** + * Indicates whether the specified plugin is installed as a dependency to other + * plugin. + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed as a dependency, otherwise false. + */ +PlatformJson.prototype.isPluginDependent = function(pluginId) { + var dependentPlugins = this.root.dependent_plugins; + return dependentPlugins[pluginId] || + dependentPlugins[pluginMappernto[pluginId]] || + dependentPlugins[pluginMapperotn[pluginId]]; +}; + +/** + * Indicates whether plugin is installed either as top-level or as dependency. + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed, otherwise false. + */ +PlatformJson.prototype.isPluginInstalled = function(pluginId) { + return this.isPluginTopLevel(pluginId) || + this.isPluginDependent(pluginId); +}; + +PlatformJson.prototype.addPlugin = function(pluginId, variables, isTopLevel) { + var pluginsList = isTopLevel ? + this.root.installed_plugins : + this.root.dependent_plugins; + + pluginsList[pluginId] = variables; + + return this; +}; + +/** + * @chaining + * Generates and adds metadata for provided plugin into associated .json file + * + * @param {PluginInfo} pluginInfo A pluginInfo instance to add metadata from + * @returns {this} Current PlatformJson instance to allow calls chaining + */ +PlatformJson.prototype.addPluginMetadata = function (pluginInfo) { + + var installedModules = this.root.modules || []; + + var installedPaths = installedModules.map(function (installedModule) { + return installedModule.file; + }); + + var modulesToInstall = pluginInfo.getJsModules(this.platform) + .map(function (module) { + return new ModuleMetadata(pluginInfo.id, module); + }) + .filter(function (metadata) { + // Filter out modules which are already added to metadata + return installedPaths.indexOf(metadata.file) === -1; + }); + + this.root.modules = installedModules.concat(modulesToInstall); + + this.root.plugin_metadata = this.root.plugin_metadata || {}; + this.root.plugin_metadata[pluginInfo.id] = pluginInfo.version; + + return this; +}; + +PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) { + var pluginsList = isTopLevel ? + this.root.installed_plugins : + this.root.dependent_plugins; + + delete pluginsList[pluginId]; + + return this; +}; + +/** + * @chaining + * Removes metadata for provided plugin from associated file + * + * @param {PluginInfo} pluginInfo A PluginInfo instance to which modules' metadata + * we need to remove + * + * @returns {this} Current PlatformJson instance to allow calls chaining + */ +PlatformJson.prototype.removePluginMetadata = function (pluginInfo) { + var modulesToRemove = pluginInfo.getJsModules(this.platform) + .map(function (jsModule) { + return ['plugins', pluginInfo.id, jsModule.src].join('/'); + }); + + var installedModules = this.root.modules || []; + this.root.modules = installedModules + .filter(function (installedModule) { + // Leave only those metadatas which 'file' is not in removed modules + return (modulesToRemove.indexOf(installedModule.file) === -1); + }); + + if (this.root.plugin_metadata) { + delete this.root.plugin_metadata[pluginInfo.id]; + } + + return this; +}; + +PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level, force) { + this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level, 'force':force}); +}; + +PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, is_top_level) { + this.root.prepare_queue.uninstalled.push({'plugin':pluginId, 'id':pluginId, 'topLevel':is_top_level}); +}; + +/** + * Moves plugin, specified by id to top-level plugins. If plugin is top-level + * already, then does nothing. + * @method function + * @param {String} pluginId A plugin id to make top-level. + * @return {PlatformJson} PlatformJson instance. + */ +PlatformJson.prototype.makeTopLevel = function(pluginId) { + var plugin = this.root.dependent_plugins[pluginId]; + if (plugin) { + delete this.root.dependent_plugins[pluginId]; + this.root.installed_plugins[pluginId] = plugin; + } + return this; +}; + +/** + * Generates a metadata for all installed plugins and js modules. The resultant + * string is ready to be written to 'cordova_plugins.js' + * + * @returns {String} cordova_plugins.js contents + */ +PlatformJson.prototype.generateMetadata = function () { + return [ + 'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {', + 'module.exports = ' + JSON.stringify(this.root.modules, null, 4) + ';', + 'module.exports.metadata = ', + '// TOP OF METADATA', + JSON.stringify(this.root.plugin_metadata, null, 4) + ';', + '// BOTTOM OF METADATA', + '});' // Close cordova.define. + ].join('\n'); +}; + +/** + * @chaining + * Generates and then saves metadata to specified file. Doesn't check if file exists. + * + * @param {String} destination File metadata will be written to + * @return {PlatformJson} PlatformJson instance + */ +PlatformJson.prototype.generateAndSaveMetadata = function (destination) { + var meta = this.generateMetadata(); + shelljs.mkdir('-p', path.dirname(destination)); + fs.writeFileSync(destination, meta, 'utf-8'); + + return this; +}; + +// convert a munge from the old format ([file][parent][xml] = count) to the current one +function fix_munge(root) { + root.prepare_queue = root.prepare_queue || {installed:[], uninstalled:[]}; + root.config_munge = root.config_munge || {files: {}}; + root.installed_plugins = root.installed_plugins || {}; + root.dependent_plugins = root.dependent_plugins || {}; + + var munge = root.config_munge; + if (!munge.files) { + var new_munge = { files: {} }; + for (var file in munge) { + for (var selector in munge[file]) { + for (var xml_child in munge[file][selector]) { + var val = parseInt(munge[file][selector][xml_child]); + for (var i = 0; i < val; i++) { + mungeutil.deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]); + } + } + } + } + root.config_munge = new_munge; + } + + return root; +} + +/** + * @constructor + * @class ModuleMetadata + * + * Creates a ModuleMetadata object that represents module entry in 'cordova_plugins.js' + * file at run time + * + * @param {String} pluginId Plugin id where this module installed from + * @param (JsModule|Object) jsModule A js-module entry from PluginInfo class to generate metadata for + */ +function ModuleMetadata (pluginId, jsModule) { + + if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id'); + if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties'); + + this.id = pluginId + '.' + ( jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1] ); + this.file = ['plugins', pluginId, jsModule.src].join('/'); + this.pluginId = pluginId; + + if (jsModule.clobbers && jsModule.clobbers.length > 0) { + this.clobbers = jsModule.clobbers.map(function(o) { return o.target; }); + } + if (jsModule.merges && jsModule.merges.length > 0) { + this.merges = jsModule.merges.map(function(o) { return o.target; }); + } + if (jsModule.runs) { + this.runs = true; + } +} + +module.exports = PlatformJson; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js new file mode 100644 index 0000000..0be0c41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js @@ -0,0 +1,423 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true, laxcomma:true, laxbreak:true */ + +/* +A class for holidng the information currently stored in plugin.xml +It should also be able to answer questions like whether the plugin +is compatible with a given engine version. + +TODO (kamrik): refactor this to not use sync functions and return promises. +*/ + + +var path = require('path') + , fs = require('fs') + , xml_helpers = require('../util/xml-helpers') + , CordovaError = require('../CordovaError/CordovaError') + ; + +function PluginInfo(dirname) { + var self = this; + + // METHODS + // Defined inside the constructor to avoid the "this" binding problems. + + // tag + // Example: + // Used to require a variable to be specified via --variable when installing the plugin. + // returns { key : default | null} + self.getPreferences = getPreferences; + function getPreferences(platform) { + return _getTags(self._et, 'preference', platform, _parsePreference) + .reduce(function (preferences, pref) { + preferences[pref.preference] = pref.default; + return preferences; + }, {}); + } + + function _parsePreference(prefTag) { + var name = prefTag.attrib.name.toUpperCase(); + var def = prefTag.attrib.default || null; + return {preference: name, default: def}; + } + + // + self.getAssets = getAssets; + function getAssets(platform) { + var assets = _getTags(self._et, 'asset', platform, _parseAsset); + return assets; + } + + function _parseAsset(tag) { + var src = tag.attrib.src; + var target = tag.attrib.target; + + if ( !src || !target) { + var msg = + 'Malformed tag. Both "src" and "target" attributes' + + 'must be specified in\n' + + self.filepath + ; + throw new Error(msg); + } + + var asset = { + itemType: 'asset', + src: src, + target: target + }; + return asset; + } + + + // + // Example: + // + self.getDependencies = getDependencies; + function getDependencies(platform) { + var deps = _getTags( + self._et, + 'dependency', + platform, + _parseDependency + ); + return deps; + } + + function _parseDependency(tag) { + var dep = + { id : tag.attrib.id + , url : tag.attrib.url || '' + , subdir : tag.attrib.subdir || '' + , commit : tag.attrib.commit + }; + + dep.git_ref = dep.commit; + + if ( !dep.id ) { + var msg = + ' tag is missing id attribute in ' + + self.filepath + ; + throw new CordovaError(msg); + } + return dep; + } + + + // tag + self.getConfigFiles = getConfigFiles; + function getConfigFiles(platform) { + var configFiles = _getTags(self._et, 'config-file', platform, _parseConfigFile); + return configFiles; + } + + function _parseConfigFile(tag) { + var configFile = + { target : tag.attrib['target'] + , parent : tag.attrib['parent'] + , after : tag.attrib['after'] + , xmls : tag.getchildren() + // To support demuxing via versions + , versions : tag.attrib['versions'] + , deviceTarget: tag.attrib['device-target'] + }; + return configFile; + } + + self.getEditConfigs = getEditConfigs; + function getEditConfigs(platform) { + var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs); + return editConfigs; + } + + function _parseEditConfigs(tag) { + var editConfig = + { file : tag.attrib['file'] + , target : tag.attrib['target'] + , mode : tag.attrib['mode'] + , xmls : tag.getchildren() + }; + return editConfig; + } + + // tags, both global and within a + // TODO (kamrik): Do we ever use under ? Example wanted. + self.getInfo = getInfo; + function getInfo(platform) { + var infos = _getTags( + self._et, + 'info', + platform, + function(elem) { return elem.text; } + ); + // Filter out any undefined or empty strings. + infos = infos.filter(Boolean); + return infos; + } + + // + // Examples: + // + // + self.getSourceFiles = getSourceFiles; + function getSourceFiles(platform) { + var sourceFiles = _getTagsInPlatform(self._et, 'source-file', platform, _parseSourceFile); + return sourceFiles; + } + + function _parseSourceFile(tag) { + return { + itemType: 'source-file', + src: tag.attrib.src, + framework: isStrTrue(tag.attrib.framework), + weak: isStrTrue(tag.attrib.weak), + compilerFlags: tag.attrib['compiler-flags'], + targetDir: tag.attrib['target-dir'] + }; + } + + // + // Example: + // + self.getHeaderFiles = getHeaderFiles; + function getHeaderFiles(platform) { + var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function(tag) { + return { + itemType: 'header-file', + src: tag.attrib.src, + targetDir: tag.attrib['target-dir'] + }; + }); + return headerFiles; + } + + // + // Example: + // + self.getResourceFiles = getResourceFiles; + function getResourceFiles(platform) { + var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function(tag) { + return { + itemType: 'resource-file', + src: tag.attrib.src, + target: tag.attrib.target, + versions: tag.attrib.versions, + deviceTarget: tag.attrib['device-target'], + arch: tag.attrib.arch + }; + }); + return resourceFiles; + } + + // + // Example: + // + self.getLibFiles = getLibFiles; + function getLibFiles(platform) { + var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function(tag) { + return { + itemType: 'lib-file', + src: tag.attrib.src, + arch: tag.attrib.arch, + Include: tag.attrib.Include, + versions: tag.attrib.versions, + deviceTarget: tag.attrib['device-target'] || tag.attrib.target + }; + }); + return libFiles; + } + + // + // Example: + // + self.getHookScripts = getHookScripts; + function getHookScripts(hook, platforms) { + var scriptElements = self._et.findall('./hook'); + + if(platforms) { + platforms.forEach(function (platform) { + scriptElements = scriptElements.concat(self._et.findall('./platform[@name="' + platform + '"]/hook')); + }); + } + + function filterScriptByHookType(el) { + return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; + } + + return scriptElements.filter(filterScriptByHookType); + } + + self.getJsModules = getJsModules; + function getJsModules(platform) { + var modules = _getTags(self._et, 'js-module', platform, _parseJsModule); + return modules; + } + + function _parseJsModule(tag) { + var ret = { + itemType: 'js-module', + name: tag.attrib.name, + src: tag.attrib.src, + clobbers: tag.findall('clobbers').map(function(tag) { return { target: tag.attrib.target }; }), + merges: tag.findall('merges').map(function(tag) { return { target: tag.attrib.target }; }), + runs: tag.findall('runs').length > 0 + }; + + return ret; + } + + self.getEngines = function() { + return self._et.findall('engines/engine').map(function(n) { + return { + name: n.attrib.name, + version: n.attrib.version, + platform: n.attrib.platform, + scriptSrc: n.attrib.scriptSrc + }; + }); + }; + + self.getPlatforms = function() { + return self._et.findall('platform').map(function(n) { + return { name: n.attrib.name }; + }); + }; + + self.getPlatformsArray = function() { + return self._et.findall('platform').map(function(n) { + return n.attrib.name; + }); + }; + self.getFrameworks = function(platform) { + return _getTags(self._et, 'framework', platform, function(el) { + var ret = { + itemType: 'framework', + type: el.attrib.type, + parent: el.attrib.parent, + custom: isStrTrue(el.attrib.custom), + src: el.attrib.src, + spec: el.attrib.spec, + weak: isStrTrue(el.attrib.weak), + versions: el.attrib.versions, + targetDir: el.attrib['target-dir'], + deviceTarget: el.attrib['device-target'] || el.attrib.target, + arch: el.attrib.arch + }; + return ret; + }); + }; + + self.getFilesAndFrameworks = getFilesAndFrameworks; + function getFilesAndFrameworks(platform) { + // Please avoid changing the order of the calls below, files will be + // installed in this order. + var items = [].concat( + self.getSourceFiles(platform), + self.getHeaderFiles(platform), + self.getResourceFiles(platform), + self.getFrameworks(platform), + self.getLibFiles(platform) + ); + return items; + } + ///// End of PluginInfo methods ///// + + + ///// PluginInfo Constructor logic ///// + self.filepath = path.join(dirname, 'plugin.xml'); + if (!fs.existsSync(self.filepath)) { + throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.'); + } + + self.dir = dirname; + var et = self._et = xml_helpers.parseElementtreeSync(self.filepath); + var pelem = et.getroot(); + self.id = pelem.attrib.id; + self.version = pelem.attrib.version; + + // Optional fields + self.name = pelem.findtext('name'); + self.description = pelem.findtext('description'); + self.license = pelem.findtext('license'); + self.repo = pelem.findtext('repo'); + self.issue = pelem.findtext('issue'); + self.keywords = pelem.findtext('keywords'); + self.info = pelem.findtext('info'); + if (self.keywords) { + self.keywords = self.keywords.split(',').map( function(s) { return s.trim(); } ); + } + self.getKeywordsAndPlatforms = function () { + var ret = self.keywords || []; + return ret.concat('ecosystem:cordova').concat(addCordova(self.getPlatformsArray())); + }; +} // End of PluginInfo constructor. + +// Helper function used to prefix every element of an array with cordova- +// Useful when we want to modify platforms to be cordova-platform +function addCordova(someArray) { + var newArray = someArray.map(function(element) { + return 'cordova-' + element; + }); + return newArray; +} + +// Helper function used by most of the getSomething methods of PluginInfo. +// Get all elements of a given name. Both in root and in platform sections +// for the given platform. If transform is given and is a function, it is +// applied to each element. +function _getTags(pelem, tag, platform, transform) { + var platformTag = pelem.find('./platform[@name="' + platform + '"]'); + var tagsInRoot = pelem.findall(tag); + tagsInRoot = tagsInRoot || []; + var tagsInPlatform = platformTag ? platformTag.findall(tag) : []; + var tags = tagsInRoot.concat(tagsInPlatform); + if ( typeof transform === 'function' ) { + tags = tags.map(transform); + } + return tags; +} + +// Same as _getTags() but only looks inside a platform section. +function _getTagsInPlatform(pelem, tag, platform, transform) { + var platformTag = pelem.find('./platform[@name="' + platform + '"]'); + var tags = platformTag ? platformTag.findall(tag) : []; + if ( typeof transform === 'function' ) { + tags = tags.map(transform); + } + return tags; +} + +// Check if x is a string 'true'. +function isStrTrue(x) { + return String(x).toLowerCase() == 'true'; +} + +module.exports = PluginInfo; +// Backwards compat: +PluginInfo.PluginInfo = PluginInfo; +PluginInfo.loadPluginsDir = function(dir) { + var PluginInfoProvider = require('./PluginInfoProvider'); + return new PluginInfoProvider().getAllWithinSearchPath(dir); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js new file mode 100644 index 0000000..6240119 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js @@ -0,0 +1,82 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true, laxcomma:true, laxbreak:true */ + +var fs = require('fs'); +var path = require('path'); +var PluginInfo = require('./PluginInfo'); +var events = require('../events'); + +function PluginInfoProvider() { + this._cache = {}; + this._getAllCache = {}; +} + +PluginInfoProvider.prototype.get = function(dirName) { + var absPath = path.resolve(dirName); + if (!this._cache[absPath]) { + this._cache[absPath] = new PluginInfo(dirName); + } + return this._cache[absPath]; +}; + +// Normally you don't need to put() entries, but it's used +// when copying plugins, and in unit tests. +PluginInfoProvider.prototype.put = function(pluginInfo) { + var absPath = path.resolve(pluginInfo.dir); + this._cache[absPath] = pluginInfo; +}; + +// Used for plugin search path processing. +// Given a dir containing multiple plugins, create a PluginInfo object for +// each of them and return as array. +// Should load them all in parallel and return a promise, but not yet. +PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) { + var absPath = path.resolve(dirName); + if (!this._getAllCache[absPath]) { + this._getAllCache[absPath] = getAllHelper(absPath, this); + } + return this._getAllCache[absPath]; +}; + +function getAllHelper(absPath, provider) { + if (!fs.existsSync(absPath)){ + return []; + } + // If dir itself is a plugin, return it in an array with one element. + if (fs.existsSync(path.join(absPath, 'plugin.xml'))) { + return [provider.get(absPath)]; + } + var subdirs = fs.readdirSync(absPath); + var plugins = []; + subdirs.forEach(function(subdir) { + var d = path.join(absPath, subdir); + if (fs.existsSync(path.join(d, 'plugin.xml'))) { + try { + plugins.push(provider.get(d)); + } catch (e) { + events.emit('warn', 'Error parsing ' + path.join(d, 'plugin.xml.\n' + e.stack)); + } + } + }); + return plugins; +} + +module.exports = PluginInfoProvider; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js new file mode 100644 index 0000000..e8968f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js @@ -0,0 +1,152 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); + +var ActionStack = require('./ActionStack'); +var PlatformJson = require('./PlatformJson'); +var CordovaError = require('./CordovaError/CordovaError'); +var PlatformMunger = require('./ConfigChanges/ConfigChanges').PlatformMunger; +var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider'); + +/** + * @constructor + * @class PluginManager + * Represents an entity for adding/removing plugins for platforms + * + * @param {String} platform Platform name + * @param {Object} locations - Platform files and directories + * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from + */ +function PluginManager(platform, locations, ideProject) { + this.platform = platform; + this.locations = locations; + this.project = ideProject; + + var platformJson = PlatformJson.load(locations.root, platform); + this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider()); +} + + +/** + * @constructs PluginManager + * A convenience shortcut to new PluginManager(...) + * + * @param {String} platform Platform name + * @param {Object} locations - Platform files and directories + * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from + * @returns new PluginManager instance + */ +PluginManager.get = function(platform, locations, ideProject) { + return new PluginManager(platform, locations, ideProject); +}; + +PluginManager.INSTALL = 'install'; +PluginManager.UNINSTALL = 'uninstall'; + +module.exports = PluginManager; + +/** + * Describes and implements common plugin installation/uninstallation routine. The flow is the following: + * * Validate and set defaults for options. Note that options are empty by default. Everything + * needed for platform IDE project must be passed from outside. Plugin variables (which + * are the part of the options) also must be already populated with 'PACKAGE_NAME' variable. + * * Collect all plugin's native and web files, get installers/uninstallers and process + * all these via ActionStack. + * * Save the IDE project, so the changes made by installers are persisted. + * * Generate config changes munge for plugin and apply it to all required files + * * Generate metadata for plugin and plugin modules and save it to 'cordova_plugins.js' + * + * @param {PluginInfo} plugin A PluginInfo structure representing plugin to install + * @param {Object} [options={}] An installation options. It is expected but is not necessary + * that options would contain 'variables' inner object with 'PACKAGE_NAME' field set by caller. + * + * @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise. + */ +PluginManager.prototype.doOperation = function (operation, plugin, options) { + if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL) + return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"')); + + if (!plugin || plugin.constructor.name !== 'PluginInfo') + return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance')); + + // Set default to empty object to play safe when accesing properties + options = options || {}; + + var self = this; + var actions = new ActionStack(); + + // gather all files need to be handled during operation ... + plugin.getFilesAndFrameworks(this.platform) + .concat(plugin.getAssets(this.platform)) + .concat(plugin.getJsModules(this.platform)) + // ... put them into stack ... + .forEach(function(item) { + var installer = self.project.getInstaller(item.itemType); + var uninstaller = self.project.getUninstaller(item.itemType); + var actionArgs = [item, plugin, self.project, options]; + + var action; + if (operation === PluginManager.INSTALL) { + action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]); + } else /* op === PluginManager.UNINSTALL */{ + action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]); + } + actions.push(action); + }); + + // ... and run through the action stack + return actions.process(this.platform) + .then(function () { + if (self.project.write) { + self.project.write(); + } + + if (operation === PluginManager.INSTALL) { + // Ignore passed `is_top_level` option since platform itself doesn't know + // anything about managing dependencies - it's responsibility of caller. + self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true, options.force); + self.munger.platformJson.addPluginMetadata(plugin); + } else { + self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true); + self.munger.platformJson.removePluginMetadata(plugin); + } + + // Save everything (munge and plugin/modules metadata) + self.munger.save_all(); + + var metadata = self.munger.platformJson.generateMetadata(); + fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8'); + + // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified + if (options.usePlatformWww) { + fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8'); + } + }); +}; + +PluginManager.prototype.addPlugin = function (plugin, installOptions) { + return this.doOperation(PluginManager.INSTALL, plugin, installOptions); +}; + +PluginManager.prototype.removePlugin = function (plugin, uninstallOptions) { + return this.doOperation(PluginManager.UNINSTALL, plugin, uninstallOptions); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/events.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/events.js new file mode 100644 index 0000000..e702bd8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/events.js @@ -0,0 +1,72 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var EventEmitter = require('events').EventEmitter; + +var INSTANCE = new EventEmitter(); +var EVENTS_RECEIVER; + +module.exports = INSTANCE; + +/** + * Sets up current instance to forward emitted events to another EventEmitter + * instance. + * + * @param {EventEmitter} [eventEmitter] The emitter instance to forward + * events to. Falsy value, when passed, disables forwarding. + */ +module.exports.forwardEventsTo = function (eventEmitter) { + + // If no argument is specified disable events forwarding + if (!eventEmitter) { + EVENTS_RECEIVER = undefined; + return; + } + + if (!(eventEmitter instanceof EventEmitter)) + throw new Error('Cordova events can be redirected to another EventEmitter instance only'); + + // CB-10940 Skipping forwarding to self to avoid infinite recursion. + // This is the case when the modules are npm-linked. + if (this !== eventEmitter) { + EVENTS_RECEIVER = eventEmitter; + } else { + // Reset forwarding if we are subscribing to self + EVENTS_RECEIVER = undefined; + } +}; + +var emit = INSTANCE.emit; + +/** + * This method replaces original 'emit' method to allow events forwarding. + * + * @return {eventEmitter} Current instance to allow calls chaining, as + * original 'emit' does + */ +module.exports.emit = function () { + + var args = Array.prototype.slice.call(arguments); + + if (EVENTS_RECEIVER) { + EVENTS_RECEIVER.emit.apply(EVENTS_RECEIVER, args); + } + + return emit.apply(this, args); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js new file mode 100644 index 0000000..a3f1431 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js @@ -0,0 +1,184 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var child_process = require('child_process'); +var fs = require('fs'); +var path = require('path'); +var _ = require('underscore'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('./events'); +var iswin32 = process.platform == 'win32'; + +// On Windows, spawn() for batch files requires absolute path & having the extension. +function resolveWindowsExe(cmd) { + var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs']; + function isValidExe(c) { + return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c); + } + if (isValidExe(cmd)) { + return cmd; + } + cmd = shell.which(cmd) || cmd; + if (!isValidExe(cmd)) { + winExtensions.some(function(ext) { + if (fs.existsSync(cmd + ext)) { + cmd = cmd + ext; + return true; + } + }); + } + return cmd; +} + +function maybeQuote(a) { + if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"'; + return a; +} + +/** + * A special implementation for child_process.spawn that handles + * Windows-specific issues with batch files and spaces in paths. Returns a + * promise that succeeds only for return code 0. It is also possible to + * subscribe on spawned process' stdout and stderr streams using progress + * handler for resultant promise. + * + * @example spawn('mycommand', [], {stdio: 'pipe'}) .progress(function (stdio){ + * if (stdio.stderr) { console.error(stdio.stderr); } }) + * .then(function(result){ // do other stuff }) + * + * @param {String} cmd A command to spawn + * @param {String[]} [args=[]] An array of arguments, passed to spawned + * process + * @param {Object} [opts={}] A configuration object + * @param {String|String[]|Object} opts.stdio Property that configures how + * spawned process' stdio will behave. Has the same meaning and possible + * values as 'stdio' options for child_process.spawn method + * (https://nodejs.org/api/child_process.html#child_process_options_stdio). + * @param {Object} [env={}] A map of extra environment variables + * @param {String} [cwd=process.cwd()] Working directory for the command + * @param {Boolean} [chmod=false] If truthy, will attempt to set the execute + * bit before executing on non-Windows platforms + * + * @return {Promise} A promise that is either fulfilled if the spawned + * process is exited with zero error code or rejected otherwise. If the + * 'stdio' option set to 'default' or 'pipe', the promise also emits progress + * messages with the following contents: + * { + * 'stdout': ..., + * 'stderr': ... + * } + */ +exports.spawn = function(cmd, args, opts) { + args = args || []; + opts = opts || {}; + var spawnOpts = {}; + var d = Q.defer(); + + if (iswin32) { + cmd = resolveWindowsExe(cmd); + // If we couldn't find the file, likely we'll end up failing, + // but for things like "del", cmd will do the trick. + if (path.extname(cmd) != '.exe') { + var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"'; + // We need to use /s to ensure that spaces are parsed properly with cmd spawned content + args = [['/s', '/c', cmdArgs].join(' ')]; + cmd = 'cmd'; + spawnOpts.windowsVerbatimArguments = true; + } else if (!fs.existsSync(cmd)) { + // We need to use /s to ensure that spaces are parsed properly with cmd spawned content + args = ['/s', '/c', cmd].concat(args).map(maybeQuote); + } + } + + if (opts.stdio !== 'default') { + // Ignore 'default' value for stdio because it corresponds to child_process's default 'pipe' option + spawnOpts.stdio = opts.stdio; + } + + if (opts.cwd) { + spawnOpts.cwd = opts.cwd; + } + + if (opts.env) { + spawnOpts.env = _.extend(_.extend({}, process.env), opts.env); + } + + if (opts.chmod && !iswin32) { + try { + // This fails when module is installed in a system directory (e.g. via sudo npm install) + fs.chmodSync(cmd, '755'); + } catch (e) { + // If the perms weren't set right, then this will come as an error upon execution. + } + } + + events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' ')); + + var child = child_process.spawn(cmd, args, spawnOpts); + var capturedOut = ''; + var capturedErr = ''; + + if (child.stdout) { + child.stdout.setEncoding('utf8'); + child.stdout.on('data', function(data) { + capturedOut += data; + d.notify({'stdout': data}); + }); + } + + if (child.stderr) { + child.stderr.setEncoding('utf8'); + child.stderr.on('data', function(data) { + capturedErr += data; + d.notify({'stderr': data}); + }); + } + + child.on('close', whenDone); + child.on('error', whenDone); + function whenDone(arg) { + child.removeListener('close', whenDone); + child.removeListener('error', whenDone); + var code = typeof arg == 'number' ? arg : arg && arg.code; + + events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args); + if (code === 0) { + d.resolve(capturedOut.trim()); + } else { + var errMsg = cmd + ': Command failed with exit code ' + code; + if (capturedErr) { + errMsg += ' Error output:\n' + capturedErr.trim(); + } + var err = new Error(errMsg); + err.code = code; + d.reject(err); + } + } + + return d.promise; +}; + +exports.maybeSpawn = function(cmd, args, opts) { + if (fs.existsSync(cmd)) { + return exports.spawn(cmd, args, opts); + } + return Q(null); +}; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/addProperty.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/addProperty.js new file mode 100644 index 0000000..7dc4dc1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/addProperty.js @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +module.exports = function addProperty(module, property, modulePath, obj) { + + obj = obj || module.exports; + // Add properties as getter to delay load the modules on first invocation + Object.defineProperty(obj, property, { + configurable: true, + get: function () { + var delayLoadedModule = module.require(modulePath); + obj[property] = delayLoadedModule; + return delayLoadedModule; + } + }); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js new file mode 100644 index 0000000..9dee5c6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js @@ -0,0 +1,101 @@ +/* + * + * Copyright 2013 Brett Rudd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// contains PLIST utility functions +var __ = require('underscore'); +var plist = require('plist'); + +// adds node to doc at selector +module.exports.graftPLIST = graftPLIST; +function graftPLIST(doc, xml, selector) { + var obj = plist.parse(''+xml+''); + + var node = doc[selector]; + if (node && Array.isArray(node) && Array.isArray(obj)){ + node = node.concat(obj); + for (var i =0;i. If we have two dicts we merge them instead of + // overriding the old one. See CB-6472 + if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)){//arrays checked above + __.extend(obj,node); + } + doc[selector] = obj; + } + + return true; +} + +// removes node from doc at selector +module.exports.prunePLIST = prunePLIST; +function prunePLIST(doc, xml, selector) { + var obj = plist.parse(''+xml+''); + + pruneOBJECT(doc, selector, obj); + + return true; +} + +function pruneOBJECT(doc, selector, fragment) { + if (Array.isArray(fragment) && Array.isArray(doc[selector])) { + var empty = true; + for (var i in fragment) { + for (var j in doc[selector]) { + empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty; + } + } + if (empty) + { + delete doc[selector]; + return true; + } + } + else if (nodeEqual(doc[selector], fragment)) { + delete doc[selector]; + return true; + } + + return false; +} + +function nodeEqual(node1, node2) { + if (typeof node1 != typeof node2) + return false; + else if (typeof node1 == 'string') { + node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)'); + return new RegExp('^' + node2 + '$').test(node1); + } + else { + for (var key in node2) { + if (!nodeEqual(node1[key], node2[key])) return false; + } + return true; + } +} + +// escape string for use in regex +function escapeRE(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '$&'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js new file mode 100644 index 0000000..9a1e82d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js @@ -0,0 +1,366 @@ +/* + * + * Copyright 2013 Anis Kadri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint sub:true, laxcomma:true */ + +/** + * contains XML utility functions, some of which are specific to elementtree + */ + +var fs = require('fs') + , path = require('path') + , _ = require('underscore') + , et = require('elementtree') + ; + + var ROOT = /^\/([^\/]*)/, + ABSOLUTE = /^\/([^\/]*)\/(.*)/; + +module.exports = { + // compare two et.XML nodes, see if they match + // compares tagName, text, attributes and children (recursively) + equalNodes: function(one, two) { + if (one.tag != two.tag) { + return false; + } else if (one.text.trim() != two.text.trim()) { + return false; + } else if (one._children.length != two._children.length) { + return false; + } + + if (!attribMatch(one, two)) return false; + + for (var i = 0; i < one._children.length; i++) { + if (!module.exports.equalNodes(one._children[i], two._children[i])) { + return false; + } + } + + return true; + }, + + // adds node to doc at selector, creating parent if it doesn't exist + graftXML: function(doc, nodes, selector, after) { + var parent = module.exports.resolveParent(doc, selector); + if (!parent) { + //Try to create the parent recursively if necessary + try { + var parentToCreate = et.XML('<' + path.basename(selector) + '>'), + parentSelector = path.dirname(selector); + + this.graftXML(doc, [parentToCreate], parentSelector); + } catch (e) { + return false; + } + parent = module.exports.resolveParent(doc, selector); + if (!parent) return false; + } + + nodes.forEach(function (node) { + // check if child is unique first + if (uniqueChild(node, parent)) { + var children = parent.getchildren(); + var insertIdx = after ? findInsertIdx(children, after) : children.length; + + //TODO: replace with parent.insert after the bug in ElementTree is fixed + parent.getchildren().splice(insertIdx, 0, node); + } + }); + + return true; + }, + + // adds new attributes to doc at selector + // Will only merge if attribute has not been modified already or --force is used + graftXMLMerge: function(doc, nodes, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + // saves the attributes of the original xml before making changes + xml.oldAttrib = _.extend({}, target.attrib); + + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + target.attrib[attribute] = node.attrib[attribute]; + } + }); + + return true; + }, + + // overwrite all attributes to doc at selector with new attributes + // Will only overwrite if attribute has not been modified already or --force is used + graftXMLOverwrite: function(doc, nodes, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + // saves the attributes of the original xml before making changes + xml.oldAttrib = _.extend({}, target.attrib); + + // remove old attributes from target + var targetAttributes = target.attrib; + for (var targetAttribute in targetAttributes) { + delete targetAttributes[targetAttribute]; + } + + // add new attributes to target + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + target.attrib[attribute] = node.attrib[attribute]; + } + }); + + return true; + }, + + // removes node from doc at selector + pruneXML: function(doc, nodes, selector) { + var parent = module.exports.resolveParent(doc, selector); + if (!parent) return false; + + nodes.forEach(function (node) { + var matchingKid = null; + if ((matchingKid = findChild(node, parent)) !== null) { + // stupid elementtree takes an index argument it doesn't use + // and does not conform to the python lib + parent.remove(matchingKid); + } + }); + + return true; + }, + + // restores attributes from doc at selector + pruneXMLRestore: function(doc, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + if (xml.oldAttrib) { + target.attrib = _.extend({}, xml.oldAttrib); + } + + return true; + }, + + prunXMLRemove: function(doc, selector, nodes) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + if (target.attrib[attribute]) { + delete target.attrib[attribute]; + } + } + }); + + return true; + + }, + + + parseElementtreeSync: function (filename) { + var contents = fs.readFileSync(filename, 'utf-8'); + if(contents) { + //Windows is the BOM. Skip the Byte Order Mark. + contents = contents.substring(contents.indexOf('<')); + } + return new et.ElementTree(et.XML(contents)); + }, + + resolveParent: function (doc, selector) { + var parent, tagName, subSelector; + + // handle absolute selector (which elementtree doesn't like) + if (ROOT.test(selector)) { + tagName = selector.match(ROOT)[1]; + // test for wildcard "any-tag" root selector + if (tagName == '*' || tagName === doc._root.tag) { + parent = doc._root; + + // could be an absolute path, but not selecting the root + if (ABSOLUTE.test(selector)) { + subSelector = selector.match(ABSOLUTE)[2]; + parent = parent.find(subSelector); + } + } else { + return false; + } + } else { + parent = doc.find(selector); + } + return parent; + } +}; + +function findChild(node, parent) { + var matchingKids = parent.findall(node.tag) + , i, j; + + for (i = 0, j = matchingKids.length ; i < j ; i++) { + if (module.exports.equalNodes(node, matchingKids[i])) { + return matchingKids[i]; + } + } + return null; +} + +function uniqueChild(node, parent) { + var matchingKids = parent.findall(node.tag) + , i = 0; + + if (matchingKids.length === 0) { + return true; + } else { + for (i; i < matchingKids.length; i++) { + if (module.exports.equalNodes(node, matchingKids[i])) { + return false; + } + } + return true; + } +} + +// Find the index at which to insert an entry. After is a ;-separated priority list +// of tags after which the insertion should be made. E.g. If we need to +// insert an element C, and the rule is that the order of children has to be +// As, Bs, Cs. After will be equal to "C;B;A". +function findInsertIdx(children, after) { + var childrenTags = children.map(function(child) { return child.tag; }); + var afters = after.split(';'); + var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); }); + var foundIndex = _.find(afterIndexes, function(index) { return index != -1; }); + + //add to the beginning if no matching nodes are found + return typeof foundIndex === 'undefined' ? 0 : foundIndex+1; +} + +var BLACKLIST = ['platform', 'feature','plugin','engine']; +var SINGLETONS = ['content', 'author', 'name']; +function mergeXml(src, dest, platform, clobber) { + // Do nothing for blacklisted tags. + if (BLACKLIST.indexOf(src.tag) != -1) return; + + //Handle attributes + Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) { + if (clobber || !dest.attrib[attribute]) { + dest.attrib[attribute] = src.attrib[attribute]; + } + }); + //Handle text + if (src.text && (clobber || !dest.text)) { + dest.text = src.text; + } + //Handle children + src.getchildren().forEach(mergeChild); + + //Handle platform + if (platform) { + src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) { + platformElement.getchildren().forEach(mergeChild); + }); + } + + //Handle duplicate preference tags (by name attribute) + removeDuplicatePreferences(dest); + + function mergeChild (srcChild) { + var srcTag = srcChild.tag, + destChild = new et.Element(srcTag), + foundChild, + query = srcTag + '', + shouldMerge = true; + + if (BLACKLIST.indexOf(srcTag) !== -1) return; + + if (SINGLETONS.indexOf(srcTag) !== -1) { + foundChild = dest.find(query); + if (foundChild) { + destChild = foundChild; + dest.remove(destChild); + } + } else { + //Check for an exact match and if you find one don't add + var mergeCandidates = dest.findall(query) + .filter(function (foundChild) { + return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild); + }); + + if (mergeCandidates.length > 0) { + destChild = mergeCandidates[0]; + dest.remove(destChild); + shouldMerge = false; + } + } + + mergeXml(srcChild, destChild, platform, clobber && shouldMerge); + dest.append(destChild); + } + + function removeDuplicatePreferences(xml) { + // reduce preference tags to a hashtable to remove dupes + var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) { + previousValue[ currentValue.attrib.name ] = currentValue.attrib.value; + return previousValue; + }, {}); + + // remove all preferences + xml.findall('preference[@name][@value]').forEach(function(pref) { + xml.remove(pref); + }); + + // write new preferences + Object.keys(prefHash).forEach(function(key, index) { + var element = et.SubElement(xml, 'preference'); + element.set('name', key); + element.set('value', this[key]); + }, prefHash); + } +} + +// Expose for testing. +module.exports.mergeXml = mergeXml; + +function textMatch(elm1, elm2) { + var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '', + text2 = elm2.text ? elm2.text.replace(/\s+/, '') : ''; + return (text1 === '' || text1 === text2); +} + +function attribMatch(one, two) { + var oneAttribKeys = Object.keys(one.attrib); + var twoAttribKeys = Object.keys(two.attrib); + + if (oneAttribKeys.length != twoAttribKeys.length) { + return false; + } + + for (var i = 0; i < oneAttribKeys.length; i++) { + var attribName = oneAttribKeys[i]; + + if (one.attrib[attribName] != two.attrib[attribName]) { + return false; + } + } + + return true; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.travis.yml new file mode 100644 index 0000000..ae381fc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +sudo: false +node_js: + - "0.10" +install: npm install +script: + - npm test diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/README.md new file mode 100644 index 0000000..3b93e5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/README.md @@ -0,0 +1,14 @@ +[![Build Status](https://travis-ci.org/stevengill/cordova-registry-mapper.svg?branch=master)](https://travis-ci.org/stevengill/cordova-registry-mapper) + +#Cordova Registry Mapper + +This module is used to map Cordova plugin ids to package names and vice versa. + +When Cordova users add plugins to their projects using ids +(e.g. `cordova plugin add org.apache.cordova.device`), +this module will map that id to the corresponding package name so `cordova-lib` knows what to fetch from **npm**. + +This module was created so the Apache Cordova project could migrate its plugins from +the [Cordova Registry](http://registry.cordova.io/) +to [npm](https://registry.npmjs.com/) +instead of having to maintain a registry. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/index.js new file mode 100644 index 0000000..4550774 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/index.js @@ -0,0 +1,204 @@ +var map = { + 'org.apache.cordova.battery-status':'cordova-plugin-battery-status', + 'org.apache.cordova.camera':'cordova-plugin-camera', + 'org.apache.cordova.console':'cordova-plugin-console', + 'org.apache.cordova.contacts':'cordova-plugin-contacts', + 'org.apache.cordova.device':'cordova-plugin-device', + 'org.apache.cordova.device-motion':'cordova-plugin-device-motion', + 'org.apache.cordova.device-orientation':'cordova-plugin-device-orientation', + 'org.apache.cordova.dialogs':'cordova-plugin-dialogs', + 'org.apache.cordova.file':'cordova-plugin-file', + 'org.apache.cordova.file-transfer':'cordova-plugin-file-transfer', + 'org.apache.cordova.geolocation':'cordova-plugin-geolocation', + 'org.apache.cordova.globalization':'cordova-plugin-globalization', + 'org.apache.cordova.inappbrowser':'cordova-plugin-inappbrowser', + 'org.apache.cordova.media':'cordova-plugin-media', + 'org.apache.cordova.media-capture':'cordova-plugin-media-capture', + 'org.apache.cordova.network-information':'cordova-plugin-network-information', + 'org.apache.cordova.splashscreen':'cordova-plugin-splashscreen', + 'org.apache.cordova.statusbar':'cordova-plugin-statusbar', + 'org.apache.cordova.vibration':'cordova-plugin-vibration', + 'org.apache.cordova.test-framework':'cordova-plugin-test-framework', + 'com.msopentech.websql' : 'cordova-plugin-websql', + 'com.msopentech.indexeddb' : 'cordova-plugin-indexeddb', + 'com.microsoft.aad.adal' : 'cordova-plugin-ms-adal', + 'com.microsoft.capptain' : 'capptain-cordova', + 'com.microsoft.services.aadgraph' : 'cordova-plugin-ms-aad-graph', + 'com.microsoft.services.files' : 'cordova-plugin-ms-files', + 'om.microsoft.services.outlook' : 'cordova-plugin-ms-outlook', + 'com.pbakondy.sim' : 'cordova-plugin-sim', + 'android.support.v4' : 'cordova-plugin-android-support-v4', + 'android.support.v7-appcompat' : 'cordova-plugin-android-support-v7-appcompat', + 'com.google.playservices' : 'cordova-plugin-googleplayservices', + 'com.google.cordova.admob' : 'cordova-plugin-admobpro', + 'com.rjfun.cordova.extension' : 'cordova-plugin-extension', + 'com.rjfun.cordova.plugin.admob' : 'cordova-plugin-admob', + 'com.rjfun.cordova.flurryads' : 'cordova-plugin-flurry', + 'com.rjfun.cordova.facebookads' : 'cordova-plugin-facebookads', + 'com.rjfun.cordova.httpd' : 'cordova-plugin-httpd', + 'com.rjfun.cordova.iad' : 'cordova-plugin-iad', + 'com.rjfun.cordova.iflyspeech' : 'cordova-plugin-iflyspeech', + 'com.rjfun.cordova.lianlianpay' : 'cordova-plugin-lianlianpay', + 'com.rjfun.cordova.mobfox' : 'cordova-plugin-mobfox', + 'com.rjfun.cordova.mopub' : 'cordova-plugin-mopub', + 'com.rjfun.cordova.mmedia' : 'cordova-plugin-mmedia', + 'com.rjfun.cordova.nativeaudio' : 'cordova-plugin-nativeaudio', + 'com.rjfun.cordova.plugin.paypalmpl' : 'cordova-plugin-paypalmpl', + 'com.rjfun.cordova.smartadserver' : 'cordova-plugin-smartadserver', + 'com.rjfun.cordova.sms' : 'cordova-plugin-sms', + 'com.rjfun.cordova.wifi' : 'cordova-plugin-wifi', + 'com.ohh2ahh.plugins.appavailability' : 'cordova-plugin-appavailability', + 'org.adapt-it.cordova.fonts' : 'cordova-plugin-fonts', + 'de.martinreinhardt.cordova.plugins.barcodeScanner' : 'cordova-plugin-barcodescanner', + 'de.martinreinhardt.cordova.plugins.urlhandler' : 'cordova-plugin-urlhandler', + 'de.martinreinhardt.cordova.plugins.email' : 'cordova-plugin-email', + 'de.martinreinhardt.cordova.plugins.certificates' : 'cordova-plugin-certificates', + 'de.martinreinhardt.cordova.plugins.sqlite' : 'cordova-plugin-sqlite', + 'fr.smile.cordova.fileopener' : 'cordova-plugin-fileopener', + 'org.smile.websqldatabase.initializer' : 'cordova-plugin-websqldatabase-initializer', + 'org.smile.websqldatabase.wpdb' : 'cordova-plugin-websqldatabase', + 'org.jboss.aerogear.cordova.push' : 'aerogear-cordova-push', + 'org.jboss.aerogear.cordova.oauth2' : 'aerogear-cordova-oauth2', + 'org.jboss.aerogear.cordova.geo' : 'aerogear-cordova-geo', + 'org.jboss.aerogear.cordova.crypto' : 'aerogear-cordova-crypto', + 'org.jboss.aerogaer.cordova.otp' : 'aerogear-cordova-otp', + 'uk.co.ilee.applewatch' : 'cordova-plugin-apple-watch', + 'uk.co.ilee.directions' : 'cordova-plugin-directions', + 'uk.co.ilee.gamecenter' : 'cordova-plugin-game-center', + 'uk.co.ilee.jailbreakdetection' : 'cordova-plugin-jailbreak-detection', + 'uk.co.ilee.nativetransitions' : 'cordova-plugin-native-transitions', + 'uk.co.ilee.pedometer' : 'cordova-plugin-pedometer', + 'uk.co.ilee.shake' : 'cordova-plugin-shake', + 'uk.co.ilee.touchid' : 'cordova-plugin-touchid', + 'com.knowledgecode.cordova.websocket' : 'cordova-plugin-websocket', + 'com.elixel.plugins.settings' : 'cordova-plugin-settings', + 'com.cowbell.cordova.geofence' : 'cordova-plugin-geofence', + 'com.blackberry.community.preventsleep' : 'cordova-plugin-preventsleep', + 'com.blackberry.community.gamepad' : 'cordova-plugin-gamepad', + 'com.blackberry.community.led' : 'cordova-plugin-led', + 'com.blackberry.community.thumbnail' : 'cordova-plugin-thumbnail', + 'com.blackberry.community.mediakeys' : 'cordova-plugin-mediakeys', + 'com.blackberry.community.simplebtlehrplugin' : 'cordova-plugin-bluetoothheartmonitor', + 'com.blackberry.community.simplebeaconplugin' : 'cordova-plugin-bluetoothibeacon', + 'com.blackberry.community.simplebtsppplugin' : 'cordova-plugin-bluetoothspp', + 'com.blackberry.community.clipboard' : 'cordova-plugin-clipboard', + 'com.blackberry.community.curl' : 'cordova-plugin-curl', + 'com.blackberry.community.qt' : 'cordova-plugin-qtbridge', + 'com.blackberry.community.upnp' : 'cordova-plugin-upnp', + 'com.blackberry.community.PasswordCrypto' : 'cordova-plugin-password-crypto', + 'com.blackberry.community.deviceinfoplugin' : 'cordova-plugin-deviceinfo', + 'com.blackberry.community.gsecrypto' : 'cordova-plugin-bb-crypto', + 'com.blackberry.community.mongoose' : 'cordova-plugin-mongoose', + 'com.blackberry.community.sysdialog' : 'cordova-plugin-bb-sysdialog', + 'com.blackberry.community.screendisplay' : 'cordova-plugin-screendisplay', + 'com.blackberry.community.messageplugin' : 'cordova-plugin-bb-messageretrieve', + 'com.blackberry.community.emailsenderplugin' : 'cordova-plugin-emailsender', + 'com.blackberry.community.audiometadata' : 'cordova-plugin-audiometadata', + 'com.blackberry.community.deviceemails' : 'cordova-plugin-deviceemails', + 'com.blackberry.community.audiorecorder' : 'cordova-plugin-audiorecorder', + 'com.blackberry.community.vibration' : 'cordova-plugin-vibrate-intense', + 'com.blackberry.community.SMSPlugin' : 'cordova-plugin-bb-sms', + 'com.blackberry.community.extractZipFile' : 'cordova-plugin-bb-zip', + 'com.blackberry.community.lowlatencyaudio' : 'cordova-plugin-bb-nativeaudio', + 'com.blackberry.community.barcodescanner' : 'phonegap-plugin-barcodescanner', + 'com.blackberry.app' : 'cordova-plugin-bb-app', + 'com.blackberry.bbm.platform' : 'cordova-plugin-bbm', + 'com.blackberry.connection' : 'cordova-plugin-bb-connection', + 'com.blackberry.identity' : 'cordova-plugin-bb-identity', + 'com.blackberry.invoke.card' : 'cordova-plugin-bb-card', + 'com.blackberry.invoke' : 'cordova-plugin-bb-invoke', + 'com.blackberry.invoked' : 'cordova-plugin-bb-invoked', + 'com.blackberry.io.filetransfer' : 'cordova-plugin-bb-filetransfer', + 'com.blackberry.io' : 'cordova-plugin-bb-io', + 'com.blackberry.notification' : 'cordova-plugin-bb-notification', + 'com.blackberry.payment' : 'cordova-plugin-bb-payment', + 'com.blackberry.pim.calendar' : 'cordova-plugin-bb-calendar', + 'com.blackberry.pim.contacts' : 'cordova-plugin-bb-contacts', + 'com.blackberry.pim.lib' : 'cordova-plugin-bb-pimlib', + 'com.blackberry.push' : 'cordova-plugin-bb-push', + 'com.blackberry.screenshot' : 'cordova-plugin-screenshot', + 'com.blackberry.sensors' : 'cordova-plugin-bb-sensors', + 'com.blackberry.system' : 'cordova-plugin-bb-system', + 'com.blackberry.ui.contextmenu' : 'cordova-plugin-bb-ctxmenu', + 'com.blackberry.ui.cover' : 'cordova-plugin-bb-cover', + 'com.blackberry.ui.dialog' : 'cordova-plugin-bb-dialog', + 'com.blackberry.ui.input' : 'cordova-plugin-touch-keyboard', + 'com.blackberry.ui.toast' : 'cordova-plugin-toast', + 'com.blackberry.user.identity' : 'cordova-plugin-bb-idservice', + 'com.blackberry.utils' : 'cordova-plugin-bb-utils', + 'net.yoik.cordova.plugins.screenorientation' : 'cordova-plugin-screen-orientation', + 'com.phonegap.plugins.barcodescanner' : 'phonegap-plugin-barcodescanner', + 'com.manifoldjs.hostedwebapp' : 'cordova-plugin-hostedwebapp', + 'com.initialxy.cordova.themeablebrowser' : 'cordova-plugin-themeablebrowser', + 'gr.denton.photosphere' : 'cordova-plugin-panoramaviewer', + 'nl.x-services.plugins.actionsheet' : 'cordova-plugin-actionsheet', + 'nl.x-services.plugins.socialsharing' : 'cordova-plugin-x-socialsharing', + 'nl.x-services.plugins.googleplus' : 'cordova-plugin-googleplus', + 'nl.x-services.plugins.insomnia' : 'cordova-plugin-insomnia', + 'nl.x-services.plugins.toast' : 'cordova-plugin-x-toast', + 'nl.x-services.plugins.calendar' : 'cordova-plugin-calendar', + 'nl.x-services.plugins.launchmyapp' : 'cordova-plugin-customurlscheme', + 'nl.x-services.plugins.flashlight' : 'cordova-plugin-flashlight', + 'nl.x-services.plugins.sslcertificatechecker' : 'cordova-plugin-sslcertificatechecker', + 'com.bridge.open' : 'cordova-open', + 'com.bridge.safe' : 'cordova-safe', + 'com.disusered.open' : 'cordova-open', + 'com.disusered.safe' : 'cordova-safe', + 'me.apla.cordova.app-preferences' : 'cordova-plugin-app-preferences', + 'com.konotor.cordova' : 'cordova-plugin-konotor', + 'io.intercom.cordova' : 'cordova-plugin-intercom', + 'com.onesignal.plugins.onesignal' : 'onesignal-cordova-plugin', + 'com.danjarvis.document-contract': 'cordova-plugin-document-contract', + 'com.eface2face.iosrtc' : 'cordova-plugin-iosrtc', + 'com.mobileapptracking.matplugin' : 'cordova-plugin-tune', + 'com.marianhello.cordova.background-geolocation' : 'cordova-plugin-mauron85-background-geolocation', + 'fr.louisbl.cordova.locationservices' : 'cordova-plugin-locationservices', + 'fr.louisbl.cordova.gpslocation' : 'cordova-plugin-gpslocation', + 'com.hiliaox.weibo' : 'cordova-plugin-weibo', + 'com.uxcam.cordova.plugin' : 'cordova-uxcam', + 'de.fastr.phonegap.plugins.downloader' : 'cordova-plugin-fastrde-downloader', + 'de.fastr.phonegap.plugins.injectView' : 'cordova-plugin-fastrde-injectview', + 'de.fastr.phonegap.plugins.CheckGPS' : 'cordova-plugin-fastrde-checkgps', + 'de.fastr.phonegap.plugins.md5chksum' : 'cordova-plugin-fastrde-md5', + 'io.repro.cordova' : 'cordova-plugin-repro', + 're.notifica.cordova': 'cordova-plugin-notificare-push', + 'com.megster.cordova.ble': 'cordova-plugin-ble-central', + 'com.megster.cordova.bluetoothserial': 'cordova-plugin-bluetooth-serial', + 'com.megster.cordova.rfduino': 'cordova-plugin-rfduino', + 'cz.velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', + 'cz.Velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', + 'org.scriptotek.appinfo': 'cordova-plugin-appinfo', + 'com.yezhiming.cordova.appinfo': 'cordova-plugin-appinfo', + 'pl.makingwaves.estimotebeacons': 'cordova-plugin-estimote', + 'com.evothings.ble': 'cordova-plugin-ble', + 'com.appsee.plugin' : 'cordova-plugin-appsee', + 'am.armsoft.plugins.listpicker': 'cordova-plugin-listpicker', + 'com.pushbots.push': 'pushbots-cordova-plugin', + 'com.admob.google': 'cordova-admob', + 'admob.ads.google': 'cordova-admob-ads', + 'admob.google.plugin': 'admob-google', + 'com.admob.admobads': 'admob-ads', + 'com.connectivity.monitor': 'cordova-connectivity-monitor', + 'com.ios.libgoogleadmobads': 'cordova-libgoogleadmobads', + 'com.google.play.services': 'cordova-google-play-services', + 'android.support.v13': 'cordova-android-support-v13', + 'android.support.v4': 'cordova-android-support-v4', // Duplicated key ;) + 'com.analytics.google': 'cordova-plugin-analytics', + 'com.analytics.adid.google': 'cordova-plugin-analytics-adid', + 'com.chariotsolutions.nfc.plugin': 'phonegap-nfc', + 'com.samz.mixpanel': 'cordova-plugin-mixpanel', + 'de.appplant.cordova.common.RegisterUserNotificationSettings': 'cordova-plugin-registerusernotificationsettings', + 'plugin.google.maps': 'cordova-plugin-googlemaps', + 'xu.li.cordova.wechat': 'cordova-plugin-wechat', + 'es.keensoft.fullscreenimage': 'cordova-plugin-fullscreenimage', + 'com.arcoirislabs.plugin.mqtt' : 'cordova-plugin-mqtt' +}; + +module.exports.oldToNew = map; + +var reverseMap = {}; +Object.keys(map).forEach(function(elem){ + reverseMap[map[elem]] = elem; +}); + +module.exports.newToOld = reverseMap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/package.json new file mode 100644 index 0000000..f835196 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "cordova-registry-mapper@^1.1.8", + "scope": null, + "escapedName": "cordova-registry-mapper", + "name": "cordova-registry-mapper", + "rawSpec": "^1.1.8", + "spec": ">=1.1.8 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "cordova-registry-mapper@>=1.1.8 <2.0.0", + "_id": "cordova-registry-mapper@1.1.15", + "_inCache": true, + "_installable": true, + "_location": "/cordova-registry-mapper", + "_nodeVersion": "5.4.1", + "_npmUser": { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "raw": "cordova-registry-mapper@^1.1.8", + "scope": null, + "escapedName": "cordova-registry-mapper", + "name": "cordova-registry-mapper", + "rawSpec": "^1.1.8", + "spec": ">=1.1.8 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", + "_shasum": "e244b9185b8175473bff6079324905115f83dc7c", + "_shrinkwrap": null, + "_spec": "cordova-registry-mapper@^1.1.8", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Steve Gill" + }, + "bugs": { + "url": "https://github.com/stevengill/cordova-registry-mapper/issues" + }, + "dependencies": {}, + "description": "Maps old plugin ids to new plugin names for fetching from npm", + "devDependencies": { + "tape": "^3.5.0" + }, + "directories": {}, + "dist": { + "shasum": "e244b9185b8175473bff6079324905115f83dc7c", + "tarball": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz" + }, + "gitHead": "00af0f028ec94154a364eeabe38b8e22320647bd", + "homepage": "https://github.com/stevengill/cordova-registry-mapper#readme", + "keywords": [ + "cordova", + "plugins" + ], + "license": "Apache version 2.0", + "main": "index.js", + "maintainers": [ + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + } + ], + "name": "cordova-registry-mapper", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/stevengill/cordova-registry-mapper.git" + }, + "scripts": { + "test": "node tests/test.js" + }, + "version": "1.1.15" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/tests/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/tests/test.js new file mode 100644 index 0000000..35343be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/cordova-registry-mapper/tests/test.js @@ -0,0 +1,11 @@ +var test = require('tape'); +var oldToNew = require('../index').oldToNew; +var newToOld = require('../index').newToOld; + +test('plugin mappings exist', function(t) { + t.plan(2); + + t.equal('cordova-plugin-device', oldToNew['org.apache.cordova.device']); + + t.equal('org.apache.cordova.device', newToOld['cordova-plugin-device']); +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.travis.yml new file mode 100644 index 0000000..6f27c96 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/.travis.yml @@ -0,0 +1,10 @@ +language: node_js + +node_js: + - 0.6 + +script: make test + +notifications: + email: + - tomaz+travisci@tomaz.me diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/CHANGES.md new file mode 100644 index 0000000..50d415d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/CHANGES.md @@ -0,0 +1,39 @@ +elementtree v0.1.6 (in development) + +* Add support for CData elements. (#14) + [hermannpencole] + +elementtree v0.1.5 - 2012-11-14 + +* Fix a bug in the find() and findtext() method which could manifest itself + under some conditions. + [metagriffin] + +elementtree v0.1.4 - 2012-10-15 + +* Allow user to use namespaced attributes when using find* functions. + [Andrew Lunny] + +elementtree v0.1.3 - 2012-09-21 + +* Improve the output of text content in the tags (strip unnecessary line break + characters). + +[Darryl Pogue] + +elementtree v0.1.2 - 2012-09-04 + + * Allow user to pass 'indent' option to ElementTree.write method. If this + option is specified (e.g. {'indent': 4}). XML will be pretty printed. + [Darryl Pogue, Tomaz Muraus] + + * Bump sax dependency version. + +elementtree v0.1.1 - 2011-09-23 + + * Improve special character escaping. + [Ryan Phillips] + +elementtree v0.1.0 - 2011-09-05 + + * Initial release. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/LICENSE.txt b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/LICENSE.txt new file mode 100644 index 0000000..6b0b127 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/Makefile new file mode 100755 index 0000000..ab7c4e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/Makefile @@ -0,0 +1,21 @@ +TESTS := \ + tests/test-simple.js + + + +PATH := ./node_modules/.bin:$(PATH) + +WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey') + +default: test + +test: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}" + +tap: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}" + +coverage: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}" + +.PHONY: default test coverage tap scope diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/NOTICE new file mode 100644 index 0000000..28ad70a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/NOTICE @@ -0,0 +1,5 @@ +node-elementtree +Copyright (c) 2011, Rackspace, Inc. + +The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/README.md new file mode 100644 index 0000000..738420c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/README.md @@ -0,0 +1,141 @@ +node-elementtree +==================== + +node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module. + +Installation +==================== + + $ npm install elementtree + +Using the library +==================== + +For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage). + +Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm). + +Example 1 – Creating An XML Document +==================== + +This example shows how to build a valid XML document that can be published to +Atom Hopper. Atom Hopper is used internally as a bridge from products all the +way to collecting revenue, called “Usage.” MaaS and other products send similar +events to it every time user performs an action on a resource +(e.g. creates,updates or deletes). Below is an example of leveraging the API +to create a new XML document. + +```javascript +var et = require('elementtree'); +var XML = et.XML; +var ElementTree = et.ElementTree; +var element = et.Element; +var subElement = et.SubElement; + +var date, root, tenantId, serviceName, eventType, usageId, dataCenter, region, +checks, resourceId, category, startTime, resourceName, etree, xml; + +date = new Date(); + +root = element('entry'); +root.set('xmlns', 'http://www.w3.org/2005/Atom'); + +tenantId = subElement(root, 'TenantId'); +tenantId.text = '12345'; + +serviceName = subElement(root, 'ServiceName'); +serviceName.text = 'MaaS'; + +resourceId = subElement(root, 'ResourceID'); +resourceId.text = 'enAAAA'; + +usageId = subElement(root, 'UsageID'); +usageId.text = '550e8400-e29b-41d4-a716-446655440000'; + +eventType = subElement(root, 'EventType'); +eventType.text = 'create'; + +category = subElement(root, 'category'); +category.set('term', 'monitoring.entity.create'); + +dataCenter = subElement(root, 'DataCenter'); +dataCenter.text = 'global'; + +region = subElement(root, 'Region'); +region.text = 'global'; + +startTime = subElement(root, 'StartTime'); +startTime.text = date; + +resourceName = subElement(root, 'ResourceName'); +resourceName.text = 'entity'; + +etree = new ElementTree(root); +xml = etree.write({'xml_declaration': false}); +console.log(xml); +``` + +As you can see, both et.Element and et.SubElement are factory methods which +return a new instance of Element and SubElement class, respectively. +When you create a new element (tag) you can use set method to set an attribute. +To set the tag value, assign a value to the .text attribute. + +This example would output a document that looks like this: + +```xml + + 12345 + MaaS + enAAAA + 550e8400-e29b-41d4-a716-446655440000 + create + + global + global + Sun Apr 29 2012 16:37:32 GMT-0700 (PDT) + entity + +``` + +Example 2 – Parsing An XML Document +==================== + +This example shows how to parse an XML document and use simple XPath selectors. +For demonstration purposes, we will use the XML document located at +https://gist.github.com/2554343. + +Behind the scenes, node-elementtree uses Isaac’s sax library for parsing XML, +but the library has a concept of “parsers,” which means it’s pretty simple to +add support for a different parser. + +```javascript +var fs = require('fs'); + +var et = require('elementtree'); + +var XML = et.XML; +var ElementTree = et.ElementTree; +var element = et.Element; +var subElement = et.SubElement; + +var data, etree; + +data = fs.readFileSync('document.xml').toString(); +etree = et.parse(data); + +console.log(etree.findall('./entry/TenantId').length); // 2 +console.log(etree.findtext('./entry/ServiceName')); // MaaS +console.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create +console.log(etree.findall('*/category/[@term="monitoring.entity.update"]').length); // 1 +``` + +Build status +==================== + +[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree) + + +License +==================== + +node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/constants.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/constants.js new file mode 100644 index 0000000..b057faf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/constants.js @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var DEFAULT_PARSER = 'sax'; + +exports.DEFAULT_PARSER = DEFAULT_PARSER; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementpath.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementpath.js new file mode 100644 index 0000000..2e93f47 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementpath.js @@ -0,0 +1,343 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var sprintf = require('./sprintf').sprintf; + +var utils = require('./utils'); +var SyntaxError = require('./errors').SyntaxError; + +var _cache = {}; + +var RE = new RegExp( + "(" + + "'[^']*'|\"[^\"]*\"|" + + "::|" + + "//?|" + + "\\.\\.|" + + "\\(\\)|" + + "[/.*:\\[\\]\\(\\)@=])|" + + "((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" + + "\\s+", 'g' +); + +var xpath_tokenizer = utils.findall.bind(null, RE); + +function prepare_tag(next, token) { + var tag = token[0]; + + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem._children.forEach(function(e) { + if (e.tag === tag) { + rv.push(e); + } + }); + } + + return rv; + } + + return select; +} + +function prepare_star(next, token) { + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem._children.forEach(function(e) { + rv.push(e); + }); + } + + return rv; + } + + return select; +} + +function prepare_dot(next, token) { + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + rv.push(elem); + } + + return rv; + } + + return select; +} + +function prepare_iter(next, token) { + var tag; + token = next(); + + if (token[1] === '*') { + tag = '*'; + } + else if (!token[1]) { + tag = token[0] || ''; + } + else { + throw new SyntaxError(token); + } + + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem.iter(tag, function(e) { + if (e !== elem) { + rv.push(e); + } + }); + } + + return rv; + } + + return select; +} + +function prepare_dot_dot(next, token) { + function select(context, result) { + var i, len, elem, rv = [], parent_map = context.parent_map; + + if (!parent_map) { + context.parent_map = parent_map = {}; + + context.root.iter(null, function(p) { + p._children.forEach(function(e) { + parent_map[e] = p; + }); + }); + } + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (parent_map.hasOwnProperty(elem)) { + rv.push(parent_map[elem]); + } + } + + return rv; + } + + return select; +} + + +function prepare_predicate(next, token) { + var tag, key, value, select; + token = next(); + + if (token[1] === '@') { + // attribute + token = next(); + + if (token[1]) { + throw new SyntaxError(token, 'Invalid attribute predicate'); + } + + key = token[0]; + token = next(); + + if (token[1] === ']') { + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.get(key)) { + rv.push(elem); + } + } + + return rv; + }; + } + else if (token[1] === '=') { + value = next()[1]; + + if (value[0] === '"' || value[value.length - 1] === '\'') { + value = value.slice(1, value.length - 1); + } + else { + throw new SyntaxError(token, 'Ivalid comparison target'); + } + + token = next(); + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.get(key) === value) { + rv.push(elem); + } + } + + return rv; + }; + } + + if (token[1] !== ']') { + throw new SyntaxError(token, 'Invalid attribute predicate'); + } + } + else if (!token[1]) { + tag = token[0] || ''; + token = next(); + + if (token[1] !== ']') { + throw new SyntaxError(token, 'Invalid node predicate'); + } + + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.find(tag)) { + rv.push(elem); + } + } + + return rv; + }; + } + else { + throw new SyntaxError(null, 'Invalid predicate'); + } + + return select; +} + + + +var ops = { + "": prepare_tag, + "*": prepare_star, + ".": prepare_dot, + "..": prepare_dot_dot, + "//": prepare_iter, + "[": prepare_predicate, +}; + +function _SelectorContext(root) { + this.parent_map = null; + this.root = root; +} + +function findall(elem, path) { + var selector, result, i, len, token, value, select, context; + + if (_cache.hasOwnProperty(path)) { + selector = _cache[path]; + } + else { + // TODO: Use smarter cache purging approach + if (Object.keys(_cache).length > 100) { + _cache = {}; + } + + if (path.charAt(0) === '/') { + throw new SyntaxError(null, 'Cannot use absolute path on element'); + } + + result = xpath_tokenizer(path); + selector = []; + + function getToken() { + return result.shift(); + } + + token = getToken(); + while (true) { + var c = token[1] || ''; + value = ops[c](getToken, token); + + if (!value) { + throw new SyntaxError(null, sprintf('Invalid path: %s', path)); + } + + selector.push(value); + token = getToken(); + + if (!token) { + break; + } + else if (token[1] === '/') { + token = getToken(); + } + + if (!token) { + break; + } + } + + _cache[path] = selector; + } + + // Execute slector pattern + result = [elem]; + context = new _SelectorContext(elem); + + for (i = 0, len = selector.length; i < len; i++) { + select = selector[i]; + result = select(context, result); + } + + return result || []; +} + +function find(element, path) { + var resultElements = findall(element, path); + + if (resultElements && resultElements.length > 0) { + return resultElements[0]; + } + + return null; +} + +function findtext(element, path, defvalue) { + var resultElements = findall(element, path); + + if (resultElements && resultElements.length > 0) { + return resultElements[0].text; + } + + return defvalue; +} + + +exports.find = find; +exports.findall = findall; +exports.findtext = findtext; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementtree.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementtree.js new file mode 100644 index 0000000..61d9276 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/elementtree.js @@ -0,0 +1,611 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var sprintf = require('./sprintf').sprintf; + +var utils = require('./utils'); +var ElementPath = require('./elementpath'); +var TreeBuilder = require('./treebuilder').TreeBuilder; +var get_parser = require('./parser').get_parser; +var constants = require('./constants'); + +var element_ids = 0; + +function Element(tag, attrib) +{ + this._id = element_ids++; + this.tag = tag; + this.attrib = {}; + this.text = null; + this.tail = null; + this._children = []; + + if (attrib) { + this.attrib = utils.merge(this.attrib, attrib); + } +} + +Element.prototype.toString = function() +{ + return sprintf("", this.tag, this._id); +}; + +Element.prototype.makeelement = function(tag, attrib) +{ + return new Element(tag, attrib); +}; + +Element.prototype.len = function() +{ + return this._children.length; +}; + +Element.prototype.getItem = function(index) +{ + return this._children[index]; +}; + +Element.prototype.setItem = function(index, element) +{ + this._children[index] = element; +}; + +Element.prototype.delItem = function(index) +{ + this._children.splice(index, 1); +}; + +Element.prototype.getSlice = function(start, stop) +{ + return this._children.slice(start, stop); +}; + +Element.prototype.setSlice = function(start, stop, elements) +{ + var i; + var k = 0; + for (i = start; i < stop; i++, k++) { + this._children[i] = elements[k]; + } +}; + +Element.prototype.delSlice = function(start, stop) +{ + this._children.splice(start, stop - start); +}; + +Element.prototype.append = function(element) +{ + this._children.push(element); +}; + +Element.prototype.extend = function(elements) +{ + this._children.concat(elements); +}; + +Element.prototype.insert = function(index, element) +{ + this._children[index] = element; +}; + +Element.prototype.remove = function(element) +{ + this._children = this._children.filter(function(e) { + /* TODO: is this the right way to do this? */ + if (e._id === element._id) { + return false; + } + return true; + }); +}; + +Element.prototype.getchildren = function() { + return this._children; +}; + +Element.prototype.find = function(path) +{ + return ElementPath.find(this, path); +}; + +Element.prototype.findtext = function(path, defvalue) +{ + return ElementPath.findtext(this, path, defvalue); +}; + +Element.prototype.findall = function(path, defvalue) +{ + return ElementPath.findall(this, path, defvalue); +}; + +Element.prototype.clear = function() +{ + this.attrib = {}; + this._children = []; + this.text = null; + this.tail = null; +}; + +Element.prototype.get = function(key, defvalue) +{ + if (this.attrib[key] !== undefined) { + return this.attrib[key]; + } + else { + return defvalue; + } +}; + +Element.prototype.set = function(key, value) +{ + this.attrib[key] = value; +}; + +Element.prototype.keys = function() +{ + return Object.keys(this.attrib); +}; + +Element.prototype.items = function() +{ + return utils.items(this.attrib); +}; + +/* + * In python this uses a generator, but in v8 we don't have em, + * so we use a callback instead. + **/ +Element.prototype.iter = function(tag, callback) +{ + var self = this; + var i, child; + + if (tag === "*") { + tag = null; + } + + if (tag === null || this.tag === tag) { + callback(self); + } + + for (i = 0; i < this._children.length; i++) { + child = this._children[i]; + child.iter(tag, function(e) { + callback(e); + }); + } +}; + +Element.prototype.itertext = function(callback) +{ + this.iter(null, function(e) { + if (e.text) { + callback(e.text); + } + + if (e.tail) { + callback(e.tail); + } + }); +}; + + +function SubElement(parent, tag, attrib) { + var element = parent.makeelement(tag, attrib); + parent.append(element); + return element; +} + +function Comment(text) { + var element = new Element(Comment); + if (text) { + element.text = text; + } + return element; +} + +function CData(text) { + var element = new Element(CData); + if (text) { + element.text = text; + } + return element; +} + +function ProcessingInstruction(target, text) +{ + var element = new Element(ProcessingInstruction); + element.text = target; + if (text) { + element.text = element.text + " " + text; + } + return element; +} + +function QName(text_or_uri, tag) +{ + if (tag) { + text_or_uri = sprintf("{%s}%s", text_or_uri, tag); + } + this.text = text_or_uri; +} + +QName.prototype.toString = function() { + return this.text; +}; + +function ElementTree(element) +{ + this._root = element; +} + +ElementTree.prototype.getroot = function() { + return this._root; +}; + +ElementTree.prototype._setroot = function(element) { + this._root = element; +}; + +ElementTree.prototype.parse = function(source, parser) { + if (!parser) { + parser = get_parser(constants.DEFAULT_PARSER); + parser = new parser.XMLParser(new TreeBuilder()); + } + + parser.feed(source); + this._root = parser.close(); + return this._root; +}; + +ElementTree.prototype.iter = function(tag, callback) { + this._root.iter(tag, callback); +}; + +ElementTree.prototype.find = function(path) { + return this._root.find(path); +}; + +ElementTree.prototype.findtext = function(path, defvalue) { + return this._root.findtext(path, defvalue); +}; + +ElementTree.prototype.findall = function(path) { + return this._root.findall(path); +}; + +/** + * Unlike ElementTree, we don't write to a file, we return you a string. + */ +ElementTree.prototype.write = function(options) { + var sb = []; + options = utils.merge({ + encoding: 'utf-8', + xml_declaration: null, + default_namespace: null, + method: 'xml'}, options); + + if (options.xml_declaration !== false) { + sb.push("\n"); + } + + if (options.method === "text") { + _serialize_text(sb, self._root, encoding); + } + else { + var qnames, namespaces, indent, indent_string; + var x = _namespaces(this._root, options.encoding, options.default_namespace); + qnames = x[0]; + namespaces = x[1]; + + if (options.hasOwnProperty('indent')) { + indent = 0; + indent_string = new Array(options.indent + 1).join(' '); + } + else { + indent = false; + } + + if (options.method === "xml") { + _serialize_xml(function(data) { + sb.push(data); + }, this._root, options.encoding, qnames, namespaces, indent, indent_string); + } + else { + /* TODO: html */ + throw new Error("unknown serialization method "+ options.method); + } + } + + return sb.join(""); +}; + +var _namespace_map = { + /* "well-known" namespace prefixes */ + "http://www.w3.org/XML/1998/namespace": "xml", + "http://www.w3.org/1999/xhtml": "html", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", + "http://schemas.xmlsoap.org/wsdl/": "wsdl", + /* xml schema */ + "http://www.w3.org/2001/XMLSchema": "xs", + "http://www.w3.org/2001/XMLSchema-instance": "xsi", + /* dublic core */ + "http://purl.org/dc/elements/1.1/": "dc", +}; + +function register_namespace(prefix, uri) { + if (/ns\d+$/.test(prefix)) { + throw new Error('Prefix format reserved for internal use'); + } + + if (_namespace_map.hasOwnProperty(uri) && _namespace_map[uri] === prefix) { + delete _namespace_map[uri]; + } + + _namespace_map[uri] = prefix; +} + + +function _escape(text, encoding, isAttribute, isText) { + if (text) { + text = text.toString(); + text = text.replace(/&/g, '&'); + text = text.replace(//g, '>'); + if (!isText) { + text = text.replace(/\n/g, ' '); + text = text.replace(/\r/g, ' '); + } + if (isAttribute) { + text = text.replace(/"/g, '"'); + } + } + return text; +} + +/* TODO: benchmark single regex */ +function _escape_attrib(text, encoding) { + return _escape(text, encoding, true); +} + +function _escape_cdata(text, encoding) { + return _escape(text, encoding, false); +} + +function _escape_text(text, encoding) { + return _escape(text, encoding, false, true); +} + +function _namespaces(elem, encoding, default_namespace) { + var qnames = {}; + var namespaces = {}; + + if (default_namespace) { + namespaces[default_namespace] = ""; + } + + function encode(text) { + return text; + } + + function add_qname(qname) { + if (qname[0] === "{") { + var tmp = qname.substring(1).split("}", 2); + var uri = tmp[0]; + var tag = tmp[1]; + var prefix = namespaces[uri]; + + if (prefix === undefined) { + prefix = _namespace_map[uri]; + if (prefix === undefined) { + prefix = "ns" + Object.keys(namespaces).length; + } + if (prefix !== "xml") { + namespaces[uri] = prefix; + } + } + + if (prefix) { + qnames[qname] = sprintf("%s:%s", prefix, tag); + } + else { + qnames[qname] = tag; + } + } + else { + if (default_namespace) { + throw new Error('cannot use non-qualified names with default_namespace option'); + } + + qnames[qname] = qname; + } + } + + + elem.iter(null, function(e) { + var i; + var tag = e.tag; + var text = e.text; + var items = e.items(); + + if (tag instanceof QName && qnames[tag.text] === undefined) { + add_qname(tag.text); + } + else if (typeof(tag) === "string") { + add_qname(tag); + } + else if (tag !== null && tag !== Comment && tag !== CData && tag !== ProcessingInstruction) { + throw new Error('Invalid tag type for serialization: '+ tag); + } + + if (text instanceof QName && qnames[text.text] === undefined) { + add_qname(text.text); + } + + items.forEach(function(item) { + var key = item[0], + value = item[1]; + if (key instanceof QName) { + key = key.text; + } + + if (qnames[key] === undefined) { + add_qname(key); + } + + if (value instanceof QName && qnames[value.text] === undefined) { + add_qname(value.text); + } + }); + }); + return [qnames, namespaces]; +} + +function _serialize_xml(write, elem, encoding, qnames, namespaces, indent, indent_string) { + var tag = elem.tag; + var text = elem.text; + var items; + var i; + + var newlines = indent || (indent === 0); + write(Array(indent + 1).join(indent_string)); + + if (tag === Comment) { + write(sprintf("", _escape_cdata(text, encoding))); + } + else if (tag === ProcessingInstruction) { + write(sprintf("", _escape_cdata(text, encoding))); + } + else if (tag === CData) { + text = text || ''; + write(sprintf("", text)); + } + else { + tag = qnames[tag]; + if (tag === undefined) { + if (text) { + write(_escape_text(text, encoding)); + } + elem.iter(function(e) { + _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); + }); + } + else { + write("<" + tag); + items = elem.items(); + + if (items || namespaces) { + items.sort(); // lexical order + + items.forEach(function(item) { + var k = item[0], + v = item[1]; + + if (k instanceof QName) { + k = k.text; + } + + if (v instanceof QName) { + v = qnames[v.text]; + } + else { + v = _escape_attrib(v, encoding); + } + write(sprintf(" %s=\"%s\"", qnames[k], v)); + }); + + if (namespaces) { + items = utils.items(namespaces); + items.sort(function(a, b) { return a[1] < b[1]; }); + + items.forEach(function(item) { + var k = item[1], + v = item[0]; + + if (k) { + k = ':' + k; + } + + write(sprintf(" xmlns%s=\"%s\"", k, _escape_attrib(v, encoding))); + }); + } + } + + if (text || elem.len()) { + if (text && text.toString().match(/^\s*$/)) { + text = null; + } + + write(">"); + if (!text && newlines) { + write("\n"); + } + + if (text) { + write(_escape_text(text, encoding)); + } + elem._children.forEach(function(e) { + _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); + }); + + if (!text && indent) { + write(Array(indent + 1).join(indent_string)); + } + write(""); + } + else { + write(" />"); + } + } + } + + if (newlines) { + write("\n"); + } +} + +function parse(source, parser) { + var tree = new ElementTree(); + tree.parse(source, parser); + return tree; +} + +function tostring(element, options) { + return new ElementTree(element).write(options); +} + +exports.PI = ProcessingInstruction; +exports.Comment = Comment; +exports.CData = CData; +exports.ProcessingInstruction = ProcessingInstruction; +exports.SubElement = SubElement; +exports.QName = QName; +exports.ElementTree = ElementTree; +exports.ElementPath = ElementPath; +exports.Element = function(tag, attrib) { + return new Element(tag, attrib); +}; + +exports.XML = function(data) { + var et = new ElementTree(); + return et.parse(data); +}; + +exports.parse = parse; +exports.register_namespace = register_namespace; +exports.tostring = tostring; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/errors.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/errors.js new file mode 100644 index 0000000..e8742be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/errors.js @@ -0,0 +1,31 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var util = require('util'); + +var sprintf = require('./sprintf').sprintf; + +function SyntaxError(token, msg) { + msg = msg || sprintf('Syntax Error at token %s', token.toString()); + this.token = token; + this.message = msg; + Error.call(this, msg); +} + +util.inherits(SyntaxError, Error); + +exports.SyntaxError = SyntaxError; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parser.js new file mode 100644 index 0000000..7307ee4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parser.js @@ -0,0 +1,33 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* TODO: support node-expat C++ module optionally */ + +var util = require('util'); +var parsers = require('./parsers/index'); + +function get_parser(name) { + if (name === 'sax') { + return parsers.sax; + } + else { + throw new Error('Invalid parser: ' + name); + } +} + + +exports.get_parser = get_parser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/index.js new file mode 100644 index 0000000..5eac5c8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/index.js @@ -0,0 +1 @@ +exports.sax = require('./sax'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/sax.js new file mode 100644 index 0000000..69b0a59 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/parsers/sax.js @@ -0,0 +1,56 @@ +var util = require('util'); + +var sax = require('sax'); + +var TreeBuilder = require('./../treebuilder').TreeBuilder; + +function XMLParser(target) { + this.parser = sax.parser(true); + + this.target = (target) ? target : new TreeBuilder(); + + this.parser.onopentag = this._handleOpenTag.bind(this); + this.parser.ontext = this._handleText.bind(this); + this.parser.oncdata = this._handleCdata.bind(this); + this.parser.ondoctype = this._handleDoctype.bind(this); + this.parser.oncomment = this._handleComment.bind(this); + this.parser.onclosetag = this._handleCloseTag.bind(this); + this.parser.onerror = this._handleError.bind(this); +} + +XMLParser.prototype._handleOpenTag = function(tag) { + this.target.start(tag.name, tag.attributes); +}; + +XMLParser.prototype._handleText = function(text) { + this.target.data(text); +}; + +XMLParser.prototype._handleCdata = function(text) { + this.target.data(text); +}; + +XMLParser.prototype._handleDoctype = function(text) { +}; + +XMLParser.prototype._handleComment = function(comment) { +}; + +XMLParser.prototype._handleCloseTag = function(tag) { + this.target.end(tag); +}; + +XMLParser.prototype._handleError = function(err) { + throw err; +}; + +XMLParser.prototype.feed = function(chunk) { + this.parser.write(chunk); +}; + +XMLParser.prototype.close = function() { + this.parser.close(); + return this.target.close(); +}; + +exports.XMLParser = XMLParser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/sprintf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/sprintf.js new file mode 100644 index 0000000..f802c1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/sprintf.js @@ -0,0 +1,86 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var cache = {}; + + +// Do any others need escaping? +var TO_ESCAPE = { + '\'': '\\\'', + '\n': '\\n' +}; + + +function populate(formatter) { + var i, type, + key = formatter, + prev = 0, + arg = 1, + builder = 'return \''; + + for (i = 0; i < formatter.length; i++) { + if (formatter[i] === '%') { + type = formatter[i + 1]; + + switch (type) { + case 's': + builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \''; + prev = i + 2; + arg++; + break; + case 'j': + builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \''; + prev = i + 2; + arg++; + break; + case '%': + builder += formatter.slice(prev, i + 1); + prev = i + 2; + i++; + break; + } + + + } else if (TO_ESCAPE[formatter[i]]) { + builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]]; + prev = i + 1; + } + } + + builder += formatter.slice(prev) + '\';'; + cache[key] = new Function(builder); +} + + +/** + * A fast version of sprintf(), which currently only supports the %s and %j. + * This caches a formatting function for each format string that is used, so + * you should only use this sprintf() will be called many times with a single + * format string and a limited number of format strings will ever be used (in + * general this means that format strings should be string literals). + * + * @param {String} formatter A format string. + * @param {...String} var_args Values that will be formatted by %s and %j. + * @return {String} The formatted output. + */ +exports.sprintf = function(formatter, var_args) { + if (!cache[formatter]) { + populate(formatter); + } + + return cache[formatter].apply(null, arguments); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/treebuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/treebuilder.js new file mode 100644 index 0000000..393a98f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/treebuilder.js @@ -0,0 +1,60 @@ +function TreeBuilder(element_factory) { + this._data = []; + this._elem = []; + this._last = null; + this._tail = null; + if (!element_factory) { + /* evil circular dep */ + element_factory = require('./elementtree').Element; + } + this._factory = element_factory; +} + +TreeBuilder.prototype.close = function() { + return this._last; +}; + +TreeBuilder.prototype._flush = function() { + if (this._data) { + if (this._last !== null) { + var text = this._data.join(""); + if (this._tail) { + this._last.tail = text; + } + else { + this._last.text = text; + } + } + this._data = []; + } +}; + +TreeBuilder.prototype.data = function(data) { + this._data.push(data); +}; + +TreeBuilder.prototype.start = function(tag, attrs) { + this._flush(); + var elem = this._factory(tag, attrs); + this._last = elem; + + if (this._elem.length) { + this._elem[this._elem.length - 1].append(elem); + } + + this._elem.push(elem); + + this._tail = null; +}; + +TreeBuilder.prototype.end = function(tag) { + this._flush(); + this._last = this._elem.pop(); + if (this._last.tag !== tag) { + throw new Error("end tag mismatch"); + } + this._tail = 1; + return this._last; +}; + +exports.TreeBuilder = TreeBuilder; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/utils.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/utils.js new file mode 100644 index 0000000..b08a670 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/lib/utils.js @@ -0,0 +1,72 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * @param {Object} hash. + * @param {Array} ignored. + */ +function items(hash, ignored) { + ignored = ignored || null; + var k, rv = []; + + function is_ignored(key) { + if (!ignored || ignored.length === 0) { + return false; + } + + return ignored.indexOf(key); + } + + for (k in hash) { + if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) { + rv.push([k, hash[k]]); + } + } + + return rv; +} + + +function findall(re, str) { + var match, matches = []; + + while ((match = re.exec(str))) { + matches.push(match); + } + + return matches; +} + +function merge(a, b) { + var c = {}, attrname; + + for (attrname in a) { + if (a.hasOwnProperty(attrname)) { + c[attrname] = a[attrname]; + } + } + for (attrname in b) { + if (b.hasOwnProperty(attrname)) { + c[attrname] = b[attrname]; + } + } + return c; +} + +exports.items = items; +exports.findall = findall; +exports.merge = merge; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/package.json new file mode 100644 index 0000000..5a8ff65 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "elementtree@^0.1.6", + "scope": null, + "escapedName": "elementtree", + "name": "elementtree", + "rawSpec": "^0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android" + ] + ], + "_from": "elementtree@>=0.1.6 <0.2.0", + "_id": "elementtree@0.1.6", + "_inCache": true, + "_installable": true, + "_location": "/elementtree", + "_npmUser": { + "name": "rphillips", + "email": "ryan@trolocsis.com" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "elementtree@^0.1.6", + "scope": null, + "escapedName": "elementtree", + "name": "elementtree", + "rawSpec": "^0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/", + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", + "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "_shrinkwrap": null, + "_spec": "elementtree@^0.1.6", + "_where": "/Users/steveng/repo/cordova/cordova-android", + "author": { + "name": "Rackspace US, Inc." + }, + "bugs": { + "url": "https://github.com/racker/node-elementtree/issues" + }, + "contributors": [ + { + "name": "Paul Querna", + "email": "paul.querna@rackspace.com" + }, + { + "name": "Tomaz Muraus", + "email": "tomaz.muraus@rackspace.com" + } + ], + "dependencies": { + "sax": "0.3.5" + }, + "description": "XML Serialization and Parsing module based on Python's ElementTree.", + "devDependencies": { + "whiskey": "0.8.x" + }, + "directories": { + "lib": "lib" + }, + "dist": { + "shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "tarball": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "homepage": "https://github.com/racker/node-elementtree", + "keywords": [ + "xml", + "sax", + "parser", + "seralization", + "elementtree" + ], + "licenses": [ + { + "type": "Apache", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "main": "lib/elementtree.js", + "maintainers": [ + { + "name": "rphillips", + "email": "ryan@trolocsis.com" + } + ], + "name": "elementtree", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/racker/node-elementtree.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.1.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml1.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml1.xml new file mode 100644 index 0000000..72c33ae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml1.xml @@ -0,0 +1,17 @@ + + + dd + test_object_1 + 4281c348eaf83e70ddce0e07221c3d28 + 14 + application/octetstream + 2009-02-03T05:26:32.612278 + + + test_object_2 + b039efe731ad111bc1b0ef221c3849d0 + 64 + application/octetstream + 2009-02-03T05:26:32.612278 + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml2.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml2.xml new file mode 100644 index 0000000..5f94bbd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/data/xml2.xml @@ -0,0 +1,14 @@ + + + + Hello World + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/test-simple.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/test-simple.js new file mode 100644 index 0000000..1fc04b8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/elementtree/tests/test-simple.js @@ -0,0 +1,339 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var fs = require('fs'); +var path = require('path'); + +var sprintf = require('./../lib/sprintf').sprintf; +var et = require('elementtree'); +var XML = et.XML; +var ElementTree = et.ElementTree; +var Element = et.Element; +var SubElement = et.SubElement; +var SyntaxError = require('./../lib/errors').SyntaxError; + +function readFile(name) { + return fs.readFileSync(path.join(__dirname, '/data/', name), 'utf8'); +} + +exports['test_simplest'] = function(test, assert) { + /* Ported from */ + var Element = et.Element; + var root = Element('root'); + root.append(Element('one')); + root.append(Element('two')); + root.append(Element('three')); + assert.equal(3, root.len()); + assert.equal('one', root.getItem(0).tag); + assert.equal('two', root.getItem(1).tag); + assert.equal('three', root.getItem(2).tag); + test.finish(); +}; + + +exports['test_attribute_values'] = function(test, assert) { + var XML = et.XML; + var root = XML(''); + assert.equal('Alpha', root.attrib['alpha']); + assert.equal('Beta', root.attrib['beta']); + assert.equal('Gamma', root.attrib['gamma']); + test.finish(); +}; + + +exports['test_findall'] = function(test, assert) { + var XML = et.XML; + var root = XML(''); + + assert.equal(root.findall("c").length, 1); + assert.equal(root.findall(".//c").length, 2); + assert.equal(root.findall(".//b").length, 3); + assert.equal(root.findall(".//b")[0]._children.length, 1); + assert.equal(root.findall(".//b")[1]._children.length, 0); + assert.equal(root.findall(".//b")[2]._children.length, 0); + assert.deepEqual(root.findall('.//b')[0], root.getchildren()[0]); + + test.finish(); +}; + +exports['test_find'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + var c = SubElement(a, 'c'); + + assert.deepEqual(a.find('./b/..'), a); + test.finish(); +}; + +exports['test_elementtree_find_qname'] = function(test, assert) { + var tree = new et.ElementTree(XML('')); + assert.deepEqual(tree.find(new et.QName('c')), tree.getroot()._children[2]); + test.finish(); +}; + +exports['test_attrib_ns_clear'] = function(test, assert) { + var attribNS = '{http://foo/bar}x'; + + var par = Element('par'); + par.set(attribNS, 'a'); + var child = SubElement(par, 'child'); + child.set(attribNS, 'b'); + + assert.equal('a', par.get(attribNS)); + assert.equal('b', child.get(attribNS)); + + par.clear(); + assert.equal(null, par.get(attribNS)); + assert.equal('b', child.get(attribNS)); + test.finish(); +}; + +exports['test_create_tree_and_parse_simple'] = function(test, assert) { + var i = 0; + var e = new Element('bar', {}); + var expected = "\n" + + 'ponies'; + + SubElement(e, "blah", {a: 11}); + SubElement(e, "blah", {a: 12}); + var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); + se.text = 'ponies'; + + se.itertext(function(text) { + assert.equal(text, 'ponies'); + i++; + }); + + assert.equal(i, 1); + var etree = new ElementTree(e); + var xml = etree.write(); + assert.equal(xml, expected); + test.finish(); +}; + +exports['test_write_with_options'] = function(test, assert) { + var i = 0; + var e = new Element('bar', {}); + var expected1 = "\n" + + '\n' + + ' \n' + + ' test\n' + + ' \n' + + ' \n' + + ' ponies\n' + + '\n'; + var expected2 = "\n" + + '\n' + + ' \n' + + ' test\n' + + ' \n' + + ' \n' + + ' ponies\n' + + '\n'; + + var expected3 = "\n" + + '\n' + + ' \n' + + ' Hello World\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' Test & Test & Test\n' + + ' \n' + + '\n'; + + var se1 = SubElement(e, "blah", {a: 11}); + var se2 = SubElement(se1, "baz", {d: 11}); + se2.text = 'test'; + SubElement(e, "blah", {a: 12}); + var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); + se.text = 'ponies'; + + se.itertext(function(text) { + assert.equal(text, 'ponies'); + i++; + }); + + assert.equal(i, 1); + var etree = new ElementTree(e); + var xml1 = etree.write({'indent': 4}); + var xml2 = etree.write({'indent': 2}); + assert.equal(xml1, expected1); + assert.equal(xml2, expected2); + + var file = readFile('xml2.xml'); + var etree2 = et.parse(file); + var xml3 = etree2.write({'indent': 4}); + assert.equal(xml3, expected3); + test.finish(); +}; + +exports['test_parse_and_find_2'] = function(test, assert) { + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + assert.equal(etree.findall('./object').length, 2); + assert.equal(etree.findall('[@name]').length, 1); + assert.equal(etree.findall('[@name="test_container_1"]').length, 1); + assert.equal(etree.findall('[@name=\'test_container_1\']').length, 1); + assert.equal(etree.findall('./object')[0].findtext('name'), 'test_object_1'); + assert.equal(etree.findtext('./object/name'), 'test_object_1'); + assert.equal(etree.findall('.//bytes').length, 2); + assert.equal(etree.findall('*/bytes').length, 2); + assert.equal(etree.findall('*/foobar').length, 0); + + test.finish(); +}; + +exports['test_namespaced_attribute'] = function(test, assert) { + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + assert.equal(etree.findall('*/bytes[@android:type="cool"]').length, 1); + + test.finish(); +} + +exports['test_syntax_errors'] = function(test, assert) { + var expressions = [ './/@bar', '[@bar', '[@foo=bar]', '[@', '/bar' ]; + var errCount = 0; + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + expressions.forEach(function(expression) { + try { + etree.findall(expression); + } + catch (err) { + errCount++; + } + }); + + assert.equal(errCount, expressions.length); + test.finish(); +}; + +exports['test_register_namespace'] = function(test, assert){ + var prefix = 'TESTPREFIX'; + var namespace = 'http://seriously.unknown/namespace/URI'; + var errCount = 0; + + var etree = Element(sprintf('{%s}test', namespace)); + assert.equal(et.tostring(etree, { 'xml_declaration': false}), + sprintf('', namespace)); + + et.register_namespace(prefix, namespace); + var etree = Element(sprintf('{%s}test', namespace)); + assert.equal(et.tostring(etree, { 'xml_declaration': false}), + sprintf('<%s:test xmlns:%s="%s" />', prefix, prefix, namespace)); + + try { + et.register_namespace('ns25', namespace); + } + catch (err) { + errCount++; + } + + assert.equal(errCount, 1, 'Reserved prefix used, but exception was not thrown'); + test.finish(); +}; + +exports['test_tostring'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + var c = SubElement(a, 'c'); + c.text = 543; + + assert.equal(et.tostring(a, { 'xml_declaration': false }), '543'); + assert.equal(et.tostring(c, { 'xml_declaration': false }), '543'); + test.finish(); +}; + +exports['test_escape'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + b.text = '&&&&<>"\n\r'; + + assert.equal(et.tostring(a, { 'xml_declaration': false }), '&&&&<>\"\n\r'); + test.finish(); +}; + +exports['test_find_null'] = function(test, assert) { + var root = Element('root'); + var node = SubElement(root, 'node'); + var leaf = SubElement(node, 'leaf'); + leaf.text = 'ipsum'; + + assert.equal(root.find('node/leaf'), leaf); + assert.equal(root.find('no-such-node/leaf'), null); + test.finish(); +}; + +exports['test_findtext_null'] = function(test, assert) { + var root = Element('root'); + var node = SubElement(root, 'node'); + var leaf = SubElement(node, 'leaf'); + leaf.text = 'ipsum'; + + assert.equal(root.findtext('node/leaf'), 'ipsum'); + assert.equal(root.findtext('no-such-node/leaf'), null); + test.finish(); +}; + +exports['test_remove'] = function(test, assert) { + var root = Element('root'); + var node1 = SubElement(root, 'node1'); + var node2 = SubElement(root, 'node2'); + var node3 = SubElement(root, 'node3'); + + assert.equal(root.len(), 3); + + root.remove(node2); + + assert.equal(root.len(), 2); + assert.equal(root.getItem(0).tag, 'node1') + assert.equal(root.getItem(1).tag, 'node3') + + test.finish(); +}; + +exports['test_cdata_write'] = function(test, assert) { + var root, etree, xml, values, value, i; + + values = [ + 'if(0>1) then true;', + 'ponies hello', + '' + ]; + + for (i = 0; i < values.length; i++) { + value = values[i]; + + root = Element('root'); + root.append(et.CData(value)); + etree = new ElementTree(root); + xml = etree.write({'xml_declaration': false}); + + assert.equal(xml, sprintf('', value)); + } + + test.finish(); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/README.md new file mode 100644 index 0000000..063cf95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/README.md @@ -0,0 +1,377 @@ +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) + +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Negation + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird, and for the time being, this should be +avoided. The behavior is deprecated in version 5, and will be removed +entirely in version 6. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* `cb` {Function} + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* return: {Array} filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` {String} pattern to search for +* `options` {Object} +* `cb` {Function} Called when an error occurs, or matches are found + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'DIR'` - Path exists, and is not a directory + * `'FILE'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the matched. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of patterns to exclude matches. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `nonegate` Suppress deprecated `negate` behavior. (See below.) + Default=true +* `nocomment` Suppress deprecated `comment` behavior. (See below.) + Default=true + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +**Note**: In version 5 of this module, negation and comments are +**disabled** by default. You can explicitly set `nonegate:false` or +`nocomment:false` to re-enable them. They are going away entirely in +version 6. + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird. It is better to use the `ignore` option +to set a pattern or set of patterns to exclude from matches. If you +want the "everything except *x*" type of behavior, you can use `**` as +the main pattern, and set an `ignore` for the things to exclude. + +The comments feature is added in minimatch, primarily to more easily +support use cases like ignore files, where a `#` at the start of a +line makes the pattern "empty". However, in the context of a +straightforward filesystem globber, "comments" don't make much sense. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/common.js new file mode 100644 index 0000000..e36a631 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/common.js @@ -0,0 +1,245 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern) + } + + return { + matcher: new Minimatch(pattern), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = options.cwd + self.changedCwd = path.resolve(options.cwd) !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.nomount = !!options.nomount + + // disable comments and negation unless the user explicitly + // passes in false as the option. + options.nonegate = options.nonegate === false ? false : true + options.nocomment = options.nocomment === false ? false : true + deprecationWarning(options) + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +// TODO(isaacs): remove entirely in v6 +// exported to reset in tests +exports.deprecationWarned +function deprecationWarning(options) { + if (!options.nonegate || !options.nocomment) { + if (process.noDeprecation !== true && !exports.deprecationWarned) { + var msg = 'glob WARNING: comments and negation will be disabled in v6' + if (process.throwDeprecation) + throw new Error(msg) + else if (process.traceDeprecation) + console.trace(msg) + else + console.error(msg) + + exports.deprecationWarned = true + } + } +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + return !(/\/$/.test(e)) + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/glob.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/glob.js new file mode 100644 index 0000000..022d2ac --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/glob.js @@ -0,0 +1,752 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +glob.hasMagic = function (pattern, options_) { + var options = util._extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + + function done () { + --self._processing + if (self._processing <= 0) + self._finish() + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/package.json new file mode 100644 index 0000000..2823a1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "glob@^5.0.13", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^5.0.13", + "spec": ">=5.0.13 <6.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "glob@>=5.0.13 <6.0.0", + "_id": "glob@5.0.15", + "_inCache": true, + "_installable": true, + "_location": "/glob", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "glob@^5.0.13", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^5.0.13", + "spec": ">=5.0.13 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common", + "/istanbul" + ], + "_resolved": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "_shrinkwrap": null, + "_spec": "glob@^5.0.13", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "description": "a little globber", + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^1.1.4", + "tick": "0.0.6" + }, + "directories": {}, + "dist": { + "shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "tarball": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "gitHead": "3a7e71d453dd80e75b196fd262dd23ed54beeceb", + "homepage": "https://github.com/isaacs/node-glob#readme", + "license": "ISC", + "main": "glob.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "bench": "bash benchmark.sh", + "benchclean": "node benchclean.js", + "prepublish": "npm run benchclean", + "prof": "bash prof.sh && cat profile.txt", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + }, + "version": "5.0.15" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/sync.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/sync.js new file mode 100644 index 0000000..09883d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/glob/sync.js @@ -0,0 +1,460 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/LICENSE new file mode 100644 index 0000000..05eeeb8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/README.md new file mode 100644 index 0000000..6dc8929 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/inflight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/inflight.js new file mode 100644 index 0000000..48202b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/inflight.js @@ -0,0 +1,54 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/package.json new file mode 100644 index 0000000..2d30258 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inflight/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "inflight@^1.0.4", + "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + ] + ], + "_from": "inflight@>=1.0.4 <2.0.0", + "_id": "inflight@1.0.6", + "_inCache": true, + "_installable": true, + "_location": "/inflight", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inflight@^1.0.4", + "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cli/glob", + "/glob" + ], + "_resolved": "http://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "_shrinkwrap": null, + "_spec": "inflight@^1.0.4", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "description": "Add callbacks to requests in flight to avoid async duplication", + "devDependencies": { + "tap": "^7.1.2" + }, + "directories": {}, + "dist": { + "shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "files": [ + "inflight.js" + ], + "gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "inflight", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/inflight.git" + }, + "scripts": { + "test": "tap test.js --100" + }, + "version": "1.0.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits.js new file mode 100644 index 0000000..3b94763 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits_browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/package.json new file mode 100644 index 0000000..740569d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/inherits/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "inherits@2", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + ] + ], + "_from": "inherits@>=2.0.0 <3.0.0", + "_id": "inherits@2.0.3", + "_inCache": true, + "_installable": true, + "_location": "/inherits", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inherits@2", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cli/glob", + "/fileset/glob", + "/glob", + "/readable-stream" + ], + "_resolved": "http://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_shasum": "633c2c83e3da42a502f52466022480f4208261de", + "_shrinkwrap": null, + "_spec": "inherits@2", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": { + "tap": "^7.1.0" + }, + "directories": {}, + "dist": { + "shasum": "633c2c83e3da42a502f52466022480f4208261de", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/README.md new file mode 100644 index 0000000..fd98e5c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/README.md @@ -0,0 +1,121 @@ +# lodash v3.10.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. + +Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): +```bash +$ lodash modularize modern exports=node -o ./ +$ lodash modern -d -o ./index.js +``` + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash +``` + +In Node.js/io.js: + +```js +// load the modern build +var _ = require('lodash'); +// or a method category +var array = require('lodash/array'); +// or a method (great for smaller builds with browserify/webpack) +var chunk = require('lodash/array/chunk'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details. + +**Note:**
    +Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
    +Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. + +## Module formats + +lodash is also available in a variety of other builds & module formats. + + * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds + * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds + * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build + +## Further Reading + + * [API Documentation](https://lodash.com/docs) + * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) + * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) + * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) + * [More Resources](https://github.com/lodash/lodash/wiki/Resources) + +## Features + + * ~100% [code coverage](https://coveralls.io/r/lodash) + * Follows [semantic versioning](http://semver.org/) for releases + * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining + * [_(…)](https://lodash.com/docs#_) supports implicit chaining + * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order + * [_.at](https://lodash.com/docs#at) for cherry-picking collection values + * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch + * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) + * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size + * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions + * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control + * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties + * [_.fill](https://lodash.com/docs#fill) to fill arrays with values + * [_.findKey](https://lodash.com/docs#findKey) for finding keys + * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) + * [_.forEach](https://lodash.com/docs#forEach) supports exiting early + * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties + * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties + * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting + * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods + * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range + * [_.isNative](https://lodash.com/docs#isNative) to check for native functions + * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects + * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays + * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object + * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons + * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) + * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) + * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods + * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition + * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior + * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays + * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers + * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions + * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking + * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values + * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders + * [_.support](https://lodash.com/docs#support) for flagging environment features + * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) + * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects + * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined + * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties + * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) + * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), & + [more](https://lodash.com/docs "_.ceil & _.floor") math methods + * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & + [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders + * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & + [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods + * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & + [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks + * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & + [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) + * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & + [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods + * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & + [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings + * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences + * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence + +## Support + +Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6. +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array.js new file mode 100644 index 0000000..e5121fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array.js @@ -0,0 +1,44 @@ +module.exports = { + 'chunk': require('./array/chunk'), + 'compact': require('./array/compact'), + 'difference': require('./array/difference'), + 'drop': require('./array/drop'), + 'dropRight': require('./array/dropRight'), + 'dropRightWhile': require('./array/dropRightWhile'), + 'dropWhile': require('./array/dropWhile'), + 'fill': require('./array/fill'), + 'findIndex': require('./array/findIndex'), + 'findLastIndex': require('./array/findLastIndex'), + 'first': require('./array/first'), + 'flatten': require('./array/flatten'), + 'flattenDeep': require('./array/flattenDeep'), + 'head': require('./array/head'), + 'indexOf': require('./array/indexOf'), + 'initial': require('./array/initial'), + 'intersection': require('./array/intersection'), + 'last': require('./array/last'), + 'lastIndexOf': require('./array/lastIndexOf'), + 'object': require('./array/object'), + 'pull': require('./array/pull'), + 'pullAt': require('./array/pullAt'), + 'remove': require('./array/remove'), + 'rest': require('./array/rest'), + 'slice': require('./array/slice'), + 'sortedIndex': require('./array/sortedIndex'), + 'sortedLastIndex': require('./array/sortedLastIndex'), + 'tail': require('./array/tail'), + 'take': require('./array/take'), + 'takeRight': require('./array/takeRight'), + 'takeRightWhile': require('./array/takeRightWhile'), + 'takeWhile': require('./array/takeWhile'), + 'union': require('./array/union'), + 'uniq': require('./array/uniq'), + 'unique': require('./array/unique'), + 'unzip': require('./array/unzip'), + 'unzipWith': require('./array/unzipWith'), + 'without': require('./array/without'), + 'xor': require('./array/xor'), + 'zip': require('./array/zip'), + 'zipObject': require('./array/zipObject'), + 'zipWith': require('./array/zipWith') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/chunk.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/chunk.js new file mode 100644 index 0000000..c8be1fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/chunk.js @@ -0,0 +1,46 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/compact.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/compact.js new file mode 100644 index 0000000..1dc1c55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/compact.js @@ -0,0 +1,30 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/difference.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/difference.js new file mode 100644 index 0000000..128932a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/difference.js @@ -0,0 +1,29 @@ +var baseDifference = require('../internal/baseDifference'), + baseFlatten = require('../internal/baseFlatten'), + isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ +var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; +}); + +module.exports = difference; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/drop.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/drop.js new file mode 100644 index 0000000..039a0b5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/drop.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = drop; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRight.js new file mode 100644 index 0000000..14b5eb6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRightWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRightWhile.js new file mode 100644 index 0000000..be158bd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropWhile.js new file mode 100644 index 0000000..d9eabae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/dropWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/fill.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/fill.js new file mode 100644 index 0000000..2c8f6da --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/fill.js @@ -0,0 +1,44 @@ +var baseFill = require('../internal/baseFill'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ +function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findIndex.js new file mode 100644 index 0000000..2a6b8e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ +var findIndex = createFindIndex(); + +module.exports = findIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findLastIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findLastIndex.js new file mode 100644 index 0000000..d6d8eca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/findLastIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ +var findLastIndex = createFindIndex(true); + +module.exports = findLastIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/first.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/first.js new file mode 100644 index 0000000..b3b9c79 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/first.js @@ -0,0 +1,22 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ +function first(array) { + return array ? array[0] : undefined; +} + +module.exports = first; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flatten.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flatten.js new file mode 100644 index 0000000..dc2eff8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flatten.js @@ -0,0 +1,32 @@ +var baseFlatten = require('../internal/baseFlatten'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it's only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ +function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; +} + +module.exports = flatten; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flattenDeep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flattenDeep.js new file mode 100644 index 0000000..9f775fe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/flattenDeep.js @@ -0,0 +1,21 @@ +var baseFlatten = require('../internal/baseFlatten'); + +/** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ +function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; +} + +module.exports = flattenDeep; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/head.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/head.js new file mode 100644 index 0000000..1961b08 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/head.js @@ -0,0 +1 @@ +module.exports = require('./first'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/indexOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/indexOf.js new file mode 100644 index 0000000..4cfc682 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/indexOf.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + binaryIndex = require('../internal/binaryIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); +} + +module.exports = indexOf; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/initial.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/initial.js new file mode 100644 index 0000000..59b7a7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/initial.js @@ -0,0 +1,20 @@ +var dropRight = require('./dropRight'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + return dropRight(array, 1); +} + +module.exports = initial; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/intersection.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/intersection.js new file mode 100644 index 0000000..f218432 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/intersection.js @@ -0,0 +1,58 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + cacheIndexOf = require('../internal/cacheIndexOf'), + createCache = require('../internal/createCache'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ +var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = baseIndexOf, + isCommon = true, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; +}); + +module.exports = intersection; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/last.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/last.js new file mode 100644 index 0000000..299af31 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/last.js @@ -0,0 +1,19 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/lastIndexOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/lastIndexOf.js new file mode 100644 index 0000000..02b8062 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/lastIndexOf.js @@ -0,0 +1,60 @@ +var binaryIndex = require('../internal/binaryIndex'), + indexOfNaN = require('../internal/indexOfNaN'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = lastIndexOf; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/object.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/object.js new file mode 100644 index 0000000..f4a3453 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/object.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pull.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pull.js new file mode 100644 index 0000000..7bcbb4a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pull.js @@ -0,0 +1,52 @@ +var baseIndexOf = require('../internal/baseIndexOf'); + +/** Used for native method references. */ +var arrayProto = Array.prototype; + +/** Native method references. */ +var splice = arrayProto.splice; + +/** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ +function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = baseIndexOf, + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = pull; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pullAt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pullAt.js new file mode 100644 index 0000000..4ca2476 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/pullAt.js @@ -0,0 +1,40 @@ +var baseAt = require('../internal/baseAt'), + baseCompareAscending = require('../internal/baseCompareAscending'), + baseFlatten = require('../internal/baseFlatten'), + basePullAt = require('../internal/basePullAt'), + restParam = require('../function/restParam'); + +/** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ +var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; +}); + +module.exports = pullAt; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/remove.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/remove.js new file mode 100644 index 0000000..0cf979b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/remove.js @@ -0,0 +1,64 @@ +var baseCallback = require('../internal/baseCallback'), + basePullAt = require('../internal/basePullAt'); + +/** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ +function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = baseCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; +} + +module.exports = remove; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/rest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/rest.js new file mode 100644 index 0000000..9bfb734 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/rest.js @@ -0,0 +1,21 @@ +var drop = require('./drop'); + +/** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ +function rest(array) { + return drop(array, 1); +} + +module.exports = rest; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/slice.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/slice.js new file mode 100644 index 0000000..48ef1a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/slice.js @@ -0,0 +1,30 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); +} + +module.exports = slice; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedIndex.js new file mode 100644 index 0000000..6903bca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedIndex.js @@ -0,0 +1,53 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it's invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ +var sortedIndex = createSortedIndex(); + +module.exports = sortedIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedLastIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedLastIndex.js new file mode 100644 index 0000000..81a4a86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/sortedLastIndex.js @@ -0,0 +1,25 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ +var sortedLastIndex = createSortedIndex(true); + +module.exports = sortedLastIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/tail.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/tail.js new file mode 100644 index 0000000..c5dfe77 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/tail.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/take.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/take.js new file mode 100644 index 0000000..875917a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/take.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ +function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = take; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRight.js new file mode 100644 index 0000000..6e89c87 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ +function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = takeRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRightWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRightWhile.js new file mode 100644 index 0000000..5464d13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ +function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true) + : []; +} + +module.exports = takeRightWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeWhile.js new file mode 100644 index 0000000..f7e28a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/takeWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ +function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3)) + : []; +} + +module.exports = takeWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/union.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/union.js new file mode 100644 index 0000000..53cefe4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/union.js @@ -0,0 +1,24 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseUniq = require('../internal/baseUniq'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ +var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); +}); + +module.exports = union; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/uniq.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/uniq.js new file mode 100644 index 0000000..ae937ef --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/uniq.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseUniq = require('../internal/baseUniq'), + isIterateeCall = require('../internal/isIterateeCall'), + sortedUniq = require('../internal/sortedUniq'); + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it's invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); + return (isSorted) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); +} + +module.exports = uniq; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unique.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unique.js new file mode 100644 index 0000000..396de1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unique.js @@ -0,0 +1 @@ +module.exports = require('./uniq'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzip.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzip.js new file mode 100644 index 0000000..0a539fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzip.js @@ -0,0 +1,47 @@ +var arrayFilter = require('../internal/arrayFilter'), + arrayMap = require('../internal/arrayMap'), + baseProperty = require('../internal/baseProperty'), + isArrayLike = require('../internal/isArrayLike'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ +function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; +} + +module.exports = unzip; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzipWith.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzipWith.js new file mode 100644 index 0000000..324a2b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/unzipWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('../internal/arrayMap'), + arrayReduce = require('../internal/arrayReduce'), + bindCallback = require('../internal/bindCallback'), + unzip = require('./unzip'); + +/** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ +function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); +} + +module.exports = unzipWith; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/without.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/without.js new file mode 100644 index 0000000..2ac3d11 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/without.js @@ -0,0 +1,27 @@ +var baseDifference = require('../internal/baseDifference'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ +var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/xor.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/xor.js new file mode 100644 index 0000000..04ef32a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/xor.js @@ -0,0 +1,35 @@ +var arrayPush = require('../internal/arrayPush'), + baseDifference = require('../internal/baseDifference'), + baseUniq = require('../internal/baseUniq'), + isArrayLike = require('../internal/isArrayLike'); + +/** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; +} + +module.exports = xor; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zip.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zip.js new file mode 100644 index 0000000..53a6f69 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zip.js @@ -0,0 +1,21 @@ +var restParam = require('../function/restParam'), + unzip = require('./unzip'); + +/** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ +var zip = restParam(unzip); + +module.exports = zip; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipObject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipObject.js new file mode 100644 index 0000000..dec7a21 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipObject.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); + +/** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ +function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; +} + +module.exports = zipObject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipWith.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipWith.js new file mode 100644 index 0000000..ad10374 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/array/zipWith.js @@ -0,0 +1,36 @@ +var restParam = require('../function/restParam'), + unzipWith = require('./unzipWith'); + +/** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ +var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); +}); + +module.exports = zipWith; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain.js new file mode 100644 index 0000000..6439627 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain.js @@ -0,0 +1,16 @@ +module.exports = { + 'chain': require('./chain/chain'), + 'commit': require('./chain/commit'), + 'concat': require('./chain/concat'), + 'lodash': require('./chain/lodash'), + 'plant': require('./chain/plant'), + 'reverse': require('./chain/reverse'), + 'run': require('./chain/run'), + 'tap': require('./chain/tap'), + 'thru': require('./chain/thru'), + 'toJSON': require('./chain/toJSON'), + 'toString': require('./chain/toString'), + 'value': require('./chain/value'), + 'valueOf': require('./chain/valueOf'), + 'wrapperChain': require('./chain/wrapperChain') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/chain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/chain.js new file mode 100644 index 0000000..453ba1e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/chain.js @@ -0,0 +1,35 @@ +var lodash = require('./lodash'); + +/** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/commit.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/commit.js new file mode 100644 index 0000000..c732d1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/commit.js @@ -0,0 +1 @@ +module.exports = require('./wrapperCommit'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/concat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/concat.js new file mode 100644 index 0000000..90607d1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/concat.js @@ -0,0 +1 @@ +module.exports = require('./wrapperConcat'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/lodash.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/lodash.js new file mode 100644 index 0000000..1c3467e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/lodash.js @@ -0,0 +1,125 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + baseLodash = require('../internal/baseLodash'), + isArray = require('../lang/isArray'), + isObjectLike = require('../internal/isObjectLike'), + wrapperClone = require('../internal/wrapperClone'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; + +module.exports = lodash; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/plant.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/plant.js new file mode 100644 index 0000000..04099f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/plant.js @@ -0,0 +1 @@ +module.exports = require('./wrapperPlant'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/reverse.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/reverse.js new file mode 100644 index 0000000..f72a64a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/reverse.js @@ -0,0 +1 @@ +module.exports = require('./wrapperReverse'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/run.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/run.js new file mode 100644 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/run.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/tap.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/tap.js new file mode 100644 index 0000000..3d0257e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/tap.js @@ -0,0 +1,29 @@ +/** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ +function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; +} + +module.exports = tap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/thru.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/thru.js new file mode 100644 index 0000000..a715780 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/thru.js @@ -0,0 +1,26 @@ +/** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ +function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); +} + +module.exports = thru; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toJSON.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toJSON.js new file mode 100644 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toJSON.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toString.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toString.js new file mode 100644 index 0000000..c7bcbf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/toString.js @@ -0,0 +1 @@ +module.exports = require('./wrapperToString'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/value.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/value.js new file mode 100644 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/value.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/valueOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/valueOf.js new file mode 100644 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/valueOf.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperChain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperChain.js new file mode 100644 index 0000000..3823481 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperChain.js @@ -0,0 +1,32 @@ +var chain = require('./chain'); + +/** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ +function wrapperChain() { + return chain(this); +} + +module.exports = wrapperChain; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperCommit.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperCommit.js new file mode 100644 index 0000000..c3d2898 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperCommit.js @@ -0,0 +1,32 @@ +var LodashWrapper = require('../internal/LodashWrapper'); + +/** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperConcat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperConcat.js new file mode 100644 index 0000000..799156c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperConcat.js @@ -0,0 +1,34 @@ +var arrayConcat = require('../internal/arrayConcat'), + baseFlatten = require('../internal/baseFlatten'), + isArray = require('../lang/isArray'), + restParam = require('../function/restParam'), + toObject = require('../internal/toObject'); + +/** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); +}); + +module.exports = wrapperConcat; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperPlant.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperPlant.js new file mode 100644 index 0000000..234fe41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperPlant.js @@ -0,0 +1,45 @@ +var baseLodash = require('../internal/baseLodash'), + wrapperClone = require('../internal/wrapperClone'); + +/** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ +function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; +} + +module.exports = wrapperPlant; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperReverse.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperReverse.js new file mode 100644 index 0000000..6ba546d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperReverse.js @@ -0,0 +1,43 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + thru = require('./thru'); + +/** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); +} + +module.exports = wrapperReverse; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperToString.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperToString.js new file mode 100644 index 0000000..db975a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperToString.js @@ -0,0 +1,17 @@ +/** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ +function wrapperToString() { + return (this.value() + ''); +} + +module.exports = wrapperToString; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperValue.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperValue.js new file mode 100644 index 0000000..2734e41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/chain/wrapperValue.js @@ -0,0 +1,20 @@ +var baseWrapperValue = require('../internal/baseWrapperValue'); + +/** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ +function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); +} + +module.exports = wrapperValue; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection.js new file mode 100644 index 0000000..0338857 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection.js @@ -0,0 +1,44 @@ +module.exports = { + 'all': require('./collection/all'), + 'any': require('./collection/any'), + 'at': require('./collection/at'), + 'collect': require('./collection/collect'), + 'contains': require('./collection/contains'), + 'countBy': require('./collection/countBy'), + 'detect': require('./collection/detect'), + 'each': require('./collection/each'), + 'eachRight': require('./collection/eachRight'), + 'every': require('./collection/every'), + 'filter': require('./collection/filter'), + 'find': require('./collection/find'), + 'findLast': require('./collection/findLast'), + 'findWhere': require('./collection/findWhere'), + 'foldl': require('./collection/foldl'), + 'foldr': require('./collection/foldr'), + 'forEach': require('./collection/forEach'), + 'forEachRight': require('./collection/forEachRight'), + 'groupBy': require('./collection/groupBy'), + 'include': require('./collection/include'), + 'includes': require('./collection/includes'), + 'indexBy': require('./collection/indexBy'), + 'inject': require('./collection/inject'), + 'invoke': require('./collection/invoke'), + 'map': require('./collection/map'), + 'max': require('./math/max'), + 'min': require('./math/min'), + 'partition': require('./collection/partition'), + 'pluck': require('./collection/pluck'), + 'reduce': require('./collection/reduce'), + 'reduceRight': require('./collection/reduceRight'), + 'reject': require('./collection/reject'), + 'sample': require('./collection/sample'), + 'select': require('./collection/select'), + 'shuffle': require('./collection/shuffle'), + 'size': require('./collection/size'), + 'some': require('./collection/some'), + 'sortBy': require('./collection/sortBy'), + 'sortByAll': require('./collection/sortByAll'), + 'sortByOrder': require('./collection/sortByOrder'), + 'sum': require('./math/sum'), + 'where': require('./collection/where') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/all.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/all.js new file mode 100644 index 0000000..d0839f7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/any.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/any.js new file mode 100644 index 0000000..900ac25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/at.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/at.js new file mode 100644 index 0000000..29236e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/at.js @@ -0,0 +1,29 @@ +var baseAt = require('../internal/baseAt'), + baseFlatten = require('../internal/baseFlatten'), + restParam = require('../function/restParam'); + +/** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ +var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); +}); + +module.exports = at; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/collect.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/collect.js new file mode 100644 index 0000000..0d1e1ab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/collect.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/contains.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/contains.js new file mode 100644 index 0000000..594722a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/countBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/countBy.js new file mode 100644 index 0000000..e97dbb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/countBy.js @@ -0,0 +1,54 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); +}); + +module.exports = countBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/detect.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/detect.js new file mode 100644 index 0000000..2fb6303 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/detect.js @@ -0,0 +1 @@ +module.exports = require('./find'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/each.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/eachRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/every.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/every.js new file mode 100644 index 0000000..5a2d0f5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/every.js @@ -0,0 +1,66 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/filter.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/filter.js new file mode 100644 index 0000000..7620aa7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/filter.js @@ -0,0 +1,61 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ +function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, predicate); +} + +module.exports = filter; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/find.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/find.js new file mode 100644 index 0000000..7358cfe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/find.js @@ -0,0 +1,56 @@ +var baseEach = require('../internal/baseEach'), + createFind = require('../internal/createFind'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ +var find = createFind(baseEach); + +module.exports = find; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findLast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findLast.js new file mode 100644 index 0000000..75dbadc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findLast.js @@ -0,0 +1,25 @@ +var baseEachRight = require('../internal/baseEachRight'), + createFind = require('../internal/createFind'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(baseEachRight, true); + +module.exports = findLast; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findWhere.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findWhere.js new file mode 100644 index 0000000..2d62065 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/findWhere.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + find = require('./find'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ +function findWhere(collection, source) { + return find(collection, baseMatches(source)); +} + +module.exports = findWhere; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldl.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldl.js new file mode 100644 index 0000000..26f53cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldl.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldr.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldr.js new file mode 100644 index 0000000..8fb199e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/foldr.js @@ -0,0 +1 @@ +module.exports = require('./reduceRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEach.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEach.js new file mode 100644 index 0000000..05a8e21 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEach.js @@ -0,0 +1,37 @@ +var arrayEach = require('../internal/arrayEach'), + baseEach = require('../internal/baseEach'), + createForEach = require('../internal/createForEach'); + +/** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ +var forEach = createForEach(arrayEach, baseEach); + +module.exports = forEach; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEachRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEachRight.js new file mode 100644 index 0000000..3499711 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/forEachRight.js @@ -0,0 +1,26 @@ +var arrayEachRight = require('../internal/arrayEachRight'), + baseEachRight = require('../internal/baseEachRight'), + createForEach = require('../internal/createForEach'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ +var forEachRight = createForEach(arrayEachRight, baseEachRight); + +module.exports = forEachRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/groupBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/groupBy.js new file mode 100644 index 0000000..a925c89 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/groupBy.js @@ -0,0 +1,59 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } +}); + +module.exports = groupBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/include.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/include.js new file mode 100644 index 0000000..594722a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/include.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/includes.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/includes.js new file mode 100644 index 0000000..329486a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/includes.js @@ -0,0 +1,57 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + getLength = require('../internal/getLength'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + isLength = require('../internal/isLength'), + isString = require('../lang/isString'), + values = require('../object/values'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `target` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ +function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && baseIndexOf(collection, target, fromIndex) > -1); +} + +module.exports = includes; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/indexBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/indexBy.js new file mode 100644 index 0000000..34a941e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/indexBy.js @@ -0,0 +1,53 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ +var indexBy = createAggregator(function(result, value, key) { + result[key] = value; +}); + +module.exports = indexBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/inject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/inject.js new file mode 100644 index 0000000..26f53cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/inject.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/invoke.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/invoke.js new file mode 100644 index 0000000..6e71721 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/invoke.js @@ -0,0 +1,42 @@ +var baseEach = require('../internal/baseEach'), + invokePath = require('../internal/invokePath'), + isArrayLike = require('../internal/isArrayLike'), + isKey = require('../internal/isKey'), + restParam = require('../function/restParam'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it's + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; +}); + +module.exports = invoke; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/map.js new file mode 100644 index 0000000..5381110 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/map.js @@ -0,0 +1,68 @@ +var arrayMap = require('../internal/arrayMap'), + baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + isArray = require('../lang/isArray'); + +/** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = baseCallback(iteratee, thisArg, 3); + return func(collection, iteratee); +} + +module.exports = map; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/max.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/max.js new file mode 100644 index 0000000..bb1d213 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/max.js @@ -0,0 +1 @@ +module.exports = require('../math/max'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/min.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/min.js new file mode 100644 index 0000000..eef13d0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/min.js @@ -0,0 +1 @@ +module.exports = require('../math/min'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/partition.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/partition.js new file mode 100644 index 0000000..ee35f27 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/partition.js @@ -0,0 +1,66 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ +var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); +}, function() { return [[], []]; }); + +module.exports = partition; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/pluck.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/pluck.js new file mode 100644 index 0000000..5ee1ec8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/pluck.js @@ -0,0 +1,31 @@ +var map = require('./map'), + property = require('../utility/property'); + +/** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ +function pluck(collection, path) { + return map(collection, property(path)); +} + +module.exports = pluck; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduce.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduce.js new file mode 100644 index 0000000..5d5e8c9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduce.js @@ -0,0 +1,44 @@ +var arrayReduce = require('../internal/arrayReduce'), + baseEach = require('../internal/baseEach'), + createReduce = require('../internal/createReduce'); + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ +var reduce = createReduce(arrayReduce, baseEach); + +module.exports = reduce; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduceRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduceRight.js new file mode 100644 index 0000000..5a5753b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reduceRight.js @@ -0,0 +1,29 @@ +var arrayReduceRight = require('../internal/arrayReduceRight'), + baseEachRight = require('../internal/baseEachRight'), + createReduce = require('../internal/createReduce'); + +/** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ +var reduceRight = createReduce(arrayReduceRight, baseEachRight); + +module.exports = reduceRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reject.js new file mode 100644 index 0000000..5592453 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/reject.js @@ -0,0 +1,50 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ +function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); +} + +module.exports = reject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sample.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sample.js new file mode 100644 index 0000000..8e01533 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sample.js @@ -0,0 +1,50 @@ +var baseRandom = require('../internal/baseRandom'), + isIterateeCall = require('../internal/isIterateeCall'), + toArray = require('../lang/toArray'), + toIterable = require('../internal/toIterable'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ +function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; +} + +module.exports = sample; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/select.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/select.js new file mode 100644 index 0000000..ade80f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/select.js @@ -0,0 +1 @@ +module.exports = require('./filter'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/shuffle.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/shuffle.js new file mode 100644 index 0000000..949689c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/shuffle.js @@ -0,0 +1,24 @@ +var sample = require('./sample'); + +/** Used as references for `-Infinity` and `Infinity`. */ +var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + +/** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ +function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); +} + +module.exports = shuffle; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/size.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/size.js new file mode 100644 index 0000000..78dcf4c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/size.js @@ -0,0 +1,30 @@ +var getLength = require('../internal/getLength'), + isLength = require('../internal/isLength'), + keys = require('../object/keys'); + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; +} + +module.exports = size; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/some.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/some.js new file mode 100644 index 0000000..d0b09a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/some.js @@ -0,0 +1,67 @@ +var arraySome = require('../internal/arraySome'), + baseCallback = require('../internal/baseCallback'), + baseSome = require('../internal/baseSome'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ +function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = some; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortBy.js new file mode 100644 index 0000000..4401c77 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortBy.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + baseSortBy = require('../internal/baseSortBy'), + compareAscending = require('../internal/compareAscending'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = baseCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); +} + +module.exports = sortBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByAll.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByAll.js new file mode 100644 index 0000000..4766c20 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByAll.js @@ -0,0 +1,52 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseSortByOrder = require('../internal/baseSortByOrder'), + isIterateeCall = require('../internal/isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); +}); + +module.exports = sortByAll; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByOrder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByOrder.js new file mode 100644 index 0000000..8b4fc19 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sortByOrder.js @@ -0,0 +1,55 @@ +var baseSortByOrder = require('../internal/baseSortByOrder'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); +} + +module.exports = sortByOrder; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sum.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sum.js new file mode 100644 index 0000000..a2e9380 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/sum.js @@ -0,0 +1 @@ +module.exports = require('../math/sum'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/where.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/where.js new file mode 100644 index 0000000..f603bf8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/collection/where.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + filter = require('./filter'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ +function where(collection, source) { + return filter(collection, baseMatches(source)); +} + +module.exports = where; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date.js new file mode 100644 index 0000000..195366e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./date/now') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date/now.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date/now.js new file mode 100644 index 0000000..ffe3060 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/date/now.js @@ -0,0 +1,24 @@ +var getNative = require('../internal/getNative'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeNow = getNative(Date, 'now'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ +var now = nativeNow || function() { + return new Date().getTime(); +}; + +module.exports = now; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function.js new file mode 100644 index 0000000..71f8ebe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function.js @@ -0,0 +1,28 @@ +module.exports = { + 'after': require('./function/after'), + 'ary': require('./function/ary'), + 'backflow': require('./function/backflow'), + 'before': require('./function/before'), + 'bind': require('./function/bind'), + 'bindAll': require('./function/bindAll'), + 'bindKey': require('./function/bindKey'), + 'compose': require('./function/compose'), + 'curry': require('./function/curry'), + 'curryRight': require('./function/curryRight'), + 'debounce': require('./function/debounce'), + 'defer': require('./function/defer'), + 'delay': require('./function/delay'), + 'flow': require('./function/flow'), + 'flowRight': require('./function/flowRight'), + 'memoize': require('./function/memoize'), + 'modArgs': require('./function/modArgs'), + 'negate': require('./function/negate'), + 'once': require('./function/once'), + 'partial': require('./function/partial'), + 'partialRight': require('./function/partialRight'), + 'rearg': require('./function/rearg'), + 'restParam': require('./function/restParam'), + 'spread': require('./function/spread'), + 'throttle': require('./function/throttle'), + 'wrap': require('./function/wrap') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/after.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/after.js new file mode 100644 index 0000000..96a51fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/after.js @@ -0,0 +1,48 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = global.isFinite; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ +function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/ary.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/ary.js new file mode 100644 index 0000000..53a6913 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/ary.js @@ -0,0 +1,34 @@ +var createWrapper = require('../internal/createWrapper'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** Used to compose bitmasks for wrapper metadata. */ +var ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/backflow.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/backflow.js new file mode 100644 index 0000000..1954e94 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/backflow.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/before.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/before.js new file mode 100644 index 0000000..3d94216 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/before.js @@ -0,0 +1,42 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bind.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bind.js new file mode 100644 index 0000000..0de126a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bind.js @@ -0,0 +1,56 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindAll.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindAll.js new file mode 100644 index 0000000..a09e948 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindAll.js @@ -0,0 +1,50 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + functions = require('../object/functions'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1; + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ +var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; +}); + +module.exports = bindAll; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindKey.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindKey.js new file mode 100644 index 0000000..b787fe7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/bindKey.js @@ -0,0 +1,66 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/compose.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/compose.js new file mode 100644 index 0000000..1954e94 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curry.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curry.js new file mode 100644 index 0000000..b7db3fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curry.js @@ -0,0 +1,51 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_FLAG = 8; + +/** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +var curry = createCurry(CURRY_FLAG); + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curryRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curryRight.js new file mode 100644 index 0000000..11c5403 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/curryRight.js @@ -0,0 +1,48 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +var curryRight = createCurry(CURRY_RIGHT_FLAG); + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/debounce.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/debounce.js new file mode 100644 index 0000000..163af90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/debounce.js @@ -0,0 +1,181 @@ +var isObject = require('../lang/isObject'), + now = require('../date/now'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it's invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; +} + +module.exports = debounce; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/defer.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/defer.js new file mode 100644 index 0000000..3accbf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/defer.js @@ -0,0 +1,25 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ +var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/delay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/delay.js new file mode 100644 index 0000000..d5eef27 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/delay.js @@ -0,0 +1,26 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ +var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); +}); + +module.exports = delay; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flow.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flow.js new file mode 100644 index 0000000..a435a3d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flow.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flowRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flowRight.js new file mode 100644 index 0000000..23b9d76 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/flowRight.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/memoize.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/memoize.js new file mode 100644 index 0000000..f3b8d69 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/memoize.js @@ -0,0 +1,80 @@ +var MapCache = require('../internal/MapCache'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +module.exports = memoize; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/modArgs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/modArgs.js new file mode 100644 index 0000000..49b9b5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/modArgs.js @@ -0,0 +1,58 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseFlatten = require('../internal/baseFlatten'), + baseIsFunction = require('../internal/baseIsFunction'), + restParam = require('./restParam'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ +var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); +}); + +module.exports = modArgs; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/negate.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/negate.js new file mode 100644 index 0000000..8247939 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/negate.js @@ -0,0 +1,32 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; +} + +module.exports = negate; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/once.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/once.js new file mode 100644 index 0000000..0b5bd85 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/once.js @@ -0,0 +1,24 @@ +var before = require('./before'); + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ +function once(func) { + return before(2, func); +} + +module.exports = once; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partial.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partial.js new file mode 100644 index 0000000..fb1d04f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partial.js @@ -0,0 +1,43 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ +var partial = createPartial(PARTIAL_FLAG); + +// Assign default placeholders. +partial.placeholder = {}; + +module.exports = partial; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partialRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partialRight.js new file mode 100644 index 0000000..634e6a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/partialRight.js @@ -0,0 +1,42 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_RIGHT_FLAG = 64; + +/** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ +var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + +// Assign default placeholders. +partialRight.placeholder = {}; + +module.exports = partialRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/rearg.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/rearg.js new file mode 100644 index 0000000..f2bd9c4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/rearg.js @@ -0,0 +1,40 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var REARG_FLAG = 256; + +/** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ +var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); +}); + +module.exports = rearg; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/restParam.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/restParam.js new file mode 100644 index 0000000..8852286 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/restParam.js @@ -0,0 +1,58 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/spread.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/spread.js new file mode 100644 index 0000000..780f504 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/spread.js @@ -0,0 +1,44 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ +function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; +} + +module.exports = spread; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/throttle.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/throttle.js new file mode 100644 index 0000000..1dd00ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/throttle.js @@ -0,0 +1,62 @@ +var debounce = require('./debounce'), + isObject = require('../lang/isObject'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); +} + +module.exports = throttle; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/wrap.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/wrap.js new file mode 100644 index 0000000..6a33c5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/function/wrap.js @@ -0,0 +1,33 @@ +var createWrapper = require('../internal/createWrapper'), + identity = require('../utility/identity'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ +function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); +} + +module.exports = wrap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/index.js new file mode 100644 index 0000000..5f17319 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/lodash/index.js @@ -0,0 +1,12351 @@ +/** + * @license + * lodash 3.10.1 (Custom Build) + * Build: `lodash modern -d -o ./index.js` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '3.10.1'; + + /** Used to compose bitmasks for wrapper metadata. */ + var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256; + + /** Used as default options for `_.trunc`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect when a function becomes hot. */ + var HOT_COUNT = 150, + HOT_SPAN = 16; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, + reUnescapedHtml = /[&<>"'`]/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + + /** + * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns) + * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern). + */ + var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + reHasRegExpChars = RegExp(reRegExpChars.source); + + /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ + var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect hexadecimal string values. */ + var reHasHexPrefix = /^0[xX]/; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ + var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to match words to create compound words. */ + var reWords = (function() { + var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', + lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; + + return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); + }()); + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', + 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite', + 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = + cloneableTags[dateTag] = cloneableTags[float32Tag] = + cloneableTags[float64Tag] = cloneableTags[int8Tag] = + cloneableTags[int16Tag] = cloneableTags[int32Tag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[stringTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[mapTag] = cloneableTags[setTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map latin-1 supplementary letters to basic latin letters. */ + var deburredLetters = { + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + '`': '`' + }; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used to escape characters for inclusion in compiled regexes. */ + var regexpEscapes = { + '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34', + '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39', + 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46', + 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66', + 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78' + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Detect free variable `exports`. */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; + + /** Detect free variable `self`. */ + var freeSelf = objectTypes[typeof self] && self && self.Object && self; + + /** Detect free variable `window`. */ + var freeWindow = objectTypes[typeof window] && window && window.Object && window; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `compareAscending` which compares values and + * sorts them in ascending order without guaranteeing a stable sort. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function baseCompareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isFunction` without support for environments + * with incorrect `typeof` results. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + */ + function baseIsFunction(value) { + // Avoid a Chakra JIT bug in compatibility modes of IE 11. + // See https://github.com/jashkenas/underscore/issues/1621 for more details. + return typeof value == 'function' || false; + } + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + return value == null ? '' : (value + ''); + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the first character not found in `chars`. + */ + function charsLeftIndex(string, chars) { + var index = -1, + length = string.length; + + while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the last character not found in `chars`. + */ + function charsRightIndex(string, chars) { + var index = string.length; + + while (index-- && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.sortBy` to compare transformed elements of a collection and stable + * sort them in ascending order. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareAscending(object, other) { + return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); + } + + /** + * Used by `_.sortByOrder` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, + * a value is sorted in ascending order if its corresponding order is "asc", and + * descending if "desc". + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = baseCompareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * ((order === 'asc' || order === true) ? 1 : -1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + function deburrLetter(letter) { + return deburredLetters[letter]; + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeHtmlChar(chr) { + return htmlEscapes[chr]; + } + + /** + * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes. + * + * @private + * @param {string} chr The matched character to escape. + * @param {string} leadingChar The capture group for a leading character. + * @param {string} whitespaceChar The capture group for a whitespace character. + * @returns {string} Returns the escaped character. + */ + function escapeRegExpChar(chr, leadingChar, whitespaceChar) { + if (leadingChar) { + chr = regexpEscapes[chr]; + } else if (whitespaceChar) { + chr = stringEscapes[chr]; + } + return '\\' + chr; + } + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ + function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; + } + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a + * character code is whitespace. + * + * @private + * @param {number} charCode The character code to inspect. + * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. + */ + function isSpace(charCode) { + return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || + (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + if (array[index] === placeholder) { + array[index] = PLACEHOLDER; + result[++resIndex] = index; + } + } + return result; + } + + /** + * An implementation of `_.uniq` optimized for sorted arrays without support + * for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function sortedUniq(array, iteratee) { + var seen, + index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (!index || seen !== computed) { + seen = computed; + result[++resIndex] = value; + } + } + return result; + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the first non-whitespace character. + */ + function trimmedLeftIndex(string) { + var index = -1, + length = string.length; + + while (++index < length && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedRightIndex(string) { + var index = string.length; + + while (index-- && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(chr) { + return htmlUnescapes[chr]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the given `context` object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // using `context` to mock `Date#getTime` use in `_.now` + * var mock = _.runInContext({ + * 'Date': function() { + * return { 'getTime': getTimeMock }; + * } + * }); + * + * // or creating a suped-up `defer` in Node.js + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See https://es5.github.io/#x11.1.5 for more details. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for native method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Native method references. */ + var ArrayBuffer = context.ArrayBuffer, + clearTimeout = context.clearTimeout, + parseFloat = context.parseFloat, + pow = Math.pow, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + Set = getNative(context, 'Set'), + setTimeout = context.setTimeout, + splice = arrayProto.splice, + Uint8Array = context.Uint8Array, + WeakMap = getNative(context, 'WeakMap'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeCreate = getNative(Object, 'create'), + nativeFloor = Math.floor, + nativeIsArray = getNative(Array, 'isArray'), + nativeIsFinite = context.isFinite, + nativeKeys = getNative(Object, 'keys'), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = getNative(Date, 'now'), + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used as references for `-Infinity` and `Infinity`. */ + var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, + POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The function whose prototype all chaining wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable chaining for all wrapper methods. + * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. + */ + function LodashWrapper(value, chainAll, actions) { + this.__wrapped__ = value; + this.__actions__ = actions || []; + this.__chain__ = !!chainAll; + } + + /** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB). Change the following template settings to use + * alternative delimiters. + * + * @static + * @memberOf _ + * @type Object + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type string + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type Object + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type Function + */ + '_': lodash + } + }; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = POSITIVE_INFINITY; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = arrayCopy(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = arrayCopy(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = arrayCopy(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) { + return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a cache object to store key/value pairs. + * + * @private + * @static + * @name Cache + * @memberOf _.memoize + */ + function MapCache() { + this.__data__ = {}; + } + + /** + * Removes `key` and its value from the cache. + * + * @private + * @name delete + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. + */ + function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + + /** + * Gets the cached value for `key`. + * + * @private + * @name get + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to get. + * @returns {*} Returns the cached value. + */ + function mapGet(key) { + return key == '__proto__' ? undefined : this.__data__[key]; + } + + /** + * Checks if a cached value for `key` exists. + * + * @private + * @name has + * @memberOf _.memoize.Cache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + return key != '__proto__' && hasOwnProperty.call(this.__data__, key); + } + + /** + * Sets `value` to `key` of the cache. + * + * @private + * @name set + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to cache. + * @param {*} value The value to cache. + * @returns {Object} Returns the cache object. + */ + function mapSet(key, value) { + if (key != '__proto__') { + this.__data__[key] = value; + } + return this; + } + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } + } + + /** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; + } + + /** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ + function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a new array joining `array` with `other`. + * + * @private + * @param {Array} array The array to join. + * @param {Array} other The other array to join. + * @returns {Array} Returns the new concatenated array. + */ + function arrayConcat(array, other) { + var index = -1, + length = array.length, + othIndex = -1, + othLength = other.length, + result = Array(length + othLength); + + while (++index < length) { + result[index] = array[index]; + } + while (++othIndex < othLength) { + result[index++] = other[othIndex]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseExtremum` for arrays which invokes `iteratee` + * with one argument: (value). + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function arrayExtremum(array, iteratee, comparator, exValue) { + var index = -1, + length = array.length, + computed = exValue, + result = computed; + + while (++index < length) { + var value = array[index], + current = +iteratee(value); + + if (comparator(current, computed)) { + computed = current; + result = value; + } + } + return result; + } + + /** + * A specialized version of `_.filter` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * A specialized version of `_.map` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the first element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initFromArray) { + var index = -1, + length = array.length; + + if (initFromArray && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the last element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initFromArray) { + var length = array.length; + if (initFromArray && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.sum` for arrays without support for callback + * shorthands and `this` binding.. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function arraySum(array, iteratee) { + var length = array.length, + result = 0; + + while (length--) { + result += +iteratee(array[length]) || 0; + } + return result; + } + + /** + * Used by `_.defaults` to customize its `_.assign` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : objectValue; + } + + /** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; + } + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + /** + * The base implementation of `_.at` without support for string collections + * and individual key arguments. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {number[]|string[]} props The property names or indexes of elements to pick. + * @returns {Array} Returns the new array of picked elements. + */ + function baseAt(collection, props) { + var index = -1, + isNil = collection == null, + isArr = !isNil && isArrayLike(collection), + length = isArr ? collection.length : 0, + propsLength = props.length, + result = Array(propsLength); + + while(++index < propsLength) { + var key = props[index]; + if (isArr) { + result[index] = isIndex(key, length) ? collection[key] : undefined; + } else { + result[index] = isNil ? undefined : collection[key]; + } + } + return result; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + /** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); + } + + /** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; + }()); + + /** + * The base implementation of `_.delay` and `_.defer` which accepts an index + * of where to slice the arguments to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Object} args The arguments provide to `func`. + * @returns {number} Returns the timer id. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * Gets the extremum value of `collection` invoking `iteratee` for each value + * in `collection` to generate the criterion by which the value is ranked. + * The `iteratee` is invoked with three arguments: (value, index|key, collection). + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(collection, iteratee, comparator, exValue) { + var computed = exValue, + result = computed; + + baseEach(collection, function(value, index, collection) { + var current = +iteratee(value, index, collection); + if (comparator(current, computed) || (current === exValue && current === result)) { + computed = current; + result = value; + } + }); + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end >>> 0); + start >>>= 0; + + while (start < length) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, + * without support for callback shorthands and `this` binding, which iterates + * over `collection` using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element + * instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from those provided. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the new array of filtered property names. + */ + function baseFunctions(object, props) { + var index = -1, + length = props.length, + resIndex = -1, + result = []; + + while (++index < length) { + var key = props[index]; + if (isFunction(object[key])) { + result[++resIndex] = key; + } + } + return result; + } + + /** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; + } + + /** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; + } + + /** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ + function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * index arguments and capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0; + while (length--) { + var index = indexes[length]; + if (index != previous && isIndex(index)) { + var previous = index; + splice.call(array, index, 1); + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for argument juggling + * and returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns the random number. + */ + function baseRandom(min, max) { + return min + nativeFloor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight` without support + * for callback shorthands and `this` binding, which iterates over `collection` + * using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initFromCollection Specify using the first or last element + * of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initFromCollection + ? (initFromCollection = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `setData` without support for hot loop detection. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sortByOrder` without param guards. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseSortByOrder(collection, iteratees, orders) { + var callback = getCallback(), + index = -1; + + iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); + + var result = baseMap(collection, function(value) { + var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.sum` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(collection, iteratee) { + var result = 0; + baseEach(collection, function(value, index, collection) { + result += +iteratee(value, index, collection) || 0; + }); + return result; + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function baseUniq(array, iteratee) { + var index = -1, + indexOf = getIndexOf(), + length = array.length, + isCommon = indexOf == baseIndexOf, + isLarge = isCommon && length >= LARGE_ARRAY_SIZE, + seen = isLarge ? createCache() : null, + result = []; + + if (seen) { + indexOf = cacheIndexOf; + isCommon = false; + } else { + isLarge = false; + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (isCommon && value === value) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (indexOf(seen, computed, 0) < 0) { + if (iteratee || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; + } + + /** + * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, + * and `_.takeWhile` without support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to peform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + var index = -1, + length = actions.length; + + while (++index < length) { + var action = actions[index]; + result = action.func.apply(action.thisArg, arrayPush([result], action.args)); + } + return result; + } + + /** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); + } + + /** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; + } + + /** + * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function. + * + * @private + * @param {Function} setter The function to set keys and values of the accumulator object. + * @param {Function} [initializer] The function to initialize the accumulator object. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee, thisArg) { + var result = initializer ? initializer() : {}; + iteratee = getCallback(iteratee, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, iteratee(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, iteratee(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ + function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; + } + + /** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ + function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; + } + + /** + * Creates a function that produces compound words out of the words in a + * given string. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + var index = -1, + array = words(deburr(string)), + length = array.length, + result = ''; + + while (++index < length) { + result = callback(result, array[index], index); + } + return result; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.curry` or `_.curryRight` function. + * + * @private + * @param {boolean} flag The curry bit flag. + * @returns {Function} Returns the new curry function. + */ + function createCurry(flag) { + function curryFunc(func, arity, guard) { + if (guard && isIterateeCall(func, arity, guard)) { + arity = undefined; + } + var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryFunc.placeholder; + return result; + } + return curryFunc; + } + + /** + * Creates a `_.defaults` or `_.defaultsDeep` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @param {Function} customizer The function to customize assigned values. + * @returns {Function} Returns the new defaults function. + */ + function createDefaults(assigner, customizer) { + return restParam(function(args) { + var object = args[0]; + if (object == null) { + return object; + } + args.push(customizer); + return assigner.apply(undefined, args); + }); + } + + /** + * Creates a `_.max` or `_.min` function. + * + * @private + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {Function} Returns the new extremum function. + */ + function createExtremum(comparator, exValue) { + return function(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = getCallback(iteratee, thisArg, 3); + if (iteratee.length == 1) { + collection = isArray(collection) ? collection : toIterable(collection); + var result = arrayExtremum(collection, iteratee, comparator, exValue); + if (!(collection.length && result === exValue)) { + return result; + } + } + return baseExtremum(collection, iteratee, comparator, exValue); + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; + } + + /** + * Creates a `_.findIndex` or `_.findLastIndex` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFindIndex(fromRight) { + return function(array, predicate, thisArg) { + if (!(array && array.length)) { + return -1; + } + predicate = getCallback(predicate, thisArg, 3); + return baseFindIndex(array, predicate, fromRight); + }; + } + + /** + * Creates a `_.findKey` or `_.findLastKey` function. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new find function. + */ + function createFindKey(objectFunc) { + return function(object, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + return baseFind(object, predicate, objectFunc, true); + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return function() { + var wrapper, + length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { + wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? -1 : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; + } + + /** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; + } + + /** + * Creates a function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForIn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee, keysIn); + }; + } + + /** + * Creates a function for `_.forOwn` or `_.forOwnRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForOwn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee); + }; + } + + /** + * Creates a function for `_.mapKeys` or `_.mapValues`. + * + * @private + * @param {boolean} [isMapKeys] Specify mapping keys instead of values. + * @returns {Function} Returns the new map function. + */ + function createObjectMapper(isMapKeys) { + return function(object, iteratee, thisArg) { + var result = {}; + iteratee = getCallback(iteratee, thisArg, 3); + + baseForOwn(object, function(value, key, object) { + var mapped = iteratee(value, key, object); + key = isMapKeys ? mapped : key; + value = isMapKeys ? value : mapped; + result[key] = value; + }); + return result; + }; + } + + /** + * Creates a function for `_.padLeft` or `_.padRight`. + * + * @private + * @param {boolean} [fromRight] Specify padding from the right. + * @returns {Function} Returns the new pad function. + */ + function createPadDir(fromRight) { + return function(string, length, chars) { + string = baseToString(string); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); + }; + } + + /** + * Creates a `_.partial` or `_.partialRight` function. + * + * @private + * @param {boolean} flag The partial bit flag. + * @returns {Function} Returns the new partial function. + */ + function createPartial(flag) { + var partialFunc = restParam(function(func, partials) { + var holders = replaceHolders(partials, partialFunc.placeholder); + return createWrapper(func, flag, undefined, partials, holders); + }); + return partialFunc; + } + + /** + * Creates a function for `_.reduce` or `_.reduceRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createReduce(arrayFunc, eachFunc) { + return function(collection, iteratee, accumulator, thisArg) { + var initFromArray = arguments.length < 3; + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee, accumulator, initFromArray) + : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); + }; + } + + /** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ + function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); + } + + /** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ + function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.ceil`, `_.floor`, or `_.round` function. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + precision = precision === undefined ? 0 : (+precision || 0); + if (precision) { + precision = pow(10, precision); + return func(number * precision) / precision; + } + return func(number); + }; + } + + /** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ + function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + var callback = getCallback(iteratee); + return (iteratee == null && callback === baseCallback) + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; + } + + /** + * Gets the appropriate "callback" function. If the `_.callback` method is + * customized this function returns the custom method, otherwise it returns + * the `baseCallback` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function} Returns the chosen function or its result. + */ + function getCallback(func, thisArg, argCount) { + var result = lodash.callback || callback; + result = result === callback ? baseCallback : result; + return argCount ? result(func, thisArg, argCount) : result; + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name, + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized this function returns the custom method, otherwise it returns + * the `baseIndexOf` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function|number} Returns the chosen function or its result. + */ + function getIndexOf(collection, target, fromIndex) { + var result = lodash.indexOf || indexOf; + result = result === indexOf ? baseIndexOf : result; + return collection ? result(collection, target, fromIndex) : result; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; + } + + /** + * Invokes the method at `path` on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function invokePath(object, path, args) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + path = last(path); + } + var func = object == null ? object : object[path]; + return func == null ? undefined : func.apply(object, args); + } + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func); + if (!(funcName in LazyWrapper.prototype)) { + return false; + } + var other = lodash[funcName]; + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers required to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` + * augment function arguments, making the order in which they are executed important, + * preventing the merging of metadata. However, we make an exception for a safe + * common case where curried functions have `_.ary` and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < ARY_FLAG; + + var isCombo = + (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || + (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = arrayCopy(value); + } + // Use source `ary` if it's smaller. + if (srcBitmask & ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function mergeDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults); + } + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + /** + * A specialized version of `_.pick` which picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = arrayCopy(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity function + * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = (function() { + var count = 0, + lastCalled = 0; + + return function(key, value) { + var stamp = now(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return key; + } + } else { + count = 0; + } + return baseSetData(key, value); + }; + }()); + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to an array-like object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array|Object} Returns the array-like object. + */ + function toIterable(value) { + if (value == null) { + return []; + } + if (!isArrayLike(value)) { + return values(value); + } + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + return wrapper instanceof LazyWrapper + ? wrapper.clone() + : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ + var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ + function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ + var findIndex = createFindIndex(); + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ + var findLastIndex = createFindIndex(true); + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ + function first(array) { + return array ? array[0] : undefined; + } + + /** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it is only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ + function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; + } + + /** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ + function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + return dropRight(array, 1); + } + + /** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ + var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; + }); + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = getIndexOf(), + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ + var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ + function rest(array) { + return drop(array, 1); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it is invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ + var sortedIndex = createSortedIndex(); + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ + var sortedLastIndex = createSortedIndex(true); + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ + function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ + function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ + var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it is invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + var callback = getCallback(); + if (!(iteratee == null && callback === baseCallback)) { + iteratee = callback(iteratee, thisArg, 3); + } + return (isSorted && getIndexOf() == baseIndexOf) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; + } + + /** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); + } + + /** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ + var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + var zip = restParam(unzip); + + /** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ + var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); + } + + /** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); + }); + + /** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); + } + + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ + function wrapperToString() { + return (this.value() + ''); + } + + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ + var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ + function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ + var find = createFind(baseEach); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(baseEachRight, true); + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ + function findWhere(collection, source) { + return find(collection, baseMatches(source)); + } + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ + var forEach = createForEach(arrayEach, baseEach); + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ + var forEachRight = createForEach(arrayEachRight, baseEachRight); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + + /** + * Checks if `value` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ + function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && getIndexOf(collection, target, fromIndex) > -1); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it is + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; + }); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = getCallback(iteratee, thisArg, 3); + return func(collection, iteratee); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ + function pluck(collection, path) { + return map(collection, property(path)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ + var reduce = createReduce(arrayReduce, baseEach); + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + var reduceRight = createReduce(arrayReduceRight, baseEachRight); + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ + function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); + } + + /** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = getCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); + } + + /** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); + }); + + /** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); + } + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ + function where(collection, source) { + return filter(collection, baseMatches(source)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ + var now = nativeNow || function() { + return new Date().getTime(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it is called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ + function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it is called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ + var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; + }); + + /** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + var curry = createCurry(CURRY_FLAG); + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + var curryRight = createCurry(CURRY_RIGHT_FLAG); + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it is invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ + var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); + }); + + /** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; + } + + /** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ + var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = createPartial(PARTIAL_FLAG); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ + var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, + * otherwise they are assigned by reference. If `customizer` is provided it is + * invoked to produce the cloned values. If `customizer` returns `undefined` + * cloning is handled by the method instead. The `customizer` is bound to + * `thisArg` and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var shallow = _.clone(users); + * shallow[0] === users[0]; + * // => true + * + * var deep = _.clone(users, true); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.clone(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, customizer, thisArg) { + if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { + isDeep = false; + } + else if (typeof isDeep == 'function') { + thisArg = customizer; + customizer = isDeep; + isDeep = false; + } + return typeof customizer == 'function' + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + : baseClone(value, isDeep); + } + + /** + * Creates a deep clone of `value`. If `customizer` is provided it is invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ + function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) + : baseClone(value, true); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + function gt(value, other) { + return value > other; + } + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + function gte(value, other) { + return value >= other; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + function isDate(value) { + return isObjectLike(value) && objToString.call(value) == dateTag; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + } + + /** + * Checks if `value` is empty. A value is considered empty unless it is an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. If `customizer` is provided it is invoked to compare values. + * If `customizer` returns `undefined` comparisons are handled by the method + * instead. The `customizer` is bound to `thisArg` and invoked with three + * arguments: (value, other [, index|key]). + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. Functions and DOM nodes + * are **not** supported. Provide a customizer function to extend support + * for comparing other values. + * + * @static + * @memberOf _ + * @alias eq + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * object == other; + * // => false + * + * _.isEqual(object, other); + * // => true + * + * // using a customizer callback + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqual(array, other, function(value, other) { + * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { + * return true; + * } + * }); + * // => true + */ + function isEqual(value, other, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(10); + * // => true + * + * _.isFinite('10'); + * // => false + * + * _.isFinite(true); + * // => false + * + * _.isFinite(Object(10)); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. If `customizer` is provided + * it is invoked to compare values. If `customizer` returns `undefined` + * comparisons are handled by the method instead. The `customizer` is bound + * to `thisArg` and invoked with three arguments: (value, other, index|key). + * + * **Note:** This method supports comparing properties of arrays, booleans, + * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions + * and DOM nodes are **not** supported. Provide a customizer function to extend + * support for comparing other values. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + * + * // using a customizer callback + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatch(object, source, function(value, other) { + * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; + * }); + * // => true + */ + function isMatch(object, source, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + return baseIsMatch(object, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) + * which returns `true` for `undefined` and other non-numeric values. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some host objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified + * as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isNumber(8.4); + * // => true + * + * _.isNumber(NaN); + * // => true + * + * _.isNumber('8.4'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + function isRegExp(value) { + return isObject(value) && objToString.call(value) == regexpTag; + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + function lt(value, other) { + return value < other; + } + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + function lte(value, other) { + return value <= other; + } + + /** + * Converts `value` to an array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * (function() { + * return _.toArray(arguments).slice(1); + * }(1, 2, 3)); + * // => [2, 3] + */ + function toArray(value) { + var length = value ? getLength(value) : 0; + if (!isLength(length)) { + return values(value); + } + if (!length) { + return []; + } + return arrayCopy(value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return baseCopy(value, keysIn(value)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + var merge = createAssigner(baseMerge); + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var defaults = createDefaults(assign, assignDefaults); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ + var defaultsDeep = createDefaults(merge, mergeDefaults); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (iteration order is not guaranteed) + * + * // using the `_.matches` callback shorthand + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.findKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findKey(users, 'active'); + * // => 'barney' + */ + var findKey = createFindKey(baseForOwn); + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles` assuming `_.findKey` returns `barney` + * + * // using the `_.matches` callback shorthand + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + var findLastKey = createFindKey(baseForOwnRight); + + /** + * Iterates over own and inherited enumerable properties of an object invoking + * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) + */ + var forIn = createForIn(baseFor); + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' + */ + var forInRight = createForIn(baseForRight); + + /** + * Iterates over own enumerable properties of an object invoking `iteratee` + * for each property. The `iteratee` is bound to `thisArg` and invoked with + * three arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' and 'b' (iteration order is not guaranteed) + */ + var forOwn = createForOwn(baseForOwn); + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' + */ + var forOwnRight = createForOwn(baseForOwnRight); + + /** + * Creates an array of function property names from all enumerable properties, + * own and inherited, of `object`. + * + * @static + * @memberOf _ + * @alias methods + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * _.functions(_); + * // => ['after', 'ary', 'assign', ...] + */ + function functions(object) { + return baseFunctions(object, keysIn(object)); + } + + /** + * Gets the property value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + */ + function has(object, path) { + if (object == null) { + return false; + } + var result = hasOwnProperty.call(object, path); + if (!result && !isKey(path)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + path = last(path); + result = hasOwnProperty.call(object, path); + } + return result || (isLength(object.length) && isIndex(path, object.length) && + (isArray(object) || isArguments(object))); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite property + * assignments of previous values unless `multiValue` is `true`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {boolean} [multiValue] Allow multiple values per key. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + * + * // with `multiValue` + * _.invert(object, true); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function invert(object, multiValue, guard) { + if (guard && isIterateeCall(object, multiValue, guard)) { + multiValue = undefined; + } + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (multiValue) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + else { + result[value] = key; + } + } + return result; + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * property of `object` through `iteratee`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + var mapKeys = createObjectMapper(true); + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through `iteratee`. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { + * return n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * // using the `_.property` callback shorthand + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + var mapValues = createObjectMapper(); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ + var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); + }); + + /** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ + function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + /** + * This method is like `_.get` except that if the resolved value is a function + * it is invoked with the `this` binding of its parent object and its result + * is returned. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a.b.c', 'default'); + * // => 'default' + * + * _.result(object, 'a.b.c', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var result = object == null ? undefined : object[path]; + if (result === undefined) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + result = object == null ? undefined : object[last(path)]; + } + result = result === undefined ? defaultValue : result; + } + return isFunction(result) ? result.call(object) : result; + } + + /** + * Sets the property value of `path` on `object`. If a portion of `path` + * does not exist it is created. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to augment. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, 'x[0].y.z', 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + if (object == null) { + return object; + } + var pathKey = (path + ''); + path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = path[index]; + if (isObject(nested)) { + if (index == lastIndex) { + nested[key] = value; + } else if (nested[key] == null) { + nested[key] = isIndex(path[index + 1]) ? [] : {}; + } + } + nested = nested[key]; + } + return object; + } + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own enumerable + * properties through `iteratee`, with each invocation potentially mutating + * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Array|Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + */ + function transform(object, iteratee, accumulator, thisArg) { + var isArr = isArray(object) || isTypedArray(object); + iteratee = getCallback(iteratee, thisArg, 4); + + if (accumulator == null) { + if (isArr || isObject(object)) { + var Ctor = object.constructor; + if (isArr) { + accumulator = isArray(object) ? new Ctor : []; + } else { + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + } + } else { + accumulator = {}; + } + } + (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable property values + * of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `n` is between `start` and up to but not including, `end`. If + * `end` is not specified it is set to `start` with `start` then set to `0`. + * + * @static + * @memberOf _ + * @category Number + * @param {number} n The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `n` is in the range, else `false`. + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + */ + function inRange(value, start, end) { + start = +start || 0; + if (end === undefined) { + end = start; + start = 0; + } else { + end = +end || 0; + } + return value >= nativeMin(start, end) && value < nativeMax(start, end); + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number is returned. + * If `floating` is `true`, or either `min` or `max` are floats, a floating-point + * number is returned instead of an integer. + * + * @static + * @memberOf _ + * @category Number + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + if (floating && isIterateeCall(min, max, floating)) { + max = floating = undefined; + } + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (noMax && typeof min == 'boolean') { + floating = min; + min = 1; + } + else if (typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + noMax = false; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); + } + return baseRandom(min, max); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar'); + * // => 'fooBar' + * + * _.camelCase('__foo_bar__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); + }); + + /** + * Capitalizes the first character of `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('fred'); + * // => 'Fred' + */ + function capitalize(string) { + string = baseToString(string); + return string && (string.charAt(0).toUpperCase() + string.slice(1)); + } + + /** + * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = baseToString(string); + return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search from. + * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = baseToString(string); + target = (target + ''); + + var length = string.length; + position = position === undefined + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; + return position >= 0 && string.indexOf(target, position) == position; + } + + /** + * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional characters + * use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in Internet Explorer < 9, they can break out + * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + // Reset `lastIndex` because in IE < 9 `String#replace` does not. + string = baseToString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", + * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' + */ + function escapeRegExp(string) { + string = baseToString(string); + return (string && reHasRegExpChars.test(string)) + ? string.replace(reRegExpChars, escapeRegExpChar) + : (string || '(?:)'); + } + + /** + * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__foo_bar__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = baseToString(string); + length = +length; + + var strLength = string.length; + if (strLength >= length || !nativeIsFinite(length)) { + return string; + } + var mid = (length - strLength) / 2, + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); + + chars = createPadding('', rightLength, chars); + return chars.slice(0, leftLength) + string + chars; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padLeft('abc', 6); + * // => ' abc' + * + * _.padLeft('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padLeft('abc', 3); + * // => 'abc' + */ + var padLeft = createPadDir(); + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padRight('abc', 6); + * // => 'abc ' + * + * _.padRight('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padRight('abc', 3); + * // => 'abc' + */ + var padRight = createPadDir(true); + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, + * in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * of `parseInt`. + * + * @static + * @memberOf _ + * @category String + * @param {string} string The string to convert. + * @param {number} [radix] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. + // Chrome fails to trim leading whitespace characters. + // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + if (guard ? isIterateeCall(string, radix, guard) : radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + string = trim(string); + return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + /** + * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--foo-bar'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__foo_bar__'); + * // => 'Foo Bar' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = baseToString(string); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + + return string.lastIndexOf(target, position) == position; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + +``` + + +## API + +### Parsing + +Parsing a plist from filename: + +``` javascript +var fs = require('fs'); +var plist = require('plist'); + +var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8')); +console.log(JSON.stringify(obj)); +``` + +Parsing a plist from string payload: + +``` javascript +var plist = require('plist'); + +var obj = plist.parse('Hello World!'); +console.log(obj); // Hello World! +``` + +### Building + +Given an existing JavaScript Object, you can turn it into an XML document +that complies with the plist DTD: + +``` javascript +var plist = require('plist'); + +console.log(plist.build({ foo: 'bar' })); +``` + + +## License + +(The MIT License) + +Copyright (c) 2010-2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/dist/plist-build.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/dist/plist-build.js new file mode 100644 index 0000000..4fcd378 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/dist/plist-build.js @@ -0,0 +1,3982 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],3:[function(require,module,exports){ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} + +},{}],4:[function(require,module,exports){ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + +},{}],5:[function(require,module,exports){ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; + +},{"../internal/arrayEvery":7,"../internal/baseCallback":11,"../internal/baseEvery":15,"../internal/isIterateeCall":40,"../lang/isArray":49}],6:[function(require,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],7:[function(require,module,exports){ +/** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; + +},{}],8:[function(require,module,exports){ +/** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + +},{}],9:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +module.exports = assignWith; + +},{"../object/keys":58}],10:[function(require,module,exports){ +var baseCopy = require('./baseCopy'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; + +},{"../object/keys":58,"./baseCopy":12}],11:[function(require,module,exports){ +var baseMatches = require('./baseMatches'), + baseMatchesProperty = require('./baseMatchesProperty'), + bindCallback = require('./bindCallback'), + identity = require('../utility/identity'), + property = require('../utility/property'); + +/** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); +} + +module.exports = baseCallback; + +},{"../utility/identity":61,"../utility/property":62,"./baseMatches":22,"./baseMatchesProperty":23,"./bindCallback":28}],12:[function(require,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],13:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; +}()); + +module.exports = baseCreate; + +},{"../lang/isObject":53}],14:[function(require,module,exports){ +var baseForOwn = require('./baseForOwn'), + createBaseEach = require('./createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + +},{"./baseForOwn":17,"./createBaseEach":30}],15:[function(require,module,exports){ +var baseEach = require('./baseEach'); + +/** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; + +},{"./baseEach":14}],16:[function(require,module,exports){ +var createBaseFor = require('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":31}],17:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + +},{"../object/keys":58,"./baseFor":16}],18:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + +},{"./toObject":46}],19:[function(require,module,exports){ +var baseIsEqualDeep = require('./baseIsEqualDeep'), + isObject = require('../lang/isObject'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); +} + +module.exports = baseIsEqual; + +},{"../lang/isObject":53,"./baseIsEqualDeep":20,"./isObjectLike":43}],20:[function(require,module,exports){ +var equalArrays = require('./equalArrays'), + equalByTag = require('./equalByTag'), + equalObjects = require('./equalObjects'), + isArray = require('../lang/isArray'), + isTypedArray = require('../lang/isTypedArray'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +module.exports = baseIsEqualDeep; + +},{"../lang/isArray":49,"../lang/isTypedArray":55,"./equalArrays":32,"./equalByTag":33,"./equalObjects":34}],21:[function(require,module,exports){ +var baseIsEqual = require('./baseIsEqual'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + +},{"./baseIsEqual":19,"./toObject":46}],22:[function(require,module,exports){ +var baseIsMatch = require('./baseIsMatch'), + getMatchData = require('./getMatchData'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; +} + +module.exports = baseMatches; + +},{"./baseIsMatch":21,"./getMatchData":36,"./toObject":46}],23:[function(require,module,exports){ +var baseGet = require('./baseGet'), + baseIsEqual = require('./baseIsEqual'), + baseSlice = require('./baseSlice'), + isArray = require('../lang/isArray'), + isKey = require('./isKey'), + isStrictComparable = require('./isStrictComparable'), + last = require('../array/last'), + toObject = require('./toObject'), + toPath = require('./toPath'); + +/** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ +function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; +} + +module.exports = baseMatchesProperty; + +},{"../array/last":4,"../lang/isArray":49,"./baseGet":18,"./baseIsEqual":19,"./baseSlice":26,"./isKey":41,"./isStrictComparable":44,"./toObject":46,"./toPath":47}],24:[function(require,module,exports){ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; + +},{}],25:[function(require,module,exports){ +var baseGet = require('./baseGet'), + toPath = require('./toPath'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ +function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; +} + +module.exports = basePropertyDeep; + +},{"./baseGet":18,"./toPath":47}],26:[function(require,module,exports){ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + +},{}],27:[function(require,module,exports){ +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; + +},{}],28:[function(require,module,exports){ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":61}],29:[function(require,module,exports){ +var bindCallback = require('./bindCallback'), + isIterateeCall = require('./isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"../function/restParam":6,"./bindCallback":28,"./isIterateeCall":40}],30:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + +},{"./getLength":35,"./isLength":42,"./toObject":46}],31:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":46}],32:[function(require,module,exports){ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; + +},{"./arraySome":8}],33:[function(require,module,exports){ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; + +},{}],34:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; + +},{"../object/keys":58}],35:[function(require,module,exports){ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":24}],36:[function(require,module,exports){ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; + +},{"../object/pairs":60,"./isStrictComparable":44}],37:[function(require,module,exports){ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":52}],38:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":35,"./isLength":42}],39:[function(require,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],40:[function(require,module,exports){ +var isArrayLike = require('./isArrayLike'), + isIndex = require('./isIndex'), + isObject = require('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":53,"./isArrayLike":38,"./isIndex":39}],41:[function(require,module,exports){ +var isArray = require('../lang/isArray'), + toObject = require('./toObject'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); +} + +module.exports = isKey; + +},{"../lang/isArray":49,"./toObject":46}],42:[function(require,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],43:[function(require,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],44:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +},{"../lang/isObject":53}],45:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('./isIndex'), + isLength = require('./isLength'), + keysIn = require('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":48,"../lang/isArray":49,"../object/keysIn":59,"./isIndex":39,"./isLength":42}],46:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":53}],47:[function(require,module,exports){ +var baseToString = require('./baseToString'), + isArray = require('../lang/isArray'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ +function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +} + +module.exports = toPath; + +},{"../lang/isArray":49,"./baseToString":27}],48:[function(require,module,exports){ +var isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":38,"../internal/isObjectLike":43}],49:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":37,"../internal/isLength":42,"../internal/isObjectLike":43}],50:[function(require,module,exports){ +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('../internal/isArrayLike'), + isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'), + isString = require('./isString'), + keys = require('../object/keys'); + +/** + * Checks if `value` is empty. A value is considered empty unless it's an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; +} + +module.exports = isEmpty; + +},{"../internal/isArrayLike":38,"../internal/isObjectLike":43,"../object/keys":58,"./isArguments":48,"./isArray":49,"./isFunction":51,"./isString":54}],51:[function(require,module,exports){ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":53}],52:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isNative; + +},{"../internal/isObjectLike":43,"./isFunction":51}],53:[function(require,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],54:[function(require,module,exports){ +var isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":43}],55:[function(require,module,exports){ +var isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":42,"../internal/isObjectLike":43}],56:[function(require,module,exports){ +var assignWith = require('../internal/assignWith'), + baseAssign = require('../internal/baseAssign'), + createAssigner = require('../internal/createAssigner'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); +}); + +module.exports = assign; + +},{"../internal/assignWith":9,"../internal/baseAssign":10,"../internal/createAssigner":29}],57:[function(require,module,exports){ +var baseAssign = require('../internal/baseAssign'), + baseCreate = require('../internal/baseCreate'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; +} + +module.exports = create; + +},{"../internal/baseAssign":10,"../internal/baseCreate":13,"../internal/isIterateeCall":40}],58:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":37,"../internal/isArrayLike":38,"../internal/shimKeys":45,"../lang/isObject":53}],59:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/isIndex":39,"../internal/isLength":42,"../lang/isArguments":48,"../lang/isArray":49,"../lang/isObject":53}],60:[function(require,module,exports){ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; + +},{"../internal/toObject":46,"./keys":58}],61:[function(require,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],62:[function(require,module,exports){ +var baseProperty = require('../internal/baseProperty'), + basePropertyDeep = require('../internal/basePropertyDeep'), + isKey = require('../internal/isKey'); + +/** + * Creates a function that returns the property value at `path` on a + * given object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +} + +module.exports = property; + +},{"../internal/baseProperty":24,"../internal/basePropertyDeep":25,"../internal/isKey":41}],63:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],64:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); + +},{"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLStringifier":77}],65:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],66:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],67:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],68:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],69:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); + +},{"lodash/lang/isObject":53,"lodash/object/create":57}],70:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],71:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/lang/isObject":53,"lodash/object/create":57}],72:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); + +},{"./XMLCData":65,"./XMLComment":66,"./XMLDTDAttList":67,"./XMLDTDElement":68,"./XMLDTDEntity":69,"./XMLDTDNotation":70,"./XMLProcessingInstruction":75,"lodash/lang/isObject":53,"lodash/object/create":57}],73:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); + +},{"./XMLAttribute":63,"./XMLNode":74,"./XMLProcessingInstruction":75,"lodash/collection/every":5,"lodash/lang/isFunction":51,"lodash/lang/isObject":53,"lodash/object/create":57}],74:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); + +},{"./XMLCData":65,"./XMLComment":66,"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLRaw":76,"./XMLText":78,"lodash/lang/isEmpty":50,"lodash/lang/isFunction":51,"lodash/lang/isObject":53}],75:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],76:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],77:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} + +}).call(this,require("buffer").Buffer) +},{"buffer":3,"util-deprecate":6,"xmldom":7}],2:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],3:[function(require,module,exports){ +(function (global){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +function typedArraySupport () { + function Bar () {} + try { + var arr = new Uint8Array(1) + arr.foo = function () { return 42 } + arr.constructor = Bar + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Bar && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined') { + if (object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + if (object instanceof ArrayBuffer) { + return fromArrayBuffer(that, object) + } + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + array.byteLength + that = Buffer._augment(new Uint8Array(array)) + } else { + // Fallback: Return an object instance of the Buffer class + that = fromTypedArray(that, new Uint8Array(array)) + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` is deprecated +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` is deprecated +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; i--) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"base64-js":2,"ieee754":4,"is-array":5}],4:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],5:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],6:[function(require,module,exports){ +(function (global){ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],7:[function(require,module,exports){ +function DOMParser(options){ + this.options = options ||{locator:{}}; + +} +DOMParser.prototype.parseFromString = function(source,mimeType){ + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns||{}; + var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid document source"); + } + return domBuilder.document; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn){ + if(isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + }else{ + var i=arguments.length; + while(--i){ + if(fn = errorImpl[arguments[i]]){ + break; + } + } + } + } + errorHandler[key] = fn && function(msg){ + fn(msg+_locator(locator)); + }||function(){}; + } + build('warning','warn'); + build('error','warn','warning'); + build('fatalError','warn','warning','error'); + return errorHandler; +} +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.document = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.document.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.document; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + if( attr.getOffset){ + position(attr.getOffset(1),attr) + } + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.document.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(this.currentElement && chars){ + if (this.cdata) { + var charNode = this.document.createCDATASection(chars); + this.currentElement.appendChild(charNode); + } else { + var charNode = this.document.createTextNode(chars); + this.currentElement.appendChild(charNode); + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.document.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.document.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.document.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn(error,_locator(this.locator)); + }, + error:function(error) { + console.error(error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error(error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.document.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +} + +},{"./dom":8,"./sax":9}],8:[function(require,module,exports){ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + } +}; +function LiveNodeList(node,refresh){ + this._node = node; + this._refresh = refresh + _updateLiveList(this); +} +function _updateLiveList(list){ + var inc = list._node._inc || list._node.ownerDocument._inc; + if(list._inc != inc){ + var ls = list._refresh(list._node); + //console.log(ls.length) + __set__(list,'length',ls.length); + copy(ls,list); + list._inc = inc; + } +} +LiveNodeList.prototype.item = function(i){ + _updateLiveList(this); + return this[i]; +} + +_extends(LiveNodeList,NodeList); +/** + * + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + */ +function NamedNodeMap() { +}; + +function _findNodeIndex(list,node){ + var i = list.length; + while(i--){ + if(list[i] === node){return i} + } +} + +function _addNamedNode(el,list,newAttr,oldAttr){ + if(oldAttr){ + list[_findNodeIndex(list,oldAttr)] = newAttr; + }else{ + list[list.length++] = newAttr; + } + if(el){ + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if(doc){ + oldAttr && _onRemoveAttribute(doc,el,oldAttr); + _onAddAttribute(doc,el,newAttr); + } + } +} +function _removeNamedNode(el,list,attr){ + var i = _findNodeIndex(list,attr); + if(i>=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + var i = this.length; + while(i--){ + var attr = this[i]; + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + doc.implementation = this; + doc.childNodes = new NodeList(); + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == 1){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == 1){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + //if(!(newChild instanceof CharacterData)){ + throw new Error(ExceptionMessage[3]) + //} + return Node.prototype.appendChild.apply(this,arguments) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node){ + var buf = []; + serializeToString(node,buf); + return buf.join(''); +} +Node.prototype.toString =function(){ + return XMLSerializer.prototype.serializeToString(this); +} +function serializeToString(node,buf){ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + var isHTML = htmlns === node.namespaceURI + buf.push('<',nodeName); + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + if(child){ + buf.push(child.data); + } + }else{ + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + function position(start,m){ + while(start>=endPos && (m = linePattern.exec(source))){ + startPos = m.index; + endPos = startPos + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = start-startPos+1; + } + var startPos = 0; + var endPos = 0; + var linePattern = /.+(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + var i = source.indexOf('<',start); + if(i<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.document; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(i>start){ + appendText(i); + } + switch(source.charAt(i+1)){ + case '/': + var end = source.indexOf('>',i+3); + var tagName = source.substring(i+2,end); + var config = parseStack.pop(); + var localNSMap = config.localNSMap; + + if(config.tagName != tagName){ + errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); + } + domBuilder.endElement(config.uri,config.localName,tagName); + if(localNSMap){ + for(var prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) ; + } + } + end++; + break; + // end elment + case '?':// + locator&&position(i); + end = parseInstruction(source,i,domBuilder); + break; + case '!':// 0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_E; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_V){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_E + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + s = S_C; + el.closed = true; + case S_V: + case S_ATTR: + case S_ATTR_S: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + break;//normal + case S_V://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_S: + if(s === S_ATTR_S){ + value = attrName; + } + if(s == S_V){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_S; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_S; + break; + case S_V: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_E: + s = S_S; + break; + //case S_S: + //case S_EQ: + //case S_ATTR_S: + // void();break; + //case S_C: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_V:void();break; + case S_ATTR_S: + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_E: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_S: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_V; + start = p; + break; + case S_C: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } +} +/** + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function appendElement(el,domBuilder,parseStack){ + var tagName = el.tagName; + var localNSMap = null; + var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + parseStack.push(el); + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = closeMap[tagName] = source.lastIndexOf('') + } + return pos',start+4); + //append comment source.substring(4,end)//, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} + +}).call(this,require("buffer").Buffer) +},{"buffer":7,"util-deprecate":70,"xmldom":88}],4:[function(require,module,exports){ + +var i; + +/** + * Parser functions. + */ + +var parserFunctions = require('./parse'); +for (i in parserFunctions) exports[i] = parserFunctions[i]; + +/** + * Builder functions. + */ + +var builderFunctions = require('./build'); +for (i in builderFunctions) exports[i] = builderFunctions[i]; + +/** + * Add Node.js-specific functions (they're deprecated…). + */ + +var nodeFunctions = require('./node'); +for (i in nodeFunctions) exports[i] = nodeFunctions[i]; + +},{"./build":1,"./node":2,"./parse":3}],5:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],6:[function(require,module,exports){ + +},{}],7:[function(require,module,exports){ +(function (global){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +function typedArraySupport () { + function Bar () {} + try { + var arr = new Uint8Array(1) + arr.foo = function () { return 42 } + arr.constructor = Bar + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Bar && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined') { + if (object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + if (object instanceof ArrayBuffer) { + return fromArrayBuffer(that, object) + } + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + array.byteLength + that = Buffer._augment(new Uint8Array(array)) + } else { + // Fallback: Return an object instance of the Buffer class + that = fromTypedArray(that, new Uint8Array(array)) + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` is deprecated +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` is deprecated +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; i--) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"base64-js":5,"ieee754":8,"is-array":9}],8:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],9:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],10:[function(require,module,exports){ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} + +},{}],11:[function(require,module,exports){ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + +},{}],12:[function(require,module,exports){ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; + +},{"../internal/arrayEvery":14,"../internal/baseCallback":18,"../internal/baseEvery":22,"../internal/isIterateeCall":47,"../lang/isArray":56}],13:[function(require,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],14:[function(require,module,exports){ +/** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; + +},{}],15:[function(require,module,exports){ +/** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + +},{}],16:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +module.exports = assignWith; + +},{"../object/keys":65}],17:[function(require,module,exports){ +var baseCopy = require('./baseCopy'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; + +},{"../object/keys":65,"./baseCopy":19}],18:[function(require,module,exports){ +var baseMatches = require('./baseMatches'), + baseMatchesProperty = require('./baseMatchesProperty'), + bindCallback = require('./bindCallback'), + identity = require('../utility/identity'), + property = require('../utility/property'); + +/** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); +} + +module.exports = baseCallback; + +},{"../utility/identity":68,"../utility/property":69,"./baseMatches":29,"./baseMatchesProperty":30,"./bindCallback":35}],19:[function(require,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],20:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; +}()); + +module.exports = baseCreate; + +},{"../lang/isObject":60}],21:[function(require,module,exports){ +var baseForOwn = require('./baseForOwn'), + createBaseEach = require('./createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + +},{"./baseForOwn":24,"./createBaseEach":37}],22:[function(require,module,exports){ +var baseEach = require('./baseEach'); + +/** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; + +},{"./baseEach":21}],23:[function(require,module,exports){ +var createBaseFor = require('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":38}],24:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + +},{"../object/keys":65,"./baseFor":23}],25:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + +},{"./toObject":53}],26:[function(require,module,exports){ +var baseIsEqualDeep = require('./baseIsEqualDeep'), + isObject = require('../lang/isObject'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); +} + +module.exports = baseIsEqual; + +},{"../lang/isObject":60,"./baseIsEqualDeep":27,"./isObjectLike":50}],27:[function(require,module,exports){ +var equalArrays = require('./equalArrays'), + equalByTag = require('./equalByTag'), + equalObjects = require('./equalObjects'), + isArray = require('../lang/isArray'), + isTypedArray = require('../lang/isTypedArray'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +module.exports = baseIsEqualDeep; + +},{"../lang/isArray":56,"../lang/isTypedArray":62,"./equalArrays":39,"./equalByTag":40,"./equalObjects":41}],28:[function(require,module,exports){ +var baseIsEqual = require('./baseIsEqual'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + +},{"./baseIsEqual":26,"./toObject":53}],29:[function(require,module,exports){ +var baseIsMatch = require('./baseIsMatch'), + getMatchData = require('./getMatchData'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; +} + +module.exports = baseMatches; + +},{"./baseIsMatch":28,"./getMatchData":43,"./toObject":53}],30:[function(require,module,exports){ +var baseGet = require('./baseGet'), + baseIsEqual = require('./baseIsEqual'), + baseSlice = require('./baseSlice'), + isArray = require('../lang/isArray'), + isKey = require('./isKey'), + isStrictComparable = require('./isStrictComparable'), + last = require('../array/last'), + toObject = require('./toObject'), + toPath = require('./toPath'); + +/** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ +function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; +} + +module.exports = baseMatchesProperty; + +},{"../array/last":11,"../lang/isArray":56,"./baseGet":25,"./baseIsEqual":26,"./baseSlice":33,"./isKey":48,"./isStrictComparable":51,"./toObject":53,"./toPath":54}],31:[function(require,module,exports){ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; + +},{}],32:[function(require,module,exports){ +var baseGet = require('./baseGet'), + toPath = require('./toPath'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ +function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; +} + +module.exports = basePropertyDeep; + +},{"./baseGet":25,"./toPath":54}],33:[function(require,module,exports){ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + +},{}],34:[function(require,module,exports){ +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; + +},{}],35:[function(require,module,exports){ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":68}],36:[function(require,module,exports){ +var bindCallback = require('./bindCallback'), + isIterateeCall = require('./isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"../function/restParam":13,"./bindCallback":35,"./isIterateeCall":47}],37:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + +},{"./getLength":42,"./isLength":49,"./toObject":53}],38:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":53}],39:[function(require,module,exports){ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; + +},{"./arraySome":15}],40:[function(require,module,exports){ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; + +},{}],41:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; + +},{"../object/keys":65}],42:[function(require,module,exports){ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":31}],43:[function(require,module,exports){ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; + +},{"../object/pairs":67,"./isStrictComparable":51}],44:[function(require,module,exports){ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":59}],45:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":42,"./isLength":49}],46:[function(require,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],47:[function(require,module,exports){ +var isArrayLike = require('./isArrayLike'), + isIndex = require('./isIndex'), + isObject = require('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":60,"./isArrayLike":45,"./isIndex":46}],48:[function(require,module,exports){ +var isArray = require('../lang/isArray'), + toObject = require('./toObject'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); +} + +module.exports = isKey; + +},{"../lang/isArray":56,"./toObject":53}],49:[function(require,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],50:[function(require,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],51:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +},{"../lang/isObject":60}],52:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('./isIndex'), + isLength = require('./isLength'), + keysIn = require('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":55,"../lang/isArray":56,"../object/keysIn":66,"./isIndex":46,"./isLength":49}],53:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":60}],54:[function(require,module,exports){ +var baseToString = require('./baseToString'), + isArray = require('../lang/isArray'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ +function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +} + +module.exports = toPath; + +},{"../lang/isArray":56,"./baseToString":34}],55:[function(require,module,exports){ +var isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":45,"../internal/isObjectLike":50}],56:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":44,"../internal/isLength":49,"../internal/isObjectLike":50}],57:[function(require,module,exports){ +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('../internal/isArrayLike'), + isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'), + isString = require('./isString'), + keys = require('../object/keys'); + +/** + * Checks if `value` is empty. A value is considered empty unless it's an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; +} + +module.exports = isEmpty; + +},{"../internal/isArrayLike":45,"../internal/isObjectLike":50,"../object/keys":65,"./isArguments":55,"./isArray":56,"./isFunction":58,"./isString":61}],58:[function(require,module,exports){ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":60}],59:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isNative; + +},{"../internal/isObjectLike":50,"./isFunction":58}],60:[function(require,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],61:[function(require,module,exports){ +var isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":50}],62:[function(require,module,exports){ +var isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":49,"../internal/isObjectLike":50}],63:[function(require,module,exports){ +var assignWith = require('../internal/assignWith'), + baseAssign = require('../internal/baseAssign'), + createAssigner = require('../internal/createAssigner'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); +}); + +module.exports = assign; + +},{"../internal/assignWith":16,"../internal/baseAssign":17,"../internal/createAssigner":36}],64:[function(require,module,exports){ +var baseAssign = require('../internal/baseAssign'), + baseCreate = require('../internal/baseCreate'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; +} + +module.exports = create; + +},{"../internal/baseAssign":17,"../internal/baseCreate":20,"../internal/isIterateeCall":47}],65:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":44,"../internal/isArrayLike":45,"../internal/shimKeys":52,"../lang/isObject":60}],66:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/isIndex":46,"../internal/isLength":49,"../lang/isArguments":55,"../lang/isArray":56,"../lang/isObject":60}],67:[function(require,module,exports){ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; + +},{"../internal/toObject":53,"./keys":65}],68:[function(require,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],69:[function(require,module,exports){ +var baseProperty = require('../internal/baseProperty'), + basePropertyDeep = require('../internal/basePropertyDeep'), + isKey = require('../internal/isKey'); + +/** + * Creates a function that returns the property value at `path` on a + * given object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +} + +module.exports = property; + +},{"../internal/baseProperty":31,"../internal/basePropertyDeep":32,"../internal/isKey":48}],70:[function(require,module,exports){ +(function (global){ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],71:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],72:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); + +},{"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLStringifier":85}],73:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],74:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],75:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],76:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],77:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); + +},{"lodash/lang/isObject":60,"lodash/object/create":64}],78:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],79:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/lang/isObject":60,"lodash/object/create":64}],80:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); + +},{"./XMLCData":73,"./XMLComment":74,"./XMLDTDAttList":75,"./XMLDTDElement":76,"./XMLDTDEntity":77,"./XMLDTDNotation":78,"./XMLProcessingInstruction":83,"lodash/lang/isObject":60,"lodash/object/create":64}],81:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); + +},{"./XMLAttribute":71,"./XMLNode":82,"./XMLProcessingInstruction":83,"lodash/collection/every":12,"lodash/lang/isFunction":58,"lodash/lang/isObject":60,"lodash/object/create":64}],82:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); + +},{"./XMLCData":73,"./XMLComment":74,"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLRaw":84,"./XMLText":86,"lodash/lang/isEmpty":57,"lodash/lang/isFunction":58,"lodash/lang/isObject":60}],83:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],84:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],85:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid document source"); + } + return domBuilder.document; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn){ + if(isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + }else{ + var i=arguments.length; + while(--i){ + if(fn = errorImpl[arguments[i]]){ + break; + } + } + } + } + errorHandler[key] = fn && function(msg){ + fn(msg+_locator(locator)); + }||function(){}; + } + build('warning','warn'); + build('error','warn','warning'); + build('fatalError','warn','warning','error'); + return errorHandler; +} +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.document = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.document.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.document; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + if( attr.getOffset){ + position(attr.getOffset(1),attr) + } + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.document.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(this.currentElement && chars){ + if (this.cdata) { + var charNode = this.document.createCDATASection(chars); + this.currentElement.appendChild(charNode); + } else { + var charNode = this.document.createTextNode(chars); + this.currentElement.appendChild(charNode); + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.document.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.document.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.document.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn(error,_locator(this.locator)); + }, + error:function(error) { + console.error(error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error(error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.document.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +} + +},{"./dom":89,"./sax":90}],89:[function(require,module,exports){ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + } +}; +function LiveNodeList(node,refresh){ + this._node = node; + this._refresh = refresh + _updateLiveList(this); +} +function _updateLiveList(list){ + var inc = list._node._inc || list._node.ownerDocument._inc; + if(list._inc != inc){ + var ls = list._refresh(list._node); + //console.log(ls.length) + __set__(list,'length',ls.length); + copy(ls,list); + list._inc = inc; + } +} +LiveNodeList.prototype.item = function(i){ + _updateLiveList(this); + return this[i]; +} + +_extends(LiveNodeList,NodeList); +/** + * + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + */ +function NamedNodeMap() { +}; + +function _findNodeIndex(list,node){ + var i = list.length; + while(i--){ + if(list[i] === node){return i} + } +} + +function _addNamedNode(el,list,newAttr,oldAttr){ + if(oldAttr){ + list[_findNodeIndex(list,oldAttr)] = newAttr; + }else{ + list[list.length++] = newAttr; + } + if(el){ + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if(doc){ + oldAttr && _onRemoveAttribute(doc,el,oldAttr); + _onAddAttribute(doc,el,newAttr); + } + } +} +function _removeNamedNode(el,list,attr){ + var i = _findNodeIndex(list,attr); + if(i>=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + var i = this.length; + while(i--){ + var attr = this[i]; + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + doc.implementation = this; + doc.childNodes = new NodeList(); + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == 1){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == 1){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + //if(!(newChild instanceof CharacterData)){ + throw new Error(ExceptionMessage[3]) + //} + return Node.prototype.appendChild.apply(this,arguments) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node){ + var buf = []; + serializeToString(node,buf); + return buf.join(''); +} +Node.prototype.toString =function(){ + return XMLSerializer.prototype.serializeToString(this); +} +function serializeToString(node,buf){ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + var isHTML = htmlns === node.namespaceURI + buf.push('<',nodeName); + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + if(child){ + buf.push(child.data); + } + }else{ + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + function position(start,m){ + while(start>=endPos && (m = linePattern.exec(source))){ + startPos = m.index; + endPos = startPos + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = start-startPos+1; + } + var startPos = 0; + var endPos = 0; + var linePattern = /.+(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + var i = source.indexOf('<',start); + if(i<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.document; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(i>start){ + appendText(i); + } + switch(source.charAt(i+1)){ + case '/': + var end = source.indexOf('>',i+3); + var tagName = source.substring(i+2,end); + var config = parseStack.pop(); + var localNSMap = config.localNSMap; + + if(config.tagName != tagName){ + errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); + } + domBuilder.endElement(config.uri,config.localName,tagName); + if(localNSMap){ + for(var prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) ; + } + } + end++; + break; + // end elment + case '?':// + locator&&position(i); + end = parseInstruction(source,i,domBuilder); + break; + case '!':// 0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_E; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_V){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_E + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + s = S_C; + el.closed = true; + case S_V: + case S_ATTR: + case S_ATTR_S: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + break;//normal + case S_V://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_S: + if(s === S_ATTR_S){ + value = attrName; + } + if(s == S_V){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_S; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_S; + break; + case S_V: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_E: + s = S_S; + break; + //case S_S: + //case S_EQ: + //case S_ATTR_S: + // void();break; + //case S_C: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_V:void();break; + case S_ATTR_S: + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_E: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_S: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_V; + start = p; + break; + case S_C: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } +} +/** + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function appendElement(el,domBuilder,parseStack){ + var tagName = el.tagName; + var localNSMap = null; + var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + parseStack.push(el); + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = closeMap[tagName] = source.lastIndexOf('') + } + return pos',start+4); + //append comment source.substring(4,end)//, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/lib/plist.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/lib/plist.js new file mode 100644 index 0000000..00a4167 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/lib/plist.js @@ -0,0 +1,23 @@ + +var i; + +/** + * Parser functions. + */ + +var parserFunctions = require('./parse'); +for (i in parserFunctions) exports[i] = parserFunctions[i]; + +/** + * Builder functions. + */ + +var builderFunctions = require('./build'); +for (i in builderFunctions) exports[i] = builderFunctions[i]; + +/** + * Add Node.js-specific functions (they're deprecated…). + */ + +var nodeFunctions = require('./node'); +for (i in nodeFunctions) exports[i] = nodeFunctions[i]; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/package.json new file mode 100644 index 0000000..9dd0f04 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/plist/package.json @@ -0,0 +1,126 @@ +{ + "_args": [ + [ + { + "raw": "plist@^1.2.0", + "scope": null, + "escapedName": "plist", + "name": "plist", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "plist@>=1.2.0 <2.0.0", + "_id": "plist@1.2.0", + "_inCache": true, + "_installable": true, + "_location": "/plist", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "mreinstein", + "email": "reinstein.mike@gmail.com" + }, + "_npmVersion": "3.3.11", + "_phantomChildren": {}, + "_requested": { + "raw": "plist@^1.2.0", + "scope": null, + "escapedName": "plist", + "name": "plist", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/plist/-/plist-1.2.0.tgz", + "_shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593", + "_shrinkwrap": null, + "_spec": "plist@^1.2.0", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-plist/issues" + }, + "contributors": [ + { + "name": "Hans Huebner", + "email": "hans.huebner@gmail.com" + }, + { + "name": "Pierre Metrailler" + }, + { + "name": "Mike Reinstein", + "email": "reinstein.mike@gmail.com" + }, + { + "name": "Vladimir Tsvang" + }, + { + "name": "Mathieu D'Amours" + } + ], + "dependencies": { + "base64-js": "0.0.8", + "util-deprecate": "1.0.2", + "xmlbuilder": "4.0.0", + "xmldom": "0.1.x" + }, + "description": "Mac OS X Plist parser/builder for Node.js and browsers", + "devDependencies": { + "browserify": "12.0.1", + "mocha": "2.3.3", + "multiline": "1.0.2", + "zuul": "3.7.2" + }, + "directories": {}, + "dist": { + "shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593", + "tarball": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz" + }, + "gitHead": "69520574f27864145192338b72e608fbe1bda6f7", + "homepage": "https://github.com/TooTallNate/node-plist#readme", + "keywords": [ + "apple", + "browser", + "mac", + "plist", + "parser", + "xml" + ], + "license": "MIT", + "main": "lib/plist.js", + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "mreinstein", + "email": "reinstein.mike@gmail.com" + } + ], + "name": "plist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-plist.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.2.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/README.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/README.markdown new file mode 100644 index 0000000..3a808ba --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/README.markdown @@ -0,0 +1,48 @@ +# node-properties-parser + +A parser for [.properties](http://en.wikipedia.org/wiki/.properties) files written in javascript. Properties files store key-value pairs. They are typically used for configuration and internationalization in Java applications as well as in Actionscript projects. Here's an example of the format: + + # You are reading the ".properties" entry. + ! The exclamation mark can also mark text as comments. + website = http://en.wikipedia.org/ + language = English + # The backslash below tells the application to continue reading + # the value onto the next line. + message = Welcome to \ + Wikipedia! + # Add spaces to the key + key\ with\ spaces = This is the value that could be looked up with the key "key with spaces". + # Unicode + tab : \u0009 +*(taken from [Wikipedia](http://en.wikipedia.org/wiki/.properties#Format))* + +Currently works with any version of node.js. + +## The API + +- `parse(text)`: Parses `text` into key-value pairs. Returns an object containing the key-value pairs. +- `read(path[, callback])`: Opens the file specified by `path` and calls `parse` on its content. If the optional `callback` parameter is provided, the result is then passed to it as the second parameter. If an error occurs, the error object is passed to `callback` as the first parameter. If `callback` is not provided, the file specified by `path` is synchronously read and calls `parse` on its contents. The resulting object is immediately returned. +- `createEditor([path[, callback]])`: If neither `path` or `callback` are provided an empty editor object is returned synchronously. If only `path` is provided, the file specified by `path` is synchronously read and parsed. An editor object with the results in then immediately returned. If both `path` and `callback` are provided, the file specified by `path` is read and parsed asynchronously. An editor object with the results are then passed to `callback` as the second parameters. If an error occurs, the error object is passed to `callback` as the first parameter. +- `Editor`: The editor object is returned by `createEditor`. Has the following API: + - `get(key)`: Returns the value currently associated with `key`. + - `set(key, [value[, comment]])`: Associates `key` with `value`. An optional comment can be provided. If `value` is not specified or is `null`, then `key` is unset. + - `unset(key)`: Unsets the specified `key`. + - `save([path][, callback]])`: Writes the current contents of this editor object to a file specified by `path`. If `path` is not provided, then it'll be defaulted to the `path` value passed to `createEditor`. The `callback` parameter is called when the file has been written to disk. + - `addHeadComment`: Added a comment to the head of the file. + - `toString`: Returns the string representation of this properties editor object. This string will be written to a file if `save` is called. + +## Getting node-properties-parser + +The easiest way to get node-properties-parser is with [npm](http://npmjs.org/): + + npm install properties-parser + +Alternatively you can clone this git repository: + + git://github.com/xavi-/node-properties-parser.git + +## Developed by +* Xavi Ramirez + +## License +This project is released under [The MIT License](http://www.opensource.org/licenses/mit-license.php). \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/index.js new file mode 100644 index 0000000..b103ad0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/index.js @@ -0,0 +1,354 @@ +var fs = require("fs"); + +function Iterator(text) { + var pos = 0, length = text.length; + + this.peek = function(num) { + num = num || 0; + if(pos + num >= length) { return null; } + + return text.charAt(pos + num); + }; + this.next = function(inc) { + inc = inc || 1; + + if(pos >= length) { return null; } + + return text.charAt((pos += inc) - inc); + }; + this.pos = function() { + return pos; + }; +} + +var rWhitespace = /\s/; +function isWhitespace(chr) { + return rWhitespace.test(chr); +} +function consumeWhiteSpace(iter) { + var start = iter.pos(); + + while(isWhitespace(iter.peek())) { iter.next(); } + + return { type: "whitespace", start: start, end: iter.pos() }; +} + +function startsComment(chr) { + return chr === "!" || chr === "#"; +} +function isEOL(chr) { + return chr == null || chr === "\n" || chr === "\r"; +} +function consumeComment(iter) { + var start = iter.pos(); + + while(!isEOL(iter.peek())) { iter.next(); } + + return { type: "comment", start: start, end: iter.pos() }; +} + +function startsKeyVal(chr) { + return !isWhitespace(chr) && !startsComment(chr); +} +function startsSeparator(chr) { + return chr === "=" || chr === ":" || isWhitespace(chr); +} +function startsEscapedVal(chr) { + return chr === "\\"; +} +function consumeEscapedVal(iter) { + var start = iter.pos(); + + iter.next(); // move past "\" + var curChar = iter.next(); + if(curChar === "u") { // encoded unicode char + iter.next(4); // Read in the 4 hex values + } + + return { type: "escaped-value", start: start, end: iter.pos() }; +} +function consumeKey(iter) { + var start = iter.pos(), children = []; + + var curChar; + while((curChar = iter.peek()) !== null) { + if(startsSeparator(curChar)) { break; } + if(startsEscapedVal(curChar)) { children.push(consumeEscapedVal(iter)); continue; } + + iter.next(); + } + + return { type: "key", start: start, end: iter.pos(), children: children }; +} +function consumeKeyValSeparator(iter) { + var start = iter.pos(); + + var seenHardSep = false, curChar; + while((curChar = iter.peek()) !== null) { + if(isEOL(curChar)) { break; } + + if(isWhitespace(curChar)) { iter.next(); continue; } + + if(seenHardSep) { break; } + + seenHardSep = (curChar === ":" || curChar === "="); + if(seenHardSep) { iter.next(); continue; } + + break; // curChar is a non-separtor char + } + + return { type: "key-value-separator", start: start, end: iter.pos() }; +} +function startsLineBreak(iter) { + return iter.peek() === "\\" && isEOL(iter.peek(1)); +} +function consumeLineBreak(iter) { + var start = iter.pos(); + + iter.next(); // consume \ + if(iter.peek() === "\r") { iter.next(); } + iter.next(); // consume \n + + var curChar; + while((curChar = iter.peek()) !== null) { + if(isEOL(curChar)) { break; } + if(!isWhitespace(curChar)) { break; } + + iter.next(); + } + + return { type: "line-break", start: start, end: iter.pos() }; +} +function consumeVal(iter) { + var start = iter.pos(), children = []; + + var curChar; + while((curChar = iter.peek()) !== null) { + if(startsLineBreak(iter)) { children.push(consumeLineBreak(iter)); continue; } + if(startsEscapedVal(curChar)) { children.push(consumeEscapedVal(iter)); continue; } + if(isEOL(curChar)) { break; } + + iter.next(); + } + + return { type: "value", start: start, end: iter.pos(), children: children }; +} +function consumeKeyVal(iter) { + return { + type: "key-value", + start: iter.pos(), + children: [ + consumeKey(iter), + consumeKeyValSeparator(iter), + consumeVal(iter) + ], + end: iter.pos() + }; +} + +var renderChild = { + "escaped-value": function(child, text) { + var type = text.charAt(child.start + 1); + + if(type === "t") { return "\t"; } + if(type === "r") { return "\r"; } + if(type === "n") { return "\n"; } + if(type === "f") { return "\f"; } + if(type !== "u") { return type; } + + return String.fromCharCode(parseInt(text.substr(child.start + 2, 4), 16)); + }, + "line-break": function (child, text) { + return ""; + } +}; +function rangeToBuffer(range, text) { + var start = range.start, buffer = []; + + for(var i = 0; i < range.children.length; i++) { + var child = range.children[i]; + + buffer.push(text.substring(start, child.start)); + buffer.push(renderChild[child.type](child, text)); + start = child.end; + } + buffer.push(text.substring(start, range.end)); + + return buffer; +} +function rangesToObject(ranges, text) { + var obj = Object.create(null); // Creates to a true hash map + + for(var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + + if(range.type !== "key-value") { continue; } + + var key = rangeToBuffer(range.children[0], text).join(""); + var val = rangeToBuffer(range.children[2], text).join(""); + obj[key] = val; + } + + return obj; +} + +function stringToRanges(text) { + var iter = new Iterator(text), ranges = []; + + var curChar; + while((curChar = iter.peek()) !== null) { + if(isWhitespace(curChar)) { ranges.push(consumeWhiteSpace(iter)); continue; } + if(startsComment(curChar)) { ranges.push(consumeComment(iter)); continue; } + if(startsKeyVal(curChar)) { ranges.push(consumeKeyVal(iter)); continue; } + + throw Error("Something crazy happened. text: '" + text + "'; curChar: '" + curChar + "'"); + } + + return ranges; +} + +function isNewLineRange(range) { + if(!range) { return false; } + + if(range.type === "whitespace") { return true; } + + if(range.type === "literal") { + return isWhitespace(range.text) && range.text.indexOf("\n") > -1; + } + + return false; +} + +function Editor(text, path) { + text = text || ""; + + var ranges = stringToRanges(text); + var obj = rangesToObject(ranges, text); + var keyRange = Object.create(null); // Creates to a true hash map + + for(var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + + if(range.type !== "key-value") { continue; } + + var key = rangeToBuffer(range.children[0], text).join(""); + keyRange[key] = range; + } + + this.addHeadComment = function(comment) { + if(comment == null) { return; } + + ranges.unshift({ type: "literal", text: "# " + comment.replace(/\n/g, "\n# ") + "\n" }); + }; + + this.get = function(key) { return obj[key]; }; + this.set = function(key, val, comment) { + if(val == null) { this.unset(key); return; } + + obj[key] = val; + + var range = keyRange[key]; + if(!range) { + keyRange[key] = range = { type: "literal", text: key + "=" + val }; + + var prevRange = ranges[ranges.length - 1]; + if(prevRange != null && !isNewLineRange(prevRange)) { + ranges.push({ type: "literal", text: "\n" }); + } + ranges.push(range); + } + + // comment === null deletes comment. if comment === undefined, it's left alone + if(comment !== undefined) { + range.comment = comment && "# " + comment.replace(/\n/g, "\n# ") + "\n"; + } + + if(range.type === "literal") { + range.text = key + "=" + val; + if(range.comment != null) { range.text = range.comment + range.text; } + } else if(range.type === "key-value") { + range.children[2] = { type: "literal", text: val }; + } else { + throw "Unknown node type: " + range.type; + } + }; + this.unset = function(key) { + if(!(key in obj)) { return; } + + var range = keyRange[key]; + var idx = ranges.indexOf(range); + + ranges.splice(idx, (isNewLineRange(ranges[idx + 1]) ? 2 : 1)); + + delete keyRange[key]; + delete obj[key]; + }; + this.valueOf = this.toString = function() { + var buffer = [], stack = [].concat(ranges); + + var node; + while((node = stack.shift()) != null) { + switch(node.type) { + case "literal": + buffer.push(node.text); + break; + case "key": + case "value": + case "comment": + case "whitespace": + case "key-value-separator": + case "escaped-value": + case "line-break": + buffer.push(text.substring(node.start, node.end)); + break; + case "key-value": + Array.prototype.unshift.apply(stack, node.children); + if(node.comment) { stack.unshift({ type: "literal", text: node.comment }); } + break; + } + } + + return buffer.join(""); + }; + this.save = function(newPath, callback) { + if(typeof newPath === 'function') { + callback = newPath; + newPath = path; + } + newPath = newPath || path; + + if(!newPath) { callback("Unknown path"); } + + fs.writeFile(newPath, this.toString(), callback || function() {}); + }; +} +function createEditor(path, callback) { + if(!path) { return new Editor(); } + + if(!callback) { return new Editor(fs.readFileSync(path).toString(), path); } + + return fs.readFile(path, function(err, text) { + if(err) { return callback(err, null); } + + text = text.toString(); + return callback(null, new Editor(text, path)); + }); +} + +function parse(text) { + text = text.toString(); + var ranges = stringToRanges(text); + return rangesToObject(ranges, text); +} + +function read(path, callback) { + if(!callback) { return parse(fs.readFileSync(path)); } + + return fs.readFile(path, function(err, data) { + if(err) { return callback(err, null); } + + return callback(null, parse(data)); + }); +} + +module.exports = { parse: parse, read: read, createEditor: createEditor }; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/package.json new file mode 100644 index 0000000..9c3acab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + { + "raw": "properties-parser@^0.2.3", + "scope": null, + "escapedName": "properties-parser", + "name": "properties-parser", + "rawSpec": "^0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android" + ] + ], + "_from": "properties-parser@>=0.2.3 <0.3.0", + "_id": "properties-parser@0.2.3", + "_inCache": true, + "_installable": true, + "_location": "/properties-parser", + "_npmUser": { + "name": "xavi", + "email": "xavi.rmz@gmail.com" + }, + "_npmVersion": "1.3.23", + "_phantomChildren": {}, + "_requested": { + "raw": "properties-parser@^0.2.3", + "scope": null, + "escapedName": "properties-parser", + "name": "properties-parser", + "rawSpec": "^0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "http://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", + "_shasum": "f7591255f707abbff227c7b56b637dbb0373a10f", + "_shrinkwrap": null, + "_spec": "properties-parser@^0.2.3", + "_where": "/Users/steveng/repo/cordova/cordova-android", + "bugs": { + "url": "https://github.com/xavi-/node-properties-parser/issues" + }, + "dependencies": {}, + "description": "A parser for .properties files written in javascript", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "f7591255f707abbff227c7b56b637dbb0373a10f", + "tarball": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz" + }, + "engines": { + "node": ">= 0.3.1" + }, + "homepage": "https://github.com/xavi-/node-properties-parser", + "keywords": [ + "parser", + ".properties", + "properties", + "java", + "file parser", + "actionscript" + ], + "main": "./index.js", + "maintainers": [ + { + "name": "xavi", + "email": "xavi.rmz@gmail.com" + } + ], + "name": "properties-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/xavi-/node-properties-parser.git" + }, + "version": "0.2.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/play-ground.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/play-ground.js new file mode 100644 index 0000000..ffbcf62 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/play-ground.js @@ -0,0 +1,17 @@ +var parser = require("./"); +var editor = parser.createEditor(); + +editor.set("ok", "hi"); +editor.set("hi", "ok"); + +console.log(editor.toString()); + +editor.unset("hi"); + +console.log("==================="); +console.log(editor.toString()); + +editor.unset("ok"); + +console.log("==================="); +console.log(editor.toString()); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.class b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.class new file mode 100755 index 0000000..f40792b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.class differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.java new file mode 100644 index 0000000..12e4472 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/ReadProperties.java @@ -0,0 +1,61 @@ +import java.io.*; +import java.util.*; + +public class ReadProperties { + public static void main(String[] args) throws IOException { + if(args.length <= 0) { System.out.println("No file provided."); return; } + + File f = new File(args[0]); + + if(!f.exists()) { System.out.println("File not found: " + args[0]); return; } + + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); + + boolean isFirst = true; // I fucking hate java, why don't they have a native string join function? + System.out.print("{"); + for (Map.Entry item : prop.entrySet()) { + String key = (String) item.getKey(); + String value = (String) item.getValue(); + + if(isFirst) { isFirst = false; } + else { System.out.print(","); } + + System.out.print("\"" + escape(key) + "\":\"" + escape(value) + "\""); + } + System.out.print("}"); + } + + static String escape(String s) { // Taken from http://code.google.com/p/json-simple/ + StringBuffer sb = new StringBuffer(); + for(int i = 0; i < s.length(); i++) { + char ch = s.charAt(i); + switch(ch) { + case '"': sb.append("\\\""); break; + case '\\': sb.append("\\\\"); break; + case '\b': sb.append("\\b"); break; + case '\f': sb.append("\\f"); break; + case '\n': sb.append("\\n"); break; + case '\r': sb.append("\\r"); break; + case '\t': sb.append("\\t"); break; + case '/': sb.append("\\/"); break; + default: + //Reference: http://www.unicode.org/versions/Unicode5.1.0/ + if (('\u0000' <= ch && ch <= '\u001F') + || ('\u007F' <= ch && ch <= '\u009F') + || ('\u2000' <= ch && ch <= '\u20FF')) { + String ss = Integer.toHexString(ch); + sb.append("\\u"); + for(int k = ss.length(); k < 4; k++) { + sb.append('0'); + } + sb.append(ss.toUpperCase()); + } else { + sb.append(ch); + } + } + } + + return sb.toString(); + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases-copy.properties b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases-copy.properties new file mode 100644 index 0000000..04b8ecd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases-copy.properties @@ -0,0 +1,16 @@ +# You are reading the ".properties" entry. +! The exclamation mark can also mark text as comments. +lala=whatever +website = whatever +language = whatever +# The backslash below tells the application to continue reading +# the value onto the next line. +message = whatever +# Add spaces to the key +key\ with\ spaces = whatever +# Unicode +tab : whatever +long-unicode : whatever +space\ separator key val \n three +another-test :whatever + null-prop \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases.properties b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases.properties new file mode 100644 index 0000000..5fc5bb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test-cases.properties @@ -0,0 +1,18 @@ +# You are reading the ".properties" entry. +! The exclamation mark can also mark text as comments. +lala=\u210A the foo foo \ + lalala; +website = http://en.wikipedia.org/ +language = English +# The backslash below tells the application to continue reading +# the value onto the next line. +message = Welcome to \ + Wikipedia! +# Add spaces to the key +key\ with\ spaces = This is the value that could be looked up with the key "key with spaces". +# Unicode +tab : \u0009 +long-unicode : \u00000009 +space\ separator key val \n three +another-test ::: hihi + null-prop \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test.js new file mode 100644 index 0000000..4b7b531 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/properties-parser/test/test.js @@ -0,0 +1,123 @@ +var fs = require("fs"); +var assert = require("assert"); +var prop = require("../index.js"); + +var syncData = prop.read("./test-cases.properties"); +prop.read("./test-cases.properties", function(err, data) { + assert.deepEqual(data, syncData); + assert.equal(data["lala"], 'ℊ the foo foo lalala;'); + assert.equal(data["website"], 'http://en.wikipedia.org/'); + assert.equal(data["language"], 'English'); + assert.equal(data["message"], 'Welcome to Wikipedia!'); + assert.equal(data["key with spaces"], 'This is the value that could be looked up with the key "key with spaces".'); + assert.equal(data["tab"], '\t'); + assert.equal(data["long-unicode"], '\u00000009'); + assert.equal(data["space separator"], 'key val \n three'); + assert.equal(data["another-test"], ':: hihi'); + assert.equal(data["null-prop"], ''); + assert.ok(data["valueOf"] == null, "Properties are set that shouldn't be (valueOf)"); + assert.ok(data["toString"] == null, "Properties are set that shouldn't be (toString)"); + + console.log("Tests all passed..."); + + if(process.argv[2] === "repl") { + var repl = require("repl").start("test-repl> "); + repl.context.data = data; + repl.context.prop = prop; + } +}); + +var editor1 = prop.createEditor(); +editor1.set("basic", "prop1"); +assert.equal(editor1.toString(), "basic=prop1"); +editor1.set("basic", "prop2", "A comment\nmulti-line1"); +assert.equal(editor1.toString(), "# A comment\n# multi-line1\nbasic=prop2"); +editor1.set("basic", "prop3", "A comment\nmulti-line2"); +assert.equal(editor1.toString(), "# A comment\n# multi-line2\nbasic=prop3"); +editor1.set("basic", "prop4"); +assert.equal(editor1.toString(), "# A comment\n# multi-line2\nbasic=prop4"); +editor1.set("basic", "prop5", null); // Delete's comment +assert.equal(editor1.toString(), "basic=prop5"); +editor1.set("basic1", "prop6"); +assert.equal(editor1.toString(), "basic=prop5\nbasic1=prop6"); +editor1.addHeadComment("Head Comment"); +assert.equal(editor1.toString(), "# Head Comment\nbasic=prop5\nbasic1=prop6"); +assert.ok(editor1.get("valueOf") == null); +assert.ok(editor1.get("toString") == null); + +var editor2 = prop.createEditor("./test-cases.properties"); +assert.equal(fs.readFileSync("./test-cases.properties").toString(), editor2.toString()); +editor2.set("lala", "prop1"); +assert.ok(editor2.toString().indexOf("lala=prop1") > -1); +editor2.set("lala", "prop2", "A comment\nmulti-line1"); +assert.ok(editor2.toString().indexOf("# A comment\n# multi-line1\nlala=prop2") > -1); +editor2.set("lala", "prop3", "A comment\nmulti-line2"); +assert.ok(editor2.toString().indexOf("# A comment\n# multi-line2\nlala=prop3") > -1); +editor2.set("lala", "prop4"); +assert.ok(editor2.toString().indexOf("# A comment\n# multi-line2\nlala=prop4") > -1); +editor2.set("lala", "prop5", null); // Delete's comment +assert.ok(editor2.toString().indexOf("! The exclamation mark can also mark text as comments.\nlala=prop5") > -1); +editor2.set("basic-non-existing", "prop6"); +assert.ok(editor2.toString().indexOf("\nbasic-non-existing=prop6") > -1); +editor2.addHeadComment("Head Comment"); +assert.equal(editor2.toString().indexOf("# Head Comment\n"), 0); +assert.ok(editor2.get("valueOf") == null); +assert.ok(editor2.get("toString") == null); + +var editor3 = prop.createEditor(); +editor3.set("stay", "ok"); + +editor3.unset("key"); +editor3.unset("key", null); +editor3.unset("key", undefined); +assert.equal(editor3.toString().trim(), "stay=ok"); + +editor3.set("key", "val"); +editor3.unset("key"); +assert.equal(editor3.toString().trim(), "stay=ok"); + +editor3.set("key", "val"); +editor3.set("key", null); +assert.equal(editor3.toString().trim(), "stay=ok"); + +editor3.set("key", "val"); +editor3.set("key", undefined); +assert.equal(editor3.toString().trim(), "stay=ok"); + +prop.createEditor("./test-cases.properties", function(err, editor) { + var properties = {}; + properties.lala = 'whatever'; + properties.website = 'whatever'; + properties.language = 'whatever'; + properties.message = 'whatever'; + properties['key with spaces'] = 'whatever'; + properties.tab = 'whatever'; + properties['long-unicode'] = 'whatever'; + properties['another-test'] = 'whatever'; + for (var item in properties) { + editor.set(item, properties[item]); + } + + assert.equal( + editor.toString(), + '# You are reading the ".properties" entry.\n' + + '! The exclamation mark can also mark text as comments.\n' + + 'lala=whatever\n' + + 'website = whatever\n' + + 'language = whatever\n' + + '# The backslash below tells the application to continue reading\n' + + '# the value onto the next line.\n' + + 'message = whatever\n' + + '# Add spaces to the key\n' + + 'key\\ with\\ spaces = whatever\n' + + '# Unicode\n' + + 'tab : whatever\n' + + 'long-unicode : whatever\n' + + 'space\\ separator key val \\n three\n' + + 'another-test :whatever\n' + + ' null-prop' + ); +}); + +// java ReadProperties test-cases.properties +// javac ReadProperties.java \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/q/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/q/CHANGES.md new file mode 100644 index 0000000..cd351fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/q/CHANGES.md @@ -0,0 +1,786 @@ + +## 1.4.1 + + - Address an issue that prevented Q from being used as a ` + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/examples/test.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/examples/test.xml new file mode 100644 index 0000000..801292d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/examples/test.xml @@ -0,0 +1,1254 @@ + + +]> + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/lib/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/lib/sax.js new file mode 100644 index 0000000..17fb08e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/lib/sax.js @@ -0,0 +1,1006 @@ +// wrapper for non-node envs +;(function (sax) { + +sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } +sax.SAXParser = SAXParser +sax.SAXStream = SAXStream +sax.createStream = createStream + +// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. +// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), +// since that's the earliest that a buffer overrun could occur. This way, checks are +// as rare as required, but as often as necessary to ensure never crossing this bound. +// Furthermore, buffers are only tested at most once per write(), so passing a very +// large string into write() might have undesirable effects, but this is manageable by +// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme +// edge case, result in creating at most one complete copy of the string passed in. +// Set to Infinity to have unlimited buffers. +sax.MAX_BUFFER_LENGTH = 64 * 1024 + +var buffers = [ + "comment", "sgmlDecl", "textNode", "tagName", "doctype", + "procInstName", "procInstBody", "entity", "attribName", + "attribValue", "cdata", "script" +] + +sax.EVENTS = // for discoverability. + [ "text" + , "processinginstruction" + , "sgmldeclaration" + , "doctype" + , "comment" + , "attribute" + , "opentag" + , "closetag" + , "opencdata" + , "cdata" + , "closecdata" + , "error" + , "end" + , "ready" + , "script" + , "opennamespace" + , "closenamespace" + ] + +function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) return new SAXParser(strict, opt) + + var parser = this + clearBuffers(parser) + parser.q = parser.c = "" + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.tagCase = parser.opt.lowercasetags ? "toLowerCase" : "toUpperCase" + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.ENTITIES = Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) parser.ns = Object.create(rootNS) + + // mostly just for error reporting + parser.position = parser.line = parser.column = 0 + emit(parser, "onready") +} + +if (!Object.create) Object.create = function (o) { + function f () { this.__proto__ = o } + f.prototype = o + return new f +} + +if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) { + return o.__proto__ +} + +if (!Object.keys) Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a +} + +function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + , maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i ++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case "textNode": + closeText(parser) + break + + case "cdata": + emitNode(parser, "oncdata", parser.cdata) + parser.cdata = "" + break + + case "script": + emitNode(parser, "onscript", parser.script) + parser.script = "" + break + + default: + error(parser, "Max buffer length exceeded: "+buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual) + + parser.position +} + +function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i ++) { + parser[buffers[i]] = "" + } +} + +SAXParser.prototype = + { end: function () { end(this) } + , write: write + , resume: function () { this.error = null; return this } + , close: function () { return this.write(null) } + , end: function () { return this.write(null) } + } + +try { + var Stream = require("stream").Stream +} catch (ex) { + var Stream = function () {} +} + + +var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== "error" && ev !== "end" +}) + +function createStream (strict, opt) { + return new SAXStream(strict, opt) +} + +function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) return new SAXStream(strict, opt) + + Stream.apply(me) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + + var me = this + + this._parser.onend = function () { + me.emit("end") + } + + this._parser.onerror = function (er) { + me.emit("error", er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, "on" + ev, { + get: function () { return me._parser["on" + ev] }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + return me._parser["on"+ev] = h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) +} + +SAXStream.prototype = Object.create(Stream.prototype, + { constructor: { value: SAXStream } }) + +SAXStream.prototype.write = function (data) { + this._parser.write(data.toString()) + this.emit("data", data) + return true +} + +SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) this._parser.write(chunk.toString()) + this._parser.end() + return true +} + +SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) { + me._parser["on"+ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] + : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) +} + + + +// character classes and tokens +var whitespace = "\r\n\t " + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + , number = "0124356789" + , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + // (Letter | "_" | ":") + , nameStart = letter+"_:" + , nameBody = nameStart+number+"-." + , quote = "'\"" + , entity = number+letter+"#" + , attribEnd = whitespace + ">" + , CDATA = "[CDATA[" + , DOCTYPE = "DOCTYPE" + , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace" + , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/" + , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + +// turn all the string character sets into character class objects. +whitespace = charClass(whitespace) +number = charClass(number) +letter = charClass(letter) +nameStart = charClass(nameStart) +nameBody = charClass(nameBody) +quote = charClass(quote) +entity = charClass(entity) +attribEnd = charClass(attribEnd) + +function charClass (str) { + return str.split("").reduce(function (s, c) { + s[c] = true + return s + }, {}) +} + +function is (charclass, c) { + return charclass[c] +} + +function not (charclass, c) { + return !charclass[c] +} + +var S = 0 +sax.STATE = +{ BEGIN : S++ +, TEXT : S++ // general stuff +, TEXT_ENTITY : S++ // & and such. +, OPEN_WAKA : S++ // < +, SGML_DECL : S++ // +, SCRIPT : S++ // " + , expect : + [ [ "opentag", { name: "xml", attributes: {} } ] + , [ "opentag", { name: "script", attributes: {} } ] + , [ "text", "hello world" ] + , [ "closetag", "script" ] + , [ "closetag", "xml" ] + ] + , strict : false + , opt : { lowercasetags: true, noscript: true } + } + ) + +require(__dirname).test + ( { xml : "" + , expect : + [ [ "opentag", { name: "xml", attributes: {} } ] + , [ "opentag", { name: "script", attributes: {} } ] + , [ "opencdata", undefined ] + , [ "cdata", "hello world" ] + , [ "closecdata", undefined ] + , [ "closetag", "script" ] + , [ "closetag", "xml" ] + ] + , strict : false + , opt : { lowercasetags: true, noscript: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/parser-position.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/parser-position.js new file mode 100644 index 0000000..e4a68b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/parser-position.js @@ -0,0 +1,28 @@ +var sax = require("../lib/sax"), + assert = require("assert") + +function testPosition(chunks, expectedEvents) { + var parser = sax.parser(); + expectedEvents.forEach(function(expectation) { + parser['on' + expectation[0]] = function() { + for (var prop in expectation[1]) { + assert.equal(parser[prop], expectation[1][prop]); + } + } + }); + chunks.forEach(function(chunk) { + parser.write(chunk); + }); +}; + +testPosition(['
    abcdefgh
    '], + [ ['opentag', { position: 5, startTagPosition: 1 }] + , ['text', { position: 19, startTagPosition: 14 }] + , ['closetag', { position: 19, startTagPosition: 14 }] + ]); + +testPosition(['
    abcde','fgh
    '], + [ ['opentag', { position: 5, startTagPosition: 1 }] + , ['text', { position: 19, startTagPosition: 14 }] + , ['closetag', { position: 19, startTagPosition: 14 }] + ]); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/script.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/script.js new file mode 100644 index 0000000..464c051 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/script.js @@ -0,0 +1,12 @@ +require(__dirname).test({ + xml : "", + expect : [ + ["opentag", {"name": "HTML","attributes": {}}], + ["opentag", {"name": "HEAD","attributes": {}}], + ["opentag", {"name": "SCRIPT","attributes": {}}], + ["script", "if (1 < 0) { console.log('elo there'); }"], + ["closetag", "SCRIPT"], + ["closetag", "HEAD"], + ["closetag", "HTML"] + ] +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child-strict.js new file mode 100644 index 0000000..ce9c045 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child-strict.js @@ -0,0 +1,40 @@ + +require(__dirname).test({ + xml : + ""+ + "" + + "" + + "" + + "" + + "=(|)" + + "" + + "", + expect : [ + ["opentag", { + "name": "root", + "attributes": {} + }], + ["opentag", { + "name": "child", + "attributes": {} + }], + ["opentag", { + "name": "haha", + "attributes": {} + }], + ["closetag", "haha"], + ["closetag", "child"], + ["opentag", { + "name": "monkey", + "attributes": {} + }], + ["text", "=(|)"], + ["closetag", "monkey"], + ["closetag", "root"], + ["end"], + ["ready"] + ], + strict : true, + opt : {} +}); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child.js new file mode 100644 index 0000000..bc6b52b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-child.js @@ -0,0 +1,40 @@ + +require(__dirname).test({ + xml : + ""+ + "" + + "" + + "" + + "" + + "=(|)" + + "" + + "", + expect : [ + ["opentag", { + "name": "ROOT", + "attributes": {} + }], + ["opentag", { + "name": "CHILD", + "attributes": {} + }], + ["opentag", { + "name": "HAHA", + "attributes": {} + }], + ["closetag", "HAHA"], + ["closetag", "CHILD"], + ["opentag", { + "name": "MONKEY", + "attributes": {} + }], + ["text", "=(|)"], + ["closetag", "MONKEY"], + ["closetag", "ROOT"], + ["end"], + ["ready"] + ], + strict : false, + opt : {} +}); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-tag.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-tag.js new file mode 100644 index 0000000..b2c5736 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/self-closing-tag.js @@ -0,0 +1,25 @@ + +require(__dirname).test({ + xml : + " "+ + " "+ + " "+ + " "+ + "=(|) "+ + ""+ + " ", + expect : [ + ["opentag", {name:"ROOT", attributes:{}}], + ["opentag", {name:"HAHA", attributes:{}}], + ["closetag", "HAHA"], + ["opentag", {name:"HAHA", attributes:{}}], + ["closetag", "HAHA"], + // ["opentag", {name:"HAHA", attributes:{}}], + // ["closetag", "HAHA"], + ["opentag", {name:"MONKEY", attributes:{}}], + ["text", "=(|)"], + ["closetag", "MONKEY"], + ["closetag", "ROOT"] + ], + opt : { trim : true } +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/stray-ending.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/stray-ending.js new file mode 100644 index 0000000..6b0aa7f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/stray-ending.js @@ -0,0 +1,17 @@ +// stray ending tags should just be ignored in non-strict mode. +// https://github.com/isaacs/sax-js/issues/32 +require(__dirname).test + ( { xml : + "" + , expect : + [ [ "opentag", { name: "A", attributes: {} } ] + , [ "opentag", { name: "B", attributes: {} } ] + , [ "text", "" ] + , [ "closetag", "B" ] + , [ "closetag", "A" ] + ] + , strict : false + , opt : {} + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/trailing-non-whitespace.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/trailing-non-whitespace.js new file mode 100644 index 0000000..3e1fb2e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/trailing-non-whitespace.js @@ -0,0 +1,17 @@ + +require(__dirname).test({ + xml : "Welcome, to monkey land", + expect : [ + ["opentag", { + "name": "SPAN", + "attributes": {} + }], + ["text", "Welcome,"], + ["closetag", "SPAN"], + ["text", " to monkey land"], + ["end"], + ["ready"] + ], + strict : false, + opt : {} +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/unquoted.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/unquoted.js new file mode 100644 index 0000000..79f1d0b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/unquoted.js @@ -0,0 +1,17 @@ +// unquoted attributes should be ok in non-strict mode +// https://github.com/isaacs/sax-js/issues/31 +require(__dirname).test + ( { xml : + "" + , expect : + [ [ "attribute", { name: "class", value: "test" } ] + , [ "attribute", { name: "hello", value: "world" } ] + , [ "opentag", { name: "SPAN", + attributes: { class: "test", hello: "world" } } ] + , [ "closetag", "SPAN" ] + ] + , strict : false + , opt : {} + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-issue-41.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-issue-41.js new file mode 100644 index 0000000..596d82b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-issue-41.js @@ -0,0 +1,67 @@ +var t = require(__dirname) + + , xmls = // should be the same both ways. + [ "" + , "" ] + + , ex1 = + [ [ "opennamespace" + , { prefix: "a" + , uri: "http://ATTRIBUTE" + } + ] + , [ "attribute" + , { name: "xmlns:a" + , value: "http://ATTRIBUTE" + , prefix: "xmlns" + , local: "a" + , uri: "http://www.w3.org/2000/xmlns/" + } + ] + , [ "attribute" + , { name: "a:attr" + , local: "attr" + , prefix: "a" + , uri: "http://ATTRIBUTE" + , value: "value" + } + ] + , [ "opentag" + , { name: "parent" + , uri: "" + , prefix: "" + , local: "parent" + , attributes: + { "a:attr": + { name: "a:attr" + , local: "attr" + , prefix: "a" + , uri: "http://ATTRIBUTE" + , value: "value" + } + , "xmlns:a": + { name: "xmlns:a" + , local: "a" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "http://ATTRIBUTE" + } + } + , ns: {"a": "http://ATTRIBUTE"} + } + ] + , ["closetag", "parent"] + , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] + ] + + // swap the order of elements 2 and 1 + , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) + , expected = [ex1, ex2] + +xmls.forEach(function (x, i) { + t.test({ xml: x + , expect: expected[i] + , strict: true + , opt: { xmlns: true } + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-rebinding.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-rebinding.js new file mode 100644 index 0000000..f464876 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-rebinding.js @@ -0,0 +1,59 @@ + +require(__dirname).test + ( { xml : + ""+ + ""+ + ""+ + ""+ + ""+ + "" + + , expect : + [ [ "opennamespace", { prefix: "x", uri: "x1" } ] + , [ "opennamespace", { prefix: "y", uri: "y1" } ] + , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] + , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ] + , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", + attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } + , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } + , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x1', y: 'y1' } } ] + + , [ "opennamespace", { prefix: "x", uri: "x2" } ] + , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] + , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind", + attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } }, + ns: { x: 'x2' } } ] + + , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", + attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x2' } } ] + + , [ "closetag", "check" ] + + , [ "closetag", "rebind" ] + , [ "closenamespace", { prefix: "x", uri: "x2" } ] + + , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", + attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x1', y: 'y1' } } ] + , [ "closetag", "check" ] + + , [ "closetag", "root" ] + , [ "closenamespace", { prefix: "x", uri: "x1" } ] + , [ "closenamespace", { prefix: "y", uri: "y1" } ] + ] + , strict : true + , opt : { xmlns: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-strict.js new file mode 100644 index 0000000..4ad615b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-strict.js @@ -0,0 +1,71 @@ + +require(__dirname).test + ( { xml : + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + "" + + , expect : + [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "", + attributes: {}, ns: {} } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", + attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } }, + ns: {} } ] + , [ "closetag", "plain" ] + + , [ "opennamespace", { prefix: "", uri: "uri:default" } ] + + , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ] + , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default", + attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } }, + ns: { "": "uri:default" } } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' }, + attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } } } ] + , [ "closetag", "plain" ] + + , [ "closetag", "ns1" ] + + , [ "closenamespace", { prefix: "", uri: "uri:default" } ] + + , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ] + + , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ] + + , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "", + attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } }, + ns: { a: "uri:nsa" } } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", + attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, + ns: { a: 'uri:nsa' } } ] + , [ "closetag", "plain" ] + + , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ] + , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa", + attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } }, + ns: { a: 'uri:nsa' } } ] + , [ "closetag", "a:ns" ] + + , [ "closetag", "ns2" ] + + , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ] + + , [ "closetag", "root" ] + ] + , strict : true + , opt : { xmlns: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-unbound.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-unbound.js new file mode 100644 index 0000000..2944b87 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-unbound.js @@ -0,0 +1,15 @@ + +require(__dirname).test( + { strict : true + , opt : { xmlns: true } + , expect : + [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] + + , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] + , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", + attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, + ns: {} } ] + , [ "closetag", "root" ] + ] + } +).write("") diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js new file mode 100644 index 0000000..16da771 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js @@ -0,0 +1,35 @@ +require(__dirname).test( + { xml : "" + , expect : + [ [ "attribute" + , { name: "xml:lang" + , local: "lang" + , prefix: "xml" + , uri: "http://www.w3.org/XML/1998/namespace" + , value: "en" + } + ] + , [ "opentag" + , { name: "root" + , uri: "" + , prefix: "" + , local: "root" + , attributes: + { "xml:lang": + { name: "xml:lang" + , local: "lang" + , prefix: "xml" + , uri: "http://www.w3.org/XML/1998/namespace" + , value: "en" + } + } + , ns: {} + } + ] + , ["closetag", "root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js new file mode 100644 index 0000000..9a1ce1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js @@ -0,0 +1,20 @@ +require(__dirname).test( + { xml : "" + , expect : + [ + [ "opentag" + , { name: "xml:root" + , uri: "http://www.w3.org/XML/1998/namespace" + , prefix: "xml" + , local: "root" + , attributes: {} + , ns: {} + } + ] + , ["closetag", "xml:root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js new file mode 100644 index 0000000..1eba9c7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js @@ -0,0 +1,40 @@ +require(__dirname).test( + { xml : "" + , expect : + [ ["error" + , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" + + "Actual: ERROR\n" + + "Line: 0\nColumn: 27\nChar: '" + ] + , [ "attribute" + , { name: "xmlns:xml" + , local: "xml" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "ERROR" + } + ] + , [ "opentag" + , { name: "xml:root" + , uri: "http://www.w3.org/XML/1998/namespace" + , prefix: "xml" + , local: "root" + , attributes: + { "xmlns:xml": + { name: "xmlns:xml" + , local: "xml" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "ERROR" + } + } + , ns: {} + } + ] + , ["closetag", "xml:root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/README.md new file mode 100644 index 0000000..cbd9565 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/README.md @@ -0,0 +1,350 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + $ node + var semver = require('semver') + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + semver.clean(' =v1.2.3 ') // '1.2.3' + semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true + semver.gt('1.2.3', '9.8.7') // false + semver.lt('1.2.3', '9.8.7') // true + +As a command-line utility: + + $ semver -h + + SemVer 5.1.0 + + A JavaScript implementation of the http://semver.org/ specification + Copyright Isaac Z. Schlueter + + Usage: semver [options] [ [...]] + Prints valid versions sorted by SemVer precedence + + Options: + -r --range + Print versions that match the specified range. + + -i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + + --preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + + -l --loose + Interpret versions and ranges loosely + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no satisfying versions are found, then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/bin/semver b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/bin/semver new file mode 100755 index 0000000..c5f2e85 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/package.json new file mode 100644 index 0000000..08ca0f7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "semver@^5.0.1", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "^5.0.1", + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "semver@>=5.0.1 <6.0.0", + "_id": "semver@5.3.0", + "_inCache": true, + "_installable": true, + "_location": "/semver", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.6", + "_phantomChildren": {}, + "_requested": { + "raw": "semver@^5.0.1", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "^5.0.1", + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", + "_shrinkwrap": null, + "_spec": "semver@^5.0.1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "dependencies": {}, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", + "tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "gitHead": "d21444a0658224b152ce54965d02dbe0856afb84", + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "semver", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "5.3.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/range.bnf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/range.bnf new file mode 100644 index 0000000..25ebd5c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/semver.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/semver.js new file mode 100644 index 0000000..5f1a3c5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/semver/semver.js @@ -0,0 +1,1203 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return compare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.documentup.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.documentup.json new file mode 100644 index 0000000..57fe301 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.documentup.json @@ -0,0 +1,6 @@ +{ + "name": "ShellJS", + "twitter": [ + "r2r" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.jshintrc new file mode 100644 index 0000000..a80c559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.jshintrc @@ -0,0 +1,7 @@ +{ + "loopfunc": true, + "sub": true, + "undef": true, + "unused": true, + "node": true +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.npmignore new file mode 100644 index 0000000..6b20c38 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.npmignore @@ -0,0 +1,2 @@ +test/ +tmp/ \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.travis.yml new file mode 100644 index 0000000..1b3280a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.10" + - "0.11" + - "0.12" + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/LICENSE new file mode 100644 index 0000000..1b35ee9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/README.md new file mode 100644 index 0000000..d08d13e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/README.md @@ -0,0 +1,579 @@ +# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) + +ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! + +The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: + ++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader ++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger ++ [JSHint](http://jshint.com) - Most popular JavaScript linter ++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers ++ [Yeoman](http://yeoman.io/) - Web application stack and development tool ++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation + +and [many more](https://npmjs.org/browse/depended/shelljs). + +Connect with [@r2r](http://twitter.com/r2r) on Twitter for questions, suggestions, etc. + +## Installing + +Via npm: + +```bash +$ npm install [-g] shelljs +``` + +If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to +run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: + +```bash +$ shjs my_script +``` + +You can also just copy `shell.js` into your project's directory, and `require()` accordingly. + + +## Examples + +### JavaScript + +```javascript +require('shelljs/global'); + +if (!which('git')) { + echo('Sorry, this script requires git'); + exit(1); +} + +// Copy files to release dir +mkdir('-p', 'out/Release'); +cp('-R', 'stuff/*', 'out/Release'); + +// Replace macros in each .js file +cd('lib'); +ls('*.js').forEach(function(file) { + sed('-i', 'BUILD_VERSION', 'v0.1.2', file); + sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); + sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); +}); +cd('..'); + +// Run external tool synchronously +if (exec('git commit -am "Auto-commit"').code !== 0) { + echo('Error: Git commit failed'); + exit(1); +} +``` + +### CoffeeScript + +```coffeescript +require 'shelljs/global' + +if not which 'git' + echo 'Sorry, this script requires git' + exit 1 + +# Copy files to release dir +mkdir '-p', 'out/Release' +cp '-R', 'stuff/*', 'out/Release' + +# Replace macros in each .js file +cd 'lib' +for file in ls '*.js' + sed '-i', 'BUILD_VERSION', 'v0.1.2', file + sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file + sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file +cd '..' + +# Run external tool synchronously +if (exec 'git commit -am "Auto-commit"').code != 0 + echo 'Error: Git commit failed' + exit 1 +``` + +## Global vs. Local + +The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. + +Example: + +```javascript +var shell = require('shelljs'); +shell.echo('hello world'); +``` + +## Make tool + +A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. + +Example (CoffeeScript): + +```coffeescript +require 'shelljs/make' + +target.all = -> + target.bundle() + target.docs() + +target.bundle = -> + cd __dirname + mkdir 'build' + cd 'lib' + (cat '*.js').to '../build/output.js' + +target.docs = -> + cd __dirname + mkdir 'docs' + cd 'lib' + for file in ls '*.js' + text = grep '//@', file # extract special comments + text.replace '//@', '' # remove comment tags + text.to 'docs/my_docs.md' +``` + +To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`. + +You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`: + +```javascript +require('shelljs/make'); + +target.bundle = function(argsArray) { + // argsArray = ['arg1', 'arg2'] + /* ... */ +} +``` + + + + + +## Command reference + + +All commands run synchronously, unless otherwise stated. + + +### cd('dir') +Changes to directory `dir` for the duration of the script + + +### pwd() +Returns the current directory. + + +### ls([options ,] path [,path ...]) +### ls([options ,] path_array) +Available options: + ++ `-R`: recursive ++ `-A`: all files (include files beginning with `.`, except for `.` and `..`) + +Examples: + +```javascript +ls('projs/*.js'); +ls('-R', '/users/me', '/tmp'); +ls('-R', ['/users/me', '/tmp']); // same as above +``` + +Returns array of files in the given path, or in current directory if no path provided. + + +### find(path [,path ...]) +### find(path_array) +Examples: + +```javascript +find('src', 'lib'); +find(['src', 'lib']); // same as above +find('.').filter(function(file) { return file.match(/\.js$/); }); +``` + +Returns array of all files (however deep) in the given paths. + +The main difference from `ls('-R', path)` is that the resulting file names +include the base directories, e.g. `lib/resources/file1` instead of just `file1`. + + +### cp([options ,] source [,source ...], dest) +### cp([options ,] source_array, dest) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +cp('file1', 'dir1'); +cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +``` + +Copies files. The wildcard `*` is accepted. + + +### rm([options ,] file [, file ...]) +### rm([options ,] file_array) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +rm('-rf', '/tmp/*'); +rm('some_file.txt', 'another_file.txt'); +rm(['some_file.txt', 'another_file.txt']); // same as above +``` + +Removes files. The wildcard `*` is accepted. + + +### mv(source [, source ...], dest') +### mv(source_array, dest') +Available options: + ++ `f`: force + +Examples: + +```javascript +mv('-f', 'file', 'dir/'); +mv('file1', 'file2', 'dir/'); +mv(['file1', 'file2'], 'dir/'); // same as above +``` + +Moves files. The wildcard `*` is accepted. + + +### mkdir([options ,] dir [, dir ...]) +### mkdir([options ,] dir_array) +Available options: + ++ `p`: full path (will create intermediate dirs if necessary) + +Examples: + +```javascript +mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +``` + +Creates directories. + + +### test(expression) +Available expression primaries: + ++ `'-b', 'path'`: true if path is a block device ++ `'-c', 'path'`: true if path is a character device ++ `'-d', 'path'`: true if path is a directory ++ `'-e', 'path'`: true if path exists ++ `'-f', 'path'`: true if path is a regular file ++ `'-L', 'path'`: true if path is a symbolic link ++ `'-p', 'path'`: true if path is a pipe (FIFO) ++ `'-S', 'path'`: true if path is a socket + +Examples: + +```javascript +if (test('-d', path)) { /* do something with dir */ }; +if (!test('-f', path)) continue; // skip if it's a regular file +``` + +Evaluates expression using the available primaries and returns corresponding value. + + +### cat(file [, file ...]) +### cat(file_array) + +Examples: + +```javascript +var str = cat('file*.txt'); +var str = cat('file1', 'file2'); +var str = cat(['file1', 'file2']); // same as above +``` + +Returns a string containing the given file, or a concatenated string +containing the files if more than one file is given (a new line character is +introduced between each file). Wildcard `*` accepted. + + +### 'string'.to(file) + +Examples: + +```javascript +cat('input.txt').to('output.txt'); +``` + +Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ + + +### 'string'.toEnd(file) + +Examples: + +```javascript +cat('input.txt').toEnd('output.txt'); +``` + +Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). + + +### sed([options ,] search_regex, replacement, file) +Available options: + ++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ + +Examples: + +```javascript +sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +``` + +Reads an input string from `file` and performs a JavaScript `replace()` on the input +using the given search regex and replacement string or function. Returns the new string after replacement. + + +### grep([options ,] regex_filter, file [, file ...]) +### grep([options ,] regex_filter, file_array) +Available options: + ++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. + +Examples: + +```javascript +grep('-v', 'GLOBAL_VARIABLE', '*.js'); +grep('GLOBAL_VARIABLE', '*.js'); +``` + +Reads input string from given files and returns a string containing all lines of the +file that match the given `regex_filter`. Wildcard `*` accepted. + + +### which(command) + +Examples: + +```javascript +var nodeExec = which('node'); +``` + +Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +Returns string containing the absolute path to the command. + + +### echo(string [,string ...]) + +Examples: + +```javascript +echo('hello world'); +var str = echo('hello world'); +``` + +Prints string to stdout, and returns string with additional utility methods +like `.to()`. + + +### pushd([options,] [dir | '-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. + +Arguments: + ++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. ++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. ++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + +Examples: + +```javascript +// process.cwd() === '/usr' +pushd('/etc'); // Returns /etc /usr +pushd('+1'); // Returns /usr /etc +``` + +Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + +### popd([options,] ['-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. + +Arguments: + ++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. ++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + +Examples: + +```javascript +echo(process.cwd()); // '/usr' +pushd('/etc'); // '/etc /usr' +echo(process.cwd()); // '/etc' +popd(); // '/usr' +echo(process.cwd()); // '/usr' +``` + +When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + +### dirs([options | '+N' | '-N']) + +Available options: + ++ `-c`: Clears the directory stack by deleting all of the elements. + +Arguments: + ++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. ++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. + +Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + +See also: pushd, popd + + +### ln(options, source, dest) +### ln(source, dest) +Available options: + ++ `s`: symlink ++ `f`: force + +Examples: + +```javascript +ln('file', 'newlink'); +ln('-sf', 'file', 'existing'); +``` + +Links source to dest. Use -f to force the link, should dest already exist. + + +### exit(code) +Exits the current process with the given exit code. + +### env['VAR_NAME'] +Object containing environment variables (both getter and setter). Shortcut to process.env. + +### exec(command [, options] [, callback]) +Available options (all `false` by default): + ++ `async`: Asynchronous execution. Defaults to true if a callback is provided. ++ `silent`: Do not echo program output to console. + +Examples: + +```javascript +var version = exec('node --version', {silent:true}).output; + +var child = exec('some_long_running_process', {async:true}); +child.stdout.on('data', function(data) { + /* ... do something with data ... */ +}); + +exec('some_long_running_process', function(code, output) { + console.log('Exit code:', code); + console.log('Program output:', output); +}); +``` + +Executes the given `command` _synchronously_, unless otherwise specified. +When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +the `callback` gets the arguments `(code, output)`. + +**Note:** For long-lived processes, it's best to run `exec()` asynchronously as +the current synchronous implementation uses a lot of CPU. This should be getting +fixed soon. + + +### chmod(octal_mode || octal_string, file) +### chmod(symbolic_mode, file) + +Available options: + ++ `-v`: output a diagnostic for every file processed ++ `-c`: like verbose but report only when a change is made ++ `-R`: change files and directories recursively + +Examples: + +```javascript +chmod(755, '/Users/brandon'); +chmod('755', '/Users/brandon'); // same as above +chmod('u+x', '/Users/brandon'); +``` + +Alters the permissions of a file or directory by either specifying the +absolute permissions in octal form or expressing the changes in symbols. +This command tries to mimic the POSIX behavior as much as possible. +Notable exceptions: + ++ In symbolic modes, 'a-r' and '-r' are identical. No consideration is + given to the umask. ++ There is no "quiet" option since default behavior is to run silent. + + +## Non-Unix commands + + +### tempdir() + +Examples: + +```javascript +var tmp = tempdir(); // "/tmp" for most *nix platforms +``` + +Searches and returns string containing a writeable, platform-dependent temporary directory. +Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). + + +### error() +Tests if error occurred in the last command. Returns `null` if no error occurred, +otherwise returns string explaining the error + + +## Configuration + + +### config.silent +Example: + +```javascript +var sh = require('shelljs'); +var silentState = sh.config.silent; // save old silent state +sh.config.silent = true; +/* ... */ +sh.config.silent = silentState; // restore old silent state +``` + +Suppresses all command output if `true`, except for `echo()` calls. +Default is `false`. + +### config.fatal +Example: + +```javascript +require('shelljs/global'); +config.fatal = true; +cp('this_file_does_not_exist', '/dev/null'); // dies here +/* more commands... */ +``` + +If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/RELEASE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/RELEASE.md new file mode 100644 index 0000000..69ef3fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/RELEASE.md @@ -0,0 +1,9 @@ +# Release steps + +* Ensure master passes CI tests +* Bump version in package.json. Any breaking change or new feature should bump minor (or even major). Non-breaking changes or fixes can just bump patch. +* Update README manually if the changes are not documented in-code. If so, run `scripts/generate-docs.js` +* Commit +* `$ git tag ` (see `git tag -l` for latest) +* `$ git push origin master --tags` +* `$ npm publish .` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/bin/shjs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/bin/shjs new file mode 100755 index 0000000..d239a7a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/bin/shjs @@ -0,0 +1,51 @@ +#!/usr/bin/env node +require('../global'); + +if (process.argv.length < 3) { + console.log('ShellJS: missing argument (script name)'); + console.log(); + process.exit(1); +} + +var args, + scriptName = process.argv[2]; +env['NODE_PATH'] = __dirname + '/../..'; + +if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { + if (test('-f', scriptName + '.js')) + scriptName += '.js'; + if (test('-f', scriptName + '.coffee')) + scriptName += '.coffee'; +} + +if (!test('-f', scriptName)) { + console.log('ShellJS: script not found ('+scriptName+')'); + console.log(); + process.exit(1); +} + +args = process.argv.slice(3); + +for (var i = 0, l = args.length; i < l; i++) { + if (args[i][0] !== "-"){ + args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words + } +} + +if (scriptName.match(/\.coffee$/)) { + // + // CoffeeScript + // + if (which('coffee')) { + exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); + } else { + console.log('ShellJS: CoffeeScript interpreter not found'); + console.log(); + process.exit(1); + } +} else { + // + // JavaScript + // + exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/global.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/global.js new file mode 100644 index 0000000..97f0033 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/global.js @@ -0,0 +1,3 @@ +var shell = require('./shell.js'); +for (var cmd in shell) + global[cmd] = shell[cmd]; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/make.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/make.js new file mode 100644 index 0000000..f78b4cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/make.js @@ -0,0 +1,56 @@ +require('./global'); + +global.config.fatal = true; +global.target = {}; + +var args = process.argv.slice(2), + targetArgs, + dashesLoc = args.indexOf('--'); + +// split args, everything after -- if only for targets +if (dashesLoc > -1) { + targetArgs = args.slice(dashesLoc + 1, args.length); + args = args.slice(0, dashesLoc); +} + +// This ensures we only execute the script targets after the entire script has +// been evaluated +setTimeout(function() { + var t; + + if (args.length === 1 && args[0] === '--help') { + console.log('Available targets:'); + for (t in global.target) + console.log(' ' + t); + return; + } + + // Wrap targets to prevent duplicate execution + for (t in global.target) { + (function(t, oldTarget){ + + // Wrap it + global.target[t] = function() { + if (oldTarget.done) + return; + oldTarget.done = true; + return oldTarget.apply(oldTarget, arguments); + }; + + })(t, global.target[t]); + } + + // Execute desired targets + if (args.length > 0) { + args.forEach(function(arg) { + if (arg in global.target) + global.target[arg](targetArgs); + else { + console.log('no such target: ' + arg); + } + }); + } else if ('all' in global.target) { + global.target.all(targetArgs); + } + +}, 0); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/package.json new file mode 100644 index 0000000..ffd2b04 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "shelljs@^0.5.3", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android" + ] + ], + "_from": "shelljs@>=0.5.3 <0.6.0", + "_id": "shelljs@0.5.3", + "_inCache": true, + "_installable": true, + "_location": "/shelljs", + "_nodeVersion": "1.2.0", + "_npmUser": { + "name": "artur", + "email": "arturadib@gmail.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "shelljs@^0.5.3", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/", + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "_shrinkwrap": null, + "_spec": "shelljs@^0.5.3", + "_where": "/Users/steveng/repo/cordova/cordova-android", + "author": { + "name": "Artur Adib", + "email": "arturadib@gmail.com" + }, + "bin": { + "shjs": "./bin/shjs" + }, + "bugs": { + "url": "https://github.com/arturadib/shelljs/issues" + }, + "dependencies": {}, + "description": "Portable Unix shell commands for Node.js", + "devDependencies": { + "jshint": "~2.1.11" + }, + "directories": {}, + "dist": { + "shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "tarball": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "22d0975040b9b8234755dc6e692d6869436e8485", + "homepage": "http://github.com/arturadib/shelljs", + "keywords": [ + "unix", + "shell", + "makefile", + "make", + "jake", + "synchronous" + ], + "license": "BSD*", + "main": "./shell.js", + "maintainers": [ + { + "name": "artur", + "email": "arturadib@gmail.com" + } + ], + "name": "shelljs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/arturadib/shelljs.git" + }, + "scripts": { + "test": "node scripts/run-tests" + }, + "version": "0.5.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/generate-docs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/generate-docs.js new file mode 100755 index 0000000..532fed9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/generate-docs.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node +require('../global'); + +echo('Appending docs to README.md'); + +cd(__dirname + '/..'); + +// Extract docs from shell.js +var docs = grep('//@', 'shell.js'); + +docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { + var file = path.match('.js$') ? path : path+'.js'; + return grep('//@', file); +}); + +// Remove '//@' +docs = docs.replace(/\/\/\@ ?/g, ''); +// Append docs to README +sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); + +echo('All done.'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/run-tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/run-tests.js new file mode 100755 index 0000000..f9d31e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/scripts/run-tests.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node +require('../global'); + +var path = require('path'); + +var failed = false; + +// +// Lint +// +JSHINT_BIN = './node_modules/jshint/bin/jshint'; +cd(__dirname + '/..'); + +if (!test('-f', JSHINT_BIN)) { + echo('JSHint not found. Run `npm install` in the root dir first.'); + exit(1); +} + +if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { + failed = true; + echo('*** JSHINT FAILED! (return code != 0)'); + echo(); +} else { + echo('All JSHint tests passed'); + echo(); +} + +// +// Unit tests +// +cd(__dirname + '/../test'); +ls('*.js').forEach(function(file) { + echo('Running test:', file); + if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) + failed = true; + echo('*** TEST FAILED! (missing exit code "123")'); + echo(); + } +}); + +if (failed) { + echo(); + echo('*******************************************************'); + echo('WARNING: Some tests did not pass!'); + echo('*******************************************************'); + exit(1); +} else { + echo(); + echo('All tests passed.'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/shell.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/shell.js new file mode 100644 index 0000000..bdeb559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/shell.js @@ -0,0 +1,159 @@ +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/arturadib/shelljs +// + +var common = require('./src/common'); + + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ + +//@include ./src/cd +var _cd = require('./src/cd'); +exports.cd = common.wrap('cd', _cd); + +//@include ./src/pwd +var _pwd = require('./src/pwd'); +exports.pwd = common.wrap('pwd', _pwd); + +//@include ./src/ls +var _ls = require('./src/ls'); +exports.ls = common.wrap('ls', _ls); + +//@include ./src/find +var _find = require('./src/find'); +exports.find = common.wrap('find', _find); + +//@include ./src/cp +var _cp = require('./src/cp'); +exports.cp = common.wrap('cp', _cp); + +//@include ./src/rm +var _rm = require('./src/rm'); +exports.rm = common.wrap('rm', _rm); + +//@include ./src/mv +var _mv = require('./src/mv'); +exports.mv = common.wrap('mv', _mv); + +//@include ./src/mkdir +var _mkdir = require('./src/mkdir'); +exports.mkdir = common.wrap('mkdir', _mkdir); + +//@include ./src/test +var _test = require('./src/test'); +exports.test = common.wrap('test', _test); + +//@include ./src/cat +var _cat = require('./src/cat'); +exports.cat = common.wrap('cat', _cat); + +//@include ./src/to +var _to = require('./src/to'); +String.prototype.to = common.wrap('to', _to); + +//@include ./src/toEnd +var _toEnd = require('./src/toEnd'); +String.prototype.toEnd = common.wrap('toEnd', _toEnd); + +//@include ./src/sed +var _sed = require('./src/sed'); +exports.sed = common.wrap('sed', _sed); + +//@include ./src/grep +var _grep = require('./src/grep'); +exports.grep = common.wrap('grep', _grep); + +//@include ./src/which +var _which = require('./src/which'); +exports.which = common.wrap('which', _which); + +//@include ./src/echo +var _echo = require('./src/echo'); +exports.echo = _echo; // don't common.wrap() as it could parse '-options' + +//@include ./src/dirs +var _dirs = require('./src/dirs').dirs; +exports.dirs = common.wrap("dirs", _dirs); +var _pushd = require('./src/dirs').pushd; +exports.pushd = common.wrap('pushd', _pushd); +var _popd = require('./src/dirs').popd; +exports.popd = common.wrap("popd", _popd); + +//@include ./src/ln +var _ln = require('./src/ln'); +exports.ln = common.wrap('ln', _ln); + +//@ +//@ ### exit(code) +//@ Exits the current process with the given exit code. +exports.exit = process.exit; + +//@ +//@ ### env['VAR_NAME'] +//@ Object containing environment variables (both getter and setter). Shortcut to process.env. +exports.env = process.env; + +//@include ./src/exec +var _exec = require('./src/exec'); +exports.exec = common.wrap('exec', _exec, {notUnix:true}); + +//@include ./src/chmod +var _chmod = require('./src/chmod'); +exports.chmod = common.wrap('chmod', _chmod); + + + +//@ +//@ ## Non-Unix commands +//@ + +//@include ./src/tempdir +var _tempDir = require('./src/tempdir'); +exports.tempdir = common.wrap('tempdir', _tempDir); + + +//@include ./src/error +var _error = require('./src/error'); +exports.error = _error; + + + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ Example: +//@ +//@ ```javascript +//@ var sh = require('shelljs'); +//@ var silentState = sh.config.silent; // save old silent state +//@ sh.config.silent = true; +//@ /* ... */ +//@ sh.config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ Example: +//@ +//@ ```javascript +//@ require('shelljs/global'); +//@ config.fatal = true; +//@ cp('this_file_does_not_exist', '/dev/null'); // dies here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cat.js new file mode 100644 index 0000000..f6f4d25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cat.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### cat(file [, file ...]) +//@ ### cat(file_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). Wildcard `*` accepted. +function _cat(options, files) { + var cat = ''; + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + cat += fs.readFileSync(file, 'utf8') + '\n'; + }); + + if (cat[cat.length-1] === '\n') + cat = cat.substring(0, cat.length-1); + + return common.ShellString(cat); +} +module.exports = _cat; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cd.js new file mode 100644 index 0000000..230f432 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/cd.js @@ -0,0 +1,19 @@ +var fs = require('fs'); +var common = require('./common'); + +//@ +//@ ### cd('dir') +//@ Changes to directory `dir` for the duration of the script +function _cd(options, dir) { + if (!dir) + common.error('directory not specified'); + + if (!fs.existsSync(dir)) + common.error('no such file or directory: ' + dir); + + if (!fs.statSync(dir).isDirectory()) + common.error('not a directory: ' + dir); + + process.chdir(dir); +} +module.exports = _cd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/chmod.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/chmod.js new file mode 100644 index 0000000..f288893 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/chmod.js @@ -0,0 +1,208 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +var PERMS = (function (base) { + return { + OTHER_EXEC : base.EXEC, + OTHER_WRITE : base.WRITE, + OTHER_READ : base.READ, + + GROUP_EXEC : base.EXEC << 3, + GROUP_WRITE : base.WRITE << 3, + GROUP_READ : base.READ << 3, + + OWNER_EXEC : base.EXEC << 6, + OWNER_WRITE : base.WRITE << 6, + OWNER_READ : base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is + // the preferred way, else a jshint warning is thrown. + STICKY : parseInt('01000', 8), + SETGID : parseInt('02000', 8), + SETUID : parseInt('04000', 8), + + TYPE_MASK : parseInt('0770000', 8) + }; +})({ + EXEC : 1, + WRITE : 2, + READ : 4 +}); + +//@ +//@ ### chmod(octal_mode || octal_string, file) +//@ ### chmod(symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is +//@ given to the umask. +//@ + There is no "quiet" option since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + filePattern = mode; + mode = options; + options = ''; + } + else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose' + }); + + if (typeof filePattern === 'string') { + filePattern = [ filePattern ]; + } + + var files; + + if (options.recursive) { + files = []; + common.expand(filePattern).forEach(function addFile(expandedFile) { + var stat = fs.lstatSync(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } + else { + files = common.expand(filePattern); + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { + return; + } + + var perms = fs.statSync(file).mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + /*jshint regexdash:true */ + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') != -1; + var changeWrite = change.indexOf('w') != -1; + var changeExec = change.indexOf('x') != -1; + var changeSticky = change.indexOf('t') != -1; + var changeSetuid = change.indexOf('s') != -1; + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + } + + if (options.verbose) { + log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms != newPerms) { + if (!options.verbose && options.changes) { + log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + } + } + else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } + else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); +} +module.exports = _chmod; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/common.js new file mode 100644 index 0000000..d8c2312 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/common.js @@ -0,0 +1,203 @@ +var os = require('os'); +var fs = require('fs'); +var _ls = require('./ls'); + +// Module globals +var config = { + silent: false, + fatal: false +}; +exports.config = config; + +var state = { + error: null, + currentCmd: 'shell.js', + tempDir: null +}; +exports.state = state; + +var platform = os.type().match(/^Win/) ? 'win' : 'unix'; +exports.platform = platform; + +function log() { + if (!config.silent) + console.log.apply(this, arguments); +} +exports.log = log; + +// Shows error message. Throws unless _continue or config.fatal are true +function error(msg, _continue) { + if (state.error === null) + state.error = ''; + state.error += state.currentCmd + ': ' + msg + '\n'; + + if (msg.length > 0) + log(state.error); + + if (config.fatal) + process.exit(1); + + if (!_continue) + throw ''; +} +exports.error = error; + +// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. +// For now, this is a dummy function to bookmark places we need such strings +function ShellString(str) { + return str; +} +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +function parseOptions(str, map) { + if (!map) + error('parseOptions() internal error: no map given'); + + // All options are false by default + var options = {}; + for (var letter in map) + options[map[letter]] = false; + + if (!str) + return options; // defaults + + if (typeof str !== 'string') + error('parseOptions() internal error: wrong str'); + + // e.g. match[1] = 'Rf' for str = '-Rf' + var match = str.match(/^\-(.+)/); + if (!match) + return options; + + // e.g. chars = ['R', 'f'] + var chars = match[1].split(''); + + chars.forEach(function(c) { + if (c in map) + options[map[c]] = true; + else + error('option not recognized: '+c); + }); + + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + var expanded = []; + list.forEach(function(listEl) { + // Wildcard present on directory names ? + if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) { + var match = listEl.match(/^([^*]+\/|)(.*)/); + var root = match[1]; + var rest = match[2]; + var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*"); + restRegex = new RegExp(restRegex); + + _ls('-R', root).filter(function (e) { + return restRegex.test(e); + }).forEach(function(file) { + expanded.push(file); + }); + } + // Wildcard present on file names ? + else if (listEl.search(/\*/) > -1) { + _ls('', listEl).forEach(function(file) { + expanded.push(file); + }); + } else { + expanded.push(listEl); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch(e) { + // Try to override file permission + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) + return parseInt(16*Math.random(), 10).toString(16); + else { + var hash = ''; + for (var i=0; i and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + if (options.recursive) { + // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" + // (see Github issue #15) + sources.forEach(function(src, i) { + if (src[src.length - 1] === '/') + sources[i] += '*'; + }); + + // Create dest + try { + fs.mkdirSync(dest, parseInt('0777', 8)); + } catch (e) { + // like Unix's cp, keep going even if we can't create dest dir + } + } + + sources = common.expand(sources); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + if (fs.statSync(src).isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.log(src + ' is a directory (not copied)'); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = path.join(dest, path.basename(src)), + checkDir = fs.statSync(src); + try { + fs.mkdirSync(newDest, checkDir.mode); + } catch (e) { + //if the directory already exists, that's okay + if (e.code !== 'EEXIST') { + common.error('dest file no such file or directory: ' + newDest, true); + throw e; + } + } + + cpdirSyncRecursive(src, newDest, {force: options.force}); + } + return; // done with dir + } + + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + copyFileSync(src, thisDest); + }); // forEach(src) +} +module.exports = _cp; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/dirs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/dirs.js new file mode 100644 index 0000000..58fae8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/dirs.js @@ -0,0 +1,191 @@ +var common = require('./common'); +var _cd = require('./cd'); +var path = require('path'); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } else { + common.error(index + ': directory stack index out of range'); + } + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(''); +} +exports.pushd = _pushd; + +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(''); +} +exports.popd = _popd; + +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. +//@ +//@ See also: pushd, popd +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c' : 'clear' + }); + + if (options['clear']) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + common.log(stack[index]); + return stack[index]; + } + + common.log(stack.join(' ')); + + return stack; +} +exports.dirs = _dirs; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/echo.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/echo.js new file mode 100644 index 0000000..760ea84 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/echo.js @@ -0,0 +1,20 @@ +var common = require('./common'); + +//@ +//@ ### echo(string [,string ...]) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ ``` +//@ +//@ Prints string to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo() { + var messages = [].slice.call(arguments, 0); + console.log.apply(this, messages); + return common.ShellString(messages.join(' ')); +} +module.exports = _echo; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/error.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/error.js new file mode 100644 index 0000000..cca3efb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/error.js @@ -0,0 +1,10 @@ +var common = require('./common'); + +//@ +//@ ### error() +//@ Tests if error occurred in the last command. Returns `null` if no error occurred, +//@ otherwise returns string explaining the error +function error() { + return common.state.error; +}; +module.exports = error; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/exec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/exec.js new file mode 100644 index 0000000..d259a9f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/exec.js @@ -0,0 +1,216 @@ +var common = require('./common'); +var _tempDir = require('./tempdir'); +var _pwd = require('./pwd'); +var path = require('path'); +var fs = require('fs'); +var child = require('child_process'); + +// Hack to run child_process.exec() synchronously (sync avoids callback hell) +// Uses a custom wait loop that checks for a flag file, created when the child process is done. +// (Can't do a wait loop that checks for internal Node variables/messages as +// Node is single-threaded; callbacks and other internal state changes are done in the +// event loop). +function execSync(cmd, opts) { + var tempDir = _tempDir(); + var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), + codeFile = path.resolve(tempDir+'/'+common.randomFileName()), + scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), + sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var previousStdoutContent = ''; + // Echoes stdout changes from running process, if not silent + function updateStdout() { + if (options.silent || !fs.existsSync(stdoutFile)) + return; + + var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); + // No changes since last time? + if (stdoutContent.length <= previousStdoutContent.length) + return; + + process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); + previousStdoutContent = stdoutContent; + } + + function escape(str) { + return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); + } + + if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); + + var execCommand = '"'+process.execPath+'" '+scriptFile; + var execOptions = { + env: process.env, + cwd: _pwd(), + maxBuffer: 20*1024*1024 + }; + + if (typeof child.execSync === 'function') { + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});", + "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');", + "childProcess.stdout.pipe(stdoutStream, {end: false});", + "childProcess.stderr.pipe(stdoutStream, {end: false});", + "childProcess.stdout.pipe(process.stdout);", + "childProcess.stderr.pipe(process.stderr);", + "var stdoutEnded = false, stderrEnded = false;", + "function tryClosing(){ if(stdoutEnded && stderrEnded){ stdoutStream.end(); } }", + "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosing(); });", + "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosing(); });" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + if (options.silent) { + execOptions.stdio = 'ignore'; + } else { + execOptions.stdio = [0, 1, 2]; + } + + // Welcome to the future + child.execSync(execCommand, execOptions); + } else { + cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix + + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + child.exec(execCommand, execOptions); + + // The wait loop + // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage + // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing + // CPU usage, though apparently not so much on Windows) + while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + } + + // At this point codeFile exists, but it's not necessarily flushed yet. + // Keep reading it until it is. + var code = parseInt('', 10); + while (isNaN(code)) { + code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); + } + + var stdout = fs.readFileSync(stdoutFile, 'utf8'); + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + try { common.unlinkSync(scriptFile); } catch(e) {} + try { common.unlinkSync(stdoutFile); } catch(e) {} + try { common.unlinkSync(codeFile); } catch(e) {} + try { common.unlinkSync(sleepFile); } catch(e) {} + + // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html + if (code === 1 || code === 2 || code >= 126) { + common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes + } + // True if successful, false if not + var obj = { + code: code, + output: stdout + }; + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, callback) { + var output = ''; + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { + if (callback) + callback(err ? err.code : 0, output); + }); + + c.stdout.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + c.stderr.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ Available options (all `false` by default): +//@ +//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. +//@ + `silent`: Do not echo program output to console. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).output; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, output) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', output); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. +//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +//@ the `callback` gets the arguments `(code, output)`. +//@ +//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as +//@ the current synchronous implementation uses a lot of CPU. This should be getting +//@ fixed soon. +function _exec(command, options, callback) { + if (!command) + common.error('must specify command'); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false + }, options); + + if (options.async) + return execAsync(command, options, callback); + else + return execSync(command, options); +} +module.exports = _exec; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/find.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/find.js new file mode 100644 index 0000000..d9eeec2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/find.js @@ -0,0 +1,51 @@ +var fs = require('fs'); +var common = require('./common'); +var _ls = require('./ls'); + +//@ +//@ ### find(path [,path ...]) +//@ ### find(path_array) +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. +function _find(options, paths) { + if (!paths) + common.error('no path specified'); + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + function pushFile(file) { + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + list.push(file); + } + + // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory + + paths.forEach(function(file) { + pushFile(file); + + if (fs.statSync(file).isDirectory()) { + _ls('-RA', file+'/*').forEach(function(subfile) { + pushFile(subfile); + }); + } + }); + + return list; +} +module.exports = _find; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/grep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/grep.js new file mode 100644 index 0000000..00c7d6a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/grep.js @@ -0,0 +1,52 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### grep([options ,] regex_filter, file [, file ...]) +//@ ### grep([options ,] regex_filter, file_array) +//@ Available options: +//@ +//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. Wildcard `*` accepted. +function _grep(options, regex, files) { + options = common.parseOptions(options, { + 'v': 'inverse' + }); + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 2); + // if it's array leave it as it is + + files = common.expand(files); + + var grep = ''; + files.forEach(function(file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, true); + return; + } + + var contents = fs.readFileSync(file, 'utf8'), + lines = contents.split(/\r*\n/); + lines.forEach(function(line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) + grep += line + '\n'; + }); + }); + + return common.ShellString(grep); +} +module.exports = _grep; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ln.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ln.js new file mode 100644 index 0000000..a7b9701 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ln.js @@ -0,0 +1,53 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); +var os = require('os'); + +//@ +//@ ### ln(options, source, dest) +//@ ### ln(source, dest) +//@ Available options: +//@ +//@ + `s`: symlink +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ln('file', 'newlink'); +//@ ln('-sf', 'file', 'existing'); +//@ ``` +//@ +//@ Links source to dest. Use -f to force the link, should dest already exist. +function _ln(options, source, dest) { + options = common.parseOptions(options, { + 's': 'symlink', + 'f': 'force' + }); + + if (!source || !dest) { + common.error('Missing and/or '); + } + + source = path.resolve(process.cwd(), String(source)); + dest = path.resolve(process.cwd(), String(dest)); + + if (!fs.existsSync(source)) { + common.error('Source file does not exist', true); + } + + if (fs.existsSync(dest)) { + if (!options.force) { + common.error('Destination file exists', true); + } + + fs.unlinkSync(dest); + } + + if (options.symlink) { + fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } else { + fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } +} +module.exports = _ln; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ls.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ls.js new file mode 100644 index 0000000..3345db4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/ls.js @@ -0,0 +1,126 @@ +var path = require('path'); +var fs = require('fs'); +var common = require('./common'); +var _cd = require('./cd'); +var _pwd = require('./pwd'); + +//@ +//@ ### ls([options ,] path [,path ...]) +//@ ### ls([options ,] path_array) +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ``` +//@ +//@ Returns array of files in the given path, or in current directory if no path provided. +function _ls(options, paths) { + options = common.parseOptions(options, { + 'R': 'recursive', + 'A': 'all', + 'a': 'all_deprecated' + }); + + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) + paths = ['.']; + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + // Conditionally pushes file to list - returns true if pushed, false otherwise + // (e.g. prevents hidden files to be included unless explicitly told so) + function pushFile(file, query) { + // hidden file? + if (path.basename(file)[0] === '.') { + // not explicitly asking for hidden files? + if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) + return false; + } + + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + + list.push(file); + return true; + } + + paths.forEach(function(p) { + if (fs.existsSync(p)) { + var stats = fs.statSync(p); + // Simple file? + if (stats.isFile()) { + pushFile(p, p); + return; // continue + } + + // Simple dir? + if (stats.isDirectory()) { + // Iterate over p contents + fs.readdirSync(p).forEach(function(file) { + if (!pushFile(file, p)) + return; + + // Recursive? + if (options.recursive) { + var oldDir = _pwd(); + _cd('', p); + if (fs.statSync(file).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); + _cd('', oldDir); + } + }); + return; // continue + } + } + + // p does not exist - possible wildcard present + + var basename = path.basename(p); + var dirname = path.dirname(p); + // Wildcard present on an existing dir? (e.g. '/tmp/*.js') + if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { + // Escape special regular expression chars + var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); + // Translates wildcard into regex + regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; + // Iterate over directory contents + fs.readdirSync(dirname).forEach(function(file) { + if (file.match(new RegExp(regexp))) { + if (!pushFile(path.normalize(dirname+'/'+file), basename)) + return; + + // Recursive? + if (options.recursive) { + var pp = dirname + '/' + file; + if (fs.lstatSync(pp).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); + } // recursive + } // if file matches + }); // forEach + return; + } + + common.error('no such file or directory: ' + p, true); + }); + + return list; +} +module.exports = _ls; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mkdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mkdir.js new file mode 100644 index 0000000..5a7088f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mkdir.js @@ -0,0 +1,68 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Recursively creates 'dir' +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options ,] dir [, dir ...]) +//@ ### mkdir([options ,] dir_array) +//@ Available options: +//@ +//@ + `p`: full path (will create intermediate dirs if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + options = common.parseOptions(options, { + 'p': 'fullpath' + }); + if (!dirs) + common.error('no paths given'); + + if (typeof dirs === 'string') + dirs = [].slice.call(arguments, 1); + // if it's array leave it as it is + + dirs.forEach(function(dir) { + if (fs.existsSync(dir)) { + if (!options.fullpath) + common.error('path already exists: ' + dir, true); + return; // skip dir + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, true); + return; // skip dir + } + + if (options.fullpath) + mkdirSyncRecursive(dir); + else + fs.mkdirSync(dir, parseInt('0777', 8)); + }); +} // mkdir +module.exports = _mkdir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mv.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mv.js new file mode 100644 index 0000000..11f9607 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/mv.js @@ -0,0 +1,80 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### mv(source [, source ...], dest') +//@ ### mv(source_array, dest') +//@ Available options: +//@ +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-f', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves files. The wildcard `*` is accepted. +function _mv(options, sources, dest) { + options = common.parseOptions(options, { + 'f': 'force' + }); + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + sources = common.expand(sources); + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: '+src, true); + return; // skip file + } + + fs.renameSync(src, thisDest); + }); // forEach(src) +} // mv +module.exports = _mv; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/popd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/popd.js new file mode 100644 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/popd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pushd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pushd.js new file mode 100644 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pushd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pwd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pwd.js new file mode 100644 index 0000000..41727bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/pwd.js @@ -0,0 +1,11 @@ +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### pwd() +//@ Returns the current directory. +function _pwd(options) { + var pwd = path.resolve(process.cwd()); + return common.ShellString(pwd); +} +module.exports = _pwd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/rm.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/rm.js new file mode 100644 index 0000000..bd608cb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/rm.js @@ -0,0 +1,163 @@ +var common = require('./common'); +var fs = require('fs'); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for(var i = 0; i < files.length; i++) { + var file = dir + "/" + files[i], + currFile = fs.lstatSync(file); + + if(currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } + + else if(currFile.isSymbolicLink()) { // Unlink symlinks + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + else // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + // Retry on windows, sometimes it takes a little time before all the files in the directory are gone + var start = Date.now(); + while (true) { + try { + result = fs.rmdirSync(dir); + if (fs.existsSync(dir)) throw { code: "EAGAIN" } + break; + } catch(er) { + // In addition to error codes, also check if the directory still exists and loop again if true + if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) { + if (Date.now() - start > 1000) throw er; + } else if (er.code === "ENOENT") { + // Directory did not exist, deletion was successful + break; + } else { + throw er; + } + } + } + } catch(e) { + common.error('could not remove directory (code '+e.code+'): ' + dir, true); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch(e) { + writePermission = false; + } + + return writePermission; +} + +//@ +//@ ### rm([options ,] file [, file ...]) +//@ ### rm([options ,] file_array) +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. The wildcard `*` is accepted. +function _rm(options, files) { + options = common.parseOptions(options, { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive' + }); + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) { + // Path does not exist, no force flag given + if (!options.force) + common.error('no such file or directory: '+file, true); + + return; // skip file + } + + // If here, path exists + + var stats = fs.lstatSync(file); + if (stats.isFile() || stats.isSymbolicLink()) { + + // Do not check for file writing permissions + if (options.force) { + common.unlinkSync(file); + return; + } + + if (isWriteable(file)) + common.unlinkSync(file); + else + common.error('permission denied: '+file, true); + + return; + } // simple file + + // Path is an existing directory, but no -r flag given + if (stats.isDirectory() && !options.recursive) { + common.error('path is a directory', true); + return; // skip path + } + + // Recursively remove existing directory + if (stats.isDirectory() && options.recursive) { + rmdirSyncRecursive(file, options.force); + } + }); // forEach(file) +} // rm +module.exports = _rm; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/sed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/sed.js new file mode 100644 index 0000000..65f7cb4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/sed.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### sed([options ,] search_regex, replacement, file) +//@ Available options: +//@ +//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input +//@ using the given search regex and replacement string or function. Returns the new string after replacement. +function _sed(options, regex, replacement, file) { + options = common.parseOptions(options, { + 'i': 'inplace' + }); + + if (typeof replacement === 'string' || typeof replacement === 'function') + replacement = replacement; // no-op + else if (typeof replacement === 'number') + replacement = replacement.toString(); // fallback + else + common.error('invalid replacement string'); + + if (!file) + common.error('no file given'); + + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); + if (options.inplace) + fs.writeFileSync(file, result, 'utf8'); + + return common.ShellString(result); +} +module.exports = _sed; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/tempdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/tempdir.js new file mode 100644 index 0000000..45953c2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/tempdir.js @@ -0,0 +1,56 @@ +var common = require('./common'); +var os = require('os'); +var fs = require('fs'); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) + return false; + + if (!fs.statSync(dir).isDirectory()) + return false; + + var testFile = dir+'/'+common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + return false; + } +} + + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + var state = common.state; + if (state.tempDir) + return state.tempDir; // from cache + + state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ + writeableDir(process.env['TMPDIR']) || + writeableDir(process.env['TEMP']) || + writeableDir(process.env['TMP']) || + writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return state.tempDir; +} +module.exports = _tempDir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/test.js new file mode 100644 index 0000000..8a4ac7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/test.js @@ -0,0 +1,85 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### test(expression) +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symboilc link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates expression using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) + common.error('no path given'); + + // hack - only works with unary primaries + options = common.parseOptions(options, { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket' + }); + + var canInterpret = false; + for (var key in options) + if (options[key] === true) { + canInterpret = true; + break; + } + + if (!canInterpret) + common.error('could not interpret expression'); + + if (options.link) { + try { + return fs.lstatSync(path).isSymbolicLink(); + } catch(e) { + return false; + } + } + + if (!fs.existsSync(path)) + return false; + + if (options.exists) + return true; + + var stats = fs.statSync(path); + + if (options.block) + return stats.isBlockDevice(); + + if (options.character) + return stats.isCharacterDevice(); + + if (options.directory) + return stats.isDirectory(); + + if (options.file) + return stats.isFile(); + + if (options.pipe) + return stats.isFIFO(); + + if (options.socket) + return stats.isSocket(); +} // test +module.exports = _test; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/to.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/to.js new file mode 100644 index 0000000..f029999 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/to.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.writeFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not write to file (code '+e.code+'): '+file, true); + } +} +module.exports = _to; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/toEnd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/toEnd.js new file mode 100644 index 0000000..f6d099d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/toEnd.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). +function _toEnd(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.appendFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not append to file (code '+e.code+'): '+file, true); + } +} +module.exports = _toEnd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/which.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/which.js new file mode 100644 index 0000000..2822ecf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/shelljs/src/which.js @@ -0,0 +1,83 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Cross-platform method for splitting environment PATH variables +function splitPath(p) { + for (i=1;i<2;i++) {} + + if (!p) + return []; + + if (common.platform === 'win') + return p.split(';'); + else + return p.split(':'); +} + +function checkPath(path) { + return fs.existsSync(path) && fs.statSync(path).isDirectory() == false; +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +//@ Returns string containing the absolute path to the command. +function _which(options, cmd) { + if (!cmd) + common.error('must specify command'); + + var pathEnv = process.env.path || process.env.Path || process.env.PATH, + pathArray = splitPath(pathEnv), + where = null; + + // No relative/absolute paths provided? + if (cmd.search(/\//) === -1) { + // Search for command in PATH + pathArray.forEach(function(dir) { + if (where) + return; // already found it + + var attempt = path.resolve(dir + '/' + cmd); + if (checkPath(attempt)) { + where = attempt; + return; + } + + if (common.platform === 'win') { + var baseAttempt = attempt; + attempt = baseAttempt + '.exe'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.cmd'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.bat'; + if (checkPath(attempt)) { + where = attempt; + return; + } + } // if 'win' + }); + } + + // Command not found anywhere? + if (!checkPath(cmd) && !where) + return null; + + where = where || path.resolve(cmd); + + return common.ShellString(where); +} +module.exports = _which; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/LICENSE new file mode 100644 index 0000000..ad0e71b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative +Reporters & Editors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/README.md new file mode 100644 index 0000000..c2ba259 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/README.md @@ -0,0 +1,22 @@ + __ + /\ \ __ + __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ + /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ + \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ + \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ + \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ + \ \____/ + \/___/ + +Underscore.js is a utility-belt library for JavaScript that provides +support for the usual functional suspects (each, map, reduce, filter...) +without extending any core JavaScript objects. + +For Docs, License, Tests, and pre-packed downloads, see: +http://underscorejs.org + +Underscore is an open-sourced component of DocumentCloud: +https://github.com/documentcloud + +Many thanks to our contributors: +https://github.com/jashkenas/underscore/contributors diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/package.json new file mode 100644 index 0000000..095e1fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "underscore@^1.8.3", + "scope": null, + "escapedName": "underscore", + "name": "underscore", + "rawSpec": "^1.8.3", + "spec": ">=1.8.3 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "underscore@>=1.8.3 <2.0.0", + "_id": "underscore@1.8.3", + "_inCache": true, + "_installable": true, + "_location": "/underscore", + "_npmUser": { + "name": "jashkenas", + "email": "jashkenas@gmail.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "underscore@^1.8.3", + "scope": null, + "escapedName": "underscore", + "name": "underscore", + "rawSpec": "^1.8.3", + "spec": ">=1.8.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common", + "/jasmine-node" + ], + "_resolved": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", + "_shrinkwrap": null, + "_spec": "underscore@^1.8.3", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Jeremy Ashkenas", + "email": "jeremy@documentcloud.org" + }, + "bugs": { + "url": "https://github.com/jashkenas/underscore/issues" + }, + "dependencies": {}, + "description": "JavaScript's functional programming helper library.", + "devDependencies": { + "docco": "*", + "eslint": "0.6.x", + "karma": "~0.12.31", + "karma-qunit": "~0.1.4", + "qunit-cli": "~0.2.0", + "uglify-js": "2.4.x" + }, + "directories": {}, + "dist": { + "shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", + "tarball": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz" + }, + "files": [ + "underscore.js", + "underscore-min.js", + "underscore-min.map", + "LICENSE" + ], + "gitHead": "e4743ab712b8ab42ad4ccb48b155034d02394e4d", + "homepage": "http://underscorejs.org", + "keywords": [ + "util", + "functional", + "server", + "client", + "browser" + ], + "license": "MIT", + "main": "underscore.js", + "maintainers": [ + { + "name": "jashkenas", + "email": "jashkenas@gmail.com" + } + ], + "name": "underscore", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jashkenas/underscore.git" + }, + "scripts": { + "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", + "doc": "docco underscore.js", + "lint": "eslint underscore.js test/*.js", + "test": "npm run test-node && npm run lint", + "test-browser": "npm i karma-phantomjs-launcher && ./node_modules/karma/bin/karma start", + "test-node": "qunit-cli test/*.js" + }, + "version": "1.8.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.js new file mode 100644 index 0000000..f01025b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.js @@ -0,0 +1,6 @@ +// Underscore.js 1.8.3 +// http://underscorejs.org +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. +(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); +//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.map b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.map new file mode 100644 index 0000000..cf356bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore-min.map @@ -0,0 +1 @@ +{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createPredicateIndexFinder","array","predicate","cb","getLength","createIndexFinder","predicateFind","sortedIndex","item","idx","i","Math","max","min","slice","call","isNaN","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","key","baseCreate","result","MAX_ARRAY_INDEX","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","computed","lastComputed","shuffle","rand","set","shuffled","random","sample","n","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","findLastIndex","low","high","mid","floor","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WA4KC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+ZtD,QAASO,GAA2Bd,GAClC,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAASW,EAAUH,GACnBT,EAAQN,EAAM,EAAI,EAAIO,EAAS,EAC5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAsBZ,QAASa,GAAkBnB,EAAKoB,EAAeC,GAC7C,MAAO,UAASN,EAAOO,EAAMC,GAC3B,GAAIC,GAAI,EAAGjB,EAASW,EAAUH,EAC9B,IAAkB,gBAAPQ,GACLvB,EAAM,EACNwB,EAAID,GAAO,EAAIA,EAAME,KAAKC,IAAIH,EAAMhB,EAAQiB,GAE5CjB,EAASgB,GAAO,EAAIE,KAAKE,IAAIJ,EAAM,EAAGhB,GAAUgB,EAAMhB,EAAS,MAE9D,IAAIc,GAAeE,GAAOhB,EAE/B,MADAgB,GAAMF,EAAYN,EAAOO,GAClBP,EAAMQ,KAASD,EAAOC,GAAO,CAEtC,IAAID,IAASA,EAEX,MADAC,GAAMH,EAAcQ,EAAMC,KAAKd,EAAOS,EAAGjB,GAASK,EAAEkB,OAC7CP,GAAO,EAAIA,EAAMC,GAAK,CAE/B,KAAKD,EAAMvB,EAAM,EAAIwB,EAAIjB,EAAS,EAAGgB,GAAO,GAAWhB,EAANgB,EAAcA,GAAOvB,EACpE,GAAIe,EAAMQ,KAASD,EAAM,MAAOC,EAElC,QAAQ,GAqPZ,QAASQ,GAAoB7B,EAAKG,GAChC,GAAI2B,GAAaC,EAAmB1B,OAChC2B,EAAchC,EAAIgC,YAClBC,EAASvB,EAAEwB,WAAWF,IAAgBA,EAAYG,WAAcC,EAGhEC,EAAO,aAGX,KAFI3B,EAAE4B,IAAItC,EAAKqC,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAAOlC,EAAKqC,KAAKH,GAEpDP,KACLO,EAAON,EAAmBD,GACtBO,IAAQrC,IAAOA,EAAIqC,KAAUJ,EAAMI,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAChElC,EAAKqC,KAAKH,GA74BhB,GAAII,GAAOC,KAGPC,EAAqBF,EAAK/B,EAG1BkC,EAAaC,MAAMV,UAAWC,EAAWU,OAAOX,UAAWY,EAAYC,SAASb,UAIlFK,EAAmBI,EAAWJ,KAC9Bd,EAAmBkB,EAAWlB,MAC9BuB,EAAmBb,EAASa,SAC5BC,EAAmBd,EAASc,eAK5BC,EAAqBN,MAAMO,QAC3BC,EAAqBP,OAAO3C,KAC5BmD,EAAqBP,EAAUQ,KAC/BC,EAAqBV,OAAOW,OAG1BC,EAAO,aAGPhD,EAAI,SAASV,GACf,MAAIA,aAAeU,GAAUV,EACvB0C,eAAgBhC,QACtBgC,KAAKiB,SAAW3D,GADiB,GAAIU,GAAEV,GAOlB,oBAAZ4D,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUlD,GAE7BkD,QAAQlD,EAAIA,GAEZ+B,EAAK/B,EAAIA,EAIXA,EAAEoD,QAAU,OAKZ,IAAItD,GAAa,SAASuD,EAAMxD,EAASyD,GACvC,GAAIzD,QAAiB,GAAG,MAAOwD,EAC/B,QAAoB,MAAZC,EAAmB,EAAIA,GAC7B,IAAK,GAAG,MAAO,UAASC,GACtB,MAAOF,GAAKpC,KAAKpB,EAAS0D,GAE5B,KAAK,GAAG,MAAO,UAASA,EAAOC,GAC7B,MAAOH,GAAKpC,KAAKpB,EAAS0D,EAAOC,GAEnC,KAAK,GAAG,MAAO,UAASD,EAAO7D,EAAO+D,GACpC,MAAOJ,GAAKpC,KAAKpB,EAAS0D,EAAO7D,EAAO+D,GAE1C,KAAK,GAAG,MAAO,UAASC,EAAaH,EAAO7D,EAAO+D,GACjD,MAAOJ,GAAKpC,KAAKpB,EAAS6D,EAAaH,EAAO7D,EAAO+D,IAGzD,MAAO,YACL,MAAOJ,GAAKM,MAAM9D,EAASI,aAO3BI,EAAK,SAASkD,EAAO1D,EAASyD,GAChC,MAAa,OAATC,EAAsBvD,EAAE4D,SACxB5D,EAAEwB,WAAW+B,GAAezD,EAAWyD,EAAO1D,EAASyD,GACvDtD,EAAE6D,SAASN,GAAevD,EAAE8D,QAAQP,GACjCvD,EAAE+D,SAASR,GAEpBvD,GAAET,SAAW,SAASgE,EAAO1D,GAC3B,MAAOQ,GAAGkD,EAAO1D,EAASmE,KAI5B,IAAIC,GAAiB,SAASC,EAAUC,GACtC,MAAO,UAAS7E,GACd,GAAIK,GAASM,UAAUN,MACvB,IAAa,EAATA,GAAqB,MAAPL,EAAa,MAAOA,EACtC,KAAK,GAAII,GAAQ,EAAWC,EAARD,EAAgBA,IAIlC,IAAK,GAHD0E,GAASnE,UAAUP,GACnBD,EAAOyE,EAASE,GAChBC,EAAI5E,EAAKE,OACJiB,EAAI,EAAOyD,EAAJzD,EAAOA,IAAK,CAC1B,GAAI0D,GAAM7E,EAAKmB,EACVuD,IAAiB7E,EAAIgF,SAAc,KAAGhF,EAAIgF,GAAOF,EAAOE,IAGjE,MAAOhF,KAKPiF,EAAa,SAAS9C,GACxB,IAAKzB,EAAE6D,SAASpC,GAAY,QAC5B,IAAIqB,EAAc,MAAOA,GAAarB,EACtCuB,GAAKvB,UAAYA,CACjB,IAAI+C,GAAS,GAAIxB,EAEjB,OADAA,GAAKvB,UAAY,KACV+C,GAGLT,EAAW,SAASO,GACtB,MAAO,UAAShF,GACd,MAAc,OAAPA,MAAmB,GAAIA,EAAIgF,KAQlCG,EAAkB5D,KAAK6D,IAAI,EAAG,IAAM,EACpCpE,EAAYyD,EAAS,UACrBhE,EAAc,SAAS0D,GACzB,GAAI9D,GAASW,EAAUmD,EACvB,OAAwB,gBAAV9D,IAAsBA,GAAU,GAAe8E,GAAV9E,EASrDK,GAAE2E,KAAO3E,EAAE4E,QAAU,SAAStF,EAAKC,EAAUM,GAC3CN,EAAWO,EAAWP,EAAUM,EAChC,IAAIe,GAAGjB,CACP,IAAII,EAAYT,GACd,IAAKsB,EAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC3CrB,EAASD,EAAIsB,GAAIA,EAAGtB,OAEjB,CACL,GAAIG,GAAOO,EAAEP,KAAKH,EAClB,KAAKsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAC5CrB,EAASD,EAAIG,EAAKmB,IAAKnB,EAAKmB,GAAItB,GAGpC,MAAOA,IAITU,EAAE6E,IAAM7E,EAAE8E,QAAU,SAASxF,EAAKC,EAAUM,GAC1CN,EAAWc,EAAGd,EAAUM,EAIxB,KAAK,GAHDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBoF,EAAU5C,MAAMxC,GACXD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtCqF,GAAQrF,GAASH,EAASD,EAAIM,GAAaA,EAAYN,GAEzD,MAAOyF,IA+BT/E,EAAEgF,OAAShF,EAAEiF,MAAQjF,EAAEkF,OAAS/F,EAAa,GAG7Ca,EAAEmF,YAAcnF,EAAEoF,MAAQjG,GAAc,GAGxCa,EAAEqF,KAAOrF,EAAEsF,OAAS,SAAShG,EAAKc,EAAWP,GAC3C,GAAIyE,EAMJ,OAJEA,GADEvE,EAAYT,GACRU,EAAEuF,UAAUjG,EAAKc,EAAWP,GAE5BG,EAAEwF,QAAQlG,EAAKc,EAAWP,GAE9ByE,QAAa,IAAKA,KAAS,EAAUhF,EAAIgF,GAA7C,QAKFtE,EAAEyF,OAASzF,EAAE0F,OAAS,SAASpG,EAAKc,EAAWP,GAC7C,GAAIkF,KAKJ,OAJA3E,GAAYC,EAAGD,EAAWP,GAC1BG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC7BvF,EAAUmD,EAAO7D,EAAOiG,IAAOZ,EAAQjD,KAAKyB,KAE3CwB,GAIT/E,EAAE4F,OAAS,SAAStG,EAAKc,EAAWP,GAClC,MAAOG,GAAEyF,OAAOnG,EAAKU,EAAE6F,OAAOxF,EAAGD,IAAaP,IAKhDG,EAAE8F,MAAQ9F,EAAE+F,IAAM,SAASzG,EAAKc,EAAWP,GACzCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,KAAKU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE3D,OAAO,GAKTU,EAAEgG,KAAOhG,EAAEiG,IAAM,SAAS3G,EAAKc,EAAWP,GACxCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,IAAIU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE1D,OAAO,GAKTU,EAAE6B,SAAW7B,EAAEkG,SAAWlG,EAAEmG,QAAU,SAAS7G,EAAKoB,EAAM0F,EAAWC,GAGnE,MAFKtG,GAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,KACd,gBAAb8G,IAAyBC,KAAOD,EAAY,GAChDpG,EAAEuG,QAAQjH,EAAKoB,EAAM0F,IAAc,GAI5CpG,EAAEwG,OAAS,SAASlH,EAAKmH,GACvB,GAAIC,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7B0G,EAAS3G,EAAEwB,WAAWiF,EAC1B,OAAOzG,GAAE6E,IAAIvF,EAAK,SAASiE,GACzB,GAAIF,GAAOsD,EAASF,EAASlD,EAAMkD,EACnC,OAAe,OAARpD,EAAeA,EAAOA,EAAKM,MAAMJ,EAAOmD,MAKnD1G,EAAE4G,MAAQ,SAAStH,EAAKgF,GACtB,MAAOtE,GAAE6E,IAAIvF,EAAKU,EAAE+D,SAASO,KAK/BtE,EAAE6G,MAAQ,SAASvH,EAAKwH,GACtB,MAAO9G,GAAEyF,OAAOnG,EAAKU,EAAE8D,QAAQgD,KAKjC9G,EAAE+G,UAAY,SAASzH,EAAKwH,GAC1B,MAAO9G,GAAEqF,KAAK/F,EAAKU,EAAE8D,QAAQgD,KAI/B9G,EAAEc,IAAM,SAASxB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,GAAUR,IAAUiD,GAAgBjD,GAExC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACR2C,EAAQiB,IACVA,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IAC9BqB,EAAWC,GAAgBD,KAAchD,KAAYQ,KAAYR,OACnEQ,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAITxE,EAAEe,IAAM,SAASzB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,EAASR,IAAUiD,EAAejD,GAEtC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACA4D,EAARjB,IACFiB,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IACnBsB,EAAXD,GAAwChD,MAAbgD,GAAoChD,MAAXQ,KACtDA,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAKTxE,EAAEkH,QAAU,SAAS5H,GAInB,IAAK,GAAe6H,GAHhBC,EAAMrH,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,GACxCK,EAASyH,EAAIzH,OACb0H,EAAWlF,MAAMxC,GACZD,EAAQ,EAAiBC,EAARD,EAAgBA,IACxCyH,EAAOnH,EAAEsH,OAAO,EAAG5H,GACfyH,IAASzH,IAAO2H,EAAS3H,GAAS2H,EAASF,IAC/CE,EAASF,GAAQC,EAAI1H,EAEvB,OAAO2H,IAMTrH,EAAEuH,OAAS,SAASjI,EAAKkI,EAAGnB,GAC1B,MAAS,OAALmB,GAAanB,GACVtG,EAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,IAC/BA,EAAIU,EAAEsH,OAAOhI,EAAIK,OAAS,KAE5BK,EAAEkH,QAAQ5H,GAAK0B,MAAM,EAAGH,KAAKC,IAAI,EAAG0G,KAI7CxH,EAAEyH,OAAS,SAASnI,EAAKC,EAAUM,GAEjC,MADAN,GAAWc,EAAGd,EAAUM,GACjBG,EAAE4G,MAAM5G,EAAE6E,IAAIvF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC/C,OACEpC,MAAOA,EACP7D,MAAOA,EACPgI,SAAUnI,EAASgE,EAAO7D,EAAOiG,MAElCgC,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAKlI,MAAQmI,EAAMnI,QACxB,SAIN,IAAIsI,GAAQ,SAASC,GACnB,MAAO,UAAS3I,EAAKC,EAAUM,GAC7B,GAAI2E,KAMJ,OALAjF,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,GAC1B,GAAI4E,GAAM/E,EAASgE,EAAO7D,EAAOJ,EACjC2I,GAASzD,EAAQjB,EAAOe,KAEnBE,GAMXxE,GAAEkI,QAAUF,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,GAAKxC,KAAKyB,GAAaiB,EAAOF,IAAQf,KAKvEvD,EAAEmI,QAAUH,EAAM,SAASxD,EAAQjB,EAAOe,GACxCE,EAAOF,GAAOf,IAMhBvD,EAAEoI,QAAUJ,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,KAAaE,EAAOF,GAAO,IAI5DtE,EAAEqI,QAAU,SAAS/I,GACnB,MAAKA,GACDU,EAAE0C,QAAQpD,GAAa0B,EAAMC,KAAK3B,GAClCS,EAAYT,GAAaU,EAAE6E,IAAIvF,EAAKU,EAAE4D,UACnC5D,EAAEsG,OAAOhH,OAIlBU,EAAEsI,KAAO,SAAShJ,GAChB,MAAW,OAAPA,EAAoB,EACjBS,EAAYT,GAAOA,EAAIK,OAASK,EAAEP,KAAKH,GAAKK,QAKrDK,EAAEuI,UAAY,SAASjJ,EAAKc,EAAWP,GACrCO,EAAYC,EAAGD,EAAWP,EAC1B,IAAI2I,MAAWC,IAIf,OAHAzI,GAAE2E,KAAKrF,EAAK,SAASiE,EAAOe,EAAKhF,IAC9Bc,EAAUmD,EAAOe,EAAKhF,GAAOkJ,EAAOC,GAAM3G,KAAKyB,MAE1CiF,EAAMC,IAShBzI,EAAE0I,MAAQ1I,EAAE2I,KAAO3I,EAAE4I,KAAO,SAASzI,EAAOqH,EAAGnB,GAC7C,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAM,GAC9BH,EAAE6I,QAAQ1I,EAAOA,EAAMR,OAAS6H,IAMzCxH,EAAE6I,QAAU,SAAS1I,EAAOqH,EAAGnB,GAC7B,MAAOrF,GAAMC,KAAKd,EAAO,EAAGU,KAAKC,IAAI,EAAGX,EAAMR,QAAe,MAAL6H,GAAanB,EAAQ,EAAImB,MAKnFxH,EAAE8I,KAAO,SAAS3I,EAAOqH,EAAGnB,GAC1B,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAMA,EAAMR,OAAS,GAC7CK,EAAE+I,KAAK5I,EAAOU,KAAKC,IAAI,EAAGX,EAAMR,OAAS6H,KAMlDxH,EAAE+I,KAAO/I,EAAEgJ,KAAOhJ,EAAEiJ,KAAO,SAAS9I,EAAOqH,EAAGnB,GAC5C,MAAOrF,GAAMC,KAAKd,EAAY,MAALqH,GAAanB,EAAQ,EAAImB,IAIpDxH,EAAEkJ,QAAU,SAAS/I,GACnB,MAAOH,GAAEyF,OAAOtF,EAAOH,EAAE4D,UAI3B,IAAIuF,GAAU,SAASC,EAAOC,EAASC,EAAQC,GAE7C,IAAK,GADDC,MAAa7I,EAAM,EACdC,EAAI2I,GAAc,EAAG5J,EAASW,EAAU8I,GAAYzJ,EAAJiB,EAAYA,IAAK,CACxE,GAAI2C,GAAQ6F,EAAMxI,EAClB,IAAIb,EAAYwD,KAAWvD,EAAE0C,QAAQa,IAAUvD,EAAEyJ,YAAYlG,IAAS,CAE/D8F,IAAS9F,EAAQ4F,EAAQ5F,EAAO8F,EAASC,GAC9C,IAAII,GAAI,EAAGC,EAAMpG,EAAM5D,MAEvB,KADA6J,EAAO7J,QAAUgK,EACNA,EAAJD,GACLF,EAAO7I,KAAS4C,EAAMmG,SAEdJ,KACVE,EAAO7I,KAAS4C,GAGpB,MAAOiG,GAITxJ,GAAEmJ,QAAU,SAAShJ,EAAOkJ,GAC1B,MAAOF,GAAQhJ,EAAOkJ,GAAS,IAIjCrJ,EAAE4J,QAAU,SAASzJ,GACnB,MAAOH,GAAE6J,WAAW1J,EAAOa,EAAMC,KAAKhB,UAAW,KAMnDD,EAAE8J,KAAO9J,EAAE+J,OAAS,SAAS5J,EAAO6J,EAAUzK,EAAUM,GACjDG,EAAEiK,UAAUD,KACfnK,EAAUN,EACVA,EAAWyK,EACXA,GAAW,GAEG,MAAZzK,IAAkBA,EAAWc,EAAGd,EAAUM,GAG9C,KAAK,GAFD2E,MACA0F,KACKtJ,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAI2C,GAAQpD,EAAMS,GACdoG,EAAWzH,EAAWA,EAASgE,EAAO3C,EAAGT,GAASoD,CAClDyG,IACGpJ,GAAKsJ,IAASlD,GAAUxC,EAAO1C,KAAKyB,GACzC2G,EAAOlD,GACEzH,EACJS,EAAE6B,SAASqI,EAAMlD,KACpBkD,EAAKpI,KAAKkF,GACVxC,EAAO1C,KAAKyB,IAEJvD,EAAE6B,SAAS2C,EAAQjB,IAC7BiB,EAAO1C,KAAKyB,GAGhB,MAAOiB,IAKTxE,EAAEmK,MAAQ,WACR,MAAOnK,GAAE8J,KAAKX,EAAQlJ,WAAW,GAAM,KAKzCD,EAAEoK,aAAe,SAASjK,GAGxB,IAAK,GAFDqE,MACA6F,EAAapK,UAAUN,OAClBiB,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAIF,GAAOP,EAAMS,EACjB,KAAIZ,EAAE6B,SAAS2C,EAAQ9D,GAAvB,CACA,IAAK,GAAIgJ,GAAI,EAAOW,EAAJX,GACT1J,EAAE6B,SAAS5B,UAAUyJ,GAAIhJ,GADAgJ,KAG5BA,IAAMW,GAAY7F,EAAO1C,KAAKpB,IAEpC,MAAO8D,IAKTxE,EAAE6J,WAAa,SAAS1J,GACtB,GAAI4I,GAAOI,EAAQlJ,WAAW,GAAM,EAAM,EAC1C,OAAOD,GAAEyF,OAAOtF,EAAO,SAASoD,GAC9B,OAAQvD,EAAE6B,SAASkH,EAAMxF,MAM7BvD,EAAEsK,IAAM,WACN,MAAOtK,GAAEuK,MAAMtK,YAKjBD,EAAEuK,MAAQ,SAASpK,GAIjB,IAAK,GAHDR,GAASQ,GAASH,EAAEc,IAAIX,EAAOG,GAAWX,QAAU,EACpD6E,EAASrC,MAAMxC,GAEVD,EAAQ,EAAWC,EAARD,EAAgBA,IAClC8E,EAAO9E,GAASM,EAAE4G,MAAMzG,EAAOT,EAEjC,OAAO8E,IAMTxE,EAAEwK,OAAS,SAAS7E,EAAMW,GAExB,IAAK,GADD9B,MACK5D,EAAI,EAAGjB,EAASW,EAAUqF,GAAWhG,EAAJiB,EAAYA,IAChD0F,EACF9B,EAAOmB,EAAK/E,IAAM0F,EAAO1F,GAEzB4D,EAAOmB,EAAK/E,GAAG,IAAM+E,EAAK/E,GAAG,EAGjC,OAAO4D,IAiBTxE,EAAEuF,UAAYrF,EAA2B,GACzCF,EAAEyK,cAAgBvK,GAA4B,GAI9CF,EAAES,YAAc,SAASN,EAAOb,EAAKC,EAAUM,GAC7CN,EAAWc,EAAGd,EAAUM,EAAS,EAGjC,KAFA,GAAI0D,GAAQhE,EAASD,GACjBoL,EAAM,EAAGC,EAAOrK,EAAUH,GACjBwK,EAAND,GAAY,CACjB,GAAIE,GAAM/J,KAAKgK,OAAOH,EAAMC,GAAQ,EAChCpL,GAASY,EAAMyK,IAAQrH,EAAOmH,EAAME,EAAM,EAAQD,EAAOC,EAE/D,MAAOF,IAgCT1K,EAAEuG,QAAUhG,EAAkB,EAAGP,EAAEuF,UAAWvF,EAAES,aAChDT,EAAE8K,YAAcvK,GAAmB,EAAGP,EAAEyK,eAKxCzK,EAAE+K,MAAQ,SAASC,EAAOC,EAAMC,GAClB,MAARD,IACFA,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOA,GAAQ,CAKf,KAAK,GAHDvL,GAASkB,KAAKC,IAAID,KAAKsK,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQ5I,MAAMxC,GAETgB,EAAM,EAAShB,EAANgB,EAAcA,IAAOqK,GAASE,EAC9CH,EAAMpK,GAAOqK,CAGf,OAAOD,GAQT,IAAIK,GAAe,SAASC,EAAYC,EAAWzL,EAAS0L,EAAgB7E,GAC1E,KAAM6E,YAA0BD,IAAY,MAAOD,GAAW1H,MAAM9D,EAAS6G,EAC7E,IAAI8E,GAAOjH,EAAW8G,EAAW5J,WAC7B+C,EAAS6G,EAAW1H,MAAM6H,EAAM9E,EACpC,OAAI1G,GAAE6D,SAASW,GAAgBA,EACxBgH,EAMTxL,GAAE6C,KAAO,SAASQ,EAAMxD,GACtB,GAAI+C,GAAcS,EAAKR,OAASD,EAAY,MAAOA,GAAWe,MAAMN,EAAMrC,EAAMC,KAAKhB,UAAW,GAChG,KAAKD,EAAEwB,WAAW6B,GAAO,KAAM,IAAIoI,WAAU,oCAC7C,IAAI/E,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7ByL,EAAQ,WACV,MAAON,GAAa/H,EAAMqI,EAAO7L,EAASmC,KAAM0E,EAAKiF,OAAO3K,EAAMC,KAAKhB,aAEzE,OAAOyL,IAMT1L,EAAE4L,QAAU,SAASvI,GACnB,GAAIwI,GAAY7K,EAAMC,KAAKhB,UAAW,GAClCyL,EAAQ,WAGV,IAAK,GAFDI,GAAW,EAAGnM,EAASkM,EAAUlM,OACjC+G,EAAOvE,MAAMxC,GACRiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B8F,EAAK9F,GAAKiL,EAAUjL,KAAOZ,EAAIC,UAAU6L,KAAcD,EAAUjL,EAEnE,MAAOkL,EAAW7L,UAAUN,QAAQ+G,EAAK5E,KAAK7B,UAAU6L,KACxD,OAAOV,GAAa/H,EAAMqI,EAAO1J,KAAMA,KAAM0E,GAE/C,OAAOgF,IAMT1L,EAAE+L,QAAU,SAASzM,GACnB,GAAIsB,GAA8B0D,EAA3B3E,EAASM,UAAUN,MAC1B,IAAc,GAAVA,EAAa,KAAM,IAAIqM,OAAM,wCACjC,KAAKpL,EAAI,EAAOjB,EAAJiB,EAAYA,IACtB0D,EAAMrE,UAAUW,GAChBtB,EAAIgF,GAAOtE,EAAE6C,KAAKvD,EAAIgF,GAAMhF,EAE9B,OAAOA,IAITU,EAAEiM,QAAU,SAAS5I,EAAM6I,GACzB,GAAID,GAAU,SAAS3H,GACrB,GAAI6H,GAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAOvI,MAAM3B,KAAM/B,WAAaqE,EAE7D,OADKtE,GAAE4B,IAAIuK,EAAOC,KAAUD,EAAMC,GAAW/I,EAAKM,MAAM3B,KAAM/B,YACvDkM,EAAMC,GAGf,OADAH,GAAQE,SACDF,GAKTjM,EAAEqM,MAAQ,SAAShJ,EAAMiJ,GACvB,GAAI5F,GAAO1F,EAAMC,KAAKhB,UAAW,EACjC,OAAOsM,YAAW,WAChB,MAAOlJ,GAAKM,MAAM,KAAM+C,IACvB4F,IAKLtM,EAAEwM,MAAQxM,EAAE4L,QAAQ5L,EAAEqM,MAAOrM,EAAG,GAOhCA,EAAEyM,SAAW,SAASpJ,EAAMiJ,EAAMI,GAChC,GAAI7M,GAAS6G,EAAMlC,EACfmI,EAAU,KACVC,EAAW,CACVF,KAASA,KACd,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI9M,EAAE+M,MAC7CJ,EAAU,KACVnI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,MAEjC,OAAO,YACL,GAAIqG,GAAM/M,EAAE+M,KACPH,IAAYF,EAAQI,WAAY,IAAOF,EAAWG,EACvD,IAAIC,GAAYV,GAAQS,EAAMH,EAc9B,OAbA/M,GAAUmC,KACV0E,EAAOzG,UACU,GAAb+M,GAAkBA,EAAYV,GAC5BK,IACFM,aAAaN,GACbA,EAAU,MAEZC,EAAWG,EACXvI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,OACrBiG,GAAWD,EAAQQ,YAAa,IAC1CP,EAAUJ,WAAWM,EAAOG,IAEvBxI,IAQXxE,EAAEmN,SAAW,SAAS9J,EAAMiJ,EAAMc,GAChC,GAAIT,GAASjG,EAAM7G,EAASwN,EAAW7I,EAEnCqI,EAAQ,WACV,GAAI/D,GAAO9I,EAAE+M,MAAQM,CAEVf,GAAPxD,GAAeA,GAAQ,EACzB6D,EAAUJ,WAAWM,EAAOP,EAAOxD,IAEnC6D,EAAU,KACLS,IACH5I,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,QAKrC,OAAO,YACL7G,EAAUmC,KACV0E,EAAOzG,UACPoN,EAAYrN,EAAE+M,KACd,IAAIO,GAAUF,IAAcT,CAO5B,OANKA,KAASA,EAAUJ,WAAWM,EAAOP,IACtCgB,IACF9I,EAASnB,EAAKM,MAAM9D,EAAS6G,GAC7B7G,EAAU6G,EAAO,MAGZlC,IAOXxE,EAAEuN,KAAO,SAASlK,EAAMmK,GACtB,MAAOxN,GAAE4L,QAAQ4B,EAASnK,IAI5BrD,EAAE6F,OAAS,SAASzF,GAClB,MAAO,YACL,OAAQA,EAAUuD,MAAM3B,KAAM/B,aAMlCD,EAAEyN,QAAU,WACV,GAAI/G,GAAOzG,UACP+K,EAAQtE,EAAK/G,OAAS,CAC1B,OAAO,YAGL,IAFA,GAAIiB,GAAIoK,EACJxG,EAASkC,EAAKsE,GAAOrH,MAAM3B,KAAM/B,WAC9BW,KAAK4D,EAASkC,EAAK9F,GAAGK,KAAKe,KAAMwC,EACxC,OAAOA,KAKXxE,EAAE0N,MAAQ,SAASC,EAAOtK,GACxB,MAAO,YACL,QAAMsK,EAAQ,EACLtK,EAAKM,MAAM3B,KAAM/B,WAD1B,SAOJD,EAAE4N,OAAS,SAASD,EAAOtK,GACzB,GAAI7D,EACJ,OAAO,YAKL,QAJMmO,EAAQ,IACZnO,EAAO6D,EAAKM,MAAM3B,KAAM/B,YAEb,GAAT0N,IAAYtK,EAAO,MAChB7D,IAMXQ,EAAE6N,KAAO7N,EAAE4L,QAAQ5L,EAAE4N,OAAQ,EAM7B,IAAIE,KAAevL,SAAU,MAAMwL,qBAAqB,YACpD1M,GAAsB,UAAW,gBAAiB,WAClC,uBAAwB,iBAAkB,iBAqB9DrB,GAAEP,KAAO,SAASH,GAChB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIqD,EAAY,MAAOA,GAAWrD,EAClC,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAASU,EAAE4B,IAAItC,EAAKgF,IAAM7E,EAAKqC,KAAKwC,EAGpD,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEgO,QAAU,SAAS1O,GACnB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAAKG,EAAKqC,KAAKwC,EAG/B,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEsG,OAAS,SAAShH,GAIlB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACd2G,EAASnE,MAAMxC,GACViB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B0F,EAAO1F,GAAKtB,EAAIG,EAAKmB,GAEvB,OAAO0F,IAKTtG,EAAEiO,UAAY,SAAS3O,EAAKC,EAAUM,GACpCN,EAAWc,EAAGd,EAAUM,EAKtB,KAAK,GADDD,GAHFH,EAAQO,EAAEP,KAAKH,GACbK,EAASF,EAAKE,OACdoF,KAEKrF,EAAQ,EAAWC,EAARD,EAAgBA,IAClCE,EAAaH,EAAKC,GAClBqF,EAAQnF,GAAcL,EAASD,EAAIM,GAAaA,EAAYN,EAE9D,OAAOyF,IAIX/E,EAAEkO,MAAQ,SAAS5O,GAIjB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACduO,EAAQ/L,MAAMxC,GACTiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1BsN,EAAMtN,IAAMnB,EAAKmB,GAAItB,EAAIG,EAAKmB,IAEhC,OAAOsN,IAITlO,EAAEmO,OAAS,SAAS7O,GAGlB,IAAK,GAFDkF,MACA/E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAChD4D,EAAOlF,EAAIG,EAAKmB,KAAOnB,EAAKmB,EAE9B,OAAO4D,IAKTxE,EAAEoO,UAAYpO,EAAEqO,QAAU,SAAS/O,GACjC,GAAIgP,KACJ,KAAK,GAAIhK,KAAOhF,GACVU,EAAEwB,WAAWlC,EAAIgF,KAAOgK,EAAMxM,KAAKwC,EAEzC,OAAOgK,GAAM3G,QAIf3H,EAAEuO,OAAStK,EAAejE,EAAEgO,SAI5BhO,EAAEwO,UAAYxO,EAAEyO,OAASxK,EAAejE,EAAEP,MAG1CO,EAAEwF,QAAU,SAASlG,EAAKc,EAAWP,GACnCO,EAAYC,EAAGD,EAAWP,EAE1B,KAAK,GADmByE,GAApB7E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAEhD,GADA0D,EAAM7E,EAAKmB,GACPR,EAAUd,EAAIgF,GAAMA,EAAKhF,GAAM,MAAOgF,IAK9CtE,EAAE0O,KAAO,SAASlE,EAAQmE,EAAW9O,GACnC,GAA+BN,GAAUE,EAArC+E,KAAalF,EAAMkL,CACvB,IAAW,MAAPlL,EAAa,MAAOkF,EACpBxE,GAAEwB,WAAWmN,IACflP,EAAOO,EAAEgO,QAAQ1O,GACjBC,EAAWO,EAAW6O,EAAW9O,KAEjCJ,EAAO0J,EAAQlJ,WAAW,GAAO,EAAO,GACxCV,EAAW,SAASgE,EAAOe,EAAKhF,GAAO,MAAOgF,KAAOhF,IACrDA,EAAM8C,OAAO9C,GAEf,KAAK,GAAIsB,GAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAAK,CACrD,GAAI0D,GAAM7E,EAAKmB,GACX2C,EAAQjE,EAAIgF,EACZ/E,GAASgE,EAAOe,EAAKhF,KAAMkF,EAAOF,GAAOf,GAE/C,MAAOiB,IAITxE,EAAE4O,KAAO,SAAStP,EAAKC,EAAUM,GAC/B,GAAIG,EAAEwB,WAAWjC,GACfA,EAAWS,EAAE6F,OAAOtG,OACf,CACL,GAAIE,GAAOO,EAAE6E,IAAIsE,EAAQlJ,WAAW,GAAO,EAAO,GAAI4O,OACtDtP,GAAW,SAASgE,EAAOe,GACzB,OAAQtE,EAAE6B,SAASpC,EAAM6E,IAG7B,MAAOtE,GAAE0O,KAAKpP,EAAKC,EAAUM,IAI/BG,EAAE8O,SAAW7K,EAAejE,EAAEgO,SAAS,GAKvChO,EAAE+C,OAAS,SAAStB,EAAWsN,GAC7B,GAAIvK,GAASD,EAAW9C,EAExB,OADIsN,IAAO/O,EAAEwO,UAAUhK,EAAQuK,GACxBvK,GAITxE,EAAEgP,MAAQ,SAAS1P,GACjB,MAAKU,GAAE6D,SAASvE,GACTU,EAAE0C,QAAQpD,GAAOA,EAAI0B,QAAUhB,EAAEuO,UAAWjP,GADtBA,GAO/BU,EAAEiP,IAAM,SAAS3P,EAAK4P,GAEpB,MADAA,GAAY5P,GACLA,GAITU,EAAEmP,QAAU,SAAS3E,EAAQ1D,GAC3B,GAAIrH,GAAOO,EAAEP,KAAKqH,GAAQnH,EAASF,EAAKE,MACxC,IAAc,MAAV6K,EAAgB,OAAQ7K,CAE5B,KAAK,GADDL,GAAM8C,OAAOoI,GACR5J,EAAI,EAAOjB,EAAJiB,EAAYA,IAAK,CAC/B,GAAI0D,GAAM7E,EAAKmB,EACf,IAAIkG,EAAMxC,KAAShF,EAAIgF,MAAUA,IAAOhF,IAAM,OAAO,EAEvD,OAAO,EAKT,IAAI8P,GAAK,SAAStH,EAAGC,EAAGsH,EAAQC,GAG9B,GAAIxH,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,IAAM,EAAIC,CAE7C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAa9H,KAAG8H,EAAIA,EAAE7E,UACtB8E,YAAa/H,KAAG+H,EAAIA,EAAE9E,SAE1B,IAAIsM,GAAYhN,EAAStB,KAAK6G,EAC9B,IAAIyH,IAAchN,EAAStB,KAAK8G,GAAI,OAAO,CAC3C,QAAQwH,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAKzH,GAAM,GAAKC,CACzB,KAAK,kBAGH,OAAKD,KAAOA,GAAWC,KAAOA,EAEhB,KAAND,EAAU,GAAKA,IAAM,EAAIC,GAAKD,KAAOC,CAC/C,KAAK,gBACL,IAAK,mBAIH,OAAQD,KAAOC,EAGnB,GAAIyH,GAA0B,mBAAdD,CAChB,KAAKC,EAAW,CACd,GAAgB,gBAAL1H,IAA6B,gBAALC,GAAe,OAAO,CAIzD,IAAI0H,GAAQ3H,EAAExG,YAAaoO,EAAQ3H,EAAEzG,WACrC,IAAImO,IAAUC,KAAW1P,EAAEwB,WAAWiO,IAAUA,YAAiBA,IACxCzP,EAAEwB,WAAWkO,IAAUA,YAAiBA,KACzC,eAAiB5H,IAAK,eAAiBC,GAC7D,OAAO,EAQXsH,EAASA,MACTC,EAASA,KAET,KADA,GAAI3P,GAAS0P,EAAO1P,OACbA,KAGL,GAAI0P,EAAO1P,KAAYmI,EAAG,MAAOwH,GAAO3P,KAAYoI,CAQtD,IAJAsH,EAAOvN,KAAKgG,GACZwH,EAAOxN,KAAKiG,GAGRyH,EAAW,CAGb,GADA7P,EAASmI,EAAEnI,OACPA,IAAWoI,EAAEpI,OAAQ,OAAO,CAEhC,MAAOA,KACL,IAAKyP,EAAGtH,EAAEnI,GAASoI,EAAEpI,GAAS0P,EAAQC,GAAS,OAAO,MAEnD,CAEL,GAAsBhL,GAAlB7E,EAAOO,EAAEP,KAAKqI,EAGlB,IAFAnI,EAASF,EAAKE,OAEVK,EAAEP,KAAKsI,GAAGpI,SAAWA,EAAQ,OAAO,CACxC,MAAOA,KAGL,GADA2E,EAAM7E,EAAKE,IACLK,EAAE4B,IAAImG,EAAGzD,KAAQ8K,EAAGtH,EAAExD,GAAMyD,EAAEzD,GAAM+K,EAAQC,GAAU,OAAO,EAMvE,MAFAD,GAAOM,MACPL,EAAOK,OACA,EAIT3P,GAAE4P,QAAU,SAAS9H,EAAGC,GACtB,MAAOqH,GAAGtH,EAAGC,IAKf/H,EAAE6P,QAAU,SAASvQ,GACnB,MAAW,OAAPA,GAAoB,EACpBS,EAAYT,KAASU,EAAE0C,QAAQpD,IAAQU,EAAE8P,SAASxQ,IAAQU,EAAEyJ,YAAYnK,IAA6B,IAAfA,EAAIK,OAChE,IAAvBK,EAAEP,KAAKH,GAAKK,QAIrBK,EAAE+P,UAAY,SAASzQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAI0Q,WAKvBhQ,EAAE0C,QAAUD,GAAiB,SAASnD,GACpC,MAA8B,mBAAvBiD,EAAStB,KAAK3B,IAIvBU,EAAE6D,SAAW,SAASvE,GACpB,GAAI2Q,SAAc3Q,EAClB,OAAgB,aAAT2Q,GAAgC,WAATA,KAAuB3Q,GAIvDU,EAAE2E,MAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,SAAU,SAASuL,GACxFlQ,EAAE,KAAOkQ,GAAQ,SAAS5Q,GACxB,MAAOiD,GAAStB,KAAK3B,KAAS,WAAa4Q,EAAO,OAMjDlQ,EAAEyJ,YAAYxJ,aACjBD,EAAEyJ,YAAc,SAASnK,GACvB,MAAOU,GAAE4B,IAAItC,EAAK,YAMJ,kBAAP,KAAyC,gBAAb6Q,aACrCnQ,EAAEwB,WAAa,SAASlC,GACtB,MAAqB,kBAAPA,KAAqB,IAKvCU,EAAEoQ,SAAW,SAAS9Q,GACpB,MAAO8Q,UAAS9Q,KAAS4B,MAAMmP,WAAW/Q,KAI5CU,EAAEkB,MAAQ,SAAS5B,GACjB,MAAOU,GAAEsQ,SAAShR,IAAQA,KAASA,GAIrCU,EAAEiK,UAAY,SAAS3K,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAAgC,qBAAvBiD,EAAStB,KAAK3B,IAIxDU,EAAEuQ,OAAS,SAASjR,GAClB,MAAe,QAARA,GAITU,EAAEwQ,YAAc,SAASlR,GACvB,MAAOA,SAAa,IAKtBU,EAAE4B,IAAM,SAAStC,EAAKgF,GACpB,MAAc,OAAPhF,GAAekD,EAAevB,KAAK3B,EAAKgF,IAQjDtE,EAAEyQ,WAAa,WAEb,MADA1O,GAAK/B,EAAIiC,EACFD,MAIThC,EAAE4D,SAAW,SAASL,GACpB,MAAOA,IAITvD,EAAE0Q,SAAW,SAASnN,GACpB,MAAO,YACL,MAAOA,KAIXvD,EAAE2Q,KAAO,aAET3Q,EAAE+D,SAAWA,EAGb/D,EAAE4Q,WAAa,SAAStR,GACtB,MAAc,OAAPA,EAAc,aAAe,SAASgF,GAC3C,MAAOhF,GAAIgF,KAMftE,EAAE8D,QAAU9D,EAAE6Q,QAAU,SAAS/J,GAE/B,MADAA,GAAQ9G,EAAEwO,aAAc1H,GACjB,SAASxH,GACd,MAAOU,GAAEmP,QAAQ7P,EAAKwH,KAK1B9G,EAAE2N,MAAQ,SAASnG,EAAGjI,EAAUM,GAC9B,GAAIiR,GAAQ3O,MAAMtB,KAAKC,IAAI,EAAG0G,GAC9BjI,GAAWO,EAAWP,EAAUM,EAAS,EACzC,KAAK,GAAIe,GAAI,EAAO4G,EAAJ5G,EAAOA,IAAKkQ,EAAMlQ,GAAKrB,EAASqB,EAChD,OAAOkQ,IAIT9Q,EAAEsH,OAAS,SAASvG,EAAKD,GAKvB,MAJW,OAAPA,IACFA,EAAMC,EACNA,EAAM,GAEDA,EAAMF,KAAKgK,MAAMhK,KAAKyG,UAAYxG,EAAMC,EAAM,KAIvDf,EAAE+M,IAAMgE,KAAKhE,KAAO,WAClB,OAAO,GAAIgE,OAAOC,UAIpB,IAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAAcxR,EAAEmO,OAAO8C,GAGvBQ,EAAgB,SAAS5M,GAC3B,GAAI6M,GAAU,SAASC,GACrB,MAAO9M,GAAI8M,IAGTvN,EAAS,MAAQpE,EAAEP,KAAKoF,GAAK+M,KAAK,KAAO,IACzCC,EAAaC,OAAO1N,GACpB2N,EAAgBD,OAAO1N,EAAQ,IACnC,OAAO,UAAS4N,GAEd,MADAA,GAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeL,GAAWM,GAG9EhS,GAAEmS,OAASV,EAAcR,GACzBjR,EAAEoS,SAAWX,EAAcD,GAI3BxR,EAAEwE,OAAS,SAASgG,EAAQzG,EAAUsO,GACpC,GAAI9O,GAAkB,MAAViH,MAAsB,GAAIA,EAAOzG,EAI7C,OAHIR,SAAe,KACjBA,EAAQ8O,GAEHrS,EAAEwB,WAAW+B,GAASA,EAAMtC,KAAKuJ,GAAUjH,EAKpD,IAAI+O,GAAY,CAChBtS,GAAEuS,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhCzS,EAAE0S,kBACAC,SAAc,kBACdC,YAAc,mBACdT,OAAc,mBAMhB,IAAIU,GAAU,OAIVC,GACFxB,IAAU,IACVyB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,SAAU,QACVC,SAAU,SAGRzB,EAAU,4BAEV0B,EAAa,SAASzB,GACxB,MAAO,KAAOmB,EAAQnB,GAOxB3R,GAAEqT,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWvT,EAAE8O,YAAayE,EAAUvT,EAAE0S,iBAGtC,IAAI5O,GAAUgO,SACXyB,EAASpB,QAAUU,GAASzO,QAC5BmP,EAASX,aAAeC,GAASzO,QACjCmP,EAASZ,UAAYE,GAASzO,QAC/BwN,KAAK,KAAO,KAAM,KAGhBlS,EAAQ,EACR0E,EAAS,QACbkP,GAAKpB,QAAQpO,EAAS,SAAS6N,EAAOQ,EAAQS,EAAaD,EAAUc,GAanE,MAZArP,IAAUkP,EAAKtS,MAAMtB,EAAO+T,GAAQvB,QAAQR,EAAS0B,GACrD1T,EAAQ+T,EAAS9B,EAAMhS,OAEnBwS,EACF/N,GAAU,cAAgB+N,EAAS,iCAC1BS,EACTxO,GAAU,cAAgBwO,EAAc,uBAC/BD,IACTvO,GAAU,OAASuO,EAAW,YAIzBhB,IAETvN,GAAU,OAGLmP,EAASG,WAAUtP,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE,GAAIuP,GAAS,GAAIrR,UAASiR,EAASG,UAAY,MAAO,IAAKtP,GAC3D,MAAOwP,GAEP,KADAA,GAAExP,OAASA,EACLwP,EAGR,GAAIP,GAAW,SAASQ,GACtB,MAAOF,GAAO1S,KAAKe,KAAM6R,EAAM7T,IAI7B8T,EAAWP,EAASG,UAAY,KAGpC,OAFAL,GAASjP,OAAS,YAAc0P,EAAW,OAAS1P,EAAS,IAEtDiP,GAITrT,EAAE+T,MAAQ,SAASzU,GACjB,GAAI0U,GAAWhU,EAAEV,EAEjB,OADA0U,GAASC,QAAS,EACXD,EAUT,IAAIxP,GAAS,SAASwP,EAAU1U,GAC9B,MAAO0U,GAASC,OAASjU,EAAEV,GAAKyU,QAAUzU,EAI5CU,GAAEkU,MAAQ,SAAS5U,GACjBU,EAAE2E,KAAK3E,EAAEoO,UAAU9O,GAAM,SAAS4Q,GAChC,GAAI7M,GAAOrD,EAAEkQ,GAAQ5Q,EAAI4Q,EACzBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAIxJ,IAAQ1E,KAAKiB,SAEjB,OADAnB,GAAK6B,MAAM+C,EAAMzG,WACVuE,EAAOxC,KAAMqB,EAAKM,MAAM3D,EAAG0G,QAMxC1G,EAAEkU,MAAMlU,GAGRA,EAAE2E,MAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAASuL,GAChF,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAI5Q,GAAM0C,KAAKiB,QAGf,OAFAwD,GAAO9C,MAAMrE,EAAKW,WACJ,UAATiQ,GAA6B,WAATA,GAAqC,IAAf5Q,EAAIK,cAAqBL,GAAI,GACrEkF,EAAOxC,KAAM1C,MAKxBU,EAAE2E,MAAM,SAAU,OAAQ,SAAU,SAASuL,GAC3C,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,MAAO1L,GAAOxC,KAAMyE,EAAO9C,MAAM3B,KAAKiB,SAAUhD,eAKpDD,EAAEyB,UAAU8B,MAAQ,WAClB,MAAOvB,MAAKiB,UAKdjD,EAAEyB,UAAU0S,QAAUnU,EAAEyB,UAAU2S,OAASpU,EAAEyB,UAAU8B,MAEvDvD,EAAEyB,UAAUc,SAAW,WACrB,MAAO,GAAKP,KAAKiB,UAUG,kBAAXoR,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOrU,OAGXiB,KAAKe"} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore.js new file mode 100644 index 0000000..b29332f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/underscore/underscore.js @@ -0,0 +1,1548 @@ +// Underscore.js 1.8.3 +// http://underscorejs.org +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +(function() { + + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `exports` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var + push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind, + nativeCreate = Object.create; + + // Naked function reference for surrogate-prototype-swapping. + var Ctor = function(){}; + + // Create a safe reference to the Underscore object for use below. + var _ = function(obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + }; + + // Export the Underscore object for **Node.js**, with + // backwards-compatibility for the old `require()` API. If we're in + // the browser, add `_` as a global object. + if (typeof exports !== 'undefined') { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = _; + } + exports._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.8.3'; + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + var optimizeCb = function(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + case 2: return function(value, other) { + return func.call(context, value, other); + }; + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + }; + + // A mostly-internal function to generate callbacks that can be applied + // to each element in a collection, returning the desired result — either + // identity, an arbitrary callback, a property matcher, or a property accessor. + var cb = function(value, context, argCount) { + if (value == null) return _.identity; + if (_.isFunction(value)) return optimizeCb(value, context, argCount); + if (_.isObject(value)) return _.matcher(value); + return _.property(value); + }; + _.iteratee = function(value, context) { + return cb(value, context, Infinity); + }; + + // An internal function for creating assigner functions. + var createAssigner = function(keysFunc, undefinedOnly) { + return function(obj) { + var length = arguments.length; + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; + }; + + // An internal function for creating a new object that inherits from another. + var baseCreate = function(prototype) { + if (!_.isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; + }; + + var property = function(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + }; + + // Helper for collection methods to determine whether a collection + // should be iterated as an array or as an object + // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 + var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + var getLength = property('length'); + var isArrayLike = function(collection) { + var length = getLength(collection); + return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; + }; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + _.each = _.forEach = function(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var keys = _.keys(obj); + for (i = 0, length = keys.length; i < length; i++) { + iteratee(obj[keys[i]], keys[i], obj); + } + } + return obj; + }; + + // Return the results of applying the iteratee to each element. + _.map = _.collect = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Create a reducing function iterating left or right. + function createReduce(dir) { + // Optimized iterator function as using arguments.length + // in the main function will deoptimize the, see #1991. + function iterator(obj, iteratee, memo, keys, index, length) { + for (; index >= 0 && index < length; index += dir) { + var currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + } + + return function(obj, iteratee, memo, context) { + iteratee = optimizeCb(iteratee, context, 4); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + index = dir > 0 ? 0 : length - 1; + // Determine the initial value if none is provided. + if (arguments.length < 3) { + memo = obj[keys ? keys[index] : index]; + index += dir; + } + return iterator(obj, iteratee, memo, keys, index, length); + }; + } + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + _.reduce = _.foldl = _.inject = createReduce(1); + + // The right-associative version of reduce, also known as `foldr`. + _.reduceRight = _.foldr = createReduce(-1); + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, predicate, context) { + var key; + if (isArrayLike(obj)) { + key = _.findIndex(obj, predicate, context); + } else { + key = _.findKey(obj, predicate, context); + } + if (key !== void 0 && key !== -1) return obj[key]; + }; + + // Return all the elements that pass a truth test. + // Aliased as `select`. + _.filter = _.select = function(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + _.each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function(obj, predicate, context) { + return _.filter(obj, _.negate(cb(predicate)), context); + }; + + // Determine whether all of the elements match a truth test. + // Aliased as `all`. + _.every = _.all = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; + }; + + // Determine if at least one element in the object matches a truth test. + // Aliased as `any`. + _.some = _.any = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; + }; + + // Determine if the array or object contains a given item (using `===`). + // Aliased as `includes` and `include`. + _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return _.indexOf(obj, item, fromIndex) >= 0; + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function(obj, method) { + var args = slice.call(arguments, 2); + var isFunc = _.isFunction(method); + return _.map(obj, function(value) { + var func = isFunc ? method : value[method]; + return func == null ? func : func.apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function(obj, key) { + return _.map(obj, _.property(key)); + }; + + // Convenience version of a common use case of `filter`: selecting only objects + // containing specific `key:value` pairs. + _.where = function(obj, attrs) { + return _.filter(obj, _.matcher(attrs)); + }; + + // Convenience version of a common use case of `find`: getting the first object + // containing specific `key:value` pairs. + _.findWhere = function(obj, attrs) { + return _.find(obj, _.matcher(attrs)); + }; + + // Return the maximum element (or element-based computation). + _.max = function(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Return the minimum element (or element-based computation). + _.min = function(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Shuffle a collection, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + _.shuffle = function(obj) { + var set = isArrayLike(obj) ? obj : _.values(obj); + var length = set.length; + var shuffled = Array(length); + for (var index = 0, rand; index < length; index++) { + rand = _.random(0, index); + if (rand !== index) shuffled[index] = shuffled[rand]; + shuffled[rand] = set[index]; + } + return shuffled; + }; + + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + + // Sort the object's values by a criterion produced by an iteratee. + _.sortBy = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + return _.pluck(_.map(obj, function(value, index, list) { + return { + value: value, + index: index, + criteria: iteratee(value, index, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); + }; + + // An internal function used for aggregate "group by" operations. + var group = function(behavior) { + return function(obj, iteratee, context) { + var result = {}; + iteratee = cb(iteratee, context); + _.each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; + }; + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + _.groupBy = group(function(result, value, key) { + if (_.has(result, key)) result[key].push(value); else result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, value, key) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + _.countBy = group(function(result, value, key) { + if (_.has(result, key)) result[key]++; else result[key] = 1; + }); + + // Safely create a real, live array from anything iterable. + _.toArray = function(obj) { + if (!obj) return []; + if (_.isArray(obj)) return slice.call(obj); + if (isArrayLike(obj)) return _.map(obj, _.identity); + return _.values(obj); + }; + + // Return the number of elements in an object. + _.size = function(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : _.keys(obj).length; + }; + + // Split a collection into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(obj, predicate, context) { + predicate = cb(predicate, context); + var pass = [], fail = []; + _.each(obj, function(value, key, obj) { + (predicate(value, key, obj) ? pass : fail).push(value); + }); + return [pass, fail]; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head` and `take`. The **guard** check + // allows it to work with `_.map`. + _.first = _.head = _.take = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[0]; + return _.initial(array, array.length - n); + }; + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. + _.initial = function(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); + }; + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. + _.last = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[array.length - 1]; + return _.rest(array, Math.max(0, array.length - n)); + }; + + // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. + // Especially useful on the arguments object. Passing an **n** will return + // the rest N values in the array. + _.rest = _.tail = _.drop = function(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + }; + + // Trim out all falsy values from an array. + _.compact = function(array) { + return _.filter(array, _.identity); + }; + + // Internal implementation of a recursive `flatten` function. + var flatten = function(input, shallow, strict, startIndex) { + var output = [], idx = 0; + for (var i = startIndex || 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { + //flatten current level of array or arguments object + if (!shallow) value = flatten(value, shallow, strict); + var j = 0, len = value.length; + output.length += len; + while (j < len) { + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; + }; + + // Flatten out an array, either recursively (by default), or just one level. + _.flatten = function(array, shallow) { + return flatten(array, shallow, false); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function(array) { + return _.difference(array, slice.call(arguments, 1)); + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function(array, isSorted, iteratee, context) { + if (!_.isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!_.contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!_.contains(result, value)) { + result.push(value); + } + } + return result; + }; + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + _.union = function() { + return _.uniq(flatten(arguments, true, true)); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersection = function(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (_.contains(result, item)) continue; + for (var j = 1; j < argsLength; j++) { + if (!_.contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; + }; + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + _.difference = function(array) { + var rest = flatten(arguments, true, true, 1); + return _.filter(array, function(value){ + return !_.contains(rest, value); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function() { + return _.unzip(arguments); + }; + + // Complement of _.zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices + _.unzip = function(array) { + var length = array && _.max(array, getLength).length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = _.pluck(array, index); + } + return result; + }; + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. + _.object = function(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + }; + + // Generator function to create the findIndex and findLastIndex functions + function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; + } + + // Returns the first index on an array-like that passes a predicate test + _.findIndex = createPredicateIndexFinder(1); + _.findLastIndex = createPredicateIndexFinder(-1); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + }; + + // Generator function to create the indexOf and lastIndexOf functions + function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), _.isNaN); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; + } + + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); + _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + step = step || 1; + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Determines whether to execute a function as a constructor + // or a normal function with the provided arguments + var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (_.isObject(result)) return result; + return self; + }; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if + // available. + _.bind = function(func, context) { + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); + var args = slice.call(arguments, 2); + var bound = function() { + return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); + }; + return bound; + }; + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. + _.partial = function(func) { + var boundArgs = slice.call(arguments, 1); + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; + }; + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + _.bindAll = function(obj) { + var i, length = arguments.length, key; + if (length <= 1) throw new Error('bindAll must be passed function names'); + for (i = 1; i < length; i++) { + key = arguments[i]; + obj[key] = _.bind(obj[key], obj); + } + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ + return func.apply(null, args); + }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = _.partial(_.delay, _, 1); + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function() { + previous = options.leading === false ? 0 : _.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function() { + var now = _.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function(func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + + if (last < wait && last >= 0) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + if (!timeout) context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function(func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a negated version of the passed-in predicate. + _.negate = function(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; + }; + + // Returns a function that will only be executed on and after the Nth call. + _.after = function(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + }; + + // Returns a function that will only be executed up to (but not including) the Nth call. + _.before = function(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = _.partial(_.before, 2); + + // Object Functions + // ---------------- + + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); + var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + function collectNonEnumProps(obj, keys) { + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { + keys.push(prop); + } + } + } + + // Retrieve the names of an object's own properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve all the property names of an object. + _.allKeys = function(obj) { + if (!_.isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } + return values; + }; + + // Returns the results of applying the iteratee to each element of the object + // In contrast to _.map it returns an object + _.mapObject = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = _.keys(obj), + length = keys.length, + results = {}, + currentKey; + for (var index = 0; index < length; index++) { + currentKey = keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Convert an object into a list of `[key, value]` pairs. + _.pairs = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } + return pairs; + }; + + // Invert the keys and values of an object. The values must be serializable. + _.invert = function(obj) { + var result = {}; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } + return result; + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function(obj) { + var names = []; + for (var key in obj) { + if (_.isFunction(obj[key])) names.push(key); + } + return names.sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = createAssigner(_.allKeys); + + // Assigns a given object with all the own properties in the passed-in object(s) + // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + _.extendOwn = _.assign = createAssigner(_.keys); + + // Returns the first key on an object that passes a predicate test + _.findKey = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = _.keys(obj), key; + for (var i = 0, length = keys.length; i < length; i++) { + key = keys[i]; + if (predicate(obj[key], key, obj)) return key; + } + }; + + // Return a copy of the object only containing the whitelisted properties. + _.pick = function(object, oiteratee, context) { + var result = {}, obj = object, iteratee, keys; + if (obj == null) return result; + if (_.isFunction(oiteratee)) { + keys = _.allKeys(obj); + iteratee = optimizeCb(oiteratee, context); + } else { + keys = flatten(arguments, false, false, 1); + iteratee = function(value, key, obj) { return key in obj; }; + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; + }; + + // Return a copy of the object without the blacklisted properties. + _.omit = function(obj, iteratee, context) { + if (_.isFunction(iteratee)) { + iteratee = _.negate(iteratee); + } else { + var keys = _.map(flatten(arguments, false, false, 1), String); + iteratee = function(value, key) { + return !_.contains(keys, key); + }; + } + return _.pick(obj, iteratee, context); + }; + + // Fill in a given object with default properties. + _.defaults = createAssigner(_.allKeys, true); + + // Creates an object that inherits from the given prototype object. + // If additional properties are provided then they will be added to the + // created object. + _.create = function(prototype, props) { + var result = baseCreate(prototype); + if (props) _.extendOwn(result, props); + return result; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function(obj) { + if (!_.isObject(obj)) return obj; + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function(obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Returns whether an object has a given set of `key:value` pairs. + _.isMatch = function(object, attrs) { + var keys = _.keys(attrs), length = keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; + }; + + + // Internal recursive comparison function for `isEqual`. + var eq = function(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // A strict comparison is necessary because `null == undefined`. + if (a == null || b == null) return a === b; + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + switch (className) { + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + } + + var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && + _.isFunction(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var keys = _.keys(a), key; + length = keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (_.keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = keys[length]; + if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function(a, b) { + return eq(a, b); + }; + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + _.isEmpty = function(obj) { + if (obj == null) return true; + if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; + return _.keys(obj).length === 0; + }; + + // Is a given value a DOM element? + _.isElement = function(obj) { + return !!(obj && obj.nodeType === 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = nativeIsArray || function(obj) { + return toString.call(obj) === '[object Array]'; + }; + + // Is a given variable an object? + _.isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. + _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { + _['is' + name] = function(obj) { + return toString.call(obj) === '[object ' + name + ']'; + }; + }); + + // Define a fallback version of the method in browsers (ahem, IE < 9), where + // there isn't any inspectable "Arguments" type. + if (!_.isArguments(arguments)) { + _.isArguments = function(obj) { + return _.has(obj, 'callee'); + }; + } + + // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, + // IE 11 (#1621), and in Safari 8 (#1929). + if (typeof /./ != 'function' && typeof Int8Array != 'object') { + _.isFunction = function(obj) { + return typeof obj == 'function' || false; + }; + } + + // Is a given object a finite number? + _.isFinite = function(obj) { + return isFinite(obj) && !isNaN(parseFloat(obj)); + }; + + // Is the given value `NaN`? (NaN is the only number which does not equal itself). + _.isNaN = function(obj) { + return _.isNumber(obj) && obj !== +obj; + }; + + // Is a given value a boolean? + _.isBoolean = function(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; + }; + + // Is a given value equal to null? + _.isNull = function(obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function(obj) { + return obj === void 0; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function() { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iteratees. + _.identity = function(value) { + return value; + }; + + // Predicate-generating functions. Often useful outside of Underscore. + _.constant = function(value) { + return function() { + return value; + }; + }; + + _.noop = function(){}; + + _.property = property; + + // Generates a function for a given object that returns a given property. + _.propertyOf = function(obj) { + return obj == null ? function(){} : function(key) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of + // `key:value` pairs. + _.matcher = _.matches = function(attrs) { + attrs = _.extendOwn({}, attrs); + return function(obj) { + return _.isMatch(obj, attrs); + }; + }; + + // Run a function **n** times. + _.times = function(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; + }; + + // Return a random integer between min and max (inclusive). + _.random = function(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + }; + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { + return new Date().getTime(); + }; + + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + var unescapeMap = _.invert(escapeMap); + + // Functions for escaping and unescaping strings to/from HTML interpolation. + var createEscaper = function(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped + var source = '(?:' + _.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + _.escape = createEscaper(escapeMap); + _.unescape = createEscaper(unescapeMap); + + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. + _.result = function(object, property, fallback) { + var value = object == null ? void 0 : object[property]; + if (value === void 0) { + value = fallback; + } + return _.isFunction(value) ? value.call(object) : value; + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate : /<%([\s\S]+?)%>/g, + interpolate : /<%=([\s\S]+?)%>/g, + escape : /<%-([\s\S]+?)%>/g + }; + + // When customizing `templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + var escaper = /\\|'|\r|\n|\u2028|\u2029/g; + + var escapeChar = function(match) { + return '\\' + escapes[match]; + }; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + // NB: `oldSettings` only exists for backwards compatibility. + _.template = function(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = _.defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escaper, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offest. + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + try { + var render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _); + }; + + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; + }; + + // Add a "chain" function. Start chaining a wrapped Underscore object. + _.chain = function(obj) { + var instance = _(obj); + instance._chain = true; + return instance; + }; + + // OOP + // --------------- + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + + // Helper function to continue chaining intermediate results. + var result = function(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function(obj) { + _.each(_.functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return result(this, func.apply(_, args)); + }; + }); + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; + return result(this, obj); + }; + }); + + // Add all accessor Array functions to the wrapper. + _.each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + return result(this, method.apply(this._wrapped, arguments)); + }; + }); + + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; + + // Provide unwrapping proxy for some methods used in engine operations + // such as arithmetic and JSON stringification. + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + + _.prototype.toString = function() { + return '' + this._wrapped; + }; + + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } +}.call(this)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/LICENSE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/LICENSE.md new file mode 100644 index 0000000..ed1d4f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/LICENSE.md @@ -0,0 +1,42 @@ +The software dual licensed under the MIT and GPL licenses. MIT license: + + Copyright (c) 2008-2013 Matsuza , Bjarke Walling + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +GPL notice (please read the [full GPL license] online): + + Copyright (C) 2008-2013 Matsuza , Bjarke Walling + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +[full GPL license]: http://www.gnu.org/licenses/gpl-2.0-standalone.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/README.md new file mode 100644 index 0000000..6ff6420 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/README.md @@ -0,0 +1,118 @@ +This is [Unicode Normalizer] in a Common JS module. I'm not affiliated with Matsuza, the original author of Unicode Normalizer. + +[![Build Status](https://travis-ci.org/walling/unorm.png?branch=master)](https://travis-ci.org/walling/unorm) + + +Installation +------------ + +```bash +npm install unorm +``` + +Polyfill +-------- + +You can use this module as a polyfill for [String.prototype.normalize], for example: + +```javascript +console.log('æøåäüö'.normalize('NFKD')); +``` + +The module uses some [EcmaScript 5](http://kangax.github.io/es5-compat-table/) features. Other browsers should use a compability shim, e.g. [es5-shim](https://github.com/kriskowal/es5-shim). + +Functions +--------- + +This module exports four functions: `nfc`, `nfd`, `nfkc`, and `nfkd`; one for each Unicode normalization. In the browser the functions are exported in the `unorm` global. In CommonJS environments you just require the module. Functions: + + * `unorm.nfd(str)` – Canonical Decomposition + * `unorm.nfc(str)` – Canonical Decomposition, followed by Canonical Composition + * `unorm.nfkd(str)` – Compatibility Decomposition + * `unorm.nfkc(str)` – Compatibility Decomposition, followed by Canonical Composition + + +Node.JS example +--------------- + +For a longer example, see `examples` directory. + +```javascript +var unorm = require('unorm'); + +var text = + 'The \u212B symbol invented by A. J. \u00C5ngstr\u00F6m ' + + '(1814, L\u00F6gd\u00F6, \u2013 1874) denotes the length ' + + '10\u207B\u00B9\u2070 m.'; + +var combining = /[\u0300-\u036F]/g; // Use XRegExp('\\p{M}', 'g'); see example.js. + +console.log('Regular: ' + text); +console.log('NFC: ' + unorm.nfc(text)); +console.log('NFD: ' + unorm.nfd(text)); +console.log('NFKC: ' + unorm.nfkc(text)); +console.log('NFKD: * ' + unorm.nfkd(text).replace(combining, '')); +console.log(' * = Combining characters removed from decomposed form.'); +``` + + +Road map +-------- + +As of November 2013. Longer term: + +- Look at possible optimizations (speed primarely, module size secondarily) +- Adding functions to quick check normalizations: `is_nfc`, `is_nfd`, etc. + + +Contributers +------------ + + - **Oleg Grenrus** is helping to maintain this library. He cleaned up the code base, fixed JSHint errors, created a test suite and updated the normalization data to Unicode 6.3. + + +Development notes +----------------- + +- [Unicode normalization forms report](http://www.unicode.org/reports/tr15/) +- Unicode data can be found from http://www.unicode.org/Public/UCD/latest/ucd + +To generate new unicode data, run: +```sh +cd src/data/src +javac UnormNormalizerBuilder.java +java UnormNormalizerBuilder +``` +produced `unormdata.js` contains needed table + +Execute `node benchmark/benchmark.js` to run simple benchmarks, if you do any changes which may affect performance. + +License +------- + +This project includes the software package **Unicode Normalizer 1.0.0**. The +software dual licensed under the MIT and GPL licenses. Here is the MIT license: + + Copyright (c) 2008-2013 Matsuza , Bjarke Walling + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + +[Unicode Normalizer]: http://coderepos.org/share/browser/lang/javascript/UnicodeNormalizer +[String.prototype.normalize]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.5.3.26 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/lib/unorm.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/lib/unorm.js new file mode 100644 index 0000000..92d3699 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/lib/unorm.js @@ -0,0 +1,442 @@ +(function (root) { + "use strict"; + +/***** unorm.js *****/ + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ + */ + + var DEFAULT_FEATURE = [null, 0, {}]; + var CACHE_THRESHOLD = 10; + var SBase = 0xAC00, LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21, TCount = 28; + var NCount = VCount * TCount; // 588 + var SCount = LCount * NCount; // 11172 + + var UChar = function(cp, feature){ + this.codepoint = cp; + this.feature = feature; + }; + + // Strategies + var cache = {}; + var cacheCounter = []; + for (var i = 0; i <= 0xFF; ++i){ + cacheCounter[i] = 0; + } + + function fromCache(next, cp, needFeature){ + var ret = cache[cp]; + if(!ret){ + ret = next(cp, needFeature); + if(!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD){ + cache[cp] = ret; + } + } + return ret; + } + + function fromData(next, cp, needFeature){ + var hash = cp & 0xFF00; + var dunit = UChar.udata[hash] || {}; + var f = dunit[cp]; + return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE); + } + function fromCpOnly(next, cp, needFeature){ + return !!needFeature ? next(cp, needFeature) : new UChar(cp, null); + } + function fromRuleBasedJamo(next, cp, needFeature){ + var j; + if(cp < LBase || (LBase + LCount <= cp && cp < SBase) || (SBase + SCount < cp)){ + return next(cp, needFeature); + } + if(LBase <= cp && cp < LBase + LCount){ + var c = {}; + var base = (cp - LBase) * VCount; + for (j = 0; j < VCount; ++j){ + c[VBase + j] = SBase + TCount * (j + base); + } + return new UChar(cp, [,,c]); + } + + var SIndex = cp - SBase; + var TIndex = SIndex % TCount; + var feature = []; + if(TIndex !== 0){ + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } else { + feature[0] = [LBase + Math.floor(SIndex / NCount), VBase + Math.floor((SIndex % NCount) / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j){ + feature[2][TBase + j] = cp + j; + } + } + return new UChar(cp, feature); + } + function fromCpFilter(next, cp, needFeature){ + return cp < 60 || 13311 < cp && cp < 42607 ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature); + } + + var strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + + UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { + return strategy(next, cp, needFeature); + }; + }, null); + + UChar.isHighSurrogate = function(cp){ + return cp >= 0xD800 && cp <= 0xDBFF; + }; + UChar.isLowSurrogate = function(cp){ + return cp >= 0xDC00 && cp <= 0xDFFF; + }; + + UChar.prototype.prepFeature = function(){ + if(!this.feature){ + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } + }; + + UChar.prototype.toString = function(){ + if(this.codepoint < 0x10000){ + return String.fromCharCode(this.codepoint); + } else { + var x = this.codepoint - 0x10000; + return String.fromCharCode(Math.floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00); + } + }; + + UChar.prototype.getDecomp = function(){ + this.prepFeature(); + return this.feature[0] || null; + }; + + UChar.prototype.isCompatibility = function(){ + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 8)); + }; + UChar.prototype.isExclude = function(){ + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 9)); + }; + UChar.prototype.getCanonicalClass = function(){ + this.prepFeature(); + return !!this.feature[1] ? (this.feature[1] & 0xff) : 0; + }; + UChar.prototype.getComposite = function(following){ + this.prepFeature(); + if(!this.feature[2]){ + return null; + } + var cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; + }; + + var UCharIterator = function(str){ + this.str = str; + this.cursor = 0; + }; + UCharIterator.prototype.next = function(){ + if(!!this.str && this.cursor < this.str.length){ + var cp = this.str.charCodeAt(this.cursor++); + var d; + if(UChar.isHighSurrogate(cp) && this.cursor < this.str.length && UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))){ + cp = (cp - 0xD800) * 0x400 + (d -0xDC00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } else { + this.str = null; + return null; + } + }; + + var RecursDecompIterator = function(it, cano){ + this.it = it; + this.canonical = cano; + this.resBuf = []; + }; + + RecursDecompIterator.prototype.next = function(){ + function recursiveDecomp(cano, uchar){ + var decomp = uchar.getDecomp(); + if(!!decomp && !(cano && uchar.isCompatibility())){ + var ret = []; + for(var i = 0; i < decomp.length; ++i){ + var a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + ret = ret.concat(a); + } + return ret; + } else { + return [uchar]; + } + } + if(this.resBuf.length === 0){ + var uchar = this.it.next(); + if(!uchar){ + return null; + } + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); + }; + + var DecompIterator = function(it){ + this.it = it; + this.resBuf = []; + }; + + DecompIterator.prototype.next = function(){ + var cc; + if(this.resBuf.length === 0){ + do{ + var uchar = this.it.next(); + if(!uchar){ + break; + } + cc = uchar.getCanonicalClass(); + var inspt = this.resBuf.length; + if(cc !== 0){ + for(; inspt > 0; --inspt){ + var uchar2 = this.resBuf[inspt - 1]; + var cc2 = uchar2.getCanonicalClass(); + if(cc2 <= cc){ + break; + } + } + } + this.resBuf.splice(inspt, 0, uchar); + } while(cc !== 0); + } + return this.resBuf.shift(); + }; + + var CompIterator = function(it){ + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; + }; + + CompIterator.prototype.next = function(){ + while(this.resBuf.length === 0){ + var uchar = this.it.next(); + if(!uchar){ + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if(this.procBuf.length === 0){ + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + var starter = this.procBuf[0]; + var composite = starter.getComposite(uchar); + var cc = uchar.getCanonicalClass(); + if(!!composite && (this.lastClass < cc || this.lastClass === 0)){ + this.procBuf[0] = composite; + } else { + if(cc === 0){ + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); + }; + + var createIterator = function(mode, str){ + switch(mode){ + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true))); + case "NFKC": + return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false))); + } + throw mode + " is invalid"; + }; + var normalize = function(mode, str){ + var it = createIterator(mode, str); + var ret = ""; + var uchar; + while(!!(uchar = it.next())){ + ret += uchar.toString(); + } + return ret; + }; + + /* API functions */ + function nfd(str){ + return normalize("NFD", str); + } + + function nfkd(str){ + return normalize("NFKD", str); + } + + function nfc(str){ + return normalize("NFC", str); + } + + function nfkc(str){ + return normalize("NFKC", str); + } + +/* Unicode data */ +UChar.udata={ +0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]}, +256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]}, +512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]}, +768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]}, +1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]}, +1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]}, +1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]}, +1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]}, +2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]}, +2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]}, +2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]}, +2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]}, +3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]}, +3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]}, +3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]}, +3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]}, +4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]}, +4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]}, +4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]}, +4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]}, +5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]}, +5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]}, +5632:{71231:[,9],71350:[,9],71351:[,7]}, +5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]}, +6144:{6313:[,228]}, +6400:{6457:[,222],6458:[,230],6459:[,220]}, +6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]}, +6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]}, +7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]}, +7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]}, +7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]}, +7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]}, +8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]}, +8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]}, +8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]}, +8960:{9001:[[12296]],9002:[[12297]]}, +9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]}, +10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]}, +11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]}, +11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]}, +11776:{11935:[[27597],256],12019:[[40863],256]}, +12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]}, +12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]}, +12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]}, +12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]}, +13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]}, +27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]}, +27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]}, +42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]}, +42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]}, +43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]}, +43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]}, +43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]}, +43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]}, +48128:{113822:[,1]}, +53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]}, +53760:{119362:[,230],119363:[,230],119364:[,230]}, +54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]}, +54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]}, +54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]}, +55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]}, +59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]}, +60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]}, +61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]}, +61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]}, +63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]}, +63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]}, +64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]}, +64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]}, +64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]}, +64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]}, +65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]}, +65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]} + +}; + + /***** Module to export */ + var unorm = { + nfc: nfc, + nfd: nfd, + nfkc: nfkc, + nfkd: nfkd + }; + + /*globals module:true,define:true*/ + + // CommonJS + if (typeof module === "object") { + module.exports = unorm; + + // AMD + } else if (typeof define === "function" && define.amd) { + define("unorm", function () { + return unorm; + }); + + // Global + } else { + root.unorm = unorm; + } + + /***** Export as shim for String::normalize method *****/ + /* + http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#november_8_2013_draft_rev_21 + + 21.1.3.12 String.prototype.normalize(form="NFC") + When the normalize method is called with one argument form, the following steps are taken: + + 1. Let O be CheckObjectCoercible(this value). + 2. Let S be ToString(O). + 3. ReturnIfAbrupt(S). + 4. If form is not provided or undefined let form be "NFC". + 5. Let f be ToString(form). + 6. ReturnIfAbrupt(f). + 7. If f is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw a RangeError Exception. + 8. Let ns be the String value is the result of normalizing S into the normalization form named by f as specified in Unicode Standard Annex #15, UnicodeNormalizatoin Forms. + 9. Return ns. + + The length property of the normalize method is 0. + + *NOTE* The normalize function is intentionally generic; it does not require that its this value be a String object. Therefore it can be transferred to other kinds of objects for use as a method. + */ + unorm.shimApplied = false; + + if (!String.prototype.normalize) { + String.prototype.normalize = function(form) { + var str = "" + this; + form = form === undefined ? "NFC" : form; + + if (form === "NFC") { + return unorm.nfc(str); + } else if (form === "NFD") { + return unorm.nfd(str); + } else if (form === "NFKC") { + return unorm.nfkc(str); + } else if (form === "NFKD") { + return unorm.nfkd(str); + } else { + throw new RangeError("Invalid normalization form: " + form); + } + }; + + unorm.shimApplied = true; + } +}(this)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/package.json new file mode 100644 index 0000000..2244ca2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/unorm/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "unorm@^1.3.3", + "scope": null, + "escapedName": "unorm", + "name": "unorm", + "rawSpec": "^1.3.3", + "spec": ">=1.3.3 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + ] + ], + "_from": "unorm@>=1.3.3 <2.0.0", + "_id": "unorm@1.4.1", + "_inCache": true, + "_installable": true, + "_location": "/unorm", + "_npmUser": { + "name": "walling", + "email": "bwp@bwp.dk" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "unorm@^1.3.3", + "scope": null, + "escapedName": "unorm", + "name": "unorm", + "rawSpec": "^1.3.3", + "spec": ">=1.3.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", + "_shasum": "364200d5f13646ca8bcd44490271335614792300", + "_shrinkwrap": null, + "_spec": "unorm@^1.3.3", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "author": { + "name": "Bjarke Walling", + "email": "bwp@bwp.dk" + }, + "bugs": { + "url": "https://github.com/walling/unorm/issues" + }, + "contributors": [ + { + "name": "Bjarke Walling", + "email": "bwp@bwp.dk" + }, + { + "name": "Oleg Grenrus", + "email": "oleg.grenrus@iki.fi" + }, + { + "name": "Matsuza", + "email": "matsuza@gmail.com" + } + ], + "dependencies": {}, + "description": "JavaScript Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. Read UAX #15 Unicode Normalization Forms.", + "devDependencies": { + "benchmark": "~1.0.0", + "grunt": "~0.4.1", + "grunt-contrib-jshint": "~0.8.0", + "grunt-contrib-watch": "~0.5.0", + "grunt-simple-mocha": "~0.4.0", + "unorm": "1.4.1" + }, + "directories": {}, + "dist": { + "shasum": "364200d5f13646ca8bcd44490271335614792300", + "tarball": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "gitHead": "e802d0d7844cf74b03742bce1147a82ace218396", + "homepage": "https://github.com/walling/unorm", + "license": "MIT or GPL-2.0", + "main": "./lib/unorm.js", + "maintainers": [ + { + "name": "walling", + "email": "bwp@bwp.dk" + } + ], + "name": "unorm", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/walling/unorm.git" + }, + "scripts": { + "test": "grunt test" + }, + "version": "1.4.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/History.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/History.md new file mode 100644 index 0000000..acc8675 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/LICENSE new file mode 100644 index 0000000..6a60e8c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/README.md new file mode 100644 index 0000000..75622fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/browser.js new file mode 100644 index 0000000..549ae2f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/node.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/node.js new file mode 100644 index 0000000..5e6fcff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/package.json new file mode 100644 index 0000000..1b68a68 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/util-deprecate/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "util-deprecate@1.0.2", + "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/plist" + ] + ], + "_from": "util-deprecate@1.0.2", + "_id": "util-deprecate@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/util-deprecate", + "_nodeVersion": "4.1.2", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "raw": "util-deprecate@1.0.2", + "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "_requiredBy": [ + "/plist" + ], + "_resolved": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_shrinkwrap": null, + "_spec": "util-deprecate@1.0.2", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "dependencies": {}, + "description": "The Node.js `util.deprecate()` function with browser support", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "license": "MIT", + "main": "node.js", + "maintainers": [ + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "util-deprecate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/README.md new file mode 100644 index 0000000..98eab25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/package.json new file mode 100644 index 0000000..b29e70c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "wrappy@1", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight" + ] + ], + "_from": "wrappy@>=1.0.0 <2.0.0", + "_id": "wrappy@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/wrappy", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" + }, + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "wrappy@1", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_shrinkwrap": null, + "_spec": "wrappy@1", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "files": [ + "wrappy.js" + ], + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/wrappy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/wrappy.js new file mode 100644 index 0000000..bb7e7d6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/.npmignore new file mode 100644 index 0000000..b6ad1f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/.npmignore @@ -0,0 +1,5 @@ +.travis.yml +src +test +perf +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/LICENSE new file mode 100644 index 0000000..e7cbac9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/README.md new file mode 100644 index 0000000..13a5b12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/README.md @@ -0,0 +1,86 @@ +# xmlbuilder-js + +An XML builder for [node.js](https://nodejs.org/) similar to +[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). + +[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) +[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) +[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) + +[![Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) +[![Dependency Status](http://img.shields.io/david/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) + +### Installation: + +``` sh +npm install xmlbuilder +``` + +### Usage: + +``` js +var builder = require('xmlbuilder'); +var xml = builder.create('root') + .ele('xmlbuilder') + .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') + .end({ pretty: true}); + +console.log(xml); +``` + +will result in: + +``` xml + + + + git://github.com/oozcitak/xmlbuilder-js.git + + +``` + +It is also possible to convert objects into nodes: + +``` js +builder.create({ + root: { + xmlbuilder: { + repo: { + '@type': 'git', // attributes start with @ + '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node + } + } + } +}); +``` + +If you need to do some processing: + +``` js +var root = builder.create('squares'); +root.com('f(x) = x^2'); +for(var i = 1; i <= 5; i++) +{ + var item = root.ele('data'); + item.att('x', i); + item.att('y', i * i); +} +``` + +This will result in: + +``` xml + + + + + + + + + +``` + +See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js new file mode 100644 index 0000000..247c9d1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js new file mode 100644 index 0000000..4282833 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js @@ -0,0 +1,69 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLCData.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLCData.js new file mode 100644 index 0000000..00002f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLCData.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLComment.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLComment.js new file mode 100644 index 0000000..ca23e95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLComment.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js new file mode 100644 index 0000000..62e6d8a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js @@ -0,0 +1,68 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js new file mode 100644 index 0000000..2d155e2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js @@ -0,0 +1,46 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js new file mode 100644 index 0000000..3201d19 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js @@ -0,0 +1,84 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js new file mode 100644 index 0000000..cfbccf4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js @@ -0,0 +1,56 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js new file mode 100644 index 0000000..b2d8435 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js @@ -0,0 +1,65 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDocType.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDocType.js new file mode 100644 index 0000000..eec6f36 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLDocType.js @@ -0,0 +1,188 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLElement.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLElement.js new file mode 100644 index 0000000..d5814c8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLElement.js @@ -0,0 +1,212 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLNode.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLNode.js new file mode 100644 index 0000000..592545a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLNode.js @@ -0,0 +1,331 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js new file mode 100644 index 0000000..f5d8c6c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js @@ -0,0 +1,51 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLRaw.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLRaw.js new file mode 100644 index 0000000..499d0e2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLRaw.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100644 index 0000000..f0ab1fc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,165 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/=0.8.0" + }, + "gitHead": "ec17840a6705ef666b7d04c771de11df6091fff5", + "homepage": "http://github.com/oozcitak/xmlbuilder-js", + "keywords": [ + "xml", + "xmlbuilder" + ], + "license": "MIT", + "main": "./lib/index", + "maintainers": [ + { + "name": "oozcitak", + "email": "oozcitak@gmail.com" + } + ], + "name": "xmlbuilder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/oozcitak/xmlbuilder-js.git" + }, + "scripts": { + "postpublish": "rm -rf lib", + "prepublish": "coffee -co lib src", + "test": "mocha && istanbul report text lcov" + }, + "version": "4.0.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.npmignore new file mode 100644 index 0000000..b094a44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.npmignore @@ -0,0 +1,5 @@ +test +t +travis.yml +.project +changelog diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.travis.yml new file mode 100644 index 0000000..b95408e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/.travis.yml @@ -0,0 +1,22 @@ +language: node_js + +node_js: + - '0.10' + +branches: + only: + - master + - proof + - travis-ci + +# Not using `npm install --dev` because it is recursive. It will pull in the all +# development dependencies for CoffeeScript. Way too much spew in the Travis CI +# build output. + +before_install: + - npm install + - npm install istanbul coveralls + +env: + global: + - secure: "BxUHTsa1WVANLQoimilbZwa1MCWSdM9hOmPWBE/rsYb7uT/iiqkRXXwnWhKtN5CLvTvIQbiAzq4iyPID0S8UHrnxClYQrOuA6QkrtwgIEuDAmijao/bgxobPOremvkwXcpMGIwzYKyYQQtSEaEIQbqf6gSSKW9dBh/GZ/vfTsqo=" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/LICENSE new file mode 100644 index 0000000..68a9b5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/LICENSE @@ -0,0 +1,8 @@ +You can choose any one of those: + +The MIT License (MIT): + +link:http://opensource.org/licenses/MIT + +LGPL: +http://www.gnu.org/licenses/lgpl.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/__package__.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/__package__.js new file mode 100644 index 0000000..b4cad28 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/__package__.js @@ -0,0 +1,4 @@ +this.addScript('dom.js',['DOMImplementation','XMLSerializer']); +this.addScript('dom-parser.js',['DOMHandler','DOMParser'], + ['DOMImplementation','XMLReader']); +this.addScript('sax.js','XMLReader'); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/changelog b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/changelog new file mode 100644 index 0000000..ab815bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/changelog @@ -0,0 +1,14 @@ +### Version 0.1.16 + +Sat May 4 14:58:03 UTC 2013 + + * Correctly handle multibyte Unicode greater than two byts. #57. #56. + * Initial unit testing and test coverage. #53. #46. #19. + * Create Bower `component.json` #52. + +### Version 0.1.8 + + * Add: some test case from node-o3-xml(excludes xpath support) + * Fix: remove existed attribute before setting (bug introduced in v0.1.5) + * Fix: index direct access for childNodes and any NodeList collection(not w3c standard) + * Fix: remove last child bug diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/component.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/component.json new file mode 100644 index 0000000..93b4d57 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/component.json @@ -0,0 +1,10 @@ +{ + "name": "xmldom", + "version": "0.1.15", + "main": "dom-parser.js", + "ignore": [ + "**/.*", + "node_modules", + "components" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom-parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom-parser.js new file mode 100644 index 0000000..08c2f70 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom-parser.js @@ -0,0 +1,249 @@ +function DOMParser(options){ + this.options = options ||{locator:{}}; + +} +DOMParser.prototype.parseFromString = function(source,mimeType){ + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns||{}; + var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace'; + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid document source"); + } + return domBuilder.document; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn && isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + } + errorHandler[key] = fn && function(msg){ + fn('[xmldom '+key+']\t'+msg+_locator(locator)); + }||function(){}; + } + build('warning'); + build('error'); + build('fatalError'); + return errorHandler; +} + +//console.log('#\n\n\n\n\n\n\n####') +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.document = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.document.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.document; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + if( attr.getOffset){ + position(attr.getOffset(1),attr) + } + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.document.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(this.currentElement && chars){ + if (this.cdata) { + var charNode = this.document.createCDATASection(chars); + this.currentElement.appendChild(charNode); + } else { + var charNode = this.document.createTextNode(chars); + this.currentElement.appendChild(charNode); + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.document.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.document.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.document.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn('[xmldom warning]\t'+error,_locator(this.locator)); + }, + error:function(error) { + console.error('[xmldom error]\t'+error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error('[xmldom fatalError]\t'+error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.document.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom.js new file mode 100644 index 0000000..460a1be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/dom.js @@ -0,0 +1,1147 @@ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + }, + toString:function(){ + for(var buf = [], i = 0;i=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + var i = this.length; + while(i--){ + var attr = this[i]; + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == 1){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == 1){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + //if(!(newChild instanceof CharacterData)){ + throw new Error(ExceptionMessage[3]) + //} + return Node.prototype.appendChild.apply(this,arguments) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node,attributeSorter){ + return node.toString(attributeSorter); +} +Node.prototype.toString =function(attributeSorter){ + var buf = []; + serializeToString(this,buf,attributeSorter); + return buf.join(''); +} +function serializeToString(node,buf,attributeSorter,isHTML){ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + isHTML = (htmlns === node.namespaceURI) ||isHTML + buf.push('<',nodeName); + if(attributeSorter){ + buf.sort.apply(attrs, attributeSorter); + } + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + if(child){ + buf.push(child.data); + } + }else{ + while(child){ + serializeToString(child,buf,attributeSorter,isHTML); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf,attributeSorter,isHTML); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/steveng/repo/cordova/cordova-android/node_modules/plist" + ] + ], + "_from": "xmldom@>=0.1.0 <0.2.0", + "_id": "xmldom@0.1.22", + "_inCache": true, + "_installable": true, + "_location": "/xmldom", + "_nodeVersion": "5.5.0", + "_npmUser": { + "name": "jindw", + "email": "jindw@xidea.org" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "xmldom@0.1.x", + "scope": null, + "escapedName": "xmldom", + "name": "xmldom", + "rawSpec": "0.1.x", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/plist" + ], + "_resolved": "http://registry.npmjs.org/xmldom/-/xmldom-0.1.22.tgz", + "_shasum": "10de4e5e964981f03c8cc72fadc08d14b6c3aa26", + "_shrinkwrap": null, + "_spec": "xmldom@0.1.x", + "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist", + "author": { + "name": "jindw", + "email": "jindw@xidea.org", + "url": "http://www.xidea.org" + }, + "bugs": { + "url": "http://github.com/jindw/xmldom/issues", + "email": "jindw@xidea.org" + }, + "contributors": [ + { + "name": "Yaron Naveh", + "email": "yaronn01@gmail.com", + "url": "http://webservices20.blogspot.com/" + }, + { + "name": "Harutyun Amirjanyan", + "email": "amirjanyan@gmail.com", + "url": "https://github.com/nightwing" + }, + { + "name": "Alan Gutierrez", + "email": "alan@prettyrobots.com", + "url": "http://www.prettyrobots.com/" + } + ], + "dependencies": {}, + "description": "A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).", + "devDependencies": { + "proof": "0.0.28" + }, + "directories": {}, + "dist": { + "shasum": "10de4e5e964981f03c8cc72fadc08d14b6c3aa26", + "tarball": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.22.tgz" + }, + "engines": { + "node": ">=0.1" + }, + "gitHead": "29a83b315aef56c156602286b2d884a3b4c2521f", + "homepage": "https://github.com/jindw/xmldom", + "keywords": [ + "w3c", + "dom", + "xml", + "parser", + "javascript", + "DOMParser", + "XMLSerializer" + ], + "licenses": [ + { + "type": "LGPL", + "url": "http://www.gnu.org/licenses/lgpl.html", + "MIT": "http://opensource.org/licenses/MIT" + } + ], + "main": "./dom-parser.js", + "maintainers": [ + { + "name": "jindw", + "email": "jindw@xidea.org" + }, + { + "name": "yaron", + "email": "yaronn01@gmail.com" + }, + { + "name": "bigeasy", + "email": "alan@prettyrobots.com" + }, + { + "name": "kethinov", + "email": "kethinov@gmail.com" + }, + { + "name": "jinjinyun", + "email": "jinyun.jin@gmail.com" + } + ], + "name": "xmldom", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jindw/xmldom.git" + }, + "scripts": { + "test": "proof platform win32 && proof test */*/*.t.js || t/test" + }, + "version": "0.1.22" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/readme.md new file mode 100644 index 0000000..f832c44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/readme.md @@ -0,0 +1,219 @@ +# XMLDOM [![Build Status](https://secure.travis-ci.org/bigeasy/xmldom.png?branch=master)](http://travis-ci.org/bigeasy/xmldom) [![Coverage Status](https://coveralls.io/repos/bigeasy/xmldom/badge.png?branch=master)](https://coveralls.io/r/bigeasy/xmldom) [![NPM version](https://badge.fury.io/js/xmldom.png)](http://badge.fury.io/js/xmldom) + +A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully +compatible with `W3C DOM level2`; and some compatible with `level3`. Supports +`DOMParser` and `XMLSerializer` interface such as in browser. + +Install: +------- +>npm install xmldom + +Example: +==== +```javascript +var DOMParser = require('xmldom').DOMParser; +var doc = new DOMParser().parseFromString( + '\n'+ + '\ttest\n'+ + '\t\n'+ + '\t\n'+ + '' + ,'text/xml'); +doc.documentElement.setAttribute('x','y'); +doc.documentElement.setAttributeNS('./lite','c:x','y2'); +var nsAttr = doc.documentElement.getAttributeNS('./lite','x') +console.info(nsAttr) +console.info(doc) +``` +API Reference +===== + + * [DOMParser](https://developer.mozilla.org/en/DOMParser): + + ```javascript + parseFromString(xmlsource,mimeType) + ``` + * **options extension** _by xmldom_(not BOM standard!!) + + ```javascript + //added the options argument + new DOMParser(options) + + //errorHandler is supported + new DOMParser({ + /** + * locator is always need for error position info + */ + locator:{}, + /** + * you can override the errorHandler for xml parser + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + errorHandler:{warning:function(w){console.warn(w)},error:callback,fatalError:callback} + //only callback model + //errorHandler:function(level,msg){console.log(level,msg)} + }) + + ``` + + * [XMLSerializer](https://developer.mozilla.org/en/XMLSerializer) + + ```javascript + serializeToString(node) + ``` +DOM level2 method and attribute: +------ + + * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247) + + attribute: + nodeValue|prefix + readonly attribute: + nodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName + method: + insertBefore(newChild, refChild) + replaceChild(newChild, oldChild) + removeChild(oldChild) + appendChild(newChild) + hasChildNodes() + cloneNode(deep) + normalize() + isSupported(feature, version) + hasAttributes() + + * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490) + + method: + hasFeature(feature, version) + createDocumentType(qualifiedName, publicId, systemId) + createDocument(namespaceURI, qualifiedName, doctype) + + * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node + + readonly attribute: + doctype|implementation|documentElement + method: + createElement(tagName) + createDocumentFragment() + createTextNode(data) + createComment(data) + createCDATASection(data) + createProcessingInstruction(target, data) + createAttribute(name) + createEntityReference(name) + getElementsByTagName(tagname) + importNode(importedNode, deep) + createElementNS(namespaceURI, qualifiedName) + createAttributeNS(namespaceURI, qualifiedName) + getElementsByTagNameNS(namespaceURI, localName) + getElementById(elementId) + + * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node + * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node + + readonly attribute: + tagName + method: + getAttribute(name) + setAttribute(name, value) + removeAttribute(name) + getAttributeNode(name) + setAttributeNode(newAttr) + removeAttributeNode(oldAttr) + getElementsByTagName(name) + getAttributeNS(namespaceURI, localName) + setAttributeNS(namespaceURI, qualifiedName, value) + removeAttributeNS(namespaceURI, localName) + getAttributeNodeNS(namespaceURI, localName) + setAttributeNodeNS(newAttr) + getElementsByTagNameNS(namespaceURI, localName) + hasAttribute(name) + hasAttributeNS(namespaceURI, localName) + + * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node + + attribute: + value + readonly attribute: + name|specified|ownerElement + + * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177) + + readonly attribute: + length + method: + item(index) + + * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922) + + readonly attribute: + length + method: + getNamedItem(name) + setNamedItem(arg) + removeNamedItem(name) + item(index) + getNamedItemNS(namespaceURI, localName) + setNamedItemNS(arg) + removeNamedItemNS(namespaceURI, localName) + + * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node + + method: + substringData(offset, count) + appendData(arg) + insertData(offset, arg) + deleteData(offset, count) + replaceData(offset, count, arg) + + * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData + + method: + splitText(offset) + + * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212) + * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData + + * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927) + + readonly attribute: + name|entities|notations|publicId|systemId|internalSubset + + * Notation : Node + + readonly attribute: + publicId|systemId + + * Entity : Node + + readonly attribute: + publicId|systemId|notationName + + * EntityReference : Node + * ProcessingInstruction : Node + + attribute: + data + readonly attribute: + target + +DOM level 3 support: +----- + + * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent) + + attribute: + textContent + method: + isDefaultNamespace(namespaceURI){ + lookupNamespaceURI(prefix) + +DOM extension by xmldom +--- + * [Node] Source position extension; + + attribute: + //Numbered starting from '1' + lineNumber + //Numbered starting from '1' + columnNumber diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/sax.js new file mode 100644 index 0000000..e11bdfb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/cordova/node_modules/xmldom/sax.js @@ -0,0 +1,586 @@ +//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] +//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] +//[5] Name ::= NameStartChar (NameChar)* +var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF +var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\u203F-\u2040]"); +var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); +//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/ +//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') + +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C +var S_TAG = 0;//tag name offerring +var S_ATTR = 1;//attr name offerring +var S_ATTR_S=2;//attr name end and space offer +var S_EQ = 3;//=space? +var S_V = 4;//attr value(no quot value only) +var S_E = 5;//attr value end and no space(quot end) +var S_S = 6;//(attr value end || tag end ) && (space offer) +var S_C = 7;//closed el + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + if(end>start){ + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + } + function position(p,m){ + while(p>=lineEnd && (m = linePattern.exec(source))){ + lineStart = m.index; + lineEnd = lineStart + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = p-lineStart+1; + } + var lineStart = 0; + var lineEnd = 0; + var linePattern = /.+(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + try{ + var tagStart = source.indexOf('<',start); + if(tagStart<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.document; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(tagStart>start){ + appendText(tagStart); + } + switch(source.charAt(tagStart+1)){ + case '/': + var end = source.indexOf('>',tagStart+3); + var tagName = source.substring(tagStart+2,end); + var config = parseStack.pop(); + var localNSMap = config.localNSMap; + if(config.tagName != tagName){ + errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); + } + domBuilder.endElement(config.uri,config.localName,tagName); + if(localNSMap){ + for(var prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) ; + } + } + end++; + break; + // end elment + case '?':// + locator&&position(tagStart); + end = parseInstruction(source,tagStart,domBuilder); + break; + case '!':// start){ + start = end; + }else{ + //TODO: 这里有可能sax回退,有位置错误风险 + appendText(Math.max(tagStart,start)+1); + } + } +} +function copyLocator(f,t){ + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; +} + +/** + * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack); + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function parseElementStartPart(source,start,el,entityReplacer,errorHandler){ + var attrName; + var value; + var p = ++start; + var s = S_TAG;//status + while(true){ + var c = source.charAt(p); + switch(c){ + case '=': + if(s === S_ATTR){//attrName + attrName = source.slice(start,p); + s = S_EQ; + }else if(s === S_ATTR_S){ + s = S_EQ; + }else{ + //fatalError: equal must after attrName or space after attrName + throw new Error('attribute equal must after attrName'); + } + break; + case '\'': + case '"': + if(s === S_EQ){//equal + start = p+1; + p = source.indexOf(c,start) + if(p>0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_E; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_V){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_E + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + s = S_C; + el.closed = true; + case S_V: + case S_ATTR: + case S_ATTR_S: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + break;//normal + case S_V://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_S: + if(s === S_ATTR_S){ + value = attrName; + } + if(s == S_V){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_S; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_S; + break; + case S_V: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_E: + s = S_S; + break; + //case S_S: + //case S_EQ: + //case S_ATTR_S: + // void();break; + //case S_C: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_V:void();break; + case S_ATTR_S: + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_E: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_S: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_V; + start = p; + break; + case S_C: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } +} +/** + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function appendElement(el,domBuilder,parseStack){ + var tagName = el.tagName; + var localNSMap = null; + var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + parseStack.push(el); + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = closeMap[tagName] = source.lastIndexOf('') + } + return pos',start+4); + //append comment source.substring(4,end)//

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js similarity index 100% rename from MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js new file mode 100644 index 0000000..684c2dc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js @@ -0,0 +1,19 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a){"use strict";function b(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function d(a,b,e){var f,g;if(a)if(y(a))for(f in a)"prototype"==f||"length"==f||"name"==f||a.hasOwnProperty&&!a.hasOwnProperty(f)||b.call(e,a[f],f,a);else if(Wd(a)||c(a)){var h="object"!=typeof a;for(f=0,g=a.length;g>f;f++)(h||f in a)&&b.call(e,a[f],f,a)}else if(a.forEach&&a.forEach!==d)a.forEach(b,e,a);else if(u(a))for(f in a)b.call(e,a[f],f,a);else if("function"==typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&b.call(e,a[f],f,a);else for(f in a)Fd.call(a,f)&&b.call(e,a[f],f,a);return a}function e(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(t(g)||y(g))for(var j=Object.keys(g),k=0,l=j.length;l>k;k++){var m=j[k],n=g[m];c&&t(n)?x(n)?a[m]=new Date(n.valueOf()):z(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):J(n)?a[m]=n.clone():(t(a[m])||(a[m]=Wd(n)?[]:{}),i(a[m],[n],!0)):a[m]=n}}return h(a,d),a}function j(a){return i(a,Od.call(arguments,1),!1)}function k(a){return i(a,Od.call(arguments,1),!0)}function l(a){return parseInt(a,10)}function m(a,b){return j(Object.create(a),b)}function n(){}function o(a){return a}function p(a){return function(){return a}}function q(a){return y(a.toString)&&a.toString!==Rd}function r(a){return"undefined"==typeof a}function s(a){return"undefined"!=typeof a}function t(a){return null!==a&&"object"==typeof a}function u(a){return null!==a&&"object"==typeof a&&!Sd(a)}function v(a){return"string"==typeof a}function w(a){return"number"==typeof a}function x(a){return"[object Date]"===Rd.call(a)}function y(a){return"function"==typeof a}function z(a){return"[object RegExp]"===Rd.call(a)}function A(a){return a&&a.window===a}function B(a){return a&&a.$evalAsync&&a.$watch}function C(a){return"[object File]"===Rd.call(a)}function D(a){return"[object FormData]"===Rd.call(a)}function E(a){return"[object Blob]"===Rd.call(a)}function F(a){return"boolean"==typeof a}function G(a){return a&&y(a.then)}function H(a){return a&&w(a.length)&&Xd.test(Rd.call(a))}function I(a){return"[object ArrayBuffer]"===Rd.call(a)}function J(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function K(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function N(a,b){function c(a,b){var c,d=b.$$hashKey;if(Wd(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(u(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Fd.call(a,c)&&(b[c]=e(a[c]));return h(b,d),b}function e(a){if(!t(a))return a;var b=g.indexOf(a);if(-1!==b)return i[b];if(A(a)||B(a))throw Td("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d=!1,e=f(a);return void 0===e&&(e=Wd(a)?[]:Object.create(Sd(a)),d=!0),g.push(a),i.push(e),d?c(a,e):e}function f(a){switch(Rd.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c;case"[object Blob]":return new a.constructor([a],{type:a.type})}return y(a.cloneNode)?a.cloneNode(!0):void 0}var g=[],i=[];if(b){if(H(b)||I(b))throw Td("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Td("cpi","Can't copy! Source and destination are identical.");return Wd(b)?b.length=0:d(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),g.push(a),i.push(b),c(a,b)}return e(a)}function O(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Wd(a)){if(x(a))return x(b)?O(a.getTime(),b.getTime()):!1;if(z(a))return z(b)?a.toString()==b.toString():!1;if(B(a)||B(b)||A(a)||A(b)||Wd(b)||x(b)||z(b))return!1;e=oa();for(d in a)if("$"!==d.charAt(0)&&!y(a[d])){if(!O(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&s(b[d])&&!y(b[d]))return!1;return!0}if(!Wd(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!O(a[d],b[d]))return!1;return!0}}return!1}function P(a,b,c){return a.concat(Od.call(b,c))}function Q(a,b){return Od.call(a,b||0)}function R(a,b){var c=arguments.length>2?Q(arguments,2):[];return!y(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,P(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function S(b,c){var d=c;return"string"==typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?d=void 0:A(c)?d="$WINDOW":c&&a.document===c?d="$DOCUMENT":B(c)&&(d="$SCOPE"),d}function T(a,b){return r(a)?void 0:(w(b)||(b=b?2:null),JSON.stringify(a,S,b))}function U(a){return v(a)?JSON.parse(a):a}function V(a,b){a=a.replace(ae,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function W(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function X(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=V(b,d);return W(a,c*(e-d))}function Y(a){a=Ld(a).clone();try{a.empty()}catch(b){}var c=Ld("
    ").append(a).html();try{return a[0].nodeType===ge?Gd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Gd(b)})}catch(b){return Gd(c)}}function Z(a){try{return decodeURIComponent(a)}catch(b){}}function $(a){var b={};return d((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=Z(d),s(d)&&(e=s(e)?Z(e):!0,Fd.call(b,d)?Wd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function _(a){var b=[];return d(a,function(a,c){Wd(a)?d(a,function(a){b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}),b.length?b.join("&"):""}function aa(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ca(a,b){var c,d,e=be.length;for(d=0;e>d;++d)if(c=be[d]+b,v(c=a.getAttribute(c)))return c;return null}function da(a,b){var c,e,f={};d(be,function(b){var d=b+"app";!c&&a.hasAttribute&&a.hasAttribute(d)&&(c=a,e=a.getAttribute(d))}),d(be,function(b){var d,f=b+"app";!c&&(d=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=d,e=d.getAttribute(f))}),c&&(f.strictDi=null!==ca(c,"strict-di"),b(c,e?[e]:[],f))}function ea(b,c,e){t(e)||(e={});var f={strictDi:!1};e=j(f,e);var g=function(){if(b=Ld(b),b.injector()){var d=b[0]===a.document?"document":Y(b);throw Td("btstrpd","App already bootstrapped with this element '{0}'",d.replace(//,">"))}c=c||[],c.unshift(["$provide",function(a){a.value("$rootElement",b)}]),e.debugInfoEnabled&&c.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),c.unshift("ng");var f=db(c,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),Ud.resumeBootstrap=function(a){return d(a,function(a){c.push(a)}),g()},void(y(Ud.resumeDeferredBootstrap)&&Ud.resumeDeferredBootstrap()))}function fa(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ga(a){var b=Ud.element(a).injector();if(!b)throw Td("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ha(a,b){return b=b||"_",a.replace(ce,function(a,c){return(c?b:"")+a.toLowerCase()})}function ia(){var b;if(!de){var c=_d();Md=r(c)?a.jQuery:c?a[c]:void 0,Md&&Md.fn.on?(Ld=Md,j(Md.fn,{scope:ze.scope,isolateScope:ze.isolateScope,controller:ze.controller,injector:ze.injector,inheritedData:ze.inheritedData}),b=Md.cleanData,Md.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Md._data(d,"events"),c&&c.$destroy&&Md(d).triggerHandler("$destroy");b(a)}):Ld=Da,Ud.element=Ld,de=!0}}function ja(a,b,c){if(!a)throw Td("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function ka(a,b,c){return c&&Wd(a)&&(a=a[a.length-1]),ja(y(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function la(a,b){if("hasOwnProperty"===a)throw Td("badname","hasOwnProperty is not a valid {0} name",b)}function ma(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&y(a)?R(f,a):a}function na(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Ld(Od.call(a,0,e))),b.push(c));return b||a}function oa(){return Object.create(null)}function pa(a){function c(a,b,c){return a[b]||(a[b]=c())}var d=b("$injector"),e=b("ng"),f=c(a,"angular",Object);return f.$$minErr=f.$$minErr||b,c(f,"module",function(){var a={};return function(b,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(b,"module"),f&&a.hasOwnProperty(b)&&(a[b]=null),c(a,b,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function c(a,c){return function(d,f){return f&&y(f)&&(f.$$moduleName=b),e.push([a,c,arguments]),k}}if(!f)throw d("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",b);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:b,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:c("$provide","decorator"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),component:c("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function qa(a,b){if(Wd(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(t(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function ra(a){var b=[];return JSON.stringify(a,function(a,c){if(c=S(a,c),t(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function sa(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):r(a)?"undefined":"string"!=typeof a?ra(a):a}function ta(c){j(c,{bootstrap:ea,copy:N,extend:j,merge:k,equals:O,element:Ld,forEach:d,injector:db,noop:n,bind:R,toJson:T,fromJson:U,identity:o,isUndefined:r,isDefined:s,isString:v,isFunction:y,isObject:t,isNumber:w,isElement:J,isArray:Wd,version:ke,isDate:x,lowercase:Gd,uppercase:Hd,callbacks:{counter:0},getTestability:ga,$$minErr:b,$$csp:$d,reloadWithDebugInfo:fa}),(Nd=pa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:yc}),a.provider("$compile",ob).directive({a:Hf,input:$f,textarea:$f,form:Mf,script:Vg,select:Yg,style:$g,option:Zg,ngBind:bg,ngBindHtml:dg,ngBindTemplate:cg,ngClass:fg,ngClassEven:hg,ngClassOdd:gg,ngCloak:ig,ngController:jg,ngForm:Nf,ngHide:Og,ngIf:mg,ngInclude:ng,ngInit:pg,ngNonBindable:Fg,ngPluralize:Jg,ngRepeat:Kg,ngShow:Ng,ngStyle:Pg,ngSwitch:Qg,ngSwitchWhen:Rg,ngSwitchDefault:Sg,ngOptions:Ig,ngTransclude:Ug,ngModel:Cg,ngList:qg,ngChange:eg,pattern:ah,ngPattern:ah,required:_g,ngRequired:_g,minlength:ch,ngMinlength:ch,maxlength:bh,ngMaxlength:bh,ngValue:ag,ngModelOptions:Eg}).directive({ngInclude:og}).directive(If).directive(kg),a.provider({$anchorScroll:eb,$animate:Pe,$animateCss:Se,$$animateJs:Ne,$$animateQueue:Oe,$$AnimateRunner:Re,$$animateAsyncRun:Qe,$browser:kb,$cacheFactory:lb,$controller:ub,$document:vb,$exceptionHandler:wb,$filter:Mc,$$forceReflow:Ye,$interpolate:Kb,$interval:Lb,$http:Gb,$httpParamSerializer:yb,$httpParamSerializerJQLike:zb,$httpBackend:Ib,$xhrFactory:Hb,$location:$b,$log:_b,$parse:sc,$rootScope:xc,$q:tc,$$q:uc,$sce:Cc,$sceDelegate:Bc,$sniffer:Dc,$templateCache:mb,$templateRequest:Ec,$$testability:Fc,$timeout:Gc,$window:Jc,$$rAF:wc,$$jqLite:Ya,$$HashMap:De,$$cookieReader:Lc})}])}function ua(){return++me}function va(a){return a.replace(pe,function(a,b,c,d){return d?c.toUpperCase():c}).replace(qe,"Moz$1")}function wa(a){return!ue.test(a)}function xa(a){var b=a.nodeType;return b===ee||!b||b===ie}function ya(a){for(var b in le[a.ng339])return!0;return!1}function za(a){for(var b=0,c=a.length;c>b;b++)Ha(a[b])}function Aa(a,b){var c,e,f,g,h=b.createDocumentFragment(),i=[];if(wa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),e=(ve.exec(a)||["",""])[1].toLowerCase(),f=xe[e]||xe._default,c.innerHTML=f[1]+a.replace(we,"<$1>")+f[2],g=f[0];g--;)c=c.lastChild;i=P(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",d(i,function(a){h.appendChild(a)}),h}function Ba(b,c){c=c||a.document;var d;return(d=te.exec(b))?[c.createElement(d[1])]:(d=Aa(b,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(v(a)&&(a=Yd(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw se("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ha(c[d])}function Ga(a,b,c,e){if(s(e))throw se("offargs","jqLite#off() does not support the `selector` argument");var f=Ia(a),g=f&&f.events,h=f&&f.handle;if(h)if(b){var i=function(b){var d=g[b];s(c)&&M(d||[],c),s(c)&&d&&d.length>0||(oe(a,b,h),delete g[b])};d(b.split(" "),function(a){i(a),re[a]&&i(re[a])})}else for(b in g)"$destroy"!==b&&oe(a,b,h),delete g[b]}function Ha(a,b){var c=a.ng339,d=c&&le[c];if(d){if(b)return void delete d.data[b];d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Ga(a)),delete le[c],a.ng339=void 0}}function Ia(a,b){var c=a.ng339,d=c&&le[c];return b&&!d&&(a.ng339=c=ua(),d=le[c]={events:{},data:{},handle:void 0}),d}function Ja(a,b,c){if(xa(a)){var d=s(c),e=!d&&b&&!t(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];j(h,b)}}}function Ka(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function La(a,b){b&&a.setAttribute&&d(b.split(" "),function(b){a.setAttribute("class",Yd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Yd(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");d(b.split(" "),function(a){a=Yd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Yd(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==ie&&(a=a.documentElement);for(var d=Wd(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(s(c=Ld.data(a,d[e])))return c;a=a.parentNode||a.nodeType===je&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Ld(c).on("load",b)}function Ta(a,b){var c=Ae[b.toLowerCase()];return c&&Be[L(a)]&&c}function Ua(a){return Ce[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(r(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Wa;f>1&&(e=qa(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ye.call(a,d))&&c.call(a,b)}function Ya(){this.$get=function(){return j(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||g)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}d(a,this.put,this)}function _a(a){return Function.prototype.toString.call(a)+" "}function ab(a){var b=_a(a).replace(Ie,""),c=b.match(Ee)||b.match(Fe);return c}function bb(a){var b=ab(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b,c){var e,f,g;if("function"==typeof a){if(!(e=a.$inject)){if(e=[],a.length){if(b)throw v(c)&&c||(c=a.name||bb(a)),Je("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);f=ab(a),d(f[1].split(Ge),function(a){a.replace(He,function(a,b,c){e.push(c)})})}a.$inject=e}}else Wd(a)?(g=a.length-1,ka(a[g],"fn"),e=a.slice(0,g)):ka(a,"fn",!0);return e}function db(a,b){function c(a){return function(b,c){return t(b)?void d(b,f(a)):a(b,c)}}function e(a,b){if(la(a,"service"),(y(b)||Wd(b))&&(b=x.instantiate(b)),!b.$get)throw Je("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(r(c))throw Je("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function h(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function i(a,b){return h(a,["$injector",function(a){return a.instantiate(b)}])}function j(a,b){return h(a,p(b),!1)}function k(a,b){la(a,"constant"),w[a]=b,z[a]=b}function l(a,b){var c=x.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function m(a){ja(r(a)||Wd(a),"modulesToLoad","not an array");var b,c=[];return d(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=x.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{v(a)?(b=Nd(a),c=c.concat(m(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):y(a)?c.push(x.invoke(a)):Wd(a)?c.push(x.invoke(a)):ka(a,"module")}catch(e){throw Wd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Je("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function n(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===o)throw Je("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=o,a[b]=c(b,d)}catch(e){throw a[b]===o&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=db.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Je("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Kd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(_a(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Wd(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Wd(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:db.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var o={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:c(e),factory:c(h),service:c(i),value:c(j),constant:c(k),decorator:l}},x=w.$injector=n(w,function(a,b){throw Ud.isString(b)&&s.push(b),Je("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},A=n(z,function(a,b){var c=x.get(a+q,b);return B.invoke(c.$get,c,void 0,a)}),B=A;w["$injector"+q]={$get:p(A)};var C=m(a);return B=A.get("$injector"),B.strictDi=b,d(C,function(a){a&&B.invoke(a)}),B}function eb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===L(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(y(a))a=a();else if(J(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else w(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=v(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Sa(function(){d.$evalAsync(h)})}),h}]}function fb(a,b){return a||b?a?b?(Wd(a)&&(a=a.join(" ")),Wd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function gb(a){for(var b=0;bk&&this.remove(n.key),b}},get:function(a){if(kb;++b)try{sa[b]()}catch(d){a.push(d)}if(sa=void 0,a.length)throw a})}finally{va++}}function I(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a}function J(a,b,c){ua.innerHTML="";var d=ua.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function K(a,b){try{a.addClass(b)}catch(c){}}function N(b,c,d,e,f){b instanceof Ld||(b=Ld(b));for(var g=/\S+/,h=0,i=b.length;i>h;h++){var j=b[h];j.nodeType===ge&&j.nodeValue.match(g)&&Ca(j,b[h]=a.document.createElement("span"))}var k=S(b,c,b,d,e,f);N.$$addScopeClass(b);var l=null;return function(a,c,d){ja(a,"scope"),f&&f.needsNewScope&&(a=a.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=P(h));var i;if(i="html"!==l?Ld(ka(l,Ld("
    ").append(b).html())):c?ze.clone.call(b):b,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return N.$$addScopeInfo(i,a),c&&c(i,a),k&&k(a,i,i,e),i}}function P(a){var b=a&&a[0];return b&&"foreignobject"!==L(b)&&Rd.call(b).match(/SVG/)?"svg":"html"}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,g,h,i,j,k,l,m,p;if(n){var q=c.length;for(p=new Array(q),j=0;jj;)h=p[o[j++]],f=o[j++],g=o[j++],f?(f.scope?(i=a.$new(),N.$$addScopeInfo(Ld(h),i)):i=a,m=f.transcludeOnThisElement?T(a,f.transclude,e):!f.templateOnThisElement&&e?e:!e&&b?T(a,b):null,f(g,i,h,d,m)):g&&g(a,h.childNodes,void 0,e)}for(var h,i,j,k,l,m,n,o=[],p=0;pr;r++){var w=!1,x=!1;j=p[r],k=j.name,n=Yd(j.value),m=qb(k),(o=Aa.test(m))&&(k=k.replace(Ve,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=m.match(Ba);y&&ca(y[1])&&(w=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=qb(k.toLowerCase()),i[l]=k,(o||!c.hasOwnProperty(l))&&(c[l]=n,Ta(a,l)&&(c[l]=!0)),ma(a,b,n,l,o),ba(b,l,"A",d,e,w,x)}if(g=a.className,t(g)&&(g=g.animVal),v(g)&&""!==g)for(;f=u.exec(g);)l=qb(f[2]),ba(b,l,"C",d,e)&&(c[l]=Yd(f[3])),g=g.substr(f.index+f[0].length);break;case ge:if(11===Kd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===ge;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ia(b,a.nodeValue);break;case he:try{f=q.exec(a.nodeValue),f&&(l=qb(f[1]),ba(b,l,"M",d,e)&&(c[l]=Yd(f[2])))}catch(z){}}return b.sort(fa),b}function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Te("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==ee&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Ld(d)}function W(a,b,c){return function(d,e,f,g,h){return e=V(e[0],b,c),a(d,e,f,g,h)}}function X(a,b,c,d,e,f){var g;return a?N(b,c,d,e,f):function(){return g||(g=N(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function Z(a,b,c,f,g,h,i,k,l){function m(a,b,c,d){a&&(c&&(a=W(a,c,d)),a.require=o.require,a.directiveName=p,(z===o||o.$$isolateScope)&&(a=pa(a,{isolateScope:!0})),i.push(a)),b&&(c&&(b=W(b,c,d)),b.require=o.require,b.directiveName=p,(z===o||o.$$isolateScope)&&(b=pa(b,{isolateScope:!0})),k.push(b))}function n(a,f,g,h,l){function m(a,b,c,d){var e;if(B(a)||(d=c,c=b,b=a,a=void 0),F&&(e=u),c||(c=F?C.parent():C),!d)return l(a,b,e,c,M);var f=l.$$slots[d];if(f)return f(a,b,e,c,M);if(r(f))throw Te("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',d,Y(C))}var n,o,p,q,s,u,v,C,D,E;b===g?(D=c,C=c.$$element):(C=Ld(g),D=new I(C,c)),s=f,z?q=f.$new(!0):w&&(s=f.$parent),l&&(v=m,v.$$boundTransclude=l,v.isSlotFilled=function(a){return!!l.$$slots[a]}),x&&(u=_(C,D,v,x,q,f,z)),z&&(N.$$addScopeInfo(C,q,!0,!(A&&(A===z||A===z.$$originalDirective))),N.$$addScopeClass(C,!0),q.$$isolateBindings=z.$$isolateBindings,E=ra(f,D,q,q.$$isolateBindings,z),E.removeWatches&&q.$on("$destroy",E.removeWatches));for(var G in u){var H=x[G],J=u[G],K=H.$$bindings.bindToController;J.identifier&&K?J.bindingInfo=ra(s,D,J.instance,K,H):J.bindingInfo={};var L=J();L!==J.instance&&(J.instance=L,C.data("$"+H.name+"Controller",L),J.bindingInfo.removeWatches&&J.bindingInfo.removeWatches(),J.bindingInfo=ra(s,D,J.instance,K,H))}for(d(x,function(a,b){var c=a.require;a.bindToController&&!Wd(c)&&t(c)&&j(u[b].instance,$(b,c,C,u))}),d(u,function(a){var b=a.instance;if(y(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(c){e(c)}if(y(b.$onInit))try{b.$onInit()}catch(c){e(c)}y(b.$onDestroy)&&s.$on("$destroy",function(){b.$onDestroy()})}),n=0,o=i.length;o>n;n++)p=i[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);var M=f;for(z&&(z.template||null===z.templateUrl)&&(M=q),a&&a(M,g.childNodes,void 0,l),n=k.length-1;n>=0;n--)p=k[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);d(u,function(a){var b=a.instance;y(b.$postLink)&&b.$postLink()})}l=l||{};for(var o,p,q,s,u,v=-Number.MAX_VALUE,w=l.newScopeDirective,x=l.controllerDirectives,z=l.newIsolateScopeDirective,A=l.templateDirective,C=l.nonTlbTranscludeDirective,D=!1,E=!1,F=l.hasElementTranscludeDirective,G=c.$$element=Ld(b),H=h,J=f,K=!1,M=!1,O=0,P=a.length;P>O;O++){o=a[O];var S=o.$$start,T=o.$$end;if(S&&(G=V(b,S,T)),q=void 0,v>o.priority)break;if((u=o.scope)&&(o.templateUrl||(t(u)?(ga("new/isolated scope",z||w,o,G),z=o):ga("new/isolated scope",z,o,G)),w=w||o),p=o.name,!K&&(o.replace&&(o.templateUrl||o.template)||o.transclude&&!o.$$tlb)){for(var Z,ba=O+1;Z=a[ba++];)if(Z.transclude&&!Z.$$tlb||Z.replace&&(Z.templateUrl||Z.template)){M=!0;break}K=!0}if(!o.templateUrl&&o.controller&&(u=o.controller,x=x||oa(),ga("'"+p+"' controller",x[p],o,G),x[p]=o),u=o.transclude)if(D=!0,o.$$tlb||(ga("transclusion",C,o,G),C=o),"element"==u)F=!0,v=o.priority,q=G,G=c.$$element=Ld(N.$$createComment(p,c[p])),b=G[0],na(g,Q(q),b),q[0].$$parentNode=q[0].parentNode,J=X(M,q,f,v,H&&H.name,{nonTlbTranscludeDirective:C});else{var ca=oa();if(q=Ld(Ea(b)).contents(),t(u)){q=[];var fa=oa(),ha=oa();d(u,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,fa[a]=b,ca[b]=null,ha[b]=c}),d(G.contents(),function(a){var b=fa[qb(L(a))];b?(ha[b]=!0,ca[b]=ca[b]||[],ca[b].push(a)):q.push(a)}),d(ha,function(a,b){if(!a)throw Te("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ia in ca)ca[ia]&&(ca[ia]=X(M,ca[ia],f))}G.empty(),J=X(M,q,f,void 0,void 0,{needsNewScope:o.$$isolateScope||o.$$newScope}),J.$$slots=ca}if(o.template)if(E=!0,ga("template",A,o,G),A=o,u=y(o.template)?o.template(G,c):o.template,u=za(u),o.replace){if(H=o,q=wa(u)?[]:sb(ka(o.templateNamespace,Yd(u))),b=q[0],1!=q.length||b.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p,"");na(g,G,b);var ja={$attr:{}},la=U(b,[],ja),ma=a.splice(O+1,a.length-(O+1));(z||w)&&aa(la,z,w),a=a.concat(la).concat(ma),da(c,ja),P=a.length}else G.html(u);if(o.templateUrl)E=!0,ga("template",A,o,G),A=o,o.replace&&(H=o),n=ea(a.splice(O,a.length-O),G,c,g,D&&J,i,k,{controllerDirectives:x,newScopeDirective:w!==o&&w,newIsolateScopeDirective:z,templateDirective:A,nonTlbTranscludeDirective:C}),P=a.length;else if(o.compile)try{s=o.compile(G,c,J);var sa=o.$$originalDirective||o;y(s)?m(null,R(sa,s),S,T):s&&m(R(sa,s.pre),R(sa,s.post),S,T)}catch(ta){e(ta,Y(G))}o.terminal&&(n.terminal=!0,v=Math.max(v,o.priority))}return n.scope=w&&w.scope===!0,n.transcludeOnThisElement=D,n.templateOnThisElement=E,n.transclude=J,l.hasElementTranscludeDirective=F,n}function $(a,b,c,e){var f;if(v(b)){var g=b.match(x),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(f=e&&e[h],f=f&&f.instance),!f){var k="$"+h+"Controller";f=i?c.inheritedData(k):c.data(k)}if(!f&&!j)throw Te("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Wd(b)){f=[];for(var l=0,m=b.length;m>l;l++)f[l]=$(a,b[l],c,e)}else t(b)&&(f={},d(b,function(b,d){f[d]=$(a,b,c,e)}));return f||null}function _(a,b,c,d,e,f,g){var h=oa();for(var j in d){var k=d[j],l={$scope:k===g||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);var n=i(m,l,!0,k.controllerAs);h[k.name]=n,a.data("$"+k.name+"Controller",n.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=m(a[d],{$$isolateScope:b,$$newScope:c})}function ba(a,c,d,f,h,i,j){if(c===h)return null;var n=null;if(k.hasOwnProperty(c))for(var o,p=b.get(c+l),q=0,s=p.length;s>q;q++)try{if(o=p[q],(r(f)||f>o.priority)&&-1!=o.restrict.indexOf(d)){if(i&&(o=m(o,{$$start:i,$$end:j})),!o.$$bindings){var u=o.$$bindings=g(o,o.name);t(u.isolateScope)&&(o.$$isolateBindings=u.isolateScope)}a.push(o),n=o}}catch(v){e(v)}return n}function ca(a){if(k.hasOwnProperty(a))for(var c,d=b.get(a+l),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function da(a,b){var c=b.$attr,e=a.$attr;a.$$element;d(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),d(b,function(b,d){a.hasOwnProperty(d)||"$"===d.charAt(0)||(a[d]=b,"class"!==d&&"style"!==d&&(e[d]=c[d]))})}function ea(a,b,c,e,g,h,i,j){var k,l,n=[],o=b[0],p=a.shift(),q=m(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=y(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),f(r).then(function(f){var m,u,v,w;if(f=za(f),p.replace){if(v=wa(f)?[]:sb(ka(s,Yd(f))),m=v[0],1!=v.length||m.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);u={$attr:{}},na(e,b,m);var x=U(m,[],u);t(p.scope)&&aa(x,!0),a=x.concat(a),da(c,u)}else m=o,b.html(f);for(a.unshift(q),k=Z(a,m,c,g,b,p,h,i,j),d(e,function(a,c){a==m&&(e[c]=b[0])}),l=S(b[0].childNodes,g);n.length;){var y=n.shift(),z=n.shift(),A=n.shift(),B=n.shift(),C=b[0];if(!y.$$destroyed){if(z!==o){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(m)),na(A,Ld(z),C),K(Ld(C),D)}w=k.transcludeOnThisElement?T(y,k.transclude,B):B,k(l,y,C,e,w)}}n=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(n?n.push(b,c,d,f):(k.transcludeOnThisElement&&(f=T(b,k.transclude,e)),k(l,b,c,d,f)))}}function fa(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function la(a,b){if("srcdoc"==b)return A.HTML;var c=L(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?A.RESOURCE_URL:void 0}function ma(a,b,d,e,f){var g=la(a,e);f=w[e]||f;var h=c(d,!0,g,f);if(h){if("multiple"===e&&"select"===L(a))throw Te("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=oa());if(z.test(e))throw Te("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==d&&(h=k&&c(k,!0,g,f),d=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function na(b,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(b)for(e=0,f=b.length;f>e;e++)if(b[e]==g){b[e++]=d;for(var j=e,k=j+h-1,l=b.length;l>j;j++,k++)l>k?b[j]=b[k]:delete b[j];b.length-=h-1,b.context===g&&(b.context=d);break}i&&i.replaceChild(d,g);var m=a.document.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Ld.hasData(g)&&(Ld.data(d,Ld.data(g)),Ld(g).off("$destroy")),Ld.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function pa(a,b){return j(function(){return a.apply(null,arguments)},a,b)}function qa(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,Y(c))}}function ra(a,b,e,f,g){function i(b,c,d){y(e.$onChanges)&&c!==d&&(sa||(a.$$postDigest(H),sa=[]),k||(k={},sa.push(j)),k[b]&&(d=k[b].previousValue),k[b]=new pb(d,c))}function j(){e.$onChanges(k),k=void 0}var k,l=[],m={};return d(f,function(d,f){var j,k,o,p,q,r=d.attrName,s=d.optional,t=d.mode;switch(t){case"@":s||Fd.call(b,r)||(e[f]=b[r]=void 0),b.$observe(r,function(a){if(v(a)||F(a)){var b=e[f];i(f,a,b),e[f]=a}}),b.$$observers[r].$$scope=a,j=b[r],v(j)?e[f]=c(j)(a):F(j)&&(e[f]=j),m[f]=new pb(Ue,e[f]);break;case"=":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]),p=k.literal?O:function(a,b){return a===b||a!==a&&b!==b},o=k.assign||function(){throw j=e[f]=k(a),Te("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[r],r,g.name)},j=e[f]=k(a);var u=function(b){return p(b,e[f])||(p(b,j)?o(a,b=e[f]):e[f]=b),j=b};u.$stateful=!0,q=d.collection?a.$watchCollection(b[r],u):a.$watch(h(b[r],u),null,k.literal),l.push(q);break;case"<":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]);var w=e[f]=k(a);m[f]=new pb(Ue,e[f]),q=a.$watch(k,function(a,b){if(b===a){if(b===w)return;b=w}i(f,a,b),e[f]=a},k.literal),l.push(q);break;case"&":if(k=b.hasOwnProperty(r)?h(b[r]):n,k===n&&s)break;e[f]=function(b){return k(a,b)}}}),{initialChanges:m,removeWatches:l.length&&function(){for(var a=0,b=l.length;b>a;++a)l[a]()}}}var sa,ta=/^\w/,ua=a.document.createElement("div"),va=D;I.prototype={$normalize:qb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=rb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=rb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,f){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),f=i):j&&(this[j]=b,k=j),this[a]=b,f?this.$attr[a]=f:(f=this.$attr[a],f||(this.$attr[a]=f=ha(a,"-"))),g=L(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=G(b,"src"===a);else if("img"===g&&"srcset"===a&&s(b)){for(var l="",m=Yd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),t=0;q>t;t++){var u=2*t;l+=G(Yd(p[u]),!0),l+=" "+Yd(p[u+1])}var v=Yd(p[2*t]).split(/\s/);l+=G(Yd(v[0]),!0),2===v.length&&(l+=" "+Yd(v[1])),this[a]=b=l}c!==!1&&(null===b||r(b)?this.$$element.removeAttr(f):ta.test(f)?this.$$element.attr(f,b):J(this.$$element[0],f,b));var w=this.$$observers;w&&d(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=oa()),e=d[a]||(d[a]=[]);return e.push(b),p.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||r(c[a])||b(c[a])}),function(){M(e,b)}}};var xa=c.startSymbol(),ya=c.endSymbol(),za="{{"==xa&&"}}"==ya?o:function(a){return a.replace(/\{\{/g,xa).replace(/}}/g,ya)},Aa=/^ngAttr[A-Z]/,Ba=/^(.+)Start$/;return N.$$addBindingInfo=C?function(a,b){var c=a.data("$binding")||[];Wd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:n,N.$$addBindingClass=C?function(a){K(a,"ng-binding")}:n,N.$$addScopeInfo=C?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:n,N.$$addScopeClass=C?function(a,b){K(a,b?"ng-isolate-scope":"ng-scope")}:n,N.$$createComment=function(b,c){var d="";return C&&(d=" "+(b||"")+": ",c&&(d+=c+" ")),a.document.createComment(d)},N}]}function pb(a,b){this.previousValue=a,this.currentValue=b}function qb(a){return va(a.replace(Ve,""))}function rb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function sb(a){a=Ld(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===he&&Pd.call(a,b,1)}return a}function tb(a,b){if(b&&v(b))return b;if(v(a)){var c=Xe.exec(a);if(c)return c[3]}}function ub(){var a={},c=!1;this.has=function(b){return a.hasOwnProperty(b)},this.register=function(b,c){la(b,"controller"),t(b)?j(a,b):a[b]=c},this.allowGlobals=function(){c=!0},this.$get=["$injector","$window",function(d,e){function f(a,c,d,e){if(!a||!t(a.$scope))throw b("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,c);a.$scope[c]=d}return function(b,g,h,i){var k,l,m,n;if(h=h===!0,i&&v(i)&&(n=i),v(b)){if(l=b.match(Xe),!l)throw We("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",b);m=l[1],n=n||l[3],b=a.hasOwnProperty(m)?a[m]:ma(g.$scope,m,!0)||(c?ma(e,m,!0):void 0),ka(b,m,!0)}if(h){var o=(Wd(b)?b[b.length-1]:b).prototype;k=Object.create(o||null),n&&f(g,n,k,m||b.name);var p;return p=j(function(){var a=d.invoke(b,k,g,m);return a!==k&&(t(a)||y(a))&&(k=a,n&&f(g,n,k,m||b.name)),k},{instance:k,identifier:n})}return k=d.instantiate(b,g,m),n&&f(g,n,k,m||b.name),k}}]}function vb(){this.$get=["$window",function(a){return Ld(a.document)}]}function wb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function xb(a){return t(a)?x(a)?a.toISOString():T(a):a}function yb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return e(a,function(a,c){null===a||r(a)||(Wd(a)?d(a,function(a){b.push(ba(c)+"="+ba(xb(a)))}):b.push(ba(c)+"="+ba(xb(a))))}),b.join("&")}}}function zb(){this.$get=function(){return function(a){function b(a,f,g){null===a||r(a)||(Wd(a)?d(a,function(a,c){b(a,f+"["+(t(a)?c:"")+"]")}):t(a)&&!x(a)?e(a,function(a,c){b(a,f+(g?"":"[")+c+(g?"":"]"))}):c.push(ba(f)+"="+ba(xb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function Ab(a,b){if(v(a)){var c=a.replace(bf,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ze)||Bb(c))&&(a=U(c))}}return a}function Bb(a){var b=a.match(_e);return b&&af[b[0]].test(a)}function Cb(a){function b(a,b){a&&(e[a]=e[a]?e[a]+", "+b:b)}var c,e=oa();return v(a)?d(a.split("\n"),function(a){c=a.indexOf(":"),b(Gd(Yd(a.substr(0,c))),Yd(a.substr(c+1)))}):t(a)&&d(a,function(a,c){b(Gd(c),Yd(a))}),e}function Db(a){var b;return function(c){if(b||(b=Cb(a)),c){var d=b[Gd(c)];return void 0===d&&(d=null),d}return b}}function Eb(a,b,c,e){return y(e)?e(a,b,c):(d(e,function(d){a=d(a,b,c)}),a)}function Fb(a){return a>=200&&300>a}function Gb(){var a=this.defaults={transformResponse:[Ab],transformRequest:[function(a){return!t(a)||C(a)||E(a)||D(a)?a:T(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:qa($e),put:qa($e),patch:qa($e)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},c=!1;this.useApplyAsync=function(a){return s(a)?(c=!!a,this):c};var e=!0;this.useLegacyPromiseExtensions=function(a){return s(a)?(e=!!a,this):e};var f=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(g,h,i,k,l,m){function n(c){function f(a){var b=j({},a);return b.data=Eb(a.data,a.headers,a.status,i.transformResponse),Fb(a.status)?b:l.reject(b)}function g(a,b){var c,e={};return d(a,function(a,d){y(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a}),e}function h(b){var c,d,e,f=a.headers,h=j({},b.headers);f=j({},f.common,f[Gd(b.method)]);a:for(c in f){d=Gd(c);for(e in h)if(Gd(e)===d)continue a;h[c]=f[c]}return g(h,qa(b))}if(!t(c))throw b("$http")("badreq","Http request configuration must be an object. Received: {0}",c);if(!v(c.url))throw b("$http")("badreq","Http request configuration url must be a string. Received: {0}",c.url);var i=j({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},c);i.headers=h(c),i.method=Hd(i.method),i.paramSerializer=v(i.paramSerializer)?m.get(i.paramSerializer):i.paramSerializer;var k=function(b){var c=b.headers,e=Eb(b.data,Db(c),void 0,b.transformRequest);return r(e)&&d(c,function(a,b){"content-type"===Gd(b)&&delete c[b]}),r(b.withCredentials)&&!r(a.withCredentials)&&(b.withCredentials=a.withCredentials),q(b,e).then(f,f)},n=[k,void 0],o=l.when(i);for(d(x,function(a){(a.request||a.requestError)&&n.unshift(a.request,a.requestError),(a.response||a.responseError)&&n.push(a.response,a.responseError)});n.length;){var p=n.shift(),s=n.shift();o=o.then(p,s)}return e?(o.success=function(a){return ka(a,"fn"),o.then(function(b){a(b.data,b.status,b.headers,i)}),o},o.error=function(a){return ka(a,"fn"),o.then(null,function(b){a(b.data,b.status,b.headers,i)}),o}):(o.success=df("success"),o.error=df("error")),o}function o(a){d(arguments,function(a){n[a]=function(b,c){return n(j({},c||{},{method:a,url:b}))}})}function p(a){d(arguments,function(a){n[a]=function(b,c,d){return n(j({},d||{},{method:a,url:b,data:c}))}})}function q(b,e){function f(a){if(a){var b={};return d(a,function(a,d){b[d]=function(b){function d(){a(b)}c?k.$applyAsync(d):k.$$phase?d():k.$apply(d)}}),b}}function i(a,b,d,e){function f(){j(b,a,d,e)}p&&(Fb(a)?p.put(z,[a,b,Cb(d),e]):p.remove(z)),c?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function j(a,c,d,e){c=c>=-1?c:0,(Fb(c)?v.resolve:v.reject)({data:a,status:c,headers:Db(d),config:b,statusText:e})}function m(a){j(a.data,a.status,qa(a.headers()),a.statusText)}function o(){var a=n.pendingRequests.indexOf(b);-1!==a&&n.pendingRequests.splice(a,1)}var p,q,v=l.defer(),x=v.promise,y=b.headers,z=u(b.url,b.paramSerializer(b.params));if(n.pendingRequests.push(b),x.then(o,o),!b.cache&&!a.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(p=t(b.cache)?b.cache:t(a.cache)?a.cache:w),p&&(q=p.get(z),s(q)?G(q)?q.then(m,m):Wd(q)?j(q[1],q[0],qa(q[2]),q[3]):j(q,200,{},"OK"):p.put(z,x)),r(q)){var A=Ic(b.url)?h()[b.xsrfCookieName||a.xsrfCookieName]:void 0;A&&(y[b.xsrfHeaderName||a.xsrfHeaderName]=A),g(b.method,z,e,i,y,b.timeout,b.withCredentials,b.responseType,f(b.eventHandlers),f(b.uploadEventHandlers))}return x}function u(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=i("$http");a.paramSerializer=v(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var x=[];return d(f,function(a){x.unshift(v(a)?m.get(a):m.invoke(a))}),n.pendingRequests=[],o("get","delete","head","jsonp"),p("post","put","patch"),n.defaults=a,n}]}function Hb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Ib(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Jb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Jb(a,b,c,e,f){function g(a,b,c){var d=f.createElement("script"),g=null;return d.type="text/javascript",d.src=a,d.async=!0,g=function(a){oe(d,"load",g),oe(d,"error",g),f.body.removeChild(d),d=null;var h=-1,i="unknown";a&&("load"!==a.type||e[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ne(d,"load",g),ne(d,"error",g),f.body.appendChild(d),g}return function(f,h,i,j,k,l,m,o,p,q){function t(){w&&w(),x&&x.abort()}function u(b,d,e,f,g){s(A)&&c.cancel(A),w=x=null,b(d,e,f,g),a.$$completeOutstandingRequest(n)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Gd(f)){var v="_"+(e.counter++).toString(36);e[v]=function(a){e[v].data=a,e[v].called=!0};var w=g(h.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(a,b){u(j,a,e[v].data,"",b),e[v]=n})}else{var x=b(f,h);x.open(f,h,!0),d(k,function(a,b){s(a)&&x.setRequestHeader(b,a)}),x.onload=function(){var a=x.statusText||"",b="response"in x?x.response:x.responseText,c=1223===x.status?204:x.status;0===c&&(c=b?200:"file"==Hc(h).protocol?404:0),u(j,c,b,x.getAllResponseHeaders(),a)};var y=function(){u(j,-1,null,null,"")};if(x.onerror=y,x.onabort=y,d(p,function(a,b){x.addEventListener(b,a)}),d(q,function(a,b){x.upload.addEventListener(b,a)}),m&&(x.withCredentials=!0),o)try{x.responseType=o}catch(z){if("json"!==o)throw z}x.send(r(i)?null:i)}if(l>0)var A=c(t,l);else G(l)&&l.then(t)}}function Kb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=T(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function k(f,k,n,o){function q(a){try{return a=G(a),o&&!s(a)?a:h(a)}catch(b){d(ef.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var t;if(!k){var u=g(f);t=p(u),t.exp=f,t.expressions=[],t.$$watchDelegate=i}return t}o=!!o;for(var v,w,x,z=0,A=[],B=[],C=f.length,D=[],E=[];C>z;){if(-1==(v=f.indexOf(a,z))||-1==(w=f.indexOf(b,v+l))){z!==C&&D.push(g(f.substring(z)));break}z!==v&&D.push(g(f.substring(z,v))),x=f.substring(v+l,w),A.push(x),B.push(c(x,q)),z=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&ef.throwNoconcat(f),!k||A.length){var F=function(a){for(var b=0,c=A.length;c>b;b++){if(o&&r(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return j(function(a){var b=0,c=A.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(ef.interr(f,g))}},{exp:f,expressions:A,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);y(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return k.startSymbol=function(){return a},k.endSymbol=function(){return b},k}]}function Lb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?Q(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=s(j)&&!j,r=(q?d:c).defer(),t=r.promise;return i=s(i)?i:0,t.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(t.$$intervalId),delete g[t.$$intervalId]),q||a.$apply()},h),g[t.$$intervalId]=r,t}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Mb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=aa(b[c]);return b.join("/")}function Nb(a,b){var c=Hc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=l(c.port)||gf[c.protocol]||null}function Ob(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Hc(a); +b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=$(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Pb(a,b){return 0===a.lastIndexOf(b,0)}function Qb(a,b){return Pb(b,a)?b.substr(a.length):void 0}function Rb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Sb(a){return a.replace(/(#.+)|#$/,"$1")}function Tb(a){return a.substr(0,Rb(a).lastIndexOf("/")+1)}function Ub(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Vb(a,b,c){this.$$html5=!0,c=c||"",Nb(a,this),this.$$parse=function(a){var c=Qb(b,a);if(!v(c))throw hf("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Ob(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=_(this.$$search),c=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return s(f=Qb(a,d))?(g=f,h=s(f=Qb(c,f))?b+(Qb("/",f)||f):a+g):s(f=Qb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Wb(a,b,c){Nb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return Pb(b,c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Qb(a,d)||Qb(b,d);r(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",r(g)&&(a=d,this.replace())):(f=Qb(c,g),r(f)&&(f=g)),Ob(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Rb(a)==Rb(b)?(this.$$parse(b),!0):!1}}function Xb(a,b,c){this.$$html5=!0,Wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Rb(d)?f=d:(g=Qb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Yb(a){return function(){return this[a]}}function Zb(a,b){return function(c){return r(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function $b(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return s(b)?(a=b,this):a},this.html5Mode=function(a){return F(a)?(b.enabled=a,this):t(a)?(F(a.enabled)&&(b.enabled=a.enabled),F(a.requireBase)&&(b.requireBase=a.requireBase),F(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw hf("nobase","$location in HTML5 mode requires a tag to be present!");l=Ub(n)+(m||"/"),k=e.history?Vb:Xb}else l=Rb(n),k=Wb;var o=Tb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Ld(a.target);"a"!==L(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");t(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Hc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Sb(j.absUrl())!=Sb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return r(Qb(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Sb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Sb(d.url()),b=Sb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function _b(){var a=!0,b=this;this.debugEnabled=function(b){return s(b)?(a=b,this):a},this.$get=["$window",function(c){function e(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function f(a){var b=c.console||{},f=b[a]||b.log||n,g=!1;try{g=!!f.apply}catch(h){}return g?function(){var a=[];return d(arguments,function(b){a.push(e(b))}),f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function ac(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw kf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function bc(a){return a+""}function cc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw kf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw kf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw kf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function dc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===lf||a===mf||a===nf)throw kf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function ec(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw kf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function fc(a,b){return"undefined"!=typeof a?a:b}function gc(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function hc(a,b){var c=a(b);return!c.$stateful}function ic(a,b){var c,e;switch(a.type){case rf.Program:c=!0,d(a.body,function(a){ic(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case rf.Literal:a.constant=!0,a.toWatch=[];break;case rf.UnaryExpression:ic(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case rf.BinaryExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case rf.LogicalExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case rf.ConditionalExpression:ic(a.test,b),ic(a.alternate,b),ic(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case rf.Identifier:a.constant=!1,a.toWatch=[a];break;case rf.MemberExpression:ic(a.object,b),a.computed&&ic(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case rf.CallExpression:c=a.filter?hc(b,a.callee.name):!1,e=[],d(a.arguments,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&hc(b,a.callee.name)?e:[a];break;case rf.AssignmentExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case rf.ArrayExpression:c=!0,e=[],d(a.elements,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ObjectExpression:c=!0,e=[],d(a.properties,function(a){ic(a.value,b),c=c&&a.value.constant&&!a.computed,a.value.constant||e.push.apply(e,a.value.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ThisExpression:a.constant=!1,a.toWatch=[];break;case rf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function jc(a){if(1==a.length){var b=a[0].expression,c=b.toWatch;return 1!==c.length?c:c[0]!==b?c:void 0}}function kc(a){return a.type===rf.Identifier||a.type===rf.MemberExpression}function lc(a){return 1===a.body.length&&kc(a.body[0].expression)?{type:rf.AssignmentExpression,left:a.body[0].expression,right:{type:rf.NGValueParameter},operator:"="}:void 0}function mc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===rf.Literal||a.body[0].expression.type===rf.ArrayExpression||a.body[0].expression.type===rf.ObjectExpression)}function nc(a){return a.constant}function oc(a,b){this.astBuilder=a,this.$filter=b}function pc(a,b){this.astBuilder=a,this.$filter=b}function qc(a){return"constructor"==a}function rc(a){return y(a.valueOf)?a.valueOf():tf.call(a)}function sc(){var a,b,c=oa(),e=oa(),f={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(a,b){f[a]=b},this.setIdentifierFns=function(c,d){return a=c,b=d,this},this.$get=["$filter",function(g){function h(a,b,d){var f,h,j;switch(d=d||u,typeof a){case"string":a=a.trim(),j=a;var q=d?e:c;if(f=q[j],!f){":"===a.charAt(0)&&":"===a.charAt(1)&&(h=!0,a=a.substring(2));var s=d?t:r,v=new qf(s),w=new sf(v,g,s);f=w.parse(a),f.constant?f.$$watchDelegate=o:h?f.$$watchDelegate=f.literal?m:l:f.inputs&&(f.$$watchDelegate=k),d&&(f=i(f)),q[j]=f}return p(f,b);case"function":return p(a,b);default:return p(n,b)}}function i(a){function b(b,c,d,e){var f=u;u=!0;try{return a(b,c,d,e)}finally{u=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=i(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cl;l++)i[l]=j,k[l]=null;return a.$watch(function(a){for(var b=!1,c=0,e=g.length;e>c;c++){var h=g[c](a);(b||(b=!j(h,i[c])))&&(k[c]=h,i[c]=h&&rc(h))}return b&&(f=d(a,void 0,void 0,k)),f},b,c,e)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,y(b)&&b.apply(this,arguments),s(a)&&d.$$postDigest(function(){s(f)&&e()})},c)}function m(a,b,c,e){function f(a){var b=!0;return d(a,function(a){s(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return e(a)},function(a,c,d){h=a,y(b)&&b.call(this,a,c,d),f(a)&&d.$$postDigest(function(){f(h)&&g()})},c)}function o(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function p(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==m&&c!==l,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return s(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==k?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=k,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var q=$d().noUnsafeEval,r={csp:q,expensiveChecks:!1,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},t={csp:q,expensiveChecks:!0,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},u=!1;return h.$$runningExpensiveChecks=function(){return u},h}]}function tc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vc(function(b){a.$evalAsync(b)},b)}]}function uc(){this.$get=["$browser","$exceptionHandler",function(a,b){return vc(function(b){a.defer(b)},b)}]}function vc(a,c){function e(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function g(a){var b,d,e;e=a.pending,a.processScheduled=!1,a.pending=void 0;for(var f=0,g=e.length;g>f;++f){d=e[f][0],b=e[f][a.status];try{y(b)?d.resolve(b(a.value)):1===a.status?d.resolve(a.value):d.reject(a.value)}catch(h){d.reject(h),c(h)}}}function h(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){g(b)}))}function i(){this.promise=new e}function k(a){var b=new i,c=0,e=Wd(a)?[]:{};return d(a,function(a,d){c++,q(a).then(function(a){e.hasOwnProperty(d)||(e[d]=a,--c||b.resolve(e))},function(a){e.hasOwnProperty(d)||b.reject(a)})}),0===c&&b.resolve(e),b.promise}var l=b("$q",TypeError),m=function(){var a=new i;return a.resolve=f(a,a.resolve),a.reject=f(a,a.reject),a.notify=f(a,a.notify),a};j(e.prototype,{then:function(a,b,c){if(r(a)&&r(b)&&r(c))return this;var d=new i;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&h(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return p(b,!0,a)},function(b){return p(b,!1,a)},b)}}),j(i.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(l("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function b(a){i||(i=!0,g.$$resolve(a))}function d(a){i||(i=!0,g.$$reject(a))}var e,g=this,i=!1;try{(t(a)||y(a))&&(e=a&&a.then),y(e)?(this.promise.$$state.status=-1,e.call(a,b,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,h(this.promise.$$state))}catch(j){d(j),c(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,h(this.promise.$$state)},notify:function(b){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(y(a)?a(b):b)}catch(h){c(h)}}})}});var n=function(a){var b=new i;return b.reject(a),b.promise},o=function(a,b){var c=new i;return b?c.resolve(a):c.reject(a),c.promise},p=function(a,b,c){var d=null;try{y(c)&&(d=c())}catch(e){return o(e,!1)}return G(d)?d.then(function(){return o(a,b)},function(a){return o(a,!1)}):o(a,b)},q=function(a,b,c,d){var e=new i;return e.resolve(a),e.promise.then(b,c,d)},s=q,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!y(a))throw l("norslvr","Expected resolverFn, got '{0}'",a);var d=new i;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=m,u.reject=n,u.when=q,u.resolve=s,u.all=k,u}function wc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function xc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=g(),this.$$ChildScope=null}return b.prototype=a,b}var e=10,f=b("$rootScope"),h=null,i=null;this.digestTtl=function(a){return arguments.length&&(e=a),e},this.$get=["$exceptionHandler","$parse","$browser",function(b,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Kd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=g(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(a){if(z.$$phase)throw f("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function q(){z.$$phase=null}function s(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function v(){}function w(){for(;C.length;)try{C.shift()()}catch(a){b(a)}i=null}function x(){null===i&&(i=k.defer(function(){z.$apply(w)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,g=f.$$watchers,i={fn:b,last:v,get:e,exp:d||a,eq:!!c};return h=null,y(b)||(i.fn=n),g||(g=f.$$watchers=[]),g.unshift(i),s(this,1),function(){M(g,i)>=0&&s(f,-1),h=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(f,f,h)):b(f,e,h)}var e=new Array(a.length),f=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(f,f,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,d){f[0]=a,e[0]=c,b(f,a===c?f:e,d)}):(d(a,function(a,b){var d=h.$watch(a,function(a,d){f[b]=a,e[b]=d,i||(i=!0,h.$evalAsync(c))});g.push(d)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function d(a){f=a;var b,d,e,h,i;if(!r(f)){if(t(f))if(c(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],e=i!==i&&h!==h,e||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(d in f)Fd.call(f,d)&&(b++,h=f[d],i=g[d],d in g?(e=i!==i&&h!==h,e||i===h||(l++,g[d]=h)):(q++,g[d]=h,l++));if(q>b){l++;for(d in g)Fd.call(f,d)||(q--,delete g[d])}}else g!==f&&(g=f,l++);return l}}function e(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(t(f))if(c(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,d),n=[],o={},p=!0,q=0;return this.$watch(m,e)},$digest:function(){var a,c,d,g,j,l,m,n,o,r,s,t,u=e,x=this,C=[];p("$digest"),k.$$checkUrlChange(),this===z&&null!==i&&(k.defer.cancel(i),w()),h=null;do{n=!1,r=x;for(var E=0;Eu&&(s=4-u,C[s]||(C[s]=[]),C[s].push({msg:y(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:c,oldVal:d}))}catch(F){b(F)}if(!(o=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(o=r.$$nextSibling);)r=r.$parent}while(r=o);if((n||A.length)&&!u--)throw q(),f("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,C)}while(n||A.length);for(q();De;e++)if(d[e])try{d[e].apply(null,k)}catch(l){b(l)}else d.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,c){var d=this,e=d,f=d,g={name:a,targetScope:d,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!d.$$listenerCount[a])return g;for(var h,i,j,k=P([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){b(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==d&&e.$$nextSibling))for(;e!==d&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var z=new o,A=z.$$asyncQueue=[],B=z.$$postDigestQueue=[],C=z.$$applyAsyncQueue=[],D=0;return z}]}function yc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return s(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return s(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Hc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function zc(a){if("self"===a)return a;if(v(a)){if(a.indexOf("***")>-1)throw uf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Zd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(z(a))return new RegExp("^"+a.source+"$");throw uf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ac(a){var b=[];return s(a)&&d(a,function(a){b.push(zc(a))}),b}function Bc(){this.SCE_CONTEXTS=vf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=Ac(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=Ac(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Ic(b):!!a.exec(b.href)}function e(c){var e,f,g=Hc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw uf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||r(b)||""===b)return b;if("string"!=typeof b)throw uf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||r(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===vf.RESOURCE_URL){if(e(b))return b;throw uf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===vf.HTML)return j(b);throw uf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw uf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[vf.HTML]=f(k),l[vf.CSS]=f(k),l[vf.URL]=f(k),l[vf.JS]=f(k),l[vf.RESOURCE_URL]=f(l[vf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Cc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Kd)throw uf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var e=qa(vf);e.isEnabled=function(){return a},e.trustAs=c.trustAs,e.getTrusted=c.getTrusted,e.valueOf=c.valueOf,a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=o),e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:b(c,function(b){return e.getTrusted(a,b)})};var f=e.parseAs,g=e.getTrusted,h=e.trustAs;return d(vf,function(a,b){var c=Gd(b);e[va("parse_as_"+c)]=function(b){return f(a,b)},e[va("get_trusted_"+c)]=function(b){return g(a,b)},e[va("trust_as_"+c)]=function(b){return h(a,b)}}),e}]}function Dc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=a.chrome&&a.chrome.app&&a.chrome.app.runtime,g=!f&&a.history&&a.history.pushState,h=l((/android (\d+)/.exec(Gd((a.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((a.navigator||{}).userAgent),j=b[0]||{},k=/^(Moz|webkit|ms)(?=[A-Z])/,m=j.body&&j.body.style,n=!1,o=!1;if(m){for(var p in m)if(d=k.exec(p)){c=d[0],c=c[0].toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in m&&"webkit"),n=!!("transition"in m||c+"Transition"in m),o=!!("animation"in m||c+"Animation"in m),!h||n&&o||(n=v(m.webkitTransition),o=v(m.webkitAnimation))}return{history:!(!g||4>h||i),hasEvent:function(a){if("input"===a&&11>=Kd)return!1;if(r(e[a])){var b=j.createElement("div");e[a]="on"+a in b}return e[a]},csp:$d(),vendorPrefix:c,transitions:n,animations:o,android:h}}]}function Ec(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw wf("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,(!v(g)||r(b.get(g)))&&(g=e.getTrustedResourceUrl(g));var k=c.defaults&&c.defaults.transformResponse;return Wd(k)?k=k.filter(function(a){return a!==Ab}):k===Ab&&(k=null),c.get(g,j({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Fc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var e={};return e.findBindings=function(a,b,c){var e=a.getElementsByClassName("ng-binding"),f=[];return d(e,function(a){var e=Ud.element(a).data("$binding");e&&d(e,function(d){if(c){var e=new RegExp("(^|\\s)"+Zd(b)+"(\\s|\\||$)");e.test(d)&&f.push(a)}else-1!=d.indexOf(b)&&f.push(a)})}),f},e.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),r(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Lc(){this.$get=Kc}function Mc(a){function b(e,f){if(t(e)){var g={};return d(e,function(a,c){g[c]=b(c,a)}),g}return a.factory(e+c,f)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Rc),b("date",ed),b("filter",Nc),b("json",fd),b("limitTo",gd),b("lowercase",Ff),b("number",Sc),b("orderBy",id),b("uppercase",Gf)}function Nc(){return function(a,d,e){if(!c(a)){if(null==a)return a;throw b("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Qc(d);switch(h){case"function":f=d;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Oc(d,e,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Oc(a,b,c){var d,e=t(a)&&"$"in a;return b===!0?b=O:y(b)||(b=function(a,b){return r(a)?!1:null===a||null===b?a===b:t(b)||t(a)&&!q(a)?!1:(a=Gd(""+a),b=Gd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!t(d)?Pc(d,a.$,b,!1):Pc(d,a,b,c)}}function Pc(a,b,c,d,e){var f=Qc(a),g=Qc(b);if("string"===g&&"!"===b.charAt(0))return!Pc(a,b.substring(1),c,d);if(Wd(a))return a.some(function(a){return Pc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Pc(a[h],b,c,!0))return!0;return e?!1:Pc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!y(i)&&!r(i)){var j="$"===h,k=j?a:a[h];if(!Pc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Qc(a){return null===a?"null":typeof a}function Rc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return r(c)&&(c=b.CURRENCY_SYM),r(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Vc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Sc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Vc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Tc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(Af))>-1&&(a=a.replace(Af,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==Bf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==Bf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>zf&&(b=b.splice(0,zf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Uc(a,b,c,d){var e=a.d,f=e.length-a.i;b=r(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0){e.splice(Math.max(a.i,g));for(var i=g;ij;j++)e[j]=0}if(h>=5)if(0>g-1){for(var k=0;k>g;k--)e.unshift(0),a.i++;e.unshift(1),a.i++}else e[g-1]++;for(;fl;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Wc(a,b,c,d){var e="";for((0>a||d&&0>=a)&&(d?a=-a+1:(a=-a, +e="-")),a=""+a;a.length0||g>-c)&&(g+=c),0===g&&-12==c&&(g=12),Wc(g,b,d,e)}}function Yc(a,b,c){return function(d,e){var f=d["get"+a](),g=(c?"STANDALONE":"")+(b?"SHORT":""),h=Hd(g+a);return e[h][f]}}function Zc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Wc(Math[d>0?"floor":"ceil"](d/60),2)+Wc(Math.abs(d%60),2)}function $c(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function _c(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function ad(a){return function(b){var c=$c(b.getFullYear()),d=_c(b),e=+d-+c,f=1+Math.round(e/6048e5);return Wc(f,a)}}function bd(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function cd(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function dd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function ed(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=l(b[9]+b[10]),f=l(b[9]+b[11])),g.call(d,l(b[1]),l(b[2])-1,l(b[3]));var i=l(b[4]||0)-e,j=l(b[5]||0)-f,k=l(b[6]||0),m=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,m),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g,h,i="",j=[];if(e=e||"mediumDate",e=a.DATETIME_FORMATS[e]||e,v(c)&&(c=Ef.test(c)?l(c):b(c)),w(c)&&(c=new Date(c)),!x(c)||!isFinite(c.getTime()))return c;for(;e;)h=Df.exec(e),h?(j=P(j,h,1),e=j.pop()):(j.push(e),e=null);var k=c.getTimezoneOffset();return f&&(k=V(f,k),c=X(c,f,!0)),d(j,function(b){g=Cf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function fd(){return function(a,b){return r(b)&&(b=2),T(a,b)}}function gd(){return function(a,b,d){return b=Math.abs(Number(b))===1/0?Number(b):l(b),isNaN(b)?a:(w(a)&&(a=a.toString()),c(a)?(d=!d||isNaN(d)?0:l(d),d=0>d?Math.max(0,a.length+d):d,b>=0?hd(a,d,d+b):0===d?hd(a,b,a.length):hd(a,Math.max(0,d+b),d)):a)}}function hd(a,b,c){return v(a)?a.slice(b,c):Od.call(a,b,c)}function id(a){function d(b){return b.map(function(b){var c=1,d=o;if(y(b))d=b;else if(v(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(c="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(d=a(b),d.constant))){var e=d();d=function(a){return a[e]}}return{get:d,descending:c}})}function e(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a){return y(a.valueOf)&&(a=a.valueOf(),e(a))?a:q(a)&&(a=a.toString(),e(a))?a:a}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"object"===c&&(a=f(a)),{value:a,type:c,index:b}}function h(a,b){var c=0,d=a.type,e=b.type;if(d===e){var f=a.value,g=b.value;"string"===d?(f=f.toLowerCase(),g=g.toLowerCase()):"object"===d&&(t(f)&&(f=a.index),t(g)&&(g=b.index)),f!==g&&(c=g>f?-1:1)}else c=e>d?-1:1;return c}return function(a,e,f,i){function j(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:l.map(function(c){return g(c.get(a),b)})}}function k(a,b){for(var c=0,d=l.length;d>c;c++){var e=n(a.predicateValues[c],b.predicateValues[c]);if(e)return e*l[c].descending*m}return n(a.tieBreaker,b.tieBreaker)*m}if(null==a)return a;if(!c(a))throw b("orderBy")("notarray","Expected array but received: {0}",a);Wd(e)||(e=[e]),0===e.length&&(e=["+"]);var l=d(e),m=f?-1:1,n=y(i)?i:h,o=Array.prototype.map.call(a,j);return o.sort(k),a=o.map(function(a){return a.value})}}function jd(a){return y(a)&&(a={link:a}),a.restrict=a.restrict||"AC",p(a)}function kd(a,b){a.$name=b}function ld(a,b,c,e,f){var g=this,h=[];g.$error={},g.$$success={},g.$pending=void 0,g.$name=f(b.name||b.ngForm||"")(c),g.$dirty=!1,g.$pristine=!0,g.$valid=!0,g.$invalid=!1,g.$submitted=!1,g.$$parentForm=Jf,g.$rollbackViewValue=function(){d(h,function(a){a.$rollbackViewValue()})},g.$commitViewValue=function(){d(h,function(a){a.$commitViewValue()})},g.$addControl=function(a){la(a.$name,"input"),h.push(a),a.$name&&(g[a.$name]=a),a.$$parentForm=g},g.$$renameControl=function(a,b){var c=a.$name;g[c]===a&&delete g[c],g[b]=a,a.$name=b},g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name],d(g.$pending,function(b,c){g.$setValidity(c,null,a)}),d(g.$error,function(b,c){g.$setValidity(c,null,a)}),d(g.$$success,function(b,c){g.$setValidity(c,null,a)}),M(h,a),a.$$parentForm=Jf},Ad({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(M(d,c),0===d.length&&delete a[b])},$animate:e}),g.$setDirty=function(){e.removeClass(a,tg),e.addClass(a,ug),g.$dirty=!0,g.$pristine=!1,g.$$parentForm.$setDirty()},g.$setPristine=function(){e.setClass(a,tg,ug+" "+Kf),g.$dirty=!1,g.$pristine=!0,g.$submitted=!1,d(h,function(a){a.$setPristine()})},g.$setUntouched=function(){d(h,function(a){a.$setUntouched()})},g.$setSubmitted=function(){e.addClass(a,Kf),g.$submitted=!0,g.$$parentForm.$setSubmitted()}}function md(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function nd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d)}function od(a,b,c,d,e,f){var g=Gd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Yd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Yf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Xf,function(a){if(!i){var b=this[Ed],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,(b.badInput!==c||b.typeMismatch!==d)&&j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function pd(a,b){if(x(a))return a;if(v(a)){Uf.lastIndex=0;var c=Uf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=$c(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function qd(a,b){return function(c,e){var f,g;if(x(c))return c;if(v(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Of.test(c))return new Date(c);if(a.lastIndex=0,f=a.exec(c))return f.shift(),g=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},d(f,function(a,c){c=p},g.$observe("min",function(a){p=m(a),h.$validate()})}if(s(g.max)||g.ngMax){var q;h.$validators.max=function(a){return!l(a)||r(q)||c(a)<=q},g.$observe("max",function(a){q=m(a),h.$validate()})}}}function sd(a,b,c,d){var e=b[0],f=d.$$hasNativeValidators=t(e.validity);f&&d.$parsers.push(function(a){var c=b.prop(Ed)||{};return c.badInput||c.typeMismatch?void 0:a})}function td(a,b,c,d,e,f){if(sd(a,b,c,d),od(a,b,c,d,e,f),d.$$parserName="number",d.$parsers.push(function(a){return d.$isEmpty(a)?null:Rf.test(a)?parseFloat(a):void 0}),d.$formatters.push(function(a){if(!d.$isEmpty(a)){if(!w(a))throw Ag("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),s(c.min)||c.ngMin){var g;d.$validators.min=function(a){return d.$isEmpty(a)||r(g)||a>=g},c.$observe("min",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),g=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}if(s(c.max)||c.ngMax){var h;d.$validators.max=function(a){return d.$isEmpty(a)||r(h)||h>=a},c.$observe("max",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),h=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}}function ud(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Pf.test(c)}}function vd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Qf.test(c)}}function wd(a,b,c,d){r(c.name)&&b.attr("name",g());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function xd(a,b,c,d,e){var f;if(s(d)){if(f=a(d),!f.constant)throw Ag("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function yd(a,b,c,d,e,f,g,h){var i=xd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=xd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return O(a,i)}),d.$parsers.push(function(a){return a?i:j})}function zd(a,b){return a="ngClass"+a,["$animate",function(c){function e(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&e.push(a))}),h.data("$classCounts",c),e.join(" ")}function m(a,b){var d=e(b,a),f=e(a,b);d=l(d,1),f=l(f,-1),d&&d.length&&c.addClass(h,d),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||(1&g.$index)===b){var c=f(a||[]);if(o){if(!O(a,o)){var d=f(o);m(d,c)}}else j(c)}o=Wd(a)?a.map(function(a){return qa(a)}):qa(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var e=1&c;if(e!==(1&d)){var h=f(g.$eval(i[a]));e===b?j(h):k(h)}})}}}]}function Ad(a){function b(a,b,h){r(b)?c("$pending",a,h):d("$pending",a,h),F(b)?b?(k(g.$error,a,h),j(g.$$success,a,h)):(j(g.$error,a,h),k(g.$$success,a,h)):(k(g.$error,a,h),k(g.$$success,a,h)),g.$pending?(e(xg,!0),g.$valid=g.$invalid=void 0,f("",null)):(e(xg,!1),g.$valid=Bd(g.$error),g.$invalid=!g.$valid,f("",g.$valid));var i;i=g.$pending&&g.$pending[a]?void 0:g.$error[a]?!1:g.$$success[a]?!0:null,f(a,i),g.$$parentForm.$setValidity(a,i,g)}function c(a,b,c){g[a]||(g[a]={}),j(g[a],b,c)}function d(a,b,c){g[a]&&k(g[a],b,c),Bd(g[a])&&(g[a]=void 0)}function e(a,b){b&&!i[a]?(l.addClass(h,a),i[a]=!0):!b&&i[a]&&(l.removeClass(h,a),i[a]=!1)}function f(a,b){a=a?"-"+ha(a,"-"):"",e(rg+a,b===!0),e(sg+a,b===!1)}var g=a.ctrl,h=a.$element,i={},j=a.set,k=a.unset,l=a.$animate;i[sg]=!(i[rg]=h.hasClass(rg)),g.$setValidity=b}function Bd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Cd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Dd=/^\/(.+)\/([a-z]*)$/,Ed="validity",Fd=Object.prototype.hasOwnProperty,Gd=function(a){return v(a)?a.toLowerCase():a},Hd=function(a){return v(a)?a.toUpperCase():a},Id=function(a){return v(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Jd=function(a){return v(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Gd=Id,Hd=Jd);var Kd,Ld,Md,Nd,Od=[].slice,Pd=[].splice,Qd=[].push,Rd=Object.prototype.toString,Sd=Object.getPrototypeOf,Td=b("ng"),Ud=a.angular||(a.angular={}),Vd=0;Kd=a.document.documentMode,n.$inject=[],o.$inject=[];var Wd=Array.isArray,Xd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Yd=function(a){return v(a)?a.trim():a},Zd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=be[c],b=a.document.querySelector("["+d.replace(":","\\:")+"jq]")){e=b.getAttribute(d+"jq");break}return _d.name_=e},ae=/:/g,be=["ng-","data-ng-","ng:","x-ng-"],ce=/[A-Z]/g,de=!1,ee=1,fe=2,ge=3,he=8,ie=9,je=11,ke={full:"1.5.7",major:1,minor:5,dot:7,codeName:"hexagonal-circumvolution"};Da.expando="ng339";var le=Da.cache={},me=1,ne=function(a,b,c){a.addEventListener(b,c,!1)},oe=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var pe=/([\:\-\_]+(.))/g,qe=/^moz([A-Z])/,re={mouseleave:"mouseout",mouseenter:"mouseover"},se=b("jqLite"),te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ue=/<|&#?\w+;/,ve=/<([\w:-]+)/,we=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,xe={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td;var ye=a.Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ze=Da.prototype={ready:function(b){function c(){d||(d=!0,b())}var d=!1;"complete"===a.document.readyState?a.setTimeout(c):(this.on("DOMContentLoaded",c),Da(a).on("load",c))},toString:function(){var a=[];return d(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Ld(a>=0?this[a]:this[this.length+a])},length:0,push:Qd,sort:[].sort,splice:[].splice},Ae={};d("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){Ae[Gd(a)]=a});var Be={};d("input,select,option,textarea,button,form,details".split(","),function(a){Be[a]=!0});var Ce={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};d({data:Ja,removeData:Ha,hasData:ya,cleanData:za},function(a,b){Da[b]=a}),d({data:Ja,inheritedData:Pa,scope:function(a){return Ld.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Ld.data(a,"$isolateScope")||Ld.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){return b=va(b),s(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,c){var d=a.nodeType;if(d!==ge&&d!==fe&&d!==he){var e=Gd(b);if(Ae[e]){if(!s(c))return a[b]||(a.attributes.getNamedItem(b)||n).specified?e:void 0;c?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(s(c))a.setAttribute(b,c);else if(a.getAttribute){var f=a.getAttribute(b,2);return null===f?void 0:f}}},prop:function(a,b,c){return s(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(r(b)){var c=a.nodeType;return c===ee||c===ge?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(r(b)){if(a.multiple&&"select"===L(a)){var c=[];return d(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return r(b)?a.innerHTML:(Fa(a,!0),void(a.innerHTML=b))},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&r(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(t(b)){for(d=0;f>d;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=r(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),d({removeData:Ha,on:function(a,b,c,d){if(s(d))throw se("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xa(a)){var e=Ia(a,!0),f=e.events,g=e.handle;g||(g=e.handle=Va(a,f));for(var h=b.indexOf(" ")>=0?b.split(" "):[b],i=h.length,j=function(b,d,e){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=d,"$destroy"===b||e||ne(a,b,g)),h.push(c)};i--;)b=h[i],re[b]?(j(re[b],Xa),j(b,void 0,!0)):j(b)}},off:Ga,one:function(a,b,c){a=Ld(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,e=a.parentNode;Fa(a),d(new Da(b),function(b){c?e.insertBefore(b,c.nextSibling):e.replaceChild(b,a),c=b})},children:function(a){var b=[];return d(a.childNodes,function(a){a.nodeType===ee&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===ee||c===je){b=new Da(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===ee){var c=a.firstChild;d(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Ld(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&d(b.split(" "),function(b){var d=c;r(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==je?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var e,f,g,h=b.type||b,i=Ia(a),k=i&&i.events,l=k&&k[h];l&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:n,type:h,target:a},b.type&&(e=j(e,b)),f=qa(l),g=c?[e].concat(c):[e],d(f,function(b){e.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)r(e)?(e=a(this[f],b,c,d),s(e)&&(e=Ld(e))):Na(e,a(this[f],b,c,d));return s(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var De=[function(){this.$get=[function(){return $a}]}],Ee=/^([^\(]+?)=>/,Fe=/^[^\(]*\(\s*([^\)]*)\)/m,Ge=/,/,He=/^\s*(_?)(\S+?)\1\s*$/,Ie=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Je=b("$injector");db.$$annotate=cb;var Ke=b("$animate"),Le=1,Me="ng-animate",Ne=function(){this.$get=n},Oe=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,e){function f(a,b,c){var e=!1;return b&&(b=v(b)?b.split(" "):Wd(b)?b:[],d(b,function(b){b&&(e=!0,a[b]=c)})),e}function g(){d(b,function(b){var c=a.get(b);if(c){var e=hb(b.attr("class")),f="",g="";d(c,function(a,b){var c=!!e[b];a!==c&&(a?f+=(f.length?" ":"")+b:g+=(g.length?" ":"")+b)}),d(b,function(a){f&&Ma(a,f),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,d,h){var i=a.get(c)||{},j=f(i,d,!0),k=f(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&e.$$postDigest(g))}return{enabled:n,on:n,off:n,pin:n,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Pe=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Ke("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Me+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw Ke("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Me)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=gb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",ib(f))},move:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",ib(f))},leave:function(b,c){return a.push(b,"leave",ib(c),function(){b.remove()})},addClass:function(b,c,d){return d=ib(d),d.addClass=fb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=ib(d),d.removeClass=fb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=ib(e),e.addClass=fb(e.addClass,c),e.removeClass=fb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=ib(f),f.from=f.from?j(f.from,c):c,f.to=f.to?j(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=fb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Qe=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){of[a]=!0});var pf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},qf=function(a){this.options=a};qf.prototype={constructor:qf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var c=a.charCodeAt(0),d=b.charCodeAt(0);return c>=55296&&56319>=c&&d>=56320&&57343>=d?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw kf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:rf.Program,body:a}},expressionStatement:function(){return{type:rf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:rf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:rf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:rf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:rf.LogicalExpression,operator:"&&", +left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:rf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=N(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:rf.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:rf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:rf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:rf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:rf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.filterChain());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:rf.Identifier,name:a.text}},constant:function(){return{type:rf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:rf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:rf.Property,kind:"init"},this.peek().constant?(a.key=this.constant(),a.computed=!1,this.consume(":"),a.value=this.expression()):this.peek().identifier?(a.key=this.identifier(),a.computed=!1,this.peek(":")?(this.consume(":"),a.value=this.expression()):a.value=a.key):this.peek("[")?(this.consume("["),a.key=this.expression(),this.consume("]"),a.computed=!0,this.consume(":"),a.value=this.expression()):this.throwError("invalid key",this.peek()),b.push(a)}while(this.expect(","));return this.consume("}"),{type:rf.ObjectExpression,properties:b}},throwError:function(a,b){throw kf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},selfReferential:{"this":{type:rf.ThisExpression},$locals:{type:rf.LocalsExpression}}},oc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ic(e,c.$filter);var f,g="";if(this.stage="assign",f=lc(e)){this.state.computing="assign";var h=this.nextId();this.recurse(f,h),this.return_(h),g="fn.assign="+this.generateFunction("assign","s,v,l")}var i=jc(e.body);c.stage="inputs",d(i,function(a,b){var d="fn"+b;c.state[d]={vars:[],body:[],own:{}},c.state.computing=d;var e=c.nextId();c.recurse(a,e),c.return_(e),c.state.inputs.push(d),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var j='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+g+this.watchFns()+"return fn;",k=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",j)(this.$filter,ac,cc,dc,bc,ec,fc,gc,a);return this.state=this.stage=void 0,k.literal=mc(e),k.constant=nc(e),k},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return d(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return d(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,c,e,f,g){var h,i,j,k,l,m=this;if(e=e||n,!g&&s(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,c,e,f,!0));switch(a.type){case rf.Program:d(a.body,function(b,c){m.recurse(b.expression,void 0,void 0,function(a){i=a}),c!==a.body.length-1?m.current().body.push(i,";"):m.return_(i)});break;case rf.Literal:k=this.escape(a.value),this.assign(b,k),e(k);break;case rf.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){i=a}),k=a.operator+"("+this.ifDefined(i,0)+")",this.assign(b,k),e(k);break;case rf.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){h=a}),this.recurse(a.right,void 0,void 0,function(a){i=a}),k="+"===a.operator?this.plus(h,i):"-"===a.operator?this.ifDefined(h,0)+a.operator+this.ifDefined(i,0):"("+h+")"+a.operator+"("+i+")",this.assign(b,k),e(k);break;case rf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case rf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case rf.Identifier:b=b||this.nextId(),c&&(c.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),c.computed=!1,c.name=a.name),ac(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){f&&1!==f&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||qc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case rf.MemberExpression:h=c&&(c.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,h,void 0,function(){m.if_(m.notNull(h),function(){f&&1!==f&&m.addEnsureSafeAssignContext(h),a.computed?(i=m.nextId(),m.recurse(a.property,i),m.getStringValue(i),m.addEnsureSafeMemberName(i),f&&1!==f&&m.if_(m.not(m.computedMember(h,i)),m.lazyAssign(m.computedMember(h,i),"{}")),k=m.ensureSafeObject(m.computedMember(h,i)),m.assign(b,k),c&&(c.computed=!0,c.name=i)):(ac(a.property.name),f&&1!==f&&m.if_(m.not(m.nonComputedMember(h,a.property.name)),m.lazyAssign(m.nonComputedMember(h,a.property.name),"{}")),k=m.nonComputedMember(h,a.property.name),(m.state.expensiveChecks||qc(a.property.name))&&(k=m.ensureSafeObject(k)),m.assign(b,k),c&&(c.computed=!1,c.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!f);break;case rf.CallExpression:b=b||this.nextId(),a.filter?(i=m.filter(a.callee.name),j=[],d(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),j.push(b)}),k=i+"("+j.join(",")+")",m.assign(b,k),e(b)):(i=m.nextId(),h={},j=[],m.recurse(a.callee,i,h,function(){m.if_(m.notNull(i),function(){m.addEnsureSafeFunction(i),d(a.arguments,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(m.ensureSafeObject(a))})}),h.name?(m.state.expensiveChecks||m.addEnsureSafeObject(h.context),k=m.member(h.context,h.name,h.computed)+"("+j.join(",")+")"):k=i+"("+j.join(",")+")",k=m.ensureSafeObject(k),m.assign(b,k)},function(){m.assign(b,"undefined")}),e(b)}));break;case rf.AssignmentExpression:if(i=this.nextId(),h={},!kc(a.left))throw kf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,void 0,h,function(){m.if_(m.notNull(h.context),function(){m.recurse(a.right,i),m.addEnsureSafeObject(m.member(h.context,h.name,h.computed)),m.addEnsureSafeAssignContext(h.context),k=m.member(h.context,h.name,h.computed)+a.operator+i,m.assign(b,k),e(b||k)})},1);break;case rf.ArrayExpression:j=[],d(a.elements,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(a)})}),k="["+j.join(",")+"]",this.assign(b,k),e(k);break;case rf.ObjectExpression:j=[],l=!1,d(a.properties,function(a){a.computed&&(l=!0)}),l?(b=b||this.nextId(),this.assign(b,"{}"),d(a.properties,function(a){a.computed?(h=m.nextId(),m.recurse(a.key,h)):h=a.key.type===rf.Identifier?a.key.name:""+a.key.value,i=m.nextId(),m.recurse(a.value,i),m.assign(m.member(b,h,a.computed),i)})):(d(a.properties,function(b){m.recurse(b.value,a.constant?void 0:m.nextId(),void 0,function(a){j.push(m.escape(b.key.type===rf.Identifier?b.key.name:""+b.key.value)+":"+a)})}),k="{"+j.join(",")+"}",this.assign(b,k)),e(b||k);break;case rf.ThisExpression:this.assign(b,"s"),e("s");break;case rf.LocalsExpression:this.assign(b,"l"),e("l");break;case rf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var c=/[$_a-zA-Z][$_a-zA-Z0-9]*/,d=/[^$_a-zA-Z0-9]/g;return c.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(v(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(w(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw kf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},pc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,ic(e,c.$filter);var f,g;(f=lc(e))&&(g=this.recurse(f));var h,i=jc(e.body);i&&(h=[],d(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];d(e.body,function(a){j.push(c.recurse(a.expression))});var k=0===e.body.length?n:1===e.body.length?j[0]:function(a,b){var c;return d(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=mc(e),k.constant=nc(e),k},recurse:function(a,b,c){var e,f,g,h=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case rf.Literal:return this.value(a.value,b);case rf.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case rf.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case rf.Identifier:return ac(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||qc(a.name),b,c,h.expression);case rf.MemberExpression:return e=this.recurse(a.object,!1,!!c),a.computed||(ac(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,b,c,h.expression):this.nonComputedMember(e,f,h.expensiveChecks,b,c,h.expression);case rf.CallExpression:return g=[],d(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,c,d,e){for(var h=[],i=0;i":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,c,d,e){return function(f,g,h,i){var j=g&&a in g?g:f;d&&1!==d&&j&&!j[a]&&(j[a]={});var k=j?j[a]:void 0;return b&&cc(k,e),c?{context:j,name:a,value:k}:k}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=bc(j),ac(j,e),d&&1!==d&&(ec(l),l&&!l[j]&&(l[j]={})),k=l[j],cc(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,c,d,e,f){return function(g,h,i,j){var k=a(g,h,i,j);e&&1!==e&&(ec(k),k&&!k[b]&&(k[b]={}));var l=null!=k?k[b]:void 0;return(c||qc(b))&&cc(l,f),d?{context:k,name:b,value:l}:l}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var sf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new rf(a,c),this.astCompiler=c.csp?new pc(this.ast,b):new oc(this.ast,b)};sf.prototype={constructor:sf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var tf=Object.prototype.valueOf,uf=b("$sce"),vf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},wf=b("$compile"),xf=a.document.createElement("a"),yf=Hc(a.location.href);Kc.$inject=["$document"],Mc.$inject=["$provide"];var zf=22,Af=".",Bf="0";Rc.$inject=["$locale"],Sc.$inject=["$locale"];var Cf={yyyy:Xc("FullYear",4,0,!1,!0),yy:Xc("FullYear",2,0,!0,!0),y:Xc("FullYear",1,0,!1,!0),MMMM:Yc("Month"),MMM:Yc("Month",!0),MM:Xc("Month",2,1),M:Xc("Month",1,1),LLLL:Yc("Month",!1,!0),dd:Xc("Date",2),d:Xc("Date",1),HH:Xc("Hours",2),H:Xc("Hours",1),hh:Xc("Hours",2,-12),h:Xc("Hours",1,-12),mm:Xc("Minutes",2),m:Xc("Minutes",1),ss:Xc("Seconds",2),s:Xc("Seconds",1),sss:Xc("Milliseconds",3),EEEE:Yc("Day"),EEE:Yc("Day",!0),a:bd,Z:Zc,ww:ad(2),w:ad(1),G:cd,GG:cd,GGG:cd,GGGG:dd},Df=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ef=/^\-?\d+$/;ed.$inject=["$locale"];var Ff=p(Gd),Gf=p(Hd);id.$inject=["$parse"];var Hf=p({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Rd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),If={};d(Ae,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=qb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),If[d]=function(){return{restrict:"A",priority:100,link:e}}}}),d(Ce,function(a,b){If[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Dd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),d(["src","srcset","href"],function(a){var b=qb("ng-"+a);If[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Rd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Kd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Jf={$addControl:n,$$renameControl:kd,$removeControl:n,$setValidity:n,$setDirty:n,$setPristine:n,$setSubmitted:n},Kf="ng-submitted";ld.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Lf=function(a){return["$timeout","$parse",function(b,c){function d(a){return""===a?c('this[""]').assign:c(a).assign||n}var e={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:ld,compile:function(c,e){c.addClass(tg).addClass(rg);var f=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,c,e,g){var h=g[0];if(!("action"in e)){var i=function(b){a.$apply(function(){h.$commitViewValue(),h.$setSubmitted()}),b.preventDefault()};ne(c[0],"submit",i),c.on("$destroy",function(){b(function(){oe(c[0],"submit",i)},0,!1)})}var k=g[1]||h.$$parentForm;k.$addControl(h);var l=f?d(h.$name):n;f&&(l(a,h),e.$observe(f,function(b){h.$name!==b&&(l(a,void 0),h.$$parentForm.$$renameControl(h,b),(l=d(h.$name))(a,h))})),c.on("$destroy",function(){h.$$parentForm.$removeControl(h),l(a,void 0),j(h,Jf)})}}}};return e}]},Mf=Lf(),Nf=Lf(!0),Of=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Pf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Qf=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Rf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sf=/^(\d{4,})-(\d{2})-(\d{2})$/,Tf=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Uf=/^(\d{4,})-W(\d\d)$/,Vf=/^(\d{4,})-(\d\d)$/,Wf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xf="keydown wheel mousedown",Yf=oa();d("date,datetime-local,month,time,week".split(","),function(a){Yf[a]=!0});var Zf={text:nd,date:rd("date",Sf,qd(Sf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":rd("datetimelocal",Tf,qd(Tf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:rd("time",Wf,qd(Wf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:rd("week",Uf,pd,"yyyy-Www"),month:rd("month",Vf,qd(Vf,["yyyy","MM"]),"yyyy-MM"),number:td,url:ud,email:vd,radio:wd,checkbox:yd,hidden:n,button:n,submit:n,reset:n,file:n},$f=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Zf[Gd(g.type)]||Zf.text)(e,f,g,h[0],b,a,c,d)}}}}],_f=/^(true|false|\d+)$/,ag=function(){return{restrict:"A",priority:100,compile:function(a,b){return _f.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},bg=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=r(a)?"":a})}}}}],cg=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=r(a)?"":a})}}}}],dg=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],eg=p({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),fg=zd("",!0),gg=zd("Odd",0),hg=zd("Even",1),ig=jd({compile:function(a,b){b.$set("ngCloak",void 0),a.removeClass("ng-cloak")}}),jg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],kg={},lg={blur:!0,focus:!0};d("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=qb("ng-"+a);kg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};lg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var mg=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.$$createComment("end ngIf",e.ngIf),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=na(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],ng=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ud.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!s(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],og=["$compile",function(b){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Rd.call(d[0]).match(/SVG/)?(d.empty(),void b(Aa(f.template,a.document).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void b(d.contents())(c))}}}],pg=jd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),qg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,c,e){var f=b.attr(c.$attr.ngList)||", ",g="false"!==c.ngTrim,h=g?Yd(f):f,i=function(a){if(!r(a)){var b=[];return a&&d(a.split(h),function(a){a&&b.push(g?Yd(a):a)}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Wd(a)?a.join(f):void 0}),e.$isEmpty=function(a){return!a||!a.length}}}},rg="ng-valid",sg="ng-invalid",tg="ng-pristine",ug="ng-dirty",vg="ng-untouched",wg="ng-touched",xg="ng-pending",yg="ng-empty",zg="ng-not-empty",Ag=b("ngModel"),Bg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,c,e,f,g,h,i,j,k){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=k(c.name||"",!1)(a),this.$$parentForm=Jf;var l,m=f(c.ngModel),o=m.assign,p=m,q=o,t=null,u=this;this.$$setOptions=function(a){if(u.$options=a,a&&a.getterSetter){var b=f(c.ngModel+"()"),d=f(c.ngModel+"($$$p)");p=function(a){var c=m(a);return y(c)&&(c=b(a)),c},q=function(a,b){y(m(a))?d(a,{$$$p:b}):o(a,b)}}else if(!m.assign)throw Ag("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,Y(e))},this.$render=n,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){u.$isEmpty(a)?(g.removeClass(e,zg),g.addClass(e,yg)):(g.removeClass(e,yg),g.addClass(e,zg))};var v=0;Ad({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:g}),this.$setPristine=function(){u.$dirty=!1,u.$pristine=!0,g.removeClass(e,ug),g.addClass(e,tg)},this.$setDirty=function(){u.$dirty=!0,u.$pristine=!1,g.removeClass(e,tg),g.addClass(e,ug),u.$$parentForm.$setDirty()},this.$setUntouched=function(){u.$touched=!1,u.$untouched=!0,g.setClass(e,vg,wg)},this.$setTouched=function(){u.$touched=!0,u.$untouched=!1,g.setClass(e,wg,vg)},this.$rollbackViewValue=function(){h.cancel(t),u.$viewValue=u.$$lastCommittedViewValue,u.$render()},this.$validate=function(){if(!w(u.$modelValue)||!isNaN(u.$modelValue)){var a=u.$$lastCommittedViewValue,b=u.$$rawModelValue,c=u.$valid,d=u.$modelValue,e=u.$options&&u.$options.allowInvalid;u.$$runValidators(b,a,function(a){e||c===a||(u.$modelValue=a?b:void 0,u.$modelValue!==d&&u.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function e(){var a=u.$$parserName||"parse";return r(l)?(h(a,null),!0):(l||(d(u.$validators,function(a,b){h(b,null)}),d(u.$asyncValidators,function(a,b){h(b,null)})),h(a,l),l)}function f(){var c=!0;return d(u.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),c?!0:(d(u.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var c=[],e=!0;d(u.$asyncValidators,function(d,f){var g=d(a,b);if(!G(g))throw Ag("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",g);h(f,void 0),c.push(g.then(function(){h(f,!0)},function(){e=!1,h(f,!1)}))}),c.length?j.all(c).then(function(){i(e)},n):i(!0)}function h(a,b){k===v&&u.$setValidity(a,b)}function i(a){k===v&&c(a)}v++;var k=v;return e()&&f()?void g():void i(!1)},this.$commitViewValue=function(){var a=u.$viewValue;h.cancel(t),(u.$$lastCommittedViewValue!==a||""===a&&u.$$hasNativeValidators)&&(u.$$updateEmptyClasses(a),u.$$lastCommittedViewValue=a,u.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){u.$modelValue!==f&&u.$$writeModelToScope()}var c=u.$$lastCommittedViewValue,d=c;if(l=r(d)?void 0:!0)for(var e=0;ef;f++){var i=a===c?f:c[f],j=a[i],k=x(j,i),l=q(j,k);if(b.push(l),h[2]||h[1]){var m=s(d,k);b.push(m)}if(h[4]){var n=u(d,k);b.push(n)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],f=g(c),h=f.length,i=0;h>i;i++){var j=c===f?i:f[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new e(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Ud.copy(a.viewValue):a.viewValue}}}}}function h(a,c,f,h){function k(a,b){var c=i.cloneNode(!1);b.appendChild(c),l(a,c)}function l(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=x&&o.readValue();if(x)for(var b=x.items.length-1;b>=0;b--){var d=x.items[b];Ra(d.group?d.element.parentNode:d.element)}x=y.getOptions();var e={};if(v&&c.prepend(n),x.items.forEach(function(a){var b;s(a.group)?(b=e[a.group],b||(b=j.cloneNode(!1),z.appendChild(b),b.label=a.group,e[a.group]=b),k(a,b)):k(a,z)}),c[0].appendChild(z),p.$render(),!p.$isEmpty(a)){var f=o.readValue(),g=y.trackBy||q;(g?O(a,f):a===f)||(p.$setViewValue(f),p.$render())}}for(var n,o=h[0],p=h[1],q=f.multiple,r=0,t=c.children(),u=t.length;u>r;r++)if(""===t[r].value){n=t.eq(r);break}var v=!!n,w=Ld(i.cloneNode(!1));w.val("?");var x,y=g(f.ngOptions,c,a),z=e[0].createDocumentFragment(),A=function(){v||c.prepend(n),c.val(""),n.prop("selected",!0),n.attr("selected",!0)},B=function(){v||n.remove()},C=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},D=function(){w.remove()};q?(p.$isEmpty=function(a){return!a||0===a.length},o.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&(b.element.selected=!0)})},o.readValue=function(){var a=c.val()||[],b=[];return d(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&a.$watchCollection(function(){return Wd(p.$viewValue)?p.$viewValue.map(function(a){return y.getTrackByValue(a)}):void 0},function(){p.$render()})):(o.writeValue=function(a){var b=x.getOptionFromViewValue(a);b?(c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(D(),A()):(B(),C())},o.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),x.getViewValueFromOption(a)):null},y.trackBy&&a.$watch(function(){return y.getTrackByValue(p.$viewValue)},function(){p.$render()})),v?(n.remove(),b(n)(a),n.removeClass("ng-scope")):n=Ld(i.cloneNode(!1)),c.empty(),m(),a.$watchCollection(y.getWatchables,m)}var i=a.document.createElement("option"),j=a.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=n},post:h}}}],Jg=["$locale","$interpolate","$log",function(a,b,c){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),o=i.offset||0,p=g.$eval(m)||{},q={},s=b.startSymbol(),t=b.endSymbol(),u=s+l+"-"+o+t,v=Ud.noop;d(i,function(a,b){var c=f.exec(b);if(c){var d=(c[1]?"-":"")+Gd(c[2]);p[d]=h.attr(i.$attr[b])}}),d(p,function(a,c){q[c]=b(a.replace(e,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in p||(d=a.pluralCat(d-o)),d!==k&&!(e&&w(k)&&isNaN(k))){v();var f=q[d];r(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=n,j()):v=g.$watch(f,j),k=d}})}}}],Kg=["$parse","$animate","$compile",function(a,e,f){var g="$$NG_REMOVED",h=b("ngRepeat"),i=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},j=function(a){return a.clone[0]},k=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(b,l){var m=l.ngRepeat,n=f.$$createComment("end ngRepeat",m),o=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!o)throw h("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var p=o[1],q=o[2],r=o[3],s=o[4];if(o=p.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!o)throw h("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var t=o[3]||o[1],u=o[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw h("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",r);var v,w,x,y,z={$id:Za};return s?v=a(s):(x=function(a,b){return Za(b)},y=function(a){return a}),function(a,b,f,l,o){v&&(w=function(b,c,d){return u&&(z[u]=b),z[t]=c,z.$index=d,v(a,z)});var p=oa();a.$watchCollection(q,function(f){var l,q,s,v,z,A,B,C,D,E,F,G,H=b[0],I=oa();if(r&&(a[r]=f),c(f))D=f,C=w||x;else{C=w||y,D=[];for(var J in f)Fd.call(f,J)&&"$"!==J.charAt(0)&&D.push(J)}for(v=D.length,F=new Array(v),l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],B=C(z,A,l),p[B])E=p[B],delete p[B],I[B]=E,F[l]=E;else{if(I[B])throw d(F,function(a){a&&a.scope&&(p[a.id]=a)}),h("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,B,A);F[l]={id:B,scope:void 0,clone:void 0},I[B]=!0}for(var K in p){if(E=p[K],G=na(E.clone),e.leave(G),G[0].parentNode)for(l=0,q=G.length;q>l;l++)G[l][g]=!0;E.scope.$destroy()}for(l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],E=F[l],E.scope){s=H;do s=s.nextSibling;while(s&&s[g]);j(E)!=s&&e.move(na(E.clone),null,H),H=k(E),i(E.scope,l,t,A,u,z,v)}else o(function(a,b){E.scope=b;var c=n.cloneNode(!1);a[a.length++]=c,e.enter(a,null,H),H=c,E.clone=a,I[E.id]=E,i(E.scope,l,t,A,u,z,v)});p=I})}}}}],Lg="ng-hide",Mg="ng-hide-animate",Ng=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Lg,{tempClasses:Mg})})}}}],Og=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Lg,{tempClasses:Mg})})}}}],Pg=jd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&d(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Qg=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,e,f,g){var h=f.ngSwitch||f.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var e,f;for(e=0,f=k.length;f>e;++e)a.cancel(k[e]);for(k.length=0,e=0,f=l.length;f>e;++e){var h=na(j[e].clone);l[e].$destroy();var n=k[e]=a.leave(h);n.then(m(k,e))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&d(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Rg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Sg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Tg=b("ngTransclude"),Ug=jd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Tg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Vg=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Wg={$setViewValue:n,$render:n},Xg=["$element","$scope",function(b,c){var d=this,e=new $a;d.ngModelCtrl=Wg,d.unknownOption=Ld(a.document.createElement("option")),d.renderUnknownOption=function(a){var c="? "+Za(a)+" ?";d.unknownOption.val(c),b.prepend(d.unknownOption),b.val(c)},c.$on("$destroy",function(){d.renderUnknownOption=n}),d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()},d.readValue=function(){return d.removeUnknownOption(),b.val()},d.writeValue=function(a){d.hasOption(a)?(d.removeUnknownOption(),b.val(a),""===a&&d.emptyOption.prop("selected",!0)):null==a&&d.emptyOption?(d.removeUnknownOption(),b.val("")):d.renderUnknownOption(a)},d.addOption=function(a,b){if(b[0].nodeType!==he){la(a,'"option value"'),""===a&&(d.emptyOption=b);var c=e.get(a)||0;e.put(a,c+1),d.ngModelCtrl.$render(),Cd(b)}},d.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(d.emptyOption=void 0)):e.put(a,b-1))},d.hasOption=function(a){return!!e.get(a)},d.registerOption=function(a,b,c,e,f){if(e){var g;c.$observe("value",function(a){s(g)&&d.removeOption(g),g=a,d.addOption(a,b)})}else f?a.$watch(f,function(a,e){c.$set("value",a),e!==a&&d.removeOption(e),d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value),d.ngModelCtrl.$render()})}}],Yg=function(){function a(a,b,c,e){var f=e[1];if(f){var g=e[0];if(g.ngModelCtrl=f,b.on("change",function(){a.$apply(function(){f.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return d(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);d(b.find("option"),function(a){a.selected=s(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==f.$viewValue||O(h,f.$viewValue)||(h=qa(f.$viewValue),f.$render()),i=f.$viewValue}),f.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Xg,priority:1,link:{pre:a,post:b}}},Zg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(s(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],$g=p({restrict:"E",terminal:!1}),_g=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},ah=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){if(v(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw b("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",g,a,Y(c));f=a||void 0,e.$validate()}),e.$validators.pattern=function(a,b){return e.$isEmpty(b)||r(f)||f.test(b)}}}}},bh=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=l(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},ch=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=l(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void a.console:(ia(),ta(Ud),Ud.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function c(a,c){var d=c;void 0===d&&(d=Math.min(b(a),3));var e=Math.pow(10,d),f=(a*e|0)%e;return{v:d,f:f}}var d={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var e=0|a,f=c(a,b);return 1==e&&0==f.v?d.ONE:d.OTHER}})}]),void Ld(a.document).ready(function(){da(a.document,ea)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/"); +var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){ +switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n, +content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0), +null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this); +return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),function(a){"use strict";a.module("uuid4",[]).factory("uuid4",function(){var a=function(a){return Math.pow(2,a)},b=(a(4),a(6)),c=a(8),d=a(12),e=(a(14),a(16)),f=a(32),g=(a(40),a(48),function(a,b){return Math.floor(Math.random()*(b-a+1))+a}),h=function(){return g(0,b-1)},i=function(){return g(0,c-1)},j=function(){return g(0,d-1)},k=function(){return g(0,e-1)},l=function(){return g(0,f-1)},m=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},n=function(a,b,c){a=String(a),c=c?c:"0";for(var d=b-a.length;d>0;d>>>=1,c+=c)1&d&&(a=c+a);return a},o=function(a,b,c,d,e,f){var g=n(a.toString(16),8)+"-"+n(b.toString(16),4)+"-"+n(c.toString(16),4)+"-"+n(d.toString(16),2)+n(e.toString(16),2)+"-"+n(f.toString(16),12);return g};return{generate:function(){return o(l(),k(),16384|j(),128|h(),i(),m())},validate:function(a){var b=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return b.test(a)}}})}(angular),angular.module("angular.css.injector",[]).provider("cssInjector",["$interpolateProvider",function(a){function b(b,d,e){var f,g=angular.element(document.getElementsByTagName("head")[0]);d.$on("$locationChangeStart",function(){c===!0&&k()});var h=function(){void 0===f&&(f=e.scope())},i=function(c){if(h(),void 0===f.injectedStylesheets)f.injectedStylesheets=[],g.append(b("")(f));else for(var d in f.injectedStylesheets)if(f.injectedStylesheets[d].href==c)return;f.injectedStylesheets.push({href:c})},j=function(a){if(h(),f.injectedStylesheets)for(var b=0;b0}})}(),function(){angular.module("leodido.luhn",[]).service("luhn",function(){var a=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]];this.check=function(b){if(!b)return!1;for(var c=b.length,d=0,e=0;c--;)e+=a[d][parseInt(b.charAt(c),10)],d^=1;return 0===e%10&&e>0}})}(),function(a,b,c){"object"==typeof exports?module.exports=exports=b(require("./core"),require("./x64-core"),require("./lib-typedarrays"),require("./enc-utf16"),require("./enc-base64"),require("./md5"),require("./sha1"),require("./sha256"),require("./sha224"),require("./sha512"),require("./sha384"),require("./sha3"),require("./ripemd160"),require("./hmac"),require("./pbkdf2"),require("./evpkdf"),require("./cipher-core"),require("./mode-cfb"),require("./mode-ctr"),require("./mode-ctr-gladman"),require("./mode-ofb"),require("./mode-ecb"),require("./pad-ansix923"),require("./pad-iso10126"),require("./pad-iso97971"),require("./pad-zeropadding"),require("./pad-nopadding"),require("./format-hex"),require("./aes"),require("./tripledes"),require("./rc4"),require("./rabbit"),require("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],b):a.CryptoJS=b(a.CryptoJS)}(this,function(a){return a}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.ES6Promise=b()}(this,function(){"use strict";function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){U=a}function d(a){V=a}function e(){return function(){return process.nextTick(j)}}function f(){return function(){T(j)}}function g(){var a=0,b=new Y(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){return a.port2.postMessage(0)}}function i(){var a=setTimeout;return function(){return a(j,1)}}function j(){for(var a=0;S>a;a+=2){var b=_[a],c=_[a+1];b(c),_[a]=void 0,_[a+1]=void 0}S=0}function k(){try{var a=require,b=a("vertx");return T=b.runOnLoop||b.runOnContext,f()}catch(c){return i()}}function l(a,b){var c=arguments,d=this,e=new this.constructor(n);void 0===e[ba]&&G(e);var f=d._state;return f?!function(){var a=c[f-1];V(function(){return D(f,e,a,d._result)})}():z(d,e,a,b),e}function m(a){var b=this;if(a&&"object"==typeof a&&a.constructor===b)return a;var c=new b(n);return v(c,a),c}function n(){}function o(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function q(a){try{return a.then}catch(b){return fa.error=b,fa}}function r(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function s(a,b,c){V(function(a){var d=!1,e=r(c,b,function(c){d||(d=!0,b!==c?v(a,c):x(a,c))},function(b){d||(d=!0,y(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,y(a,e))},a)}function t(a,b){b._state===da?x(a,b._result):b._state===ea?y(a,b._result):z(b,void 0,function(b){return v(a,b)},function(b){return y(a,b)})}function u(a,c,d){c.constructor===a.constructor&&d===l&&c.constructor.resolve===m?t(a,c):d===fa?y(a,fa.error):void 0===d?x(a,c):b(d)?s(a,c,d):x(a,c)}function v(b,c){b===c?y(b,o()):a(c)?u(b,c,q(c)):x(b,c)}function w(a){a._onerror&&a._onerror(a._result),A(a)}function x(a,b){a._state===ca&&(a._result=b,a._state=da,0!==a._subscribers.length&&V(A,a))}function y(a,b){a._state===ca&&(a._state=ea,a._result=b,V(w,a))}function z(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+da]=c,e[f+ea]=d,0===f&&a._state&&V(A,a)}function A(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;gf;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})}function L(a){var b=this,c=new b(n);return y(c,a),c}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function O(a){this[ba]=F(),this._result=this._state=void 0,this._subscribers=[],n!==a&&("function"!=typeof a&&M(),this instanceof O?E(this,a):N())}function P(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(b){throw new Error("polyfill failed because global object is unavailable in this environment")}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(b){}if("[object Promise]"===d&&!c.cast)return}a.Promise=O}var Q=void 0;Q=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var R=Q,S=0,T=void 0,U=void 0,V=function(a,b){_[S]=a,_[S+1]=b,S+=2,2===S&&(U?U(j):aa())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,_=new Array(1e3),aa=void 0;aa=Z?e():Y?g():$?h():void 0===W&&"function"==typeof require?k():i();var ba=Math.random().toString(36).substring(16),ca=void 0,da=1,ea=2,fa=new B,ga=new B,ha=0;return H.prototype._enumerate=function(){for(var a=this.length,b=this._input,c=0;this._state===ca&&a>c;c++)this._eachEntry(b[c],c)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor,d=c.resolve;if(d===m){var e=q(a);if(e===l&&a._state!==ca)this._settledAt(a._state,b,a._result);else if("function"!=typeof e)this._remaining--,this._result[b]=a;else if(c===O){var f=new c(n);u(f,a,e),this._willSettleAt(f,b)}else this._willSettleAt(new c(function(b){return b(a)}),b)}else this._willSettleAt(d(a),b)},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===ca&&(this._remaining--,a===ea?y(d,c):this._result[b]=c),0===this._remaining&&x(d,this._result)},H.prototype._willSettleAt=function(a,b){var c=this;z(a,void 0,function(a){return c._settledAt(da,b,a)},function(a){return c._settledAt(ea,b,a)})},O.all=J,O.race=K,O.resolve=m,O.reject=L,O._setScheduler=c,O._setAsap=d,O._asap=V,O.prototype={constructor:O,then:l,"catch":function(a){return this.then(null,a)}},P(),O.polyfill=P,O.Promise=O,O}),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b},setCountries:function(b){a=b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this),function(a,b){"object"==typeof exports?module.exports=exports=b():"function"==typeof define&&define.amd?define([],b):a.CryptoJS=b()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<>>6-i%4*2,l=j|k;g[h>>>2]|=l<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){ +var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.lengthq;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.lengthk;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<o?m^=1<a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<>>32-z,p=y<>>32-z;else var o=y<>>64-z,p=x<>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.pad.NoPadding={pad:function(){},unpad:function(){}},function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b); +},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a}),function(){function a(a,b){var c=a.split("."),d=ta;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){function c(){}c.prototype=b.prototype,a.ha=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.ma=function(a,c,d){for(var e=Array(arguments.length-2),f=2;fb?1:b>a?-1:0}function g(a){var b,c=[],d=0;for(b in a)c[d++]=a[b];return c}function h(a,b){this.b=a,this.a={};for(var c=0;c=0?(a=a.substring(b),a=a.replace(Sa,""),b=a.search(Ra),b>=0&&(a=a.substring(0,b))):a="",a}function D(a){return 2>a.length?!1:ea(Va,a)}function E(a){return ea(Ta,a)?G(a,La):G(a,Ja)}function F(a){var b=E(a.toString());d(a),a.a(b)}function G(a,b){for(var d,e=new c,f=a.length,g=0;f>g;++g)d=a.charAt(g),d=b[d.toUpperCase()],null!=d&&e.a(d);return e.toString()}function H(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ia}function I(a,b,c){if(0==o(b,2)&&m(b,5)){var d=p(b,5);if(0e;++e){c=a[e];var f=q(c,3);if((0==f||0==b.search(o(c,3,f-1)))&&(f=new RegExp(o(c,1)),ea(f,b)))return c}return null}function P(a,b,c,d){var e=p(b,2),f=new RegExp(o(b,1)),g=p(b,5),h="";return 2==c&&null!=d&&0g;g++){d=c[g];var h=S(a,d);if(m(h,23)){if(0==e.search(o(h,23))){c=d;break a}}else if(-1!=R(e,h)){c=d;break a}}c=null}return c}function X(a){return a=Ha[a],null==a?"ZZ":a[0]}function Y(a,b){var c=S(a,b);if(null==c)throw"Invalid region code: "+b;return p(c,10)}function Z(a,b){return ea(a,b)?0:0==b.search(a)?3:2}function $(a){var b=eb,c=L(a);return a=p(a,1),a in Ha?(b=J(b,a,X(a)),b=o(b,1),b=p(b,3),Z(b,c)):1}function _(a,b){var c=a.toString();if(0==c.length||"0"==c.charAt(0))return 0;for(var d,e=c.length,f=1;3>=f&&e>=f;++f)if(d=parseInt(c.substring(0,f),10),d in Ha)return b.a(c.substring(f)),d;return 0}function aa(a,b,e,f,g){if(0==a.length)return 0;a=new c(a);var h;null!=b&&(h=o(b,11)),null==h&&(h="NonMatch");var i=a.toString();if(0==i.length)h=20;else if(Oa.test(i))i=i.replace(Oa,""),d(a),a.a(E(i)),h=1;else{if(i=new RegExp(h),F(a),h=a.toString(),0==h.search(i)){var i=h.match(i)[0].length,j=h.substring(i).match(Pa);j&&null!=j[1]&&0=a.b.length)throw"Phone number too short after IDD";if(e=_(a,e),0!=e)return r(g,1,e),e;throw"Invalid country calling code"}if(null!=b&&(h=p(b,10),i=""+h,j=a.toString(),0==j.lastIndexOf(i,0))){var k=new c(j.substring(i.length)),j=o(b,1),i=new RegExp(p(j,2));if(ba(k,b,null),b=k.toString(),j=p(j,3),!ea(i,a.toString())&&ea(i,b)||3==Z(j,a.toString()))return e.a(b),f&&r(g,6,10),r(g,1,h),h}return r(g,1,0),0}function ba(a,b,c){var d=a.toString(),e=d.length,f=o(b,15);if(0!=e&&null!=f&&0!=f.length&&(f=new RegExp("^(?:"+f+")"),e=f.exec(d))){var g,h=RegExp;g=o(b,1),g=p(g,2),h=new h(g),g=ea(h,d);var i=e.length-1;b=o(b,16),null==b||0==b.length||null==e[i]||0==e[i].length?(!g||ea(h,d.substring(e[0].length)))&&(null!=c&&i>0&&null!=e[i]&&c.a(e[1]),a.b=""+d.substring(e[0].length)):(d=d.replace(f,b),(!g||ea(h,d))&&(null!=c&&i>0&&c.a(e[1]),a.b=""+d))}}function ca(a,b){var c=eb;if(!H(b)&&00){var i=h+15;if("+"==b.charAt(i)){var j=b.indexOf(";",i);j>0?g.a(b.substring(i,j)):g.a(b.substring(i))}i=b.indexOf("tel:"),g.a(b.substring(i>=0?i+4:0,h))}else g.a(C(b));if(h=g.toString(),i=h.indexOf(";isub="),i>0&&(d(g),g.a(h.substring(0,i))),!D(g.toString()))throw"The string supplied did not seem to be a phone number";if(h=g.toString(),!(H(e)||null!=h&&0=0&&D(b.substring(0,i)))for(var j=b.match(Ua),k=j.length,l=1;k>l;++l)if(null!=j[l]&&0b.b.length)throw"The string supplied is too short to be a phone number";if(null!=i&&(a=new c,e=new c(b.toString()),ba(e,i,a),g=e.toString(),i=o(i,1),i=p(i,3),2!=Z(i,g)&&(b=e,f&&r(h,7,a.toString()))),f=b.toString(),a=f.length,2>a)throw"The string supplied is too short to be a phone number";if(a>17)throw"The string supplied is too long to be a phone number";if(1c;++c){var e=a.f[c],f=p(e,1);if(a.v==f)return!1;var g;g=a;var h=e,i=p(h,1);if(-1!=i.indexOf("|"))g=!1;else{i=i.replace(ab,"\\d"),i=i.replace(bb,"\\d"),d(g.m);var j;j=g;var h=p(h,2),k="999999999999999".match(i)[0];k.lengthf;++f){var g=a.f[f];0==q(g,3)?c.push(a.f[f]):(g=o(g,3,Math.min(d,q(g,3)-1)),0==b.search(g)&&c.push(a.f[f]))}a.f=c}function ja(a,b){a.i.a(b);var c=b;if(Pa.test(c)||1==a.i.b.length&&Na.test(c)){var e,c=b;"+"==c?(e=c,a.u.a(c)):(e=Ja[c],a.u.a(e),a.a.a(e)),b=e}else a.j=!1,a.ga=!0;if(!a.j){if(!a.ga)if(qa(a)){if(ra(a))return ka(a)}else if(0d;++d){var e=a.f[d],f=p(e,1);if(new RegExp("^(?:"+f+")$").test(b))return a.$=db.test(o(e,4)),b=b.replace(new RegExp(f,"g"),o(e,2)),ma(a,b)}return""}function ma(a,b){var c=a.b.b.length;return a.$&&c>0&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function na(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0e;++e){var f,g=c[e];(f=!m(a.g,12)||a.o||o(g,6))||(f=p(g,4),f=0==f.length||$a.test(f)),f&&(f=p(g,2),cb.test(f)&&a.f.push(g))}return ia(a,b),b=la(a),00){for(var d="",e=0;c>e;e++)d=sa(a,b.charAt(e));return a.j?ma(a,d):a.i.toString()}return a.b.toString()}function pa(a){var b,c=a.a.toString(),e=0;return 1!=o(a.g,10)?b=!1:(b=a.a.toString(),b="1"==b.charAt(0)&&"0"!=b.charAt(1)&&"1"!=b.charAt(1)),b?(e=1,a.b.a("1").a(" "),a.o=!0):m(a.g,15)&&(b=new RegExp("^(?:"+o(a.g,15)+")"),b=c.match(b),null!=b&&null!=b[0]&&0c?Math.max(0,a.length+c):c,"string"==typeof a)return"string"==typeof b&&1==b.length?a.indexOf(b,c):-1;for(;c=g?f=e:(d=d.substring(0,g),d=G(d,Ja),0==d.length?f=e:(i=i.clone(),s(i,4),d=[i],i=p(c,1),e=L(c),i in Ha?(f=J(f,i,X(i)),g="",g=O(d,e),null==g?g=e:(d=g.clone(),g=p(g,4),0f;++f)e=c,e.ea=ja(e,a.charAt(f)),e=e.ea;return e})}(),!function(a){a.module("cwill747.phonenumber",[]).directive("phoneNumber",["$log",function(a){function b(a){return a?a.replace(/([^0-9|+])/g,""):a}function c(b,c){var d=b;try{d=phoneUtils.formatAsTyped(b,c)}catch(e){a.debug(e)}return d}return{restrict:"A",require:"?ngModel",scope:{countryCode:"=",nonFormatted:"=?"},controllerAs:"",controller:function(){this.countryCode=this.countryCode||"us"},link:function(d,e,f,g){function h(a){return g.$isEmpty(a)?a:c(b(a),d.countryCode)}function i(a){if(g.$isEmpty(a))return d.nonFormatted="",a;var c=j(a);if(c===a)return a;var e=l.selectionStart,f=l.selectionEnd+c.length-a.length;return a.lengthc.length+1&&(e-=c.length-a.length),g.$setViewValue(c),g.$render(),l.setSelectionRange(e,f),b(c)}function j(a){var e=b(a);d.nonFormatted=e;var f="";return f=e&&e.length>1?c(e,d.countryCode):e,f.trim()}function k(b){var c=!1;try{c=phoneUtils.isValidNumberForRegion(b,d.countryCode)}catch(e){a.debug(e)}var f=g.$isEmpty(b)||c;return g.$setValidity("phoneNumber",f),b}var l=e[0];d.$watch("countryCode",function(){g.$modelValue=g.$viewValue+" "}),g.$formatters.push(h),g.$formatters.push(k),g.$parsers.push(i),g.$parsers.push(k)}}}])}(angular); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css new file mode 100644 index 0000000..61d7d29 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;cursor:pointer;text-decoration:none}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;background-color:#d6d6d6;padding:0}*,a :focus{outline:0}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{background-color:#FFF}.app-body{display:none}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.marginless-listgroup{margin-bottom:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px;box-sizing:content-box}.channel-list-container,.text-list-container{padding-left:5px;padding-right:5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.channel-list-container{height:40px;line-height:40px}.left-aligned-list-value-label{float:left;height:100%;text-align:left}.mp-version,.right-aligned-list-value-label{float:right}.mp-version,.poweredByMOLPay{height:20px}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.credit-disclaimer{padding:5px;font-weight:200;color:#595959;font-size:small}.close-button,.proceed-button{color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.proceed-button{background-color:#72529b;font-size:larger;border-radius:4px}button[disabled],html input[disabled]{opacity:.4;-moz-opacity:.4;background-color:gray}.close-button{background-color:#72529b;border-radius:4px}.molpay-disclaimer-container{padding:15px}.mp-version{color:#818285;font-size:8px;display:table;font-weight:700}.mp-version span{display:table-cell;vertical-align:bottom}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.new-credit-card-switch,.new-credit-card-switch .knob,.new-credit-card-switch span{height:28px;min-height:28px}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);min-height:480px;min-height:80vw;overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);min-height:480px;min-height:80vw;overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px;min-height:44px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b;min-height:28px;height:28px}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0;min-height:28px;height:28px}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}}.list-group-item-sandboxed{background-color:#ddd;padding:5px}.list-group-item-sandboxed a,.list-group-item-sandboxed input,.list-group-item-sandboxed span{padding:5px;float:left;color:#000;font-size:14px}.list-group-item-sandboxed input{max-width:40%}.btn-group-sandboxed{float:right}.btn-group-sandboxed label{color:#595959;background-color:#fff;border-color:#ddd}.btn-group-sandboxed .btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#72529b;border-color:#72529b} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-android-permissions/www/permissions.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-android-permissions/www/permissions.js new file mode 100644 index 0000000..8789ddc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-android-permissions/www/permissions.js @@ -0,0 +1,190 @@ +cordova.define("cordova-plugin-android-permissions.Permissions", function(require, exports, module) { +var permissionsName = 'Permissions'; + +function Permissions() { + + this.ACCESS_CHECKIN_PROPERTIES = 'android.permission.ACCESS_CHECKIN_PROPERTIES'; + this.ACCESS_COARSE_LOCATION = 'android.permission.ACCESS_COARSE_LOCATION'; + this.ACCESS_FINE_LOCATION = 'android.permission.ACCESS_FINE_LOCATION'; + this.ACCESS_LOCATION_EXTRA_COMMANDS = 'android.permission.ACCESS_LOCATION_EXTRA_COMMANDS'; + this.ACCESS_MOCK_LOCATION = 'android.permission.ACCESS_MOCK_LOCATION'; + this.ACCESS_NETWORK_STATE = 'android.permission.ACCESS_NETWORK_STATE'; + this.ACCESS_SURFACE_FLINGER = 'android.permission.ACCESS_SURFACE_FLINGER'; + this.ACCESS_WIFI_STATE = 'android.permission.ACCESS_WIFI_STATE'; + this.ACCOUNT_MANAGER = 'android.permission.ACCOUNT_MANAGER'; + this.ADD_VOICEMAIL = 'com.android.voicemail.permission.ADD_VOICEMAIL'; + this.AUTHENTICATE_ACCOUNTS = 'android.permission.AUTHENTICATE_ACCOUNTS'; + this.BATTERY_STATS = 'android.permission.BATTERY_STATS'; + this.BIND_ACCESSIBILITY_SERVICE = 'android.permission.BIND_ACCESSIBILITY_SERVICE'; + this.BIND_APPWIDGET = 'android.permission.BIND_APPWIDGET'; + this.BIND_CARRIER_MESSAGING_SERVICE = 'android.permission.BIND_CARRIER_MESSAGING_SERVICE'; + this.BIND_DEVICE_ADMIN = 'android.permission.BIND_DEVICE_ADMIN'; + this.BIND_DREAM_SERVICE = 'android.permission.BIND_DREAM_SERVICE'; + this.BIND_INPUT_METHOD = 'android.permission.BIND_INPUT_METHOD'; + this.BIND_NFC_SERVICE = 'android.permission.BIND_NFC_SERVICE'; + this.BIND_NOTIFICATION_LISTENER_SERVICE = 'android.permission.BIND_NOTIFICATION_LISTENER_SERVICE'; + this.BIND_PRINT_SERVICE = 'android.permission.BIND_PRINT_SERVICE'; + this.BIND_REMOTEVIEWS = 'android.permission.BIND_REMOTEVIEWS'; + this.BIND_TEXT_SERVICE = 'android.permission.BIND_TEXT_SERVICE'; + this.BIND_TV_INPUT = 'android.permission.BIND_TV_INPUT'; + this.BIND_VOICE_INTERACTION = 'android.permission.BIND_VOICE_INTERACTION'; + this.BIND_VPN_SERVICE = 'android.permission.BIND_VPN_SERVICE'; + this.BIND_WALLPAPER = 'android.permission.BIND_WALLPAPER'; + this.BLUETOOTH = 'android.permission.BLUETOOTH'; + this.BLUETOOTH_ADMIN = 'android.permission.BLUETOOTH_ADMIN'; + this.BLUETOOTH_PRIVILEGED = 'android.permission.BLUETOOTH_PRIVILEGED'; + this.BODY_SENSORS = 'android.permission.BODY_SENSORS'; + this.BRICK = 'android.permission.BRICK'; + this.BROADCAST_PACKAGE_REMOVED = 'android.permission.BROADCAST_PACKAGE_REMOVED'; + this.BROADCAST_SMS = 'android.permission.BROADCAST_SMS'; + this.BROADCAST_STICKY = 'android.permission.BROADCAST_STICKY'; + this.BROADCAST_WAP_PUSH = 'android.permission.BROADCAST_WAP_PUSH'; + this.CALL_PHONE = 'android.permission.CALL_PHONE'; + this.CALL_PRIVILEGED = 'android.permission.CALL_PRIVILEGED'; + this.CAMERA = 'android.permission.CAMERA'; + this.CAPTURE_AUDIO_OUTPUT = 'android.permission.CAPTURE_AUDIO_OUTPUT'; + this.CAPTURE_SECURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_SECURE_VIDEO_OUTPUT'; + this.CAPTURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_VIDEO_OUTPUT'; + this.CHANGE_COMPONENT_ENABLED_STATE = 'android.permission.CHANGE_COMPONENT_ENABLED_STATE'; + this.CHANGE_CONFIGURATION = 'android.permission.CHANGE_CONFIGURATION'; + this.CHANGE_NETWORK_STATE = 'android.permission.CHANGE_NETWORK_STATE'; + this.CHANGE_WIFI_MULTICAST_STATE = 'android.permission.CHANGE_WIFI_MULTICAST_STATE'; + this.CHANGE_WIFI_STATE = 'android.permission.CHANGE_WIFI_STATE'; + this.CLEAR_APP_CACHE = 'android.permission.CLEAR_APP_CACHE'; + this.CLEAR_APP_USER_DATA = 'android.permission.CLEAR_APP_USER_DATA'; + this.CONTROL_LOCATION_UPDATES = 'android.permission.CONTROL_LOCATION_UPDATES'; + this.DELETE_CACHE_FILES = 'android.permission.DELETE_CACHE_FILES'; + this.DELETE_PACKAGES = 'android.permission.DELETE_PACKAGES'; + this.DEVICE_POWER = 'android.permission.DEVICE_POWER'; + this.DIAGNOSTIC = 'android.permission.DIAGNOSTIC'; + this.DISABLE_KEYGUARD = 'android.permission.DISABLE_KEYGUARD'; + this.DUMP = 'android.permission.DUMP'; + this.EXPAND_STATUS_BAR = 'android.permission.EXPAND_STATUS_BAR'; + this.FACTORY_TEST = 'android.permission.FACTORY_TEST'; + this.FLASHLIGHT = 'android.permission.FLASHLIGHT'; + this.FORCE_BACK = 'android.permission.FORCE_BACK'; + this.GET_ACCOUNTS = 'android.permission.GET_ACCOUNTS'; + this.GET_PACKAGE_SIZE = 'android.permission.GET_PACKAGE_SIZE'; + this.GET_TASKS = 'android.permission.GET_TASKS'; + this.GET_TOP_ACTIVITY_INFO = 'android.permission.GET_TOP_ACTIVITY_INFO'; + this.GLOBAL_SEARCH = 'android.permission.GLOBAL_SEARCH'; + this.HARDWARE_TEST = 'android.permission.HARDWARE_TEST'; + this.INJECT_EVENTS = 'android.permission.INJECT_EVENTS'; + this.INSTALL_LOCATION_PROVIDER = 'android.permission.INSTALL_LOCATION_PROVIDER'; + this.INSTALL_PACKAGES = 'android.permission.INSTALL_PACKAGES'; + this.INSTALL_SHORTCUT = 'com.android.launcher.permission.INSTALL_SHORTCUT'; + this.INTERNAL_SYSTEM_WINDOW = 'android.permission.INTERNAL_SYSTEM_WINDOW'; + this.INTERNET = 'android.permission.INTERNET'; + this.KILL_BACKGROUND_PROCESSES = 'android.permission.KILL_BACKGROUND_PROCESSES'; + this.LOCATION_HARDWARE = 'android.permission.LOCATION_HARDWARE'; + this.MANAGE_ACCOUNTS = 'android.permission.MANAGE_ACCOUNTS'; + this.MANAGE_APP_TOKENS = 'android.permission.MANAGE_APP_TOKENS'; + this.MANAGE_DOCUMENTS = 'android.permission.MANAGE_DOCUMENTS'; + this.MASTER_CLEAR = 'android.permission.MASTER_CLEAR'; + this.MEDIA_CONTENT_CONTROL = 'android.permission.MEDIA_CONTENT_CONTROL'; + this.MODIFY_AUDIO_SETTINGS = 'android.permission.MODIFY_AUDIO_SETTINGS'; + this.MODIFY_PHONE_STATE = 'android.permission.MODIFY_PHONE_STATE'; + this.MOUNT_FORMAT_FILESYSTEMS = 'android.permission.MOUNT_FORMAT_FILESYSTEMS'; + this.MOUNT_UNMOUNT_FILESYSTEMS = 'android.permission.MOUNT_UNMOUNT_FILESYSTEMS'; + this.NFC = 'android.permission.NFC'; + this.PERSISTENT_ACTIVITY = 'android.permission.PERSISTENT_ACTIVITY'; + this.PROCESS_OUTGOING_CALLS = 'android.permission.PROCESS_OUTGOING_CALLS'; + this.READ_CALENDAR = 'android.permission.READ_CALENDAR'; + this.READ_CALL_LOG = 'android.permission.READ_CALL_LOG'; + this.READ_CONTACTS = 'android.permission.READ_CONTACTS'; + this.READ_EXTERNAL_STORAGE = 'android.permission.READ_EXTERNAL_STORAGE'; + this.READ_FRAME_BUFFER = 'android.permission.READ_FRAME_BUFFER'; + this.READ_HISTORY_BOOKMARKS = 'com.android.browser.permission.READ_HISTORY_BOOKMARKS'; + this.READ_INPUT_STATE = 'android.permission.READ_INPUT_STATE'; + this.READ_LOGS = 'android.permission.READ_LOGS'; + this.READ_PHONE_STATE = 'android.permission.READ_PHONE_STATE'; + this.READ_PROFILE = 'android.permission.READ_PROFILE'; + this.READ_SMS = 'android.permission.READ_SMS'; + this.READ_SOCIAL_STREAM = 'android.permission.READ_SOCIAL_STREAM'; + this.READ_SYNC_SETTINGS = 'android.permission.READ_SYNC_SETTINGS'; + this.READ_SYNC_STATS = 'android.permission.READ_SYNC_STATS'; + this.READ_USER_DICTIONARY = 'android.permission.READ_USER_DICTIONARY'; + this.READ_VOICEMAIL = 'com.android.voicemail.permission.READ_VOICEMAIL'; + this.REBOOT = 'android.permission.REBOOT'; + this.RECEIVE_BOOT_COMPLETED = 'android.permission.RECEIVE_BOOT_COMPLETED'; + this.RECEIVE_MMS = 'android.permission.RECEIVE_MMS'; + this.RECEIVE_SMS = 'android.permission.RECEIVE_SMS'; + this.RECEIVE_WAP_PUSH = 'android.permission.RECEIVE_WAP_PUSH'; + this.RECORD_AUDIO = 'android.permission.RECORD_AUDIO'; + this.REORDER_TASKS = 'android.permission.REORDER_TASKS'; + this.RESTART_PACKAGES = 'android.permission.RESTART_PACKAGES'; + this.SEND_RESPOND_VIA_MESSAGE = 'android.permission.SEND_RESPOND_VIA_MESSAGE'; + this.SEND_SMS = 'android.permission.SEND_SMS'; + this.SET_ACTIVITY_WATCHER = 'android.permission.SET_ACTIVITY_WATCHER'; + this.SET_ALARM = 'com.android.alarm.permission.SET_ALARM'; + this.SET_ALWAYS_FINISH = 'android.permission.SET_ALWAYS_FINISH'; + this.SET_ANIMATION_SCALE = 'android.permission.SET_ANIMATION_SCALE'; + this.SET_DEBUG_APP = 'android.permission.SET_DEBUG_APP'; + this.SET_ORIENTATION = 'android.permission.SET_ORIENTATION'; + this.SET_POINTER_SPEED = 'android.permission.SET_POINTER_SPEED'; + this.SET_PREFERRED_APPLICATIONS = 'android.permission.SET_PREFERRED_APPLICATIONS'; + this.SET_PROCESS_LIMIT = 'android.permission.SET_PROCESS_LIMIT'; + this.SET_TIME = 'android.permission.SET_TIME'; + this.SET_TIME_ZONE = 'android.permission.SET_TIME_ZONE'; + this.SET_WALLPAPER = 'android.permission.SET_WALLPAPER'; + this.SET_WALLPAPER_HINTS = 'android.permission.SET_WALLPAPER_HINTS'; + this.SIGNAL_PERSISTENT_PROCESSES = 'android.permission.SIGNAL_PERSISTENT_PROCESSES'; + this.STATUS_BAR = 'android.permission.STATUS_BAR'; + this.SUBSCRIBED_FEEDS_READ = 'android.permission.SUBSCRIBED_FEEDS_READ'; + this.SUBSCRIBED_FEEDS_WRITE = 'android.permission.SUBSCRIBED_FEEDS_WRITE'; + this.SYSTEM_ALERT_WINDOW = 'android.permission.SYSTEM_ALERT_WINDOW'; + this.TRANSMIT_IR = 'android.permission.TRANSMIT_IR'; + this.UNINSTALL_SHORTCUT = 'com.android.launcher.permission.UNINSTALL_SHORTCUT'; + this.UPDATE_DEVICE_STATS = 'android.permission.UPDATE_DEVICE_STATS'; + this.USE_CREDENTIALS = 'android.permission.USE_CREDENTIALS'; + this.USE_SIP = 'android.permission.USE_SIP'; + this.VIBRATE = 'android.permission.VIBRATE'; + this.WAKE_LOCK = 'android.permission.WAKE_LOCK'; + this.WRITE_APN_SETTINGS = 'android.permission.WRITE_APN_SETTINGS'; + this.WRITE_CALENDAR = 'android.permission.WRITE_CALENDAR'; + this.WRITE_CALL_LOG = 'android.permission.WRITE_CALL_LOG'; + this.WRITE_CONTACTS = 'android.permission.WRITE_CONTACTS'; + this.WRITE_EXTERNAL_STORAGE = 'android.permission.WRITE_EXTERNAL_STORAGE'; + this.WRITE_GSERVICES = 'android.permission.WRITE_GSERVICES'; + this.WRITE_HISTORY_BOOKMARKS = 'com.android.browser.permission.WRITE_HISTORY_BOOKMARKS'; + this.WRITE_PROFILE = 'android.permission.WRITE_PROFILE'; + this.WRITE_SECURE_SETTINGS = 'android.permission.WRITE_SECURE_SETTINGS'; + this.WRITE_SETTINGS = 'android.permission.WRITE_SETTINGS'; + this.WRITE_SMS = 'android.permission.WRITE_SMS'; + this.WRITE_SOCIAL_STREAM = 'android.permission.WRITE_SOCIAL_STREAM'; + this.WRITE_SYNC_SETTINGS = 'android.permission.WRITE_SYNC_SETTINGS'; + this.WRITE_USER_DICTIONARY = 'android.permission.WRITE_USER_DICTIONARY'; + this.WRITE_VOICEMAIL = 'com.android.voicemail.permission.WRITE_VOICEMAIL'; +} + +function deprecated(name) { + console.warn("Calling cordova.plugins.permissions." + name + " with the successCallback as first argument is deprecated"); + console.warn("The new signature is '" + name + "(permission, successCallback, errorCallback)'"); +} + +Permissions.prototype = { + hasPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("hasPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'hasPermission', [permission]); + }, + requestPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("requestPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermission', [permission]); + }, + requestPermissions: function(permissions, successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermissions', permissions); + } +}; +module.exports = new Permissions(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..d609f8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,117 @@ +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + hide: function (eventname) { + exec(null, null, "InAppBrowser", "hide", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/test/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/test/tests.js new file mode 100644 index 0000000..09a1793 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/test/tests.js @@ -0,0 +1,64 @@ +cordova.define("cordova-plugin-x-toast.tests", function(require, exports, module) { +exports.defineAutoTests = function() { + + var fail = function (done) { + expect(true).toBe(false); + done(); + }, + succeed = function (done) { + expect(true).toBe(true); + done(); + }; + + describe('Plugin availability', function () { + it("window.plugins.toast should exist", function() { + expect(window.plugins.toast).toBeDefined(); + }); + }); + + describe('API functions', function () { + it("should define show", function() { + expect(window.plugins.toast.show).toBeDefined(); + }); + + it("should define showWithOptions", function() { + expect(window.plugins.toast.showWithOptions).toBeDefined(); + }); + + it("should define optionsBuilder", function() { + expect(window.plugins.toast.optionsBuilder).toBeDefined(); + }); + + it("should define showShortTop", function() { + expect(window.plugins.toast.showShortTop).toBeDefined(); + }); + + it("should define showShortCenter", function() { + expect(window.plugins.toast.showShortCenter).toBeDefined(); + }); + + it("should define showShortBottom", function() { + expect(window.plugins.toast.showShortBottom).toBeDefined(); + }); + + it("should define showLongTop", function() { + expect(window.plugins.toast.showLongTop).toBeDefined(); + }); + + it("should define showLongCenter", function() { + expect(window.plugins.toast.showLongCenter).toBeDefined(); + }); + + it("should define showLongBottom", function() { + expect(window.plugins.toast.showLongBottom).toBeDefined(); + }); + }); + + describe('Invalid usage', function () { + it("should fail due to an invalid position", function(done) { + window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); + }); + }); +}; + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js new file mode 100644 index 0000000..685c677 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js @@ -0,0 +1,101 @@ +cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { +function Toast() { +} + +Toast.prototype.optionsBuilder = function () { + + // defaults + var message = null; + var duration = "short"; + var position = "center"; + var addPixelsY = 0; + + return { + withMessage: function(m) { + message = m.toString(); + return this; + }, + + withDuration: function(d) { + duration = d.toString(); + return this; + }, + + withPosition: function(p) { + position = p; + return this; + }, + + withAddPixelsY: function(y) { + addPixelsY = y; + return this; + }, + + build: function() { + return { + message: message, + duration: duration, + position: position, + addPixelsY: addPixelsY + }; + } + }; +}; + + +Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { + options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); + options.message = options.message.toString(); + cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); +}; + +Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { + this.showWithOptions( + this.optionsBuilder() + .withMessage(message) + .withDuration(duration) + .withPosition(position) + .build(), + successCallback, + errorCallback); +}; + +Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { + this.show(message, "short", "top", successCallback, errorCallback); +}; + +Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { + this.show(message, "short", "center", successCallback, errorCallback); +}; + +Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { + this.show(message, "short", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { + this.show(message, "long", "top", successCallback, errorCallback); +}; + +Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { + this.show(message, "long", "center", successCallback, errorCallback); +}; + +Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { + this.show(message, "long", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.hide = function (successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, "Toast", "hide", []); +}; + +Toast.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.toast = new Toast(); + return window.plugins.toast; +}; + +cordova.addConstructor(Toast.install); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js new file mode 100644 index 0000000..7596c6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js @@ -0,0 +1,183 @@ +cordova.define("cordova-save-image-gallery.saveImageGallery", function(require, exports, module) { +/** + * @file saveImageGallery PhoneGap/Cordova plugin + * @author Alejandro Gómez + * @author Tommy-Carlos Williams + * @author Simba Zhang + * @author StefanoMagrassi + * @copyright Alejandro Gómez - 2016. All rights reserved. + * @license MIT + */ + +var exec = require('cordova/exec'); + +// Consts +var SERVICE = 'SaveImageGallery'; +var SAVE_BASE64_IMAGE_ACTION = 'saveImageDataToLibrary'; +var REMOVE_IMAGE_ACTION = 'removeImageFromLibrary'; +var DEFAULTS = {prefix: 'img_', mediaScanner: true, format: 'JPG', quality: 100}; + + +var ImageSaver = function () { + +}; + + +/** + * Constants. + */ +ImageSaver.FORMAT_JPG = 'jpg'; +ImageSaver.FORMAT_PNG = 'png'; + +/** + * Saves base64 data as image. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Base64 img. + * prefix: String + * format: 'JPG' or 'PNG' - defaults to 'JPG' + * mediaScanner: BOOLEAN. If true, the image will be created in the temporal directory. Otherwise the image will + * be created in the photo album. - defaults to true + * quality: FLOAT (from 0 to 100). - defaults to 100 + * @param {function} [success] + * @param {function} [fail] + * @return The path of the file. + */ + +ImageSaver.prototype.saveBase64Image = function (options, success, fail) { + var actionArgs = prepareSaveBase64Args(options); + + return exec(ok(success), error(fail), SERVICE, SAVE_BASE64_IMAGE_ACTION, actionArgs); +}; + +/** + * Remove an image from a given path. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Image location. + * @param {function} [success] + * @param {function} [fail] + * @return + */ + +ImageSaver.prototype.removeImage = function (options, success, fail) { + var actionArgs = prepareRemoveImageArgs(options); + + return exec(ok(success), error(fail), SERVICE, REMOVE_IMAGE_ACTION, actionArgs); +}; + +/** + * Gets success callback if it is defined and not null. + * Otherwise returns a simple console.log. + * @private + * @param {[function|undefined|null]} success + * @return {function} + */ +function ok(success) { + if (typeof success !== 'function') { + return console.log; + } + + return success; +} + +/** + * Gets fail callback if it is defined and not null. + * Otherwise returns a simple console.error. + * @private + * @param {[function|undefined|null]} fail + * @return {function} + */ +function error(fail) { + if (typeof fail !== 'function') { + return console.error; + } + + return fail; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [filePath] + */ +function prepareRemoveImageArgs(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace('file://', '').replace('file:/', '/'); + args.push(options.data); + + return args; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [base64String, filePrefix, mediaScannerEnabled, format, quality] + */ +function prepareSaveBase64Args(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace(/data:image\/png;base64,/, '').replace(/data:image\/jpeg;base64,/, '').replace( + /data:image\/jpg;base64,/, ''); + args.push(options.data); + + // preparing prefix + if (!options.prefix) { + options.prefix = DEFAULTS.prefix; + } + args.push(options.prefix); + + // preparing mediaScanner + if (options.mediaScanner === undefined || options.mediaScanner === null) { + options.mediaScanner = DEFAULTS.mediaScanner; + } + args.push(options.mediaScanner); + + // preparing format + if (!options.format) { + options.format = DEFAULTS.format; + } + args.push(options.format); + + // preparing quality + if (!options.quality || (!isNaN(options.quality) && options.quality <= 0)) { + options.quality = DEFAULTS.quality; + } + args.push(options.quality); + + return args; +} + + +window.ImageSaver = ImageSaver; +window.imageSaver = new ImageSaver(); +module.exports = new ImageSaver(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..59d3f90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,3 @@ +cordova.define("molpay-mobile-xdk-cordova.MOLPay", function(require, exports, module) { +function MOLPay(){window.open=cordova.InAppBrowser.open}Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var a=this.length-1;a>=0;a--)this[a]&&this[a].parentElement&&this[a].parentElement.removeChild(this[a])};var isInternalDebugging=!1,moduleId="molpay-mobile-xdk-cordova",wrapperVersion="0",molpaySdkUrl="molpay-mobile-xdk-www/index.html",mpopenmolpaywindow="mpopenmolpaywindow://",mptransactionresults="mptransactionresults://",mprunscriptonpopup="mprunscriptonpopup://",mpcloseallwindows="mpcloseallwindows://",mppinstructioncapture="mppinstructioncapture://",molpayresulturl="MOLPay/result.php",molpaynbepayurl="MOLPay/nbepay.php",b4results='"msgType":"B4"',c6results='"msgType":"C6"',molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!1,hideFrame=function(a){a.style.visibility="hidden",a.style.position="absolute",a.style.width="0px",a.style.height="0px"},showFrame=function(a){a.style.visibility="visible",a.style.position="absolute",a.style.width="100%",a.style.height="100%"},postMolpayResultHandler=function(a){var b=a;if(b){var c=new RegExp(""),h=d.match(e);if(d&&h&&f.exec(d)&&g.exec(d))for(var i=h.length-1;i>=0;i--)b=f.exec(d).index,c=g.exec(d).index,d=d.substring(0,b)+""+d.substring(c+1);return d};b=e(b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(g=JSON.parse(b))){var h=g.tranID;h&&mainUiFrame.contentWindow.transactionRequestWithTransactionId(h)}}},createBankUiWindow=function(a){var b="data:text/html;base64,"+a;bankUiWindow=window.open(b,"_blank","location=no,hardwareback=no,disallowoverscroll=yes,toolbarposition=top,transitionstyle=crossdissolve");var c=function(a){mainUiFrame.contentWindow.transactionRequest(),bankUiWindow.removeEventListener("exit",c)};bankUiWindow.addEventListener("exit",c);var d=function(a){var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){var b;if(mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url}),b=new RegExp(molpaynbepayurl),a&&b.test(a.url))var c=10,d=0,f=setInterval(function(){g()},1e3),g=function(){d++,d>c?clearInterval(f):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0],c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){function b(){window.plugins.toast.showWithOptions({message:"Image saved success!",duration:1e3,position:"bottom"})}function c(){window.plugins.toast.showWithOptions({message:"Image saved fail!",duration:1e3,position:"bottom"})}function d(){var a=cordova.plugins.permissions;c();var b=function(){c()};a.requestPermission(a.WRITE_EXTERNAL_STORAGE,function(a){a.hasPermission?k():b()},b)}var e,f;if(a&&a.indexOf(mpopenmolpaywindow)>-1)f=new RegExp(mpopenmolpaywindow,"g"),e=a.replace(f,""),e&&e.length>0&&createBankUiWindow(e);else if(a&&a.indexOf(mpcloseallwindows)>-1)bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1){if(f=new RegExp(mptransactionresults,"g"),e=a.replace(f,""),e&&e.length>0){var g=window.atob(e),h=JSON.stringify(JSON.parse(g));transactionResultCallback(h),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}}else if(a&&a.indexOf(mppinstructioncapture)>-1){f=new RegExp(mppinstructioncapture,"g"),e=a.replace(f,"");var i=JSON.parse(atob(e)),j={data:i.base64ImageUrlData,prefix:i.filename,format:"PNG",quality:100,mediaScanner:!0};window.imageSaver.saveBase64Image(j,function(a){b()},d);var k=function(){window.imageSaver.saveBase64Image(j,function(a){b()},function(a){c()})}}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(f=new RegExp(mprunscriptonpopup,"g"),e=a.replace(f,""),e&&e.length>0)){var l=window.atob(e);bankUiWindow.executeScript({code:l},function(a){})}},testCredentialsCallback=function(a,b){testMerchantCredentialsCallback(a,b),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayChannelRequestFrame&&molpayChannelRequestFrame.remove()},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isClosingMolpay=!1;try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayDiv=document.getElementById("molpay"),molpayDiv.style.width="100%",molpayDiv.style.padding="0px",molpayDiv.style.border="0px",mainUiFrame=document.createElement("iframe");var d=function(a){mainUiFrame.contentWindow.updateSdkData(JSON.stringify(molpayPaymentDetails),inAppCallback),mainUiFrame.removeEventListener("load",d)};mainUiFrame.style.border="0px",mainUiFrame.style.padding="0px",mainUiFrame.style.width="100%",mainUiFrame.style.height="100%",mainUiFrame.id="mainUiFrame",mainUiFrame.allowScriptAccess="always",mainUiFrame.setAttribute("src",molpaySdkUrl),molpayDiv.appendChild(mainUiFrame),mainUiFrame.addEventListener("load",d)},MOLPay.prototype.transactionRequest=function(a,b){try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayTransactionRequestFrame=document.createElement("iframe");var d=function(a){molpayTransactionRequestFrame.contentWindow.updateSdkData(molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame.removeEventListener("load",d)};molpayTransactionRequestFrame.id="molpayTransactionRequestFrame",molpayTransactionRequestFrame.allowScriptAccess="always",molpayTransactionRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document.body.appendChild(molpayTransactionRequestFrame),molpayTransactionRequestFrame.addEventListener("load",d)},MOLPay.prototype.closeMolpay=function(){mainUiFrame.contentWindow.closemolpay()},MOLPay.prototype.testMerchantCredentials=function(a,b){b&&(testMerchantCredentialsCallback=b),molpayChannelRequestFrame=document.createElement("iframe");var c=function(b){molpayChannelRequestFrame.contentWindow.testMerchantCredentials(a,testCredentialsCallback),molpayChannelRequestFrame.removeEventListener("load",c)};molpayChannelRequestFrame.allowScriptAccess="always",molpayChannelRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayChannelRequestFrame),document.body.appendChild(molpayChannelRequestFrame),molpayChannelRequestFrame.addEventListener("load",c)};var molpay=new MOLPay;module.exports=molpay; +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/project.properties b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/project.properties new file mode 100644 index 0000000..a34057d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt +# Project target. +target=android-25 +android.library.reference.1=CordovaLib diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_next_item.png new file mode 100644 index 0000000..fa469d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_previous_item.png new file mode 100644 index 0000000..e861ecc Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_remove.png new file mode 100644 index 0000000..f889617 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-hdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-hdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-hdpi/screen.png new file mode 100644 index 0000000..a61e2b1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-hdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-ldpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-ldpi/screen.png new file mode 100644 index 0000000..f3934cd Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-ldpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-mdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-mdpi/screen.png new file mode 100644 index 0000000..a1b697c Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-mdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-xhdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-xhdpi/screen.png new file mode 100644 index 0000000..79f2f09 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-land-xhdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_next_item.png new file mode 100644 index 0000000..47365a3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_previous_item.png new file mode 100644 index 0000000..4ad2df4 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_remove.png new file mode 100644 index 0000000..e84853e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-mdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-hdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-hdpi/screen.png new file mode 100644 index 0000000..5d6a28a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-hdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-ldpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-ldpi/screen.png new file mode 100644 index 0000000..65ad163 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-ldpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-mdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-mdpi/screen.png new file mode 100644 index 0000000..ea15693 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-mdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-xhdpi/screen.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-xhdpi/screen.png new file mode 100644 index 0000000..c2e8042 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-port-xhdpi/screen.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_next_item.png new file mode 100644 index 0000000..5f30474 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..ed8ac91 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_remove.png new file mode 100644 index 0000000..4cd0458 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_next_item.png new file mode 100644 index 0000000..51479d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..bc8ff12 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_remove.png new file mode 100644 index 0000000..331c545 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/drawable-xxhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-hdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-hdpi/icon.png new file mode 100644 index 0000000..4d27634 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-hdpi/icon.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-ldpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-ldpi/icon.png new file mode 100644 index 0000000..cd5032a Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-ldpi/icon.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-mdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-mdpi/icon.png new file mode 100644 index 0000000..e79c606 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-mdpi/icon.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-xhdpi/icon.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-xhdpi/icon.png new file mode 100644 index 0000000..ec7ffbf Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/mipmap-xhdpi/icon.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/values/strings.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/values/strings.xml new file mode 100644 index 0000000..badc945 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/values/strings.xml @@ -0,0 +1,6 @@ + + + MOLPayExample + @string/app_name + @string/launcher_name + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/xml/config.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/xml/config.xml new file mode 100644 index 0000000..083dc95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/res/xml/config.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + MOLPayExample + + A sample Apache Cordova application that implements MOLPay XDK Cordova Plugin. + + + MOLPay Mobile Tech Team + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/settings.gradle b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/settings.gradle new file mode 100644 index 0000000..8a39471 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/settings.gradle @@ -0,0 +1,3 @@ +// GENERATED FILE - DO NOT EDIT +include ":" +include ":CordovaLib" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/agomezmoron/SaveImageGallery/SaveImageGallery.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/agomezmoron/SaveImageGallery/SaveImageGallery.java new file mode 100644 index 0000000..4061796 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/agomezmoron/SaveImageGallery/SaveImageGallery.java @@ -0,0 +1,217 @@ +package com.agomezmoron.saveImageGallery; + +import java.io.File; +import java.io.FileOutputStream; +import java.util.Calendar; +import java.util.Arrays; +import java.util.List; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; + +import org.json.JSONArray; +import org.json.JSONException; + +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.net.Uri; +import android.os.Build; +import android.os.Environment; +import android.util.Base64; +import android.util.Log; + +/** + * SaveImageGallery.java + * + * Extended Android implementation of the Base64ToGallery for iOS. + * Inspirated by StefanoMagrassi's code + * https://github.com/Nexxa/cordova-base64-to-gallery + * + * @author Alejandro Gomez + */ +public class SaveImageGallery extends CordovaPlugin { + + // Consts + public static final String EMPTY_STR = ""; + + public static final String JPG_FORMAT = "JPG"; + public static final String PNG_FORMAT = "PNG"; + + // actions constants + public static final String SAVE_BASE64_ACTION = "saveImageDataToLibrary"; + public static final String REMOVE_IMAGE_ACTION = "removeImageFromLibrary"; + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + + if (action.equals(SAVE_BASE64_ACTION)) { + this.saveBase64Image(args, callbackContext); + } else if (action.equals(REMOVE_IMAGE_ACTION)) { + this.removeImage(args, callbackContext); + } else { // default case: SAVE_BASE64_ACTION + this.saveBase64Image(args, callbackContext); + } + + return true; + } + + /** + * It deletes an image from the given path. + */ + private void removeImage(JSONArray args, CallbackContext callbackContext) throws JSONException { + String filename = args.optString(0); + + // isEmpty() requires API level 9 + if (filename.equals(EMPTY_STR)) { + callbackContext.error("Missing filename string"); + } + + File file = new File(filename); + if (file.exists()) { + try { + file.delete(); + } catch (Exception ex) { + callbackContext.error(ex.getMessage()); + } + } + + callbackContext.success(filename); + + } + + /** + * It saves a Base64 String into an image. + */ + private void saveBase64Image(JSONArray args, CallbackContext callbackContext) throws JSONException { + String base64 = args.optString(0); + String filePrefix = args.optString(1); + boolean mediaScannerEnabled = args.optBoolean(2); + String format = args.optString(3); + int quality = args.optInt(4); + + List allowedFormats = Arrays.asList(new String[] { JPG_FORMAT, PNG_FORMAT }); + + // isEmpty() requires API level 9 + if (base64.equals(EMPTY_STR)) { + callbackContext.error("Missing base64 string"); + } + + // isEmpty() requires API level 9 + if (format.equals(EMPTY_STR) || !allowedFormats.contains(format.toUpperCase())) { + format = JPG_FORMAT; + } + + if (quality <= 0) { + quality = 100; + } + + // Create the bitmap from the base64 string + byte[] decodedString = Base64.decode(base64, Base64.DEFAULT); + Bitmap bmp = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length); + + if (bmp == null) { + callbackContext.error("The image could not be decoded"); + + } else { + + // Save the image + File imageFile = savePhoto(bmp, filePrefix, format, quality); + + if (imageFile == null) { + callbackContext.error("Error while saving image"); + } + + // Update image gallery + if (mediaScannerEnabled) { + scanPhoto(imageFile); + } + + String path = imageFile.toString(); + + if (!path.startsWith("file://")) { + path = "file://" + path; + } + + callbackContext.success(path); + } + } + + /** + * Private method to save a {@link Bitmap} into the photo library/temp folder with a format, a prefix and with the given quality. + */ + private File savePhoto(Bitmap bmp, String prefix, String format, int quality) { + File retVal = null; + + try { + String deviceVersion = Build.VERSION.RELEASE; + Calendar c = Calendar.getInstance(); + String date = EMPTY_STR + c.get(Calendar.YEAR) + c.get(Calendar.MONTH) + c.get(Calendar.DAY_OF_MONTH) + + c.get(Calendar.HOUR_OF_DAY) + c.get(Calendar.MINUTE) + c.get(Calendar.SECOND); + + int check = deviceVersion.compareTo("2.3.3"); + + File folder; + + /* + * File path = Environment.getExternalStoragePublicDirectory( + * Environment.DIRECTORY_PICTURES ); //this throws error in Android + * 2.2 + */ + if (check >= 1) { + folder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); + + if (!folder.exists()) { + folder.mkdirs(); + } + + } else { + folder = Environment.getExternalStorageDirectory(); + } + + // building the filename + String fileName = prefix + date; + Bitmap.CompressFormat compressFormat = null; + // switch for String is not valid for java < 1.6, so we avoid it + if (format.equalsIgnoreCase(JPG_FORMAT)) { + fileName += ".jpeg"; + compressFormat = Bitmap.CompressFormat.JPEG; + } else if (format.equalsIgnoreCase(PNG_FORMAT)) { + fileName += ".png"; + compressFormat = Bitmap.CompressFormat.PNG; + } else { + // default case + fileName += ".jpeg"; + compressFormat = Bitmap.CompressFormat.JPEG; + } + + // now we create the image in the folder + File imageFile = new File(folder, fileName); + FileOutputStream out = new FileOutputStream(imageFile); + // compress it + bmp.compress(compressFormat, quality, out); + out.flush(); + out.close(); + + retVal = imageFile; + + } catch (Exception e) { + Log.e("SaveImageToGallery", "An exception occured while saving image: " + e.toString()); + } + + return retVal; + } + + /** + * Invoke the system's media scanner to add your photo to the Media Provider's database, + * making it available in the Android Gallery application and to other apps. + */ + private void scanPhoto(File imageFile) { + Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); + Uri contentUri = Uri.fromFile(imageFile); + + mediaScanIntent.setData(contentUri); + + cordova.getActivity().sendBroadcast(mediaScanIntent); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/android/plugins/Permissions.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/android/plugins/Permissions.java new file mode 100644 index 0000000..64d3213 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/com/android/plugins/Permissions.java @@ -0,0 +1,156 @@ +package com.android.plugins; + +import android.os.Build; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Created by JasonYang on 2016/3/11. + */ +public class Permissions extends CordovaPlugin { + + private static final String ACTION_HAS_PERMISSION = "hasPermission"; + private static final String ACTION_REQUEST_PERMISSION = "requestPermission"; + private static final String ACTION_REQUEST_PERMISSIONS = "requestPermissions"; + + private static final int REQUEST_CODE_ENABLE_PERMISSION = 55433; + + private static final String KEY_ERROR = "error"; + private static final String KEY_MESSAGE = "message"; + + private CallbackContext permissionsCallback; + + @Override + public boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException { + if (ACTION_HAS_PERMISSION.equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + hasPermissionAction(callbackContext, args); + } + }); + return true; + } else if (ACTION_REQUEST_PERMISSION.equals(action) || ACTION_REQUEST_PERMISSIONS.equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try { + requestPermissionAction(callbackContext, args); + } catch (Exception e) { + e.printStackTrace(); + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "Request permission has been denied."); + callbackContext.error(returnObj); + permissionsCallback = null; + } + } + }); + return true; + } + return false; + } + + @Override + public void onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) throws JSONException { + if (permissionsCallback == null) { + return; + } + + JSONObject returnObj = new JSONObject(); + if (permissions != null && permissions.length > 0) { + //Call hasPermission again to verify + boolean hasAllPermissions = hasAllPermissions(permissions); + addProperty(returnObj, ACTION_HAS_PERMISSION, hasAllPermissions); + permissionsCallback.success(returnObj); + } else { + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "Unknown error."); + permissionsCallback.error(returnObj); + } + permissionsCallback = null; + } + + private void hasPermissionAction(CallbackContext callbackContext, JSONArray permission) { + if (permission == null || permission.length() == 0 || permission.length() > 1) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_HAS_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "One time one permission only."); + callbackContext.error(returnObj); + } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else { + try { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, cordova.hasPermission(permission.getString(0))); + callbackContext.success(returnObj); + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + + private void requestPermissionAction(CallbackContext callbackContext, JSONArray permissions) throws Exception { + if (permissions == null || permissions.length() == 0) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "At least one permission."); + callbackContext.error(returnObj); + } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else if (hasAllPermissions(permissions)) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else { + permissionsCallback = callbackContext; + String[] permissionArray = getPermissions(permissions); + cordova.requestPermissions(this, REQUEST_CODE_ENABLE_PERMISSION, permissionArray); + } + } + + private String[] getPermissions(JSONArray permissions) { + String[] stringArray = new String[permissions.length()]; + for (int i = 0; i < permissions.length(); i++) { + try { + stringArray[i] = permissions.getString(i); + } catch (JSONException ignored) { + //Believe exception only occurs when adding duplicate keys, so just ignore it + } + } + return stringArray; + } + + private boolean hasAllPermissions(JSONArray permissions) throws JSONException { + return hasAllPermissions(getPermissions(permissions)); + } + + private boolean hasAllPermissions(String[] permissions) throws JSONException { + + for (String permission : permissions) { + if(!cordova.hasPermission(permission)) { + return false; + } + } + + return true; + } + + private void addProperty(JSONObject obj, String key, Object value) { + try { + if (value == null) { + obj.put(key, JSONObject.NULL); + } else { + obj.put(key, value); + } + } catch (JSONException ignored) { + //Believe exception only occurs when adding duplicate keys, so just ignore it + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/molpay/mobile/xdk/example/MainActivity.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/molpay/mobile/xdk/example/MainActivity.java new file mode 100644 index 0000000..11eab90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/molpay/mobile/xdk/example/MainActivity.java @@ -0,0 +1,41 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +package molpay.mobile.xdk.example; + +import android.os.Bundle; +import org.apache.cordova.*; + +public class MainActivity extends CordovaActivity +{ + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + // enable Cordova apps to be started in the background + Bundle extras = getIntent().getExtras(); + if (extras != null && extras.getBoolean("cdvStartInBackground", false)) { + moveTaskToBack(true); + } + + // Set by in config.xml + loadUrl(launchUrl); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/nl/xservices/plugins/Toast.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/nl/xservices/plugins/Toast.java new file mode 100644 index 0000000..a572481 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/nl/xservices/plugins/Toast.java @@ -0,0 +1,260 @@ +package nl.xservices.plugins; + +import android.graphics.Color; +import android.graphics.drawable.GradientDrawable; +import android.os.Build; +import android.os.CountDownTimer; +import android.text.Layout; +import android.text.Spannable; +import android.text.SpannableString; +import android.text.style.AlignmentSpan; +import android.view.Gravity; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +public class Toast extends CordovaPlugin { + + private static final String ACTION_SHOW_EVENT = "show"; + private static final String ACTION_HIDE_EVENT = "hide"; + + private static final int GRAVITY_TOP = Gravity.TOP|Gravity.CENTER_HORIZONTAL; + private static final int GRAVITY_CENTER = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + private static final int GRAVITY_BOTTOM = Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL; + + private static final int BASE_TOP_BOTTOM_OFFSET = 20; + + private android.widget.Toast mostRecentToast; + private ViewGroup viewGroup; + + private static final boolean IS_AT_LEAST_LOLLIPOP = Build.VERSION.SDK_INT >= 21; + + // note that webView.isPaused() is not Xwalk compatible, so tracking it poor-man style + private boolean isPaused; + + private String currentMessage; + private JSONObject currentData; + private static CountDownTimer _timer; + + @Override + public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { + if (ACTION_HIDE_EVENT.equals(action)) { + returnTapEvent("hide", currentMessage, currentData, callbackContext); + hide(); + callbackContext.success(); + return true; + + } else if (ACTION_SHOW_EVENT.equals(action)) { + if (this.isPaused) { + return true; + } + + final JSONObject options = args.getJSONObject(0); + final String msg = options.getString("message"); + final Spannable message = new SpannableString(msg); + message.setSpan( + new AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER), + 0, + msg.length() - 1, + Spannable.SPAN_INCLUSIVE_INCLUSIVE); + + final String duration = options.getString("duration"); + final String position = options.getString("position"); + final int addPixelsY = options.has("addPixelsY") ? options.getInt("addPixelsY") : 0; + final JSONObject data = options.has("data") ? options.getJSONObject("data") : null; + final JSONObject styling = options.optJSONObject("styling"); + + currentMessage = msg; + currentData = data; + + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + int hideAfterMs; + if ("short".equalsIgnoreCase(duration)) { + hideAfterMs = 2000; + } else if ("long".equalsIgnoreCase(duration)) { + hideAfterMs = 4000; + } else { + // assuming a number of ms + hideAfterMs = Integer.parseInt(duration); + } + final android.widget.Toast toast = android.widget.Toast.makeText( + IS_AT_LEAST_LOLLIPOP ? cordova.getActivity().getWindow().getContext() : cordova.getActivity().getApplicationContext(), + message, + android.widget.Toast.LENGTH_LONG // actually controlled by a timer further down + ); + + if ("top".equals(position)) { + toast.setGravity(GRAVITY_TOP, 0, BASE_TOP_BOTTOM_OFFSET + addPixelsY); + } else if ("bottom".equals(position)) { + toast.setGravity(GRAVITY_BOTTOM, 0, BASE_TOP_BOTTOM_OFFSET - addPixelsY); + } else if ("center".equals(position)) { + toast.setGravity(GRAVITY_CENTER, 0, addPixelsY); + } else { + callbackContext.error("invalid position. valid options are 'top', 'center' and 'bottom'"); + return; + } + + // if one of the custom layout options have been passed in, draw our own shape + if (styling != null && Build.VERSION.SDK_INT >= 16) { + + // the defaults mimic the default toast as close as possible + final String backgroundColor = styling.optString("backgroundColor", "#333333"); + final String textColor = styling.optString("textColor", "#ffffff"); + final Double textSize = styling.optDouble("textSize", -1); + final double opacity = styling.optDouble("opacity", 0.8); + final int cornerRadius = styling.optInt("cornerRadius", 100); + final int horizontalPadding = styling.optInt("horizontalPadding", 50); + final int verticalPadding = styling.optInt("verticalPadding", 30); + + GradientDrawable shape = new GradientDrawable(); + shape.setCornerRadius(cornerRadius); + shape.setAlpha((int)(opacity * 255)); // 0-255, where 0 is an invisible background + shape.setColor(Color.parseColor(backgroundColor)); + toast.getView().setBackground(shape); + + final TextView toastTextView; + toastTextView = (TextView) toast.getView().findViewById(android.R.id.message); + toastTextView.setTextColor(Color.parseColor(textColor)); + if (textSize > -1) { + toastTextView.setTextSize(textSize.floatValue()); + } + + toast.getView().setPadding(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding); + + // this gives the toast a very subtle shadow on newer devices + if (Build.VERSION.SDK_INT >= 21) { + toast.getView().setElevation(6); + } + } + + // On Android >= 5 you can no longer rely on the 'toast.getView().setOnTouchListener', + // so created something funky that compares the Toast position to the tap coordinates. + if (IS_AT_LEAST_LOLLIPOP) { + getViewGroup().setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View view, MotionEvent motionEvent) { + if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) { + return false; + } + if (mostRecentToast == null || !mostRecentToast.getView().isShown()) { + getViewGroup().setOnTouchListener(null); + return false; + } + + float w = mostRecentToast.getView().getWidth(); + float startX = (view.getWidth() / 2) - (w / 2); + float endX = (view.getWidth() / 2) + (w / 2); + + float startY; + float endY; + + float g = mostRecentToast.getGravity(); + float y = mostRecentToast.getYOffset(); + float h = mostRecentToast.getView().getHeight(); + + if (g == GRAVITY_BOTTOM) { + startY = view.getHeight() - y - h; + endY = view.getHeight() - y; + } else if (g == GRAVITY_CENTER) { + startY = (view.getHeight() / 2) + y - (h / 2); + endY = (view.getHeight() / 2) + y + (h / 2); + } else { + // top + startY = y; + endY = y + h; + } + + float tapX = motionEvent.getX(); + float tapY = motionEvent.getY(); + + final boolean tapped = tapX >= startX && tapX <= endX && + tapY >= startY && tapY <= endY; + + return tapped && returnTapEvent("touch", msg, data, callbackContext); + } + }); + } else { + toast.getView().setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View view, MotionEvent motionEvent) { + return motionEvent.getAction() == MotionEvent.ACTION_DOWN && returnTapEvent("touch", msg, data, callbackContext); + } + }); + } + // trigger show every 2500 ms for as long as the requested duration + _timer = new CountDownTimer(hideAfterMs, 2500) { + public void onTick(long millisUntilFinished) {toast.show();} + public void onFinish() { + returnTapEvent("hide", msg, data, callbackContext); + toast.cancel(); + } + }.start(); + + mostRecentToast = toast; + toast.show(); + + PluginResult pr = new PluginResult(PluginResult.Status.OK); + pr.setKeepCallback(true); + callbackContext.sendPluginResult(pr); + } + }); + + return true; + } else { + callbackContext.error("toast." + action + " is not a supported function. Did you mean '" + ACTION_SHOW_EVENT + "'?"); + return false; + } + } + + + private void hide() { + if (mostRecentToast != null) { + mostRecentToast.cancel(); + getViewGroup().setOnTouchListener(null); + } + if (_timer != null) { + _timer.cancel(); + } + } + + private boolean returnTapEvent(String eventName, String message, JSONObject data, CallbackContext callbackContext) { + final JSONObject json = new JSONObject(); + try { + json.put("event", eventName); + json.put("message", message); + json.put("data", data); + } catch (JSONException e) { + e.printStackTrace(); + } + callbackContext.success(json); + return true; + } + + // lazy init and caching + private ViewGroup getViewGroup() { + if (viewGroup == null) { + viewGroup = (ViewGroup) ((ViewGroup) cordova.getActivity().findViewById(android.R.id.content)).getChildAt(0); + } + return viewGroup; + } + + @Override + public void onPause(boolean multitasking) { + hide(); + this.isPaused = true; + } + + @Override + public void onResume(boolean multitasking) { + this.isPaused = false; + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java new file mode 100644 index 0000000..c10617e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowser.java @@ -0,0 +1,1114 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.Intent; +import android.provider.Browser; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import android.webkit.CookieManager; +import android.webkit.CookieSyncManager; +import android.webkit.HttpAuthHandler; +import android.webkit.ValueCallback; +import android.webkit.WebChromeClient; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.EditText; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.Config; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaHttpAuthHandler; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginManager; +import org.apache.cordova.PluginResult; +import org.json.JSONException; +import org.json.JSONObject; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.StringTokenizer; + +@SuppressLint("SetJavaScriptEnabled") +public class InAppBrowser extends CordovaPlugin { + + private static final String NULL = "null"; + protected static final String LOG_TAG = "InAppBrowser"; + private static final String SELF = "_self"; + private static final String SYSTEM = "_system"; + private static final String EXIT_EVENT = "exit"; + private static final String LOCATION = "location"; + private static final String ZOOM = "zoom"; + private static final String HIDDEN = "hidden"; + private static final String LOAD_START_EVENT = "loadstart"; + private static final String LOAD_STOP_EVENT = "loadstop"; + private static final String LOAD_ERROR_EVENT = "loaderror"; + private static final String CLEAR_ALL_CACHE = "clearcache"; + private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; + private static final String HARDWARE_BACK_BUTTON = "hardwareback"; + private static final String MEDIA_PLAYBACK_REQUIRES_USER_ACTION = "mediaPlaybackRequiresUserAction"; + private static final String SHOULD_PAUSE = "shouldPauseOnSuspend"; + private static final Boolean DEFAULT_HARDWARE_BACK = true; + private static final String USER_WIDE_VIEW_PORT = "useWideViewPort"; + + private InAppBrowserDialog dialog; + private WebView inAppWebView; + private EditText edittext; + private CallbackContext callbackContext; + private boolean showLocationBar = true; + private boolean showZoomControls = true; + private boolean openWindowHidden = false; + private boolean clearAllCache = false; + private boolean clearSessionCache = false; + private boolean hadwareBackButton = true; + private boolean mediaPlaybackRequiresUserGesture = false; + private boolean shouldPauseInAppBrowser = false; + private boolean useWideViewPort = true; + private ValueCallback mUploadCallback; + private ValueCallback mUploadCallbackLollipop; + private final static int FILECHOOSER_REQUESTCODE = 1; + private final static int FILECHOOSER_REQUESTCODE_LOLLIPOP = 2; + + /** + * Executes the request and returns PluginResult. + * + * @param action the action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext the callbackContext used when calling back into JavaScript. + * @return A PluginResult object with a status and message. + */ + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("open")) { + this.callbackContext = callbackContext; + final String url = args.getString(0); + String t = args.optString(1); + if (t == null || t.equals("") || t.equals(NULL)) { + t = SELF; + } + final String target = t; + final HashMap features = parseFeature(args.optString(2)); + + LOG.d(LOG_TAG, "target = " + target); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + String result = ""; + // SELF + if (SELF.equals(target)) { + LOG.d(LOG_TAG, "in self"); + /* This code exists for compatibility between 3.x and 4.x versions of Cordova. + * Previously the Config class had a static method, isUrlWhitelisted(). That + * responsibility has been moved to the plugins, with an aggregating method in + * PluginManager. + */ + Boolean shouldAllowNavigation = null; + if (url.startsWith("javascript:")) { + shouldAllowNavigation = true; + } + if (shouldAllowNavigation == null) { + try { + Method iuw = Config.class.getMethod("isUrlWhiteListed", String.class); + shouldAllowNavigation = (Boolean)iuw.invoke(null, url); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + if (shouldAllowNavigation == null) { + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + PluginManager pm = (PluginManager)gpm.invoke(webView); + Method san = pm.getClass().getMethod("shouldAllowNavigation", String.class); + shouldAllowNavigation = (Boolean)san.invoke(pm, url); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + // load in webview + if (Boolean.TRUE.equals(shouldAllowNavigation)) { + LOG.d(LOG_TAG, "loading in webview"); + webView.loadUrl(url); + } + //Load the dialer + else if (url.startsWith(WebView.SCHEME_TEL)) + { + try { + LOG.d(LOG_TAG, "loading in dialer"); + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + // load in InAppBrowser + else { + LOG.d(LOG_TAG, "loading in InAppBrowser"); + result = showWebPage(url, features); + } + } + // SYSTEM + else if (SYSTEM.equals(target)) { + LOG.d(LOG_TAG, "in system"); + result = openExternal(url); + } + // BLANK - or anything else + else { + LOG.d(LOG_TAG, "in blank"); + result = showWebPage(url, features); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + } + }); + } + else if (action.equals("close")) { + closeDialog(); + } + else if (action.equals("injectScriptCode")) { + String jsWrapper = null; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(){prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')})()", callbackContext.getCallbackId()); + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectScriptFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleCode")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("show")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.show(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else if (action.equals("hide")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.hide(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else { + return false; + } + return true; + } + + /** + * Called when the view navigates. + */ + @Override + public void onReset() { + closeDialog(); + } + + /** + * Called when the system is about to start resuming a previous activity. + */ + @Override + public void onPause(boolean multitasking) { + if (shouldPauseInAppBrowser) { + inAppWebView.onPause(); + } + } + + /** + * Called when the activity will start interacting with the user. + */ + @Override + public void onResume(boolean multitasking) { + if (shouldPauseInAppBrowser) { + inAppWebView.onResume(); + } + } + + /** + * Called by AccelBroker when listener is to be shut down. + * Stop listener. + */ + public void onDestroy() { + closeDialog(); + } + + /** + * Inject an object (script or style) into the InAppBrowser WebView. + * + * This is a helper method for the inject{Script|Style}{Code|File} API calls, which + * provides a consistent method for injecting JavaScript code into the document. + * + * If a wrapper string is supplied, then the source string will be JSON-encoded (adding + * quotes) and wrapped using string formatting. (The wrapper string should have a single + * '%s' marker) + * + * @param source The source object (filename or script/style text) to inject into + * the document. + * @param jsWrapper A JavaScript string to wrap the source string in, so that the object + * is properly injected, or null if the source string is JavaScript text + * which should be executed directly. + */ + private void injectDeferredObject(String source, String jsWrapper) { + if (inAppWebView!=null) { + String scriptToInject; + if (jsWrapper != null) { + org.json.JSONArray jsonEsc = new org.json.JSONArray(); + jsonEsc.put(source); + String jsonRepr = jsonEsc.toString(); + String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); + scriptToInject = String.format(jsWrapper, jsonSourceString); + } else { + scriptToInject = source; + } + final String finalScriptToInject = scriptToInject; + this.cordova.getActivity().runOnUiThread(new Runnable() { + @SuppressLint("NewApi") + @Override + public void run() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // This action will have the side-effect of blurring the currently focused element + inAppWebView.loadUrl("javascript:" + finalScriptToInject); + } else { + inAppWebView.evaluateJavascript(finalScriptToInject, null); + } + } + }); + } else { + LOG.d(LOG_TAG, "Can't inject code into the system browser"); + } + } + + /** + * Put the list of features into a hash map + * + * @param optString + * @return + */ + private HashMap parseFeature(String optString) { + if (optString.equals(NULL)) { + return null; + } else { + HashMap map = new HashMap(); + StringTokenizer features = new StringTokenizer(optString, ","); + StringTokenizer option; + while(features.hasMoreElements()) { + option = new StringTokenizer(features.nextToken(), "="); + if (option.hasMoreElements()) { + String key = option.nextToken(); + Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + map.put(key, value); + } + } + return map; + } + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @return "" if ok, or error message. + */ + public String openExternal(String url) { + try { + Intent intent = null; + intent = new Intent(Intent.ACTION_VIEW); + // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". + // Adding the MIME type to http: URLs causes them to not be handled by the downloader. + Uri uri = Uri.parse(url); + if ("file".equals(uri.getScheme())) { + intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); + } else { + intent.setData(uri); + } + intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); + this.cordova.getActivity().startActivity(intent); + return ""; + // not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it + } catch (java.lang.RuntimeException e) { + LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); + return e.toString(); + } + } + + /** + * Closes the dialog + */ + public void closeDialog() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + final WebView childView = inAppWebView; + // The JS protects against multiple calls, so this should happen only when + // closeDialog() is called by other native code. + if (childView == null) { + return; + } + + childView.setWebViewClient(new WebViewClient() { + // NB: wait for about:blank before dismissing + public void onPageFinished(WebView view, String url) { + if (dialog != null) { + dialog.dismiss(); + dialog = null; + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread + // other than your app's UI thread, it can cause unexpected results." + // http://developer.android.com/guide/webapps/migrating.html#Threads + childView.loadUrl("about:blank"); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", EXIT_EVENT); + sendUpdate(obj, false); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + }); + } + + /** + * Checks to see if it is possible to go back one page in history, then does so. + */ + public void goBack() { + if (this.inAppWebView.canGoBack()) { + this.inAppWebView.goBack(); + } + } + + /** + * Can the web browser go back? + * @return boolean + */ + public boolean canGoBack() { + return this.inAppWebView.canGoBack(); + } + + /** + * Has the user set the hardware back button to go back + * @return boolean + */ + public boolean hardwareBack() { + return hadwareBackButton; + } + + /** + * Checks to see if it is possible to go forward one page in history, then does so. + */ + private void goForward() { + if (this.inAppWebView.canGoForward()) { + this.inAppWebView.goForward(); + } + } + + /** + * Navigate to the new page + * + * @param url to load + */ + private void navigate(String url) { + InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); + + if (!url.startsWith("http") && !url.startsWith("file:")) { + this.inAppWebView.loadUrl("http://" + url); + } else { + this.inAppWebView.loadUrl(url); + } + this.inAppWebView.requestFocus(); + } + + + /** + * Should we show the location bar? + * + * @return boolean + */ + private boolean getShowLocationBar() { + return this.showLocationBar; + } + + private InAppBrowser getInAppBrowser(){ + return this; + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @param features jsonObject + */ + public String showWebPage(final String url, HashMap features) { + // Determine if we should hide the location bar. + showLocationBar = true; + showZoomControls = true; + openWindowHidden = false; + mediaPlaybackRequiresUserGesture = false; + + if (features != null) { + Boolean show = features.get(LOCATION); + if (show != null) { + showLocationBar = show.booleanValue(); + } + Boolean zoom = features.get(ZOOM); + if (zoom != null) { + showZoomControls = zoom.booleanValue(); + } + Boolean hidden = features.get(HIDDEN); + if (hidden != null) { + openWindowHidden = hidden.booleanValue(); + } + Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); + if (hardwareBack != null) { + hadwareBackButton = hardwareBack.booleanValue(); + } else { + hadwareBackButton = DEFAULT_HARDWARE_BACK; + } + Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION); + if (mediaPlayback != null) { + mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue(); + } + Boolean cache = features.get(CLEAR_ALL_CACHE); + if (cache != null) { + clearAllCache = cache.booleanValue(); + } else { + cache = features.get(CLEAR_SESSION_CACHE); + if (cache != null) { + clearSessionCache = cache.booleanValue(); + } + } + Boolean shouldPause = features.get(SHOULD_PAUSE); + if (shouldPause != null) { + shouldPauseInAppBrowser = shouldPause.booleanValue(); + } + Boolean wideViewPort = features.get(USER_WIDE_VIEW_PORT); + if (wideViewPort != null ) { + useWideViewPort = wideViewPort.booleanValue(); + } + } + + final CordovaWebView thatWebView = this.webView; + + // Create dialog in new thread + Runnable runnable = new Runnable() { + /** + * Convert our DIP units to Pixels + * + * @return int + */ + private int dpToPixels(int dipValue) { + int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() + ); + + return value; + } + + @SuppressLint("NewApi") + public void run() { + + // CB-6702 InAppBrowser hangs when opening more than one instance + if (dialog != null) { + dialog.dismiss(); + }; + + // Let's create the main dialog + dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); + dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setCancelable(true); + dialog.setInAppBroswer(getInAppBrowser()); + + // Main container layout + LinearLayout main = new LinearLayout(cordova.getActivity()); + main.setOrientation(LinearLayout.VERTICAL); + + // Toolbar layout + RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); + //Please, no more black! + toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); + toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); + toolbar.setHorizontalGravity(Gravity.LEFT); + toolbar.setVerticalGravity(Gravity.TOP); + + // Action Button Container layout + RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); + actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + actionButtonContainer.setHorizontalGravity(Gravity.LEFT); + actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); + actionButtonContainer.setId(Integer.valueOf(1)); + + // Back button + ImageButton back = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); + back.setLayoutParams(backLayoutParams); + back.setContentDescription("Back Button"); + back.setId(Integer.valueOf(2)); + Resources activityRes = cordova.getActivity().getResources(); + int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); + Drawable backIcon = activityRes.getDrawable(backResId); + if (Build.VERSION.SDK_INT >= 16) + back.setBackground(null); + else + back.setBackgroundDrawable(null); + back.setImageDrawable(backIcon); + back.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + back.getAdjustViewBounds(); + + back.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goBack(); + } + }); + + // Forward button + ImageButton forward = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); + forward.setLayoutParams(forwardLayoutParams); + forward.setContentDescription("Forward Button"); + forward.setId(Integer.valueOf(3)); + int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); + Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if (Build.VERSION.SDK_INT >= 16) + forward.setBackground(null); + else + forward.setBackgroundDrawable(null); + forward.setImageDrawable(fwdIcon); + forward.setScaleType(ImageView.ScaleType.FIT_CENTER); + forward.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + forward.getAdjustViewBounds(); + + forward.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goForward(); + } + }); + + // Edit Text Box + edittext = new EditText(cordova.getActivity()); + RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); + textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); + edittext.setLayoutParams(textLayoutParams); + edittext.setId(Integer.valueOf(4)); + edittext.setSingleLine(true); + edittext.setText(url); + edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + edittext.setImeOptions(EditorInfo.IME_ACTION_GO); + edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE + edittext.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + navigate(edittext.getText().toString()); + return true; + } + return false; + } + }); + + // Close/Done button + ImageButton close = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + close.setContentDescription("Close Button"); + close.setId(Integer.valueOf(5)); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if (Build.VERSION.SDK_INT >= 16) + close.setBackground(null); + else + close.setBackgroundDrawable(null); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + close.getAdjustViewBounds(); + + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + // WebView + inAppWebView = new WebView(cordova.getActivity()); + inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + inAppWebView.setId(Integer.valueOf(6)); + // File Chooser Implemented ChromeClient + inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView) { + // For Android 5.0+ + public boolean onShowFileChooser (WebView webView, ValueCallback filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) + { + LOG.d(LOG_TAG, "File Chooser 5.0+"); + // If callback exists, finish it. + if(mUploadCallbackLollipop != null) { + mUploadCallbackLollipop.onReceiveValue(null); + } + mUploadCallbackLollipop = filePathCallback; + + // Create File Chooser Intent + Intent content = new Intent(Intent.ACTION_GET_CONTENT); + content.addCategory(Intent.CATEGORY_OPENABLE); + content.setType("*/*"); + + // Run cordova startActivityForResult + cordova.startActivityForResult(InAppBrowser.this, Intent.createChooser(content, "Select File"), FILECHOOSER_REQUESTCODE_LOLLIPOP); + return true; + } + + // For Android 4.1+ + public void openFileChooser(ValueCallback uploadMsg, String acceptType, String capture) + { + LOG.d(LOG_TAG, "File Chooser 4.1+"); + // Call file chooser for Android 3.0+ + openFileChooser(uploadMsg, acceptType); + } + + // For Android 3.0+ + public void openFileChooser(ValueCallback uploadMsg, String acceptType) + { + LOG.d(LOG_TAG, "File Chooser 3.0+"); + mUploadCallback = uploadMsg; + Intent content = new Intent(Intent.ACTION_GET_CONTENT); + content.addCategory(Intent.CATEGORY_OPENABLE); + + // run startActivityForResult + cordova.startActivityForResult(InAppBrowser.this, Intent.createChooser(content, "Select File"), FILECHOOSER_REQUESTCODE); + } + + }); + WebViewClient client = new InAppBrowserClient(thatWebView, edittext); + inAppWebView.setWebViewClient(client); + WebSettings settings = inAppWebView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setBuiltInZoomControls(showZoomControls); + settings.setPluginState(android.webkit.WebSettings.PluginState.ON); + + if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { + settings.setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture); + } + + String overrideUserAgent = preferences.getString("OverrideUserAgent", null); + String appendUserAgent = preferences.getString("AppendUserAgent", null); + + if (overrideUserAgent != null) { + settings.setUserAgentString(overrideUserAgent); + } + if (appendUserAgent != null) { + settings.setUserAgentString(settings.getUserAgentString() + appendUserAgent); + } + + //Toggle whether this is enabled or not! + Bundle appSettings = cordova.getActivity().getIntent().getExtras(); + boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); + if (enableDatabase) { + String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); + settings.setDatabasePath(databasePath); + settings.setDatabaseEnabled(true); + } + settings.setDomStorageEnabled(true); + + if (clearAllCache) { + CookieManager.getInstance().removeAllCookie(); + } else if (clearSessionCache) { + CookieManager.getInstance().removeSessionCookie(); + } + + inAppWebView.loadUrl(url); + inAppWebView.setId(Integer.valueOf(6)); + inAppWebView.getSettings().setLoadWithOverviewMode(true); + inAppWebView.getSettings().setUseWideViewPort(useWideViewPort); + inAppWebView.requestFocus(); + inAppWebView.requestFocusFromTouch(); + + // Add the back and forward buttons to our action button container layout + actionButtonContainer.addView(back); + actionButtonContainer.addView(forward); + + // Add the views to our toolbar + toolbar.addView(actionButtonContainer); + toolbar.addView(edittext); + toolbar.addView(close); + + // Don't add the toolbar if its been disabled + if (getShowLocationBar()) { + // Add our toolbar to our main view/layout + main.addView(toolbar); + } + + // Add our webview to our main view/layout + main.addView(inAppWebView); + + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); + lp.copyFrom(dialog.getWindow().getAttributes()); + lp.width = WindowManager.LayoutParams.MATCH_PARENT; + lp.height = WindowManager.LayoutParams.MATCH_PARENT; + + dialog.setContentView(main); + dialog.show(); + dialog.getWindow().setAttributes(lp); + // the goal of openhidden is to load the url and not display it + // Show() needs to be called to cause the URL to be loaded + if(openWindowHidden) { + dialog.hide(); + } + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + return ""; + } + + /** + * Create a new plugin success result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + */ + private void sendUpdate(JSONObject obj, boolean keepCallback) { + sendUpdate(obj, keepCallback, PluginResult.Status.OK); + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + * @param status the status code to return to the JavaScript environment + */ + private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { + if (callbackContext != null) { + PluginResult result = new PluginResult(status, obj); + result.setKeepCallback(keepCallback); + callbackContext.sendPluginResult(result); + if (!keepCallback) { + callbackContext = null; + } + } + } + + /** + * Receive File Data from File Chooser + * + * @param requestCode the requested code from chromeclient + * @param resultCode the result code returned from android system + * @param intent the data from android file chooser + */ + public void onActivityResult(int requestCode, int resultCode, Intent intent) { + // For Android >= 5.0 + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + LOG.d(LOG_TAG, "onActivityResult (For Android >= 5.0)"); + // If RequestCode or Callback is Invalid + if(requestCode != FILECHOOSER_REQUESTCODE_LOLLIPOP || mUploadCallbackLollipop == null) { + super.onActivityResult(requestCode, resultCode, intent); + return; + } + mUploadCallbackLollipop.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, intent)); + mUploadCallbackLollipop = null; + } + // For Android < 5.0 + else { + LOG.d(LOG_TAG, "onActivityResult (For Android < 5.0)"); + // If RequestCode or Callback is Invalid + if(requestCode != FILECHOOSER_REQUESTCODE || mUploadCallback == null) { + super.onActivityResult(requestCode, resultCode, intent); + return; + } + + if (null == mUploadCallback) return; + Uri result = intent == null || resultCode != cordova.getActivity().RESULT_OK ? null : intent.getData(); + + mUploadCallback.onReceiveValue(result); + mUploadCallback = null; + } + } + + /** + * The webview client receives notifications about appView + */ + public class InAppBrowserClient extends WebViewClient { + EditText edittext; + CordovaWebView webView; + + /** + * Constructor. + * + * @param webView + * @param mEditText + */ + public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { + this.webView = webView; + this.edittext = mEditText; + } + + /** + * Override the URL that should be loaded + * + * This handles a small subset of all the URIs that would be encountered. + * + * @param webView + * @param url + */ + @Override + public boolean shouldOverrideUrlLoading(WebView webView, String url) { + if (url.startsWith(WebView.SCHEME_TEL)) { + try { + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } else if (url.startsWith("geo:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith("market:") || url.startsWith("intent:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); + } + } + // If sms:5551212?body=This is the message + else if (url.startsWith("sms:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + + // Get address + String address = null; + int parmIndex = url.indexOf('?'); + if (parmIndex == -1) { + address = url.substring(4); + } else { + address = url.substring(4, parmIndex); + + // If body, then set sms body + Uri uri = Uri.parse(url); + String query = uri.getQuery(); + if (query != null) { + if (query.startsWith("body=")) { + intent.putExtra("sms_body", query.substring(5)); + } + } + } + intent.setData(Uri.parse("sms:" + address)); + intent.putExtra("address", address); + intent.setType("vnd.android-dir/mms-sms"); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); + } + } + return false; + } + + + /* + * onPageStarted fires the LOAD_START_EVENT + * + * @param view + * @param url + * @param favicon + */ + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String newloc = ""; + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { + newloc = url; + } + else + { + // Assume that everything is HTTP at this point, because if we don't specify, + // it really should be. Complain loudly about this!!! + LOG.e(LOG_TAG, "Possible Uncaught/Unknown URI"); + newloc = "http://" + url; + } + + // Update the UI if we haven't already + if (!newloc.equals(edittext.getText().toString())) { + edittext.setText(newloc); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_START_EVENT); + obj.put("url", newloc); + sendUpdate(obj, true); + } catch (JSONException ex) { + LOG.e(LOG_TAG, "URI passed in has caused a JSON error."); + } + } + + + + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + + // CB-10395 InAppBrowser's WebView not storing cookies reliable to local device storage + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { + CookieManager.getInstance().flush(); + } else { + CookieSyncManager.getInstance().sync(); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_STOP_EVENT); + obj.put("url", url); + + sendUpdate(obj, true); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_ERROR_EVENT); + obj.put("url", failingUrl); + obj.put("code", errorCode); + obj.put("message", description); + + sendUpdate(obj, true, PluginResult.Status.ERROR); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + + /** + * On received http auth request. + */ + @Override + public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { + + // Check if there is some plugin which can resolve this auth challenge + PluginManager pluginManager = null; + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + pluginManager = (PluginManager)gpm.invoke(webView); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + + if (pluginManager == null) { + try { + Field pmf = webView.getClass().getField("pluginManager"); + pluginManager = (PluginManager)pmf.get(webView); + } catch (NoSuchFieldException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + + if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(webView, new CordovaHttpAuthHandler(handler), host, realm)) { + return; + } + + // By default handle 401 like we'd normally do! + super.onReceivedHttpAuthRequest(view, handler, host, realm); + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java new file mode 100644 index 0000000..e7b212f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppBrowserDialog.java @@ -0,0 +1,57 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.Context; + +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Created by Oliver on 22/11/2013. + */ +public class InAppBrowserDialog extends Dialog { + Context context; + InAppBrowser inAppBrowser = null; + + public InAppBrowserDialog(Context context, int theme) { + super(context, theme); + this.context = context; + } + + public void setInAppBroswer(InAppBrowser browser) { + this.inAppBrowser = browser; + } + + public void onBackPressed () { + if (this.inAppBrowser == null) { + this.dismiss(); + } else { + // better to go through the in inAppBrowser + // because it does a clean up + if (this.inAppBrowser.hardwareBack() && this.inAppBrowser.canGoBack()) { + this.inAppBrowser.goBack(); + } else { + this.inAppBrowser.closeDialog(); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppChromeClient.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppChromeClient.java new file mode 100644 index 0000000..a2145e6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/inappbrowser/InAppChromeClient.java @@ -0,0 +1,133 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; + +import android.webkit.JsPromptResult; +import android.webkit.WebChromeClient; +import android.webkit.WebStorage; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.webkit.GeolocationPermissions.Callback; + +public class InAppChromeClient extends WebChromeClient { + + private CordovaWebView webView; + private String LOG_TAG = "InAppChromeClient"; + private long MAX_QUOTA = 100 * 1024 * 1024; + + public InAppChromeClient(CordovaWebView webView) { + super(); + this.webView = webView; + } + /** + * Handle database quota exceeded notification. + * + * @param url + * @param databaseIdentifier + * @param currentQuota + * @param estimatedSize + * @param totalUsedQuota + * @param quotaUpdater + */ + @Override + public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, + long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) + { + LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); + quotaUpdater.updateQuota(MAX_QUOTA); + } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * The prompt bridge provided for the InAppBrowser is capable of executing any + * oustanding callback belonging to the InAppBrowser plugin. Care has been + * taken that other callbacks cannot be triggered, and that no other code + * execution is possible. + * + * To trigger the bridge, the prompt default value should be of the form: + * + * gap-iab:// + * + * where is the string id of the callback to trigger (something + * like "InAppBrowser0123456789") + * + * If present, the prompt message is expected to be a JSON-encoded value to + * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. + * + * @param view + * @param url + * @param message + * @param defaultValue + * @param result + */ + @Override + public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) { + // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. + if (defaultValue != null && defaultValue.startsWith("gap")) { + if(defaultValue.startsWith("gap-iab://")) { + PluginResult scriptResult; + String scriptCallbackId = defaultValue.substring(10); + if (scriptCallbackId.startsWith("InAppBrowser")) { + if(message == null || message.length() == 0) { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); + } else { + try { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); + } catch(JSONException e) { + scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); + } + } + this.webView.sendPluginResult(scriptResult, scriptCallbackId); + result.confirm(""); + return true; + } + } + else + { + // Anything else with a gap: prefix should get this message + LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); + result.cancel(); + return true; + } + } + return false; + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/whitelist/WhitelistPlugin.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/whitelist/WhitelistPlugin.java new file mode 100644 index 0000000..3656788 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/apache/cordova/whitelist/WhitelistPlugin.java @@ -0,0 +1,161 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova.whitelist; + +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.ConfigXmlParser; +import org.apache.cordova.LOG; +import org.apache.cordova.Whitelist; +import org.xmlpull.v1.XmlPullParser; + +import android.content.Context; + +public class WhitelistPlugin extends CordovaPlugin { + private static final String LOG_TAG = "WhitelistPlugin"; + private Whitelist allowedNavigations; + private Whitelist allowedIntents; + private Whitelist allowedRequests; + + // Used when instantiated via reflection by PluginManager + public WhitelistPlugin() { + } + // These can be used by embedders to allow Java-configuration of whitelists. + public WhitelistPlugin(Context context) { + this(new Whitelist(), new Whitelist(), null); + new CustomConfigXmlParser().parse(context); + } + public WhitelistPlugin(XmlPullParser xmlParser) { + this(new Whitelist(), new Whitelist(), null); + new CustomConfigXmlParser().parse(xmlParser); + } + public WhitelistPlugin(Whitelist allowedNavigations, Whitelist allowedIntents, Whitelist allowedRequests) { + if (allowedRequests == null) { + allowedRequests = new Whitelist(); + allowedRequests.addWhiteListEntry("file:///*", false); + allowedRequests.addWhiteListEntry("data:*", false); + } + this.allowedNavigations = allowedNavigations; + this.allowedIntents = allowedIntents; + this.allowedRequests = allowedRequests; + } + @Override + public void pluginInitialize() { + if (allowedNavigations == null) { + allowedNavigations = new Whitelist(); + allowedIntents = new Whitelist(); + allowedRequests = new Whitelist(); + new CustomConfigXmlParser().parse(webView.getContext()); + } + } + + private class CustomConfigXmlParser extends ConfigXmlParser { + @Override + public void handleStartTag(XmlPullParser xml) { + String strNode = xml.getName(); + if (strNode.equals("content")) { + String startPage = xml.getAttributeValue(null, "src"); + allowedNavigations.addWhiteListEntry(startPage, false); + } else if (strNode.equals("allow-navigation")) { + String origin = xml.getAttributeValue(null, "href"); + if ("*".equals(origin)) { + allowedNavigations.addWhiteListEntry("http://*/*", false); + allowedNavigations.addWhiteListEntry("https://*/*", false); + allowedNavigations.addWhiteListEntry("data:*", false); + } else { + allowedNavigations.addWhiteListEntry(origin, false); + } + } else if (strNode.equals("allow-intent")) { + String origin = xml.getAttributeValue(null, "href"); + allowedIntents.addWhiteListEntry(origin, false); + } else if (strNode.equals("access")) { + String origin = xml.getAttributeValue(null, "origin"); + String subdomains = xml.getAttributeValue(null, "subdomains"); + boolean external = (xml.getAttributeValue(null, "launch-external") != null); + if (origin != null) { + if (external) { + LOG.w(LOG_TAG, "Found within config.xml. Please use instead."); + allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0)); + } else { + if ("*".equals(origin)) { + allowedRequests.addWhiteListEntry("http://*/*", false); + allowedRequests.addWhiteListEntry("https://*/*", false); + } else { + allowedRequests.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0)); + } + } + } + } + } + @Override + public void handleEndTag(XmlPullParser xml) { + } + } + + @Override + public Boolean shouldAllowNavigation(String url) { + if (allowedNavigations.isUrlWhiteListed(url)) { + return true; + } + return null; // Default policy + } + + @Override + public Boolean shouldAllowRequest(String url) { + if (Boolean.TRUE == shouldAllowNavigation(url)) { + return true; + } + if (allowedRequests.isUrlWhiteListed(url)) { + return true; + } + return null; // Default policy + } + + @Override + public Boolean shouldOpenExternalUrl(String url) { + if (allowedIntents.isUrlWhiteListed(url)) { + return true; + } + return null; // Default policy + } + + public Whitelist getAllowedNavigations() { + return allowedNavigations; + } + + public void setAllowedNavigations(Whitelist allowedNavigations) { + this.allowedNavigations = allowedNavigations; + } + + public Whitelist getAllowedIntents() { + return allowedIntents; + } + + public void setAllowedIntents(Whitelist allowedIntents) { + this.allowedIntents = allowedIntents; + } + + public Whitelist getAllowedRequests() { + return allowedRequests; + } + + public void setAllowedRequests(Whitelist allowedRequests) { + this.allowedRequests = allowedRequests; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/devgeeks/privacyscreen/PrivacyScreenPlugin.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/devgeeks/privacyscreen/PrivacyScreenPlugin.java new file mode 100644 index 0000000..691f5a6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/src/org/devgeeks/privacyscreen/PrivacyScreenPlugin.java @@ -0,0 +1,37 @@ +/** + * PrivacyScreenPlugin.java Cordova Plugin Implementation + * Created by Tommy-Carlos Williams on 18/07/14. + * Copyright (c) 2014 Tommy-Carlos Williams. All rights reserved. + * MIT Licensed + */ +package org.devgeeks.privacyscreen; + +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaWebView; + +import android.app.Activity; +import android.view.Window; +import android.view.WindowManager; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.content.Context; +import android.os.Bundle; + +/** + * This class sets the FLAG_SECURE flag on the window to make the app + * private when shown in the task switcher + */ +public class PrivacyScreenPlugin extends CordovaPlugin { + + @Override + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + Activity activity = this.cordova.getActivity(); + activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/.npmignore new file mode 100644 index 0000000..cc76483 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/.npmignore @@ -0,0 +1,5 @@ +*.mode1v3 +*.perspectivev3 +*.pbxuser +.DS_Store +build/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVDebug.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVDebug.h new file mode 100644 index 0000000..4a0d9f9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVDebug.h @@ -0,0 +1,25 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#ifdef DEBUG + #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#else + #define DLog(...) +#endif +#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h new file mode 100644 index 0000000..afb5cc6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.h @@ -0,0 +1,31 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +@interface NSArray (CDVJSONSerializingPrivate) +- (NSString*)cdv_JSONString; +@end + +@interface NSDictionary (CDVJSONSerializingPrivate) +- (NSString*)cdv_JSONString; +@end + +@interface NSString (CDVJSONSerializingPrivate) +- (id)cdv_JSONObject; +- (id)cdv_JSONFragment; +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.m new file mode 100644 index 0000000..5385680 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVJSON_private.m @@ -0,0 +1,91 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVJSON_private.h" +#import + +@implementation NSArray (CDVJSONSerializingPrivate) + +- (NSString*)cdv_JSONString +{ + NSError* error = nil; + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self + options:0 + error:&error]; + + if (error != nil) { + NSLog(@"NSArray JSONString error: %@", [error localizedDescription]); + return nil; + } else { + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } +} + +@end + +@implementation NSDictionary (CDVJSONSerializingPrivate) + +- (NSString*)cdv_JSONString +{ + NSError* error = nil; + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self + options:NSJSONWritingPrettyPrinted + error:&error]; + + if (error != nil) { + NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]); + return nil; + } else { + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } +} + +@end + +@implementation NSString (CDVJSONSerializingPrivate) + +- (id)cdv_JSONObject +{ + NSError* error = nil; + id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding] + options:NSJSONReadingMutableContainers + error:&error]; + + if (error != nil) { + NSLog(@"NSString JSONObject error: %@", [error localizedDescription]); + } + + return object; +} + +- (id)cdv_JSONFragment +{ + NSError* error = nil; + id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding] + options:NSJSONReadingAllowFragments + error:&error]; + + if (error != nil) { + NSLog(@"NSString JSONObject error: %@", [error localizedDescription]); + } + + return object; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVPlugin+Private.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVPlugin+Private.h new file mode 100644 index 0000000..f88638c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/CDVPlugin+Private.h @@ -0,0 +1,24 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +@interface CDVPlugin (Private) + +- (instancetype)initWithWebViewEngine:(id )theWebViewEngine; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h new file mode 100644 index 0000000..510b6eb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.h @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPlugin.h" + +@interface CDVGestureHandler : CDVPlugin + +@property (nonatomic, strong) UILongPressGestureRecognizer* lpgr; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.m new file mode 100644 index 0000000..242ac55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVGestureHandler/CDVGestureHandler.m @@ -0,0 +1,74 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVGestureHandler.h" + +@implementation CDVGestureHandler + +- (void)pluginInitialize +{ + [self applyLongPressFix]; +} + +- (void)applyLongPressFix +{ + // You can't suppress 3D Touch and still have regular longpress, + // so if this is false, let's not consider the 3D Touch setting at all. + if (![self.commandDelegate.settings objectForKey:@"suppresseslongpressgesture"] || + ![[self.commandDelegate.settings objectForKey:@"suppresseslongpressgesture"] boolValue]) { + return; + } + + self.lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressGestures:)]; + self.lpgr.minimumPressDuration = 0.45f; + self.lpgr.allowableMovement = 100.0f; + + // 0.45 is ok for 'regular longpress', 0.05-0.08 is required for '3D Touch longpress', + // but since this will also kill onclick handlers (not ontouchend) it's optional. + if ([self.commandDelegate.settings objectForKey:@"suppresses3dtouchgesture"] && + [[self.commandDelegate.settings objectForKey:@"suppresses3dtouchgesture"] boolValue]) { + self.lpgr.minimumPressDuration = 0.05f; + } + + NSArray *views = self.webView.subviews; + if (views.count == 0) { + NSLog(@"No webview subviews found, not applying the longpress fix."); + return; + } + for (int i=0; i + ++ (CDVIntentAndNavigationFilterValue) filterUrl:(NSURL*)url intentsWhitelist:(CDVWhitelist*)intentsWhitelist navigationsWhitelist:(CDVWhitelist*)navigationsWhitelist; ++ (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType filterValue:(CDVIntentAndNavigationFilterValue)filterValue; ++ (BOOL)shouldOpenURLRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType; +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m new file mode 100644 index 0000000..bc8f720 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m @@ -0,0 +1,142 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVIntentAndNavigationFilter.h" +#import + +@interface CDVIntentAndNavigationFilter () + +@property (nonatomic, readwrite) NSMutableArray* allowIntents; +@property (nonatomic, readwrite) NSMutableArray* allowNavigations; +@property (nonatomic, readwrite) CDVWhitelist* allowIntentsWhitelist; +@property (nonatomic, readwrite) CDVWhitelist* allowNavigationsWhitelist; + +@end + +@implementation CDVIntentAndNavigationFilter + +#pragma mark NSXMLParserDelegate + +- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict +{ + if ([elementName isEqualToString:@"allow-navigation"]) { + [self.allowNavigations addObject:attributeDict[@"href"]]; + } + if ([elementName isEqualToString:@"allow-intent"]) { + [self.allowIntents addObject:attributeDict[@"href"]]; + } +} + +- (void)parserDidStartDocument:(NSXMLParser*)parser +{ + // file: url are added by default + self.allowNavigations = [[NSMutableArray alloc] initWithArray:@[ @"file://" ]]; + // no intents are added by default + self.allowIntents = [[NSMutableArray alloc] init]; +} + +- (void)parserDidEndDocument:(NSXMLParser*)parser +{ + self.allowIntentsWhitelist = [[CDVWhitelist alloc] initWithArray:self.allowIntents]; + self.allowNavigationsWhitelist = [[CDVWhitelist alloc] initWithArray:self.allowNavigations]; +} + +- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError +{ + NSAssert(NO, @"config.xml parse error line %ld col %ld", (long)[parser lineNumber], (long)[parser columnNumber]); +} + +#pragma mark CDVPlugin + +- (void)pluginInitialize +{ + if ([self.viewController isKindOfClass:[CDVViewController class]]) { + [(CDVViewController*)self.viewController parseSettingsWithParser:self]; + } +} + ++ (CDVIntentAndNavigationFilterValue) filterUrl:(NSURL*)url intentsWhitelist:(CDVWhitelist*)intentsWhitelist navigationsWhitelist:(CDVWhitelist*)navigationsWhitelist +{ + // a URL can only allow-intent OR allow-navigation, if both are specified, + // only allow-navigation is allowed + + BOOL allowNavigationsPass = [navigationsWhitelist URLIsAllowed:url logFailure:NO]; + BOOL allowIntentPass = [intentsWhitelist URLIsAllowed:url logFailure:NO]; + + if (allowNavigationsPass && allowIntentPass) { + return CDVIntentAndNavigationFilterValueNavigationAllowed; + } else if (allowNavigationsPass) { + return CDVIntentAndNavigationFilterValueNavigationAllowed; + } else if (allowIntentPass) { + return CDVIntentAndNavigationFilterValueIntentAllowed; + } + + return CDVIntentAndNavigationFilterValueNoneAllowed; +} + +- (CDVIntentAndNavigationFilterValue) filterUrl:(NSURL*)url +{ + return [[self class] filterUrl:url intentsWhitelist:self.allowIntentsWhitelist navigationsWhitelist:self.allowNavigationsWhitelist]; +} + ++ (BOOL)shouldOpenURLRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + return (UIWebViewNavigationTypeLinkClicked == navigationType || + (UIWebViewNavigationTypeOther == navigationType && + [[request.mainDocumentURL absoluteString] isEqualToString:[request.URL absoluteString]] + ) + ); +} + ++ (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType filterValue:(CDVIntentAndNavigationFilterValue)filterValue +{ + NSString* allowIntents_whitelistRejectionFormatString = @"ERROR External navigation rejected - not set for url='%@'"; + NSString* allowNavigations_whitelistRejectionFormatString = @"ERROR Internal navigation rejected - not set for url='%@'"; + + NSURL* url = [request URL]; + + switch (filterValue) { + case CDVIntentAndNavigationFilterValueNavigationAllowed: + return YES; + case CDVIntentAndNavigationFilterValueIntentAllowed: + // only allow-intent if it's a UIWebViewNavigationTypeLinkClicked (anchor tag) OR + // it's a UIWebViewNavigationTypeOther, and it's an internal link + if ([[self class] shouldOpenURLRequest:request navigationType:navigationType]){ + [[UIApplication sharedApplication] openURL:url]; + } + + // consume the request (i.e. no error) if it wasn't handled above + return NO; + case CDVIntentAndNavigationFilterValueNoneAllowed: + // allow-navigation attempt failed for sure + NSLog(@"%@", [NSString stringWithFormat:allowNavigations_whitelistRejectionFormatString, [url absoluteString]]); + // anchor tag link means it was an allow-intent attempt that failed as well + if (UIWebViewNavigationTypeLinkClicked == navigationType) { + NSLog(@"%@", [NSString stringWithFormat:allowIntents_whitelistRejectionFormatString, [url absoluteString]]); + } + return NO; + } +} + +- (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + return [[self class] shouldOverrideLoadWithRequest:request navigationType:navigationType filterValue:[self filterUrl:request.URL]]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h new file mode 100644 index 0000000..dec6ab3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.h @@ -0,0 +1,50 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPlugin.h" + +#define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain" +#define kCDVLocalStorageFileOperationError 1 + +@interface CDVLocalStorage : CDVPlugin + +@property (nonatomic, readonly, strong) NSMutableArray* backupInfo; + +- (BOOL)shouldBackup; +- (BOOL)shouldRestore; +- (void)backup:(CDVInvokedUrlCommand*)command; +- (void)restore:(CDVInvokedUrlCommand*)command; + ++ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType; +// Visible for testing. ++ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict + bundlePath:(NSString*)bundlePath + fileManager:(NSFileManager*)fileManager; +@end + +@interface CDVBackupInfo : NSObject + +@property (nonatomic, copy) NSString* original; +@property (nonatomic, copy) NSString* backup; +@property (nonatomic, copy) NSString* label; + +- (BOOL)shouldBackup; +- (BOOL)shouldRestore; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m new file mode 100644 index 0000000..252dfaf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m @@ -0,0 +1,487 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVLocalStorage.h" +#import "CDV.h" + +@interface CDVLocalStorage () + +@property (nonatomic, readwrite, strong) NSMutableArray* backupInfo; // array of CDVBackupInfo objects +@property (nonatomic, readwrite, weak) id webviewDelegate; + +@end + +@implementation CDVLocalStorage + +@synthesize backupInfo, webviewDelegate; + +- (void)pluginInitialize +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResignActive) + name:UIApplicationWillResignActiveNotification object:nil]; + BOOL cloudBackup = [@"cloud" isEqualToString : self.commandDelegate.settings[[@"BackupWebStorage" lowercaseString]]]; + + self.backupInfo = [[self class] createBackupInfoWithCloudBackup:cloudBackup]; +} + +#pragma mark - +#pragma mark Plugin interface methods + ++ (NSMutableArray*)createBackupInfoWithTargetDir:(NSString*)targetDir backupDir:(NSString*)backupDir targetDirNests:(BOOL)targetDirNests backupDirNests:(BOOL)backupDirNests rename:(BOOL)rename +{ + /* + This "helper" does so much work and has so many options it would probably be clearer to refactor the whole thing. + Basically, there are three database locations: + + 1. "Normal" dir -- LIB// + 2. "Caches" dir -- LIB/Caches/ + 3. "Backup" dir -- DOC/Backups/ + + And between these three, there are various migration paths, most of which only consider 2 of the 3, which is why this helper is based on 2 locations and has a notion of "direction". + */ + NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:3]; + + NSString* original; + NSString* backup; + CDVBackupInfo* backupItem; + + // ////////// LOCALSTORAGE + + original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0.localstorage":@"file__0.localstorage"]; + backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")]; + backup = [backup stringByAppendingPathComponent:(rename ? @"localstorage.appdata.db" : @"file__0.localstorage")]; + + backupItem = [[CDVBackupInfo alloc] init]; + backupItem.backup = backup; + backupItem.original = original; + backupItem.label = @"localStorage database"; + + [backupInfo addObject:backupItem]; + + // ////////// WEBSQL MAIN DB + + original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/Databases.db":@"Databases.db"]; + backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")]; + backup = [backup stringByAppendingPathComponent:(rename ? @"websqlmain.appdata.db" : @"Databases.db")]; + + backupItem = [[CDVBackupInfo alloc] init]; + backupItem.backup = backup; + backupItem.original = original; + backupItem.label = @"websql main database"; + + [backupInfo addObject:backupItem]; + + // ////////// WEBSQL DATABASES + + original = [targetDir stringByAppendingPathComponent:targetDirNests ? @"WebKit/LocalStorage/file__0":@"file__0"]; + backup = [backupDir stringByAppendingPathComponent:(backupDirNests ? @"WebKit/LocalStorage" : @"")]; + backup = [backup stringByAppendingPathComponent:(rename ? @"websqldbs.appdata.db" : @"file__0")]; + + backupItem = [[CDVBackupInfo alloc] init]; + backupItem.backup = backup; + backupItem.original = original; + backupItem.label = @"websql databases"; + + [backupInfo addObject:backupItem]; + + return backupInfo; +} + ++ (NSMutableArray*)createBackupInfoWithCloudBackup:(BOOL)cloudBackup +{ + // create backup info from backup folder to caches folder + NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + NSString* cacheFolder = [appLibraryFolder stringByAppendingPathComponent:@"Caches"]; + NSString* backupsFolder = [appDocumentsFolder stringByAppendingPathComponent:@"Backups"]; + + // create the backups folder, if needed + [[NSFileManager defaultManager] createDirectoryAtPath:backupsFolder withIntermediateDirectories:YES attributes:nil error:nil]; + + [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:backupsFolder] skip:!cloudBackup]; + + return [self createBackupInfoWithTargetDir:cacheFolder backupDir:backupsFolder targetDirNests:NO backupDirNests:NO rename:YES]; +} + ++ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL*)URL skip:(BOOL)skip +{ + NSError* error = nil; + BOOL success = [URL setResourceValue:[NSNumber numberWithBool:skip] forKey:NSURLIsExcludedFromBackupKey error:&error]; + + if (!success) { + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + ++ (BOOL)copyFrom:(NSString*)src to:(NSString*)dest error:(NSError* __autoreleasing*)error +{ + NSFileManager* fileManager = [NSFileManager defaultManager]; + + if (![fileManager fileExistsAtPath:src]) { + NSString* errorString = [NSString stringWithFormat:@"%@ file does not exist.", src]; + if (error != NULL) { + (*error) = [NSError errorWithDomain:kCDVLocalStorageErrorDomain + code:kCDVLocalStorageFileOperationError + userInfo:[NSDictionary dictionaryWithObject:errorString + forKey:NSLocalizedDescriptionKey]]; + } + return NO; + } + + // generate unique filepath in temp directory + CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); + NSString* tempBackup = [[NSTemporaryDirectory() stringByAppendingPathComponent:(__bridge NSString*)uuidString] stringByAppendingPathExtension:@"bak"]; + CFRelease(uuidString); + CFRelease(uuidRef); + + BOOL destExists = [fileManager fileExistsAtPath:dest]; + + // backup the dest + if (destExists && ![fileManager copyItemAtPath:dest toPath:tempBackup error:error]) { + return NO; + } + + // remove the dest + if (destExists && ![fileManager removeItemAtPath:dest error:error]) { + return NO; + } + + // create path to dest + if (!destExists && ![fileManager createDirectoryAtPath:[dest stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:error]) { + return NO; + } + + // copy src to dest + if ([fileManager copyItemAtPath:src toPath:dest error:error]) { + // success - cleanup - delete the backup to the dest + if ([fileManager fileExistsAtPath:tempBackup]) { + [fileManager removeItemAtPath:tempBackup error:error]; + } + return YES; + } else { + // failure - we restore the temp backup file to dest + [fileManager copyItemAtPath:tempBackup toPath:dest error:error]; + // cleanup - delete the backup to the dest + if ([fileManager fileExistsAtPath:tempBackup]) { + [fileManager removeItemAtPath:tempBackup error:error]; + } + return NO; + } +} + +- (BOOL)shouldBackup +{ + for (CDVBackupInfo* info in self.backupInfo) { + if ([info shouldBackup]) { + return YES; + } + } + + return NO; +} + +- (BOOL)shouldRestore +{ + for (CDVBackupInfo* info in self.backupInfo) { + if ([info shouldRestore]) { + return YES; + } + } + + return NO; +} + +/* copy from webkitDbLocation to persistentDbLocation */ +- (void)backup:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + + NSError* __autoreleasing error = nil; + CDVPluginResult* result = nil; + NSString* message = nil; + + for (CDVBackupInfo* info in self.backupInfo) { + if ([info shouldBackup]) { + [[self class] copyFrom:info.original to:info.backup error:&error]; + + if (callbackId) { + if (error == nil) { + message = [NSString stringWithFormat:@"Backed up: %@", info.label]; + NSLog(@"%@", message); + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } else { + message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) backup: %@", info.label, [error localizedDescription]]; + NSLog(@"%@", message); + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message]; + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } + } + } + } +} + +/* copy from persistentDbLocation to webkitDbLocation */ +- (void)restore:(CDVInvokedUrlCommand*)command +{ + NSError* __autoreleasing error = nil; + CDVPluginResult* result = nil; + NSString* message = nil; + + for (CDVBackupInfo* info in self.backupInfo) { + if ([info shouldRestore]) { + [[self class] copyFrom:info.backup to:info.original error:&error]; + + if (error == nil) { + message = [NSString stringWithFormat:@"Restored: %@", info.label]; + NSLog(@"%@", message); + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; + [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; + } else { + message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) restore: %@", info.label, [error localizedDescription]]; + NSLog(@"%@", message); + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message]; + [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; + } + } + } +} + ++ (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType +{ + [self __verifyAndFixDatabaseLocations]; + [self __restoreLegacyDatabaseLocationsWithBackupType:backupType]; +} + ++ (void)__verifyAndFixDatabaseLocations +{ + NSBundle* mainBundle = [NSBundle mainBundle]; + NSString* bundlePath = [[mainBundle bundlePath] stringByDeletingLastPathComponent]; + NSString* bundleIdentifier = [[mainBundle infoDictionary] objectForKey:@"CFBundleIdentifier"]; + NSString* appPlistPath = [bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", bundleIdentifier]]; + + NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithContentsOfFile:appPlistPath]; + BOOL modified = [[self class] __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict + bundlePath:bundlePath + fileManager:[NSFileManager defaultManager]]; + + if (modified) { + BOOL ok = [appPlistDict writeToFile:appPlistPath atomically:YES]; + [[NSUserDefaults standardUserDefaults] synchronize]; + NSLog(@"Fix applied for database locations?: %@", ok ? @"YES" : @"NO"); + } +} + ++ (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict + bundlePath:(NSString*)bundlePath + fileManager:(NSFileManager*)fileManager +{ + NSString* libraryCaches = @"Library/Caches"; + NSString* libraryWebKit = @"Library/WebKit"; + + NSArray* keysToCheck = [NSArray arrayWithObjects: + @"WebKitLocalStorageDatabasePathPreferenceKey", + @"WebDatabaseDirectory", + nil]; + + BOOL dirty = NO; + + for (NSString* key in keysToCheck) { + NSString* value = [appPlistDict objectForKey:key]; + // verify key exists, and path is in app bundle, if not - fix + if ((value != nil) && ![value hasPrefix:bundlePath]) { + // the pathSuffix to use may be wrong - OTA upgrades from < 5.1 to 5.1 do keep the old path Library/WebKit, + // while Xcode synced ones do change the storage location to Library/Caches + NSString* newBundlePath = [bundlePath stringByAppendingPathComponent:libraryCaches]; + if (![fileManager fileExistsAtPath:newBundlePath]) { + newBundlePath = [bundlePath stringByAppendingPathComponent:libraryWebKit]; + } + [appPlistDict setValue:newBundlePath forKey:key]; + dirty = YES; + } + } + + return dirty; +} + ++ (void)__restoreLegacyDatabaseLocationsWithBackupType:(NSString*)backupType +{ + // on iOS 6, if you toggle between cloud/local backup, you must move database locations. Default upgrade from iOS5.1 to iOS6 is like a toggle from local to cloud. + NSString* appLibraryFolder = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + NSString* appDocumentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + + NSMutableArray* backupInfo = [NSMutableArray arrayWithCapacity:0]; + + if ([backupType isEqualToString:@"cloud"]) { +#ifdef DEBUG + NSLog(@"\n\nStarted backup to iCloud! Please be careful." + "\nYour application might be rejected by Apple if you store too much data." + "\nFor more information please read \"iOS Data Storage Guidelines\" at:" + "\nhttps://developer.apple.com/icloud/documentation/data-storage/" + "\nTo disable web storage backup to iCloud, set the BackupWebStorage preference to \"local\" in the Cordova config.xml file\n\n"); +#endif + // We would like to restore old backups/caches databases to the new destination (nested in lib folder) + [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appDocumentsFolder stringByAppendingPathComponent:@"Backups"] targetDirNests:YES backupDirNests:NO rename:YES]]; + [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:appLibraryFolder backupDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] targetDirNests:YES backupDirNests:NO rename:NO]]; + } else { + // For ios6 local backups we also want to restore from Backups dir -- but we don't need to do that here, since the plugin will do that itself. + [backupInfo addObjectsFromArray:[self createBackupInfoWithTargetDir:[appLibraryFolder stringByAppendingPathComponent:@"Caches"] backupDir:appLibraryFolder targetDirNests:NO backupDirNests:YES rename:NO]]; + } + + NSFileManager* manager = [NSFileManager defaultManager]; + + for (CDVBackupInfo* info in backupInfo) { + if ([manager fileExistsAtPath:info.backup]) { + if ([info shouldRestore]) { + NSLog(@"Restoring old webstorage backup. From: '%@' To: '%@'.", info.backup, info.original); + [self copyFrom:info.backup to:info.original error:nil]; + } + NSLog(@"Removing old webstorage backup: '%@'.", info.backup); + [manager removeItemAtPath:info.backup error:nil]; + } + } + + [[NSUserDefaults standardUserDefaults] setBool:[backupType isEqualToString:@"cloud"] forKey:@"WebKitStoreWebDataForBackup"]; +} + +#pragma mark - +#pragma mark Notification handlers + +- (void)onResignActive +{ + UIDevice* device = [UIDevice currentDevice]; + NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"]; + + BOOL isMultitaskingSupported = [device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]; + + if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default) + exitsOnSuspend = [NSNumber numberWithBool:NO]; + } + + if (exitsOnSuspend) { + [self backup:nil]; + } else if (isMultitaskingSupported) { + __block UIBackgroundTaskIdentifier backgroundTaskID = UIBackgroundTaskInvalid; + + backgroundTaskID = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ + [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID]; + backgroundTaskID = UIBackgroundTaskInvalid; + NSLog(@"Background task to backup WebSQL/LocalStorage expired."); + }]; + CDVLocalStorage __weak* weakSelf = self; + [self.commandDelegate runInBackground:^{ + [weakSelf backup:nil]; + + [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskID]; + backgroundTaskID = UIBackgroundTaskInvalid; + }]; + } +} + +- (void)onAppTerminate +{ + [self onResignActive]; +} + +- (void)onReset +{ + [self restore:nil]; +} + +@end + +#pragma mark - +#pragma mark CDVBackupInfo implementation + +@implementation CDVBackupInfo + +@synthesize original, backup, label; + +- (BOOL)file:(NSString*)aPath isNewerThanFile:(NSString*)bPath +{ + NSFileManager* fileManager = [NSFileManager defaultManager]; + NSError* __autoreleasing error = nil; + + NSDictionary* aPathAttribs = [fileManager attributesOfItemAtPath:aPath error:&error]; + NSDictionary* bPathAttribs = [fileManager attributesOfItemAtPath:bPath error:&error]; + + NSDate* aPathModDate = [aPathAttribs objectForKey:NSFileModificationDate]; + NSDate* bPathModDate = [bPathAttribs objectForKey:NSFileModificationDate]; + + if ((nil == aPathModDate) && (nil == bPathModDate)) { + return NO; + } + + return [aPathModDate compare:bPathModDate] == NSOrderedDescending || bPathModDate == nil; +} + +- (BOOL)item:(NSString*)aPath isNewerThanItem:(NSString*)bPath +{ + NSFileManager* fileManager = [NSFileManager defaultManager]; + + BOOL aPathIsDir = NO, bPathIsDir = NO; + BOOL aPathExists = [fileManager fileExistsAtPath:aPath isDirectory:&aPathIsDir]; + + [fileManager fileExistsAtPath:bPath isDirectory:&bPathIsDir]; + + if (!aPathExists) { + return NO; + } + + if (!(aPathIsDir && bPathIsDir)) { // just a file + return [self file:aPath isNewerThanFile:bPath]; + } + + // essentially we want rsync here, but have to settle for our poor man's implementation + // we get the files in aPath, and see if it is newer than the file in bPath + // (it is newer if it doesn't exist in bPath) if we encounter the FIRST file that is newer, + // we return YES + NSDirectoryEnumerator* directoryEnumerator = [fileManager enumeratorAtPath:aPath]; + NSString* path; + + while ((path = [directoryEnumerator nextObject])) { + NSString* aPathFile = [aPath stringByAppendingPathComponent:path]; + NSString* bPathFile = [bPath stringByAppendingPathComponent:path]; + + BOOL isNewer = [self file:aPathFile isNewerThanFile:bPathFile]; + if (isNewer) { + return YES; + } + } + + return NO; +} + +- (BOOL)shouldBackup +{ + return [self item:self.original isNewerThanItem:self.backup]; +} + +- (BOOL)shouldRestore +{ + return [self item:self.backup isNewerThanItem:self.original]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h new file mode 100644 index 0000000..d77f191 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h @@ -0,0 +1,41 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVAvailability.h" + +/** + * Distinguishes top-level navigations from sub-frame navigations. + * shouldStartLoadWithRequest is called for every request, but didStartLoad + * and didFinishLoad is called only for top-level navigations. + * Relevant bug: CB-2389 + */ +@interface CDVUIWebViewDelegate : NSObject { + __weak NSObject * _delegate; + NSInteger _loadCount; + NSInteger _state; + NSInteger _curLoadToken; + NSInteger _loadStartPollCount; +} + +- (id)initWithDelegate:(NSObject *)delegate; + +- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m new file mode 100644 index 0000000..0af97df --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m @@ -0,0 +1,400 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// Testing shows: +// +// In all cases, webView.request.URL is the previous page's URL (or empty) during the didStartLoad callback. +// When loading a page with a redirect: +// 1. shouldStartLoading (requestURL is target page) +// 2. didStartLoading +// 3. shouldStartLoading (requestURL is redirect target) +// 4. didFinishLoad (request.URL is redirect target) +// +// Note the lack of a second didStartLoading ** +// +// When loading a page with iframes: +// 1. shouldStartLoading (requestURL is main page) +// 2. didStartLoading +// 3. shouldStartLoading (requestURL is one of the iframes) +// 4. didStartLoading +// 5. didFinishLoad +// 6. didFinishLoad +// +// Note there is no way to distinguish which didFinishLoad maps to which didStartLoad ** +// +// Loading a page by calling window.history.go(-1): +// 1. didStartLoading +// 2. didFinishLoad +// +// Note the lack of a shouldStartLoading call ** +// Actually - this is fixed on iOS6. iOS6 has a shouldStart. ** +// +// Loading a page by calling location.reload() +// 1. shouldStartLoading +// 2. didStartLoading +// 3. didFinishLoad +// +// Loading a page with an iframe that fails to load: +// 1. shouldStart (main page) +// 2. didStart +// 3. shouldStart (iframe) +// 4. didStart +// 5. didFailWithError +// 6. didFinish +// +// Loading a page with an iframe that fails to load due to an invalid URL: +// 1. shouldStart (main page) +// 2. didStart +// 3. shouldStart (iframe) +// 5. didFailWithError +// 6. didFinish +// +// This case breaks our logic since there is a missing didStart. To prevent this, +// we check URLs in shouldStart and return NO if they are invalid. +// +// Loading a page with an invalid URL +// 1. shouldStart (main page) +// 2. didFailWithError +// +// TODO: Record order when page is re-navigated before the first navigation finishes. +// + +#import "CDVUIWebViewDelegate.h" + +// #define VerboseLog NSLog +#define VerboseLog(...) do { \ +} while (0) + +typedef enum { + STATE_IDLE = 0, + STATE_WAITING_FOR_LOAD_START = 1, + STATE_WAITING_FOR_LOAD_FINISH = 2, + STATE_IOS5_POLLING_FOR_LOAD_START = 3, + STATE_IOS5_POLLING_FOR_LOAD_FINISH = 4, + STATE_CANCELLED = 5 +} State; + +static NSString *stripFragment(NSString* url) +{ + NSRange r = [url rangeOfString:@"#"]; + + if (r.location == NSNotFound) { + return url; + } + return [url substringToIndex:r.location]; +} + +@implementation CDVUIWebViewDelegate + +- (id)initWithDelegate:(NSObject *)delegate +{ + self = [super init]; + if (self != nil) { + _delegate = delegate; + _loadCount = -1; + _state = STATE_IDLE; + } + return self; +} + +- (BOOL)request:(NSURLRequest*)newRequest isEqualToRequestAfterStrippingFragments:(NSURLRequest*)originalRequest +{ + if (originalRequest.URL && newRequest.URL) { + NSString* originalRequestUrl = [originalRequest.URL absoluteString]; + NSString* newRequestUrl = [newRequest.URL absoluteString]; + + NSString* baseOriginalRequestUrl = stripFragment(originalRequestUrl); + NSString* baseNewRequestUrl = stripFragment(newRequestUrl); + return [baseOriginalRequestUrl isEqualToString:baseNewRequestUrl]; + } + + return NO; +} + +- (BOOL)isPageLoaded:(UIWebView*)webView +{ + NSString* readyState = [webView stringByEvaluatingJavaScriptFromString:@"document.readyState"]; + + return [readyState isEqualToString:@"loaded"] || [readyState isEqualToString:@"complete"]; +} + +- (BOOL)isJsLoadTokenSet:(UIWebView*)webView +{ + NSString* loadToken = [webView stringByEvaluatingJavaScriptFromString:@"window.__cordovaLoadToken"]; + + return [[NSString stringWithFormat:@"%ld", (long)_curLoadToken] isEqualToString:loadToken]; +} + +- (void)setLoadToken:(UIWebView*)webView +{ + _curLoadToken += 1; + [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__cordovaLoadToken=%ld", (long)_curLoadToken]]; +} + +- (NSString*)evalForCurrentURL:(UIWebView*)webView +{ + return [webView stringByEvaluatingJavaScriptFromString:@"location.href"]; +} + +- (void)pollForPageLoadStart:(UIWebView*)webView +{ + if (_state != STATE_IOS5_POLLING_FOR_LOAD_START) { + return; + } + if (![self isJsLoadTokenSet:webView]) { + VerboseLog(@"Polled for page load start. result = YES!"); + _state = STATE_IOS5_POLLING_FOR_LOAD_FINISH; + [self setLoadToken:webView]; + if ([_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) { + [_delegate webViewDidStartLoad:webView]; + } + [self pollForPageLoadFinish:webView]; + } else { + VerboseLog(@"Polled for page load start. result = NO"); + // Poll only for 1 second, and then fall back on checking only when delegate methods are called. + ++_loadStartPollCount; + if (_loadStartPollCount < (1000 * .05)) { + [self performSelector:@selector(pollForPageLoadStart:) withObject:webView afterDelay:.05]; + } + } +} + +- (void)pollForPageLoadFinish:(UIWebView*)webView +{ + if (_state != STATE_IOS5_POLLING_FOR_LOAD_FINISH) { + return; + } + if ([self isPageLoaded:webView]) { + VerboseLog(@"Polled for page load finish. result = YES!"); + _state = STATE_IDLE; + if ([_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) { + [_delegate webViewDidFinishLoad:webView]; + } + } else { + VerboseLog(@"Polled for page load finish. result = NO"); + [self performSelector:@selector(pollForPageLoadFinish:) withObject:webView afterDelay:.05]; + } +} + +- (BOOL)shouldLoadRequest:(NSURLRequest*)request +{ + NSString* scheme = [[request URL] scheme]; + NSArray* allowedSchemes = [NSArray arrayWithObjects:@"mailto",@"tel",@"blob",@"sms",@"data", nil]; + if([allowedSchemes containsObject:scheme]) { + return YES; + } + else { + return [NSURLConnection canHandleRequest:request]; + } +} + +- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + BOOL shouldLoad = YES; + + if ([_delegate respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)]) { + shouldLoad = [_delegate webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; + } + + VerboseLog(@"webView shouldLoad=%d (before) state=%d loadCount=%d URL=%@", shouldLoad, _state, _loadCount, request.URL); + + if (shouldLoad) { + // When devtools refresh occurs, it blindly uses the same request object. If a history.replaceState() has occured, then + // mainDocumentURL != URL even though it's a top-level navigation. + BOOL isDevToolsRefresh = (request == webView.request); + BOOL isTopLevelNavigation = isDevToolsRefresh || [request.URL isEqual:[request mainDocumentURL]]; + if (isTopLevelNavigation) { + // Ignore hash changes that don't navigate to a different page. + // webView.request does actually update when history.replaceState() gets called. + if ([self request:request isEqualToRequestAfterStrippingFragments:webView.request]) { + NSString* prevURL = [self evalForCurrentURL:webView]; + if ([prevURL isEqualToString:[request.URL absoluteString]]) { + VerboseLog(@"Page reload detected."); + } else { + VerboseLog(@"Detected hash change shouldLoad"); + return shouldLoad; + } + } + + switch (_state) { + case STATE_WAITING_FOR_LOAD_FINISH: + // Redirect case. + // We expect loadCount == 1. + if (_loadCount != 1) { + NSLog(@"CDVWebViewDelegate: Detected redirect when loadCount=%ld", (long)_loadCount); + } + break; + + case STATE_IDLE: + case STATE_IOS5_POLLING_FOR_LOAD_START: + case STATE_CANCELLED: + // Page navigation start. + _loadCount = 0; + _state = STATE_WAITING_FOR_LOAD_START; + break; + + default: + { + NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state]; + NSLog(@"%@", description); + _loadCount = 0; + _state = STATE_WAITING_FOR_LOAD_START; + if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) { + NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description}; + NSError* error = [[NSError alloc] initWithDomain:@"CDVUIWebViewDelegate" code:1 userInfo:errorDictionary]; + [_delegate webView:webView didFailLoadWithError:error]; + } + } + } + } else { + // Deny invalid URLs so that we don't get the case where we go straight from + // webViewShouldLoad -> webViewDidFailLoad (messes up _loadCount). + shouldLoad = shouldLoad && [self shouldLoadRequest:request]; + } + VerboseLog(@"webView shouldLoad=%d (after) isTopLevelNavigation=%d state=%d loadCount=%d", shouldLoad, isTopLevelNavigation, _state, _loadCount); + } + return shouldLoad; +} + +- (void)webViewDidStartLoad:(UIWebView*)webView +{ + VerboseLog(@"webView didStartLoad (before). state=%d loadCount=%d", _state, _loadCount); + BOOL fireCallback = NO; + switch (_state) { + case STATE_IDLE: + break; + + case STATE_CANCELLED: + fireCallback = YES; + _state = STATE_WAITING_FOR_LOAD_FINISH; + _loadCount += 1; + break; + + case STATE_WAITING_FOR_LOAD_START: + if (_loadCount != 0) { + NSLog(@"CDVWebViewDelegate: Unexpected loadCount in didStart. count=%ld", (long)_loadCount); + } + fireCallback = YES; + _state = STATE_WAITING_FOR_LOAD_FINISH; + _loadCount = 1; + break; + + case STATE_WAITING_FOR_LOAD_FINISH: + _loadCount += 1; + break; + + case STATE_IOS5_POLLING_FOR_LOAD_START: + [self pollForPageLoadStart:webView]; + break; + + case STATE_IOS5_POLLING_FOR_LOAD_FINISH: + [self pollForPageLoadFinish:webView]; + break; + + default: + NSLog(@"CDVWebViewDelegate: Unexpected didStart with state=%ld loadCount=%ld", (long)_state, (long)_loadCount); + } + VerboseLog(@"webView didStartLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback); + if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidStartLoad:)]) { + [_delegate webViewDidStartLoad:webView]; + } +} + +- (void)webViewDidFinishLoad:(UIWebView*)webView +{ + VerboseLog(@"webView didFinishLoad (before). state=%d loadCount=%d", _state, _loadCount); + BOOL fireCallback = NO; + switch (_state) { + case STATE_IDLE: + break; + + case STATE_WAITING_FOR_LOAD_START: + NSLog(@"CDVWebViewDelegate: Unexpected didFinish while waiting for load start."); + break; + + case STATE_WAITING_FOR_LOAD_FINISH: + if (_loadCount == 1) { + fireCallback = YES; + _state = STATE_IDLE; + } + _loadCount -= 1; + break; + + case STATE_IOS5_POLLING_FOR_LOAD_START: + [self pollForPageLoadStart:webView]; + break; + + case STATE_IOS5_POLLING_FOR_LOAD_FINISH: + [self pollForPageLoadFinish:webView]; + break; + } + VerboseLog(@"webView didFinishLoad (after). state=%d loadCount=%d fireCallback=%d", _state, _loadCount, fireCallback); + if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) { + [_delegate webViewDidFinishLoad:webView]; + } +} + +- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error +{ + VerboseLog(@"webView didFailLoad (before). state=%d loadCount=%d", _state, _loadCount); + BOOL fireCallback = NO; + + switch (_state) { + case STATE_IDLE: + break; + + case STATE_WAITING_FOR_LOAD_START: + if ([error code] == NSURLErrorCancelled) { + _state = STATE_CANCELLED; + } else { + _state = STATE_IDLE; + } + fireCallback = YES; + break; + + case STATE_WAITING_FOR_LOAD_FINISH: + if ([error code] != NSURLErrorCancelled) { + if (_loadCount == 1) { + _state = STATE_IDLE; + fireCallback = YES; + } + _loadCount = -1; + } else { + fireCallback = YES; + _state = STATE_CANCELLED; + _loadCount -= 1; + } + break; + + case STATE_IOS5_POLLING_FOR_LOAD_START: + [self pollForPageLoadStart:webView]; + break; + + case STATE_IOS5_POLLING_FOR_LOAD_FINISH: + [self pollForPageLoadFinish:webView]; + break; + } + VerboseLog(@"webView didFailLoad (after). state=%d loadCount=%d, fireCallback=%d", _state, _loadCount, fireCallback); + if (fireCallback && [_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) { + [_delegate webView:webView didFailLoadWithError:error]; + } +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h new file mode 100644 index 0000000..6a9ee77 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPlugin.h" +#import "CDVWebViewEngineProtocol.h" + +@interface CDVUIWebViewEngine : CDVPlugin + +@property (nonatomic, strong, readonly) id uiWebViewDelegate; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m new file mode 100644 index 0000000..f571d80 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m @@ -0,0 +1,202 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVUIWebViewEngine.h" +#import "CDVUIWebViewDelegate.h" +#import "CDVUIWebViewNavigationDelegate.h" +#import "NSDictionary+CordovaPreferences.h" + +#import + +@interface CDVUIWebViewEngine () + +@property (nonatomic, strong, readwrite) UIView* engineWebView; +@property (nonatomic, strong, readwrite) id uiWebViewDelegate; +@property (nonatomic, strong, readwrite) CDVUIWebViewNavigationDelegate* navWebViewDelegate; + +@end + +@implementation CDVUIWebViewEngine + +@synthesize engineWebView = _engineWebView; + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super init]; + if (self) { + self.engineWebView = [[UIWebView alloc] initWithFrame:frame]; + NSLog(@"Using UIWebView"); + } + + return self; +} + +- (void)pluginInitialize +{ + // viewController would be available now. we attempt to set all possible delegates to it, by default + + UIWebView* uiWebView = (UIWebView*)_engineWebView; + + if ([self.viewController conformsToProtocol:@protocol(UIWebViewDelegate)]) { + self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id )self.viewController]; + uiWebView.delegate = self.uiWebViewDelegate; + } else { + self.navWebViewDelegate = [[CDVUIWebViewNavigationDelegate alloc] initWithEnginePlugin:self]; + self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:self.navWebViewDelegate]; + uiWebView.delegate = self.uiWebViewDelegate; + } + + [self updateSettings:self.commandDelegate.settings]; +} + +- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler +{ + NSString* ret = [(UIWebView*)_engineWebView stringByEvaluatingJavaScriptFromString:javaScriptString]; + + if (completionHandler) { + completionHandler(ret, nil); + } +} + +- (id)loadRequest:(NSURLRequest*)request +{ + [(UIWebView*)_engineWebView loadRequest:request]; + return nil; +} + +- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL +{ + [(UIWebView*)_engineWebView loadHTMLString:string baseURL:baseURL]; + return nil; +} + +- (NSURL*)URL +{ + return [[(UIWebView*)_engineWebView request] URL]; +} + +- (BOOL) canLoadRequest:(NSURLRequest*)request +{ + return (request != nil); +} + +- (void)updateSettings:(NSDictionary*)settings +{ + UIWebView* uiWebView = (UIWebView*)_engineWebView; + + uiWebView.scalesPageToFit = [settings cordovaBoolSettingForKey:@"EnableViewportScale" defaultValue:NO]; + uiWebView.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:NO]; + uiWebView.mediaPlaybackRequiresUserAction = [settings cordovaBoolSettingForKey:@"MediaPlaybackRequiresUserAction" defaultValue:YES]; + uiWebView.mediaPlaybackAllowsAirPlay = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES]; + uiWebView.keyboardDisplayRequiresUserAction = [settings cordovaBoolSettingForKey:@"KeyboardDisplayRequiresUserAction" defaultValue:YES]; + uiWebView.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO]; + uiWebView.gapBetweenPages = [settings cordovaFloatSettingForKey:@"GapBetweenPages" defaultValue:0.0]; + uiWebView.pageLength = [settings cordovaFloatSettingForKey:@"PageLength" defaultValue:0.0]; + + id prefObj = nil; + + // By default, DisallowOverscroll is false (thus bounce is allowed) + BOOL bounceAllowed = !([settings cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]); + + // prevent webView from bouncing + if (!bounceAllowed) { + if ([uiWebView respondsToSelector:@selector(scrollView)]) { + ((UIScrollView*)[uiWebView scrollView]).bounces = NO; + } else { + for (id subview in self.webView.subviews) { + if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { + ((UIScrollView*)subview).bounces = NO; + } + } + } + } + + NSString* decelerationSetting = [settings cordovaSettingForKey:@"UIWebViewDecelerationSpeed"]; + if (![@"fast" isEqualToString:decelerationSetting]) { + [uiWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal]; + } + + NSInteger paginationBreakingMode = 0; // default - UIWebPaginationBreakingModePage + prefObj = [settings cordovaSettingForKey:@"PaginationBreakingMode"]; + if (prefObj != nil) { + NSArray* validValues = @[@"page", @"column"]; + NSString* prefValue = [validValues objectAtIndex:0]; + + if ([prefObj isKindOfClass:[NSString class]]) { + prefValue = prefObj; + } + + paginationBreakingMode = [validValues indexOfObject:[prefValue lowercaseString]]; + if (paginationBreakingMode == NSNotFound) { + paginationBreakingMode = 0; + } + } + uiWebView.paginationBreakingMode = paginationBreakingMode; + + NSInteger paginationMode = 0; // default - UIWebPaginationModeUnpaginated + prefObj = [settings cordovaSettingForKey:@"PaginationMode"]; + if (prefObj != nil) { + NSArray* validValues = @[@"unpaginated", @"lefttoright", @"toptobottom", @"bottomtotop", @"righttoleft"]; + NSString* prefValue = [validValues objectAtIndex:0]; + + if ([prefObj isKindOfClass:[NSString class]]) { + prefValue = prefObj; + } + + paginationMode = [validValues indexOfObject:[prefValue lowercaseString]]; + if (paginationMode == NSNotFound) { + paginationMode = 0; + } + } + uiWebView.paginationMode = paginationMode; +} + +- (void)updateWithInfo:(NSDictionary*)info +{ + UIWebView* uiWebView = (UIWebView*)_engineWebView; + + id uiWebViewDelegate = [info objectForKey:kCDVWebViewEngineUIWebViewDelegate]; + NSDictionary* settings = [info objectForKey:kCDVWebViewEngineWebViewPreferences]; + + if (uiWebViewDelegate && + [uiWebViewDelegate conformsToProtocol:@protocol(UIWebViewDelegate)]) { + self.uiWebViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:(id )self.viewController]; + uiWebView.delegate = self.uiWebViewDelegate; + } + + if (settings && [settings isKindOfClass:[NSDictionary class]]) { + [self updateSettings:settings]; + } +} + +// This forwards the methods that are in the header that are not implemented here. +// Both WKWebView and UIWebView implement the below: +// loadHTMLString:baseURL: +// loadRequest: +- (id)forwardingTargetForSelector:(SEL)aSelector +{ + return _engineWebView; +} + +- (UIView*)webView +{ + return self.engineWebView; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h new file mode 100644 index 0000000..9138deb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h @@ -0,0 +1,29 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVUIWebViewEngine.h" + +@interface CDVUIWebViewNavigationDelegate : NSObject + +@property (nonatomic, weak) CDVPlugin* enginePlugin; + +- (instancetype)initWithEnginePlugin:(CDVPlugin*)enginePlugin; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m new file mode 100644 index 0000000..6e31659 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m @@ -0,0 +1,151 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVUIWebViewNavigationDelegate.h" +#import +#import +#import +#import + +@implementation CDVUIWebViewNavigationDelegate + +- (instancetype)initWithEnginePlugin:(CDVPlugin*)theEnginePlugin +{ + self = [super init]; + if (self) { + self.enginePlugin = theEnginePlugin; + } + + return self; +} + +/** + When web application loads Add stuff to the DOM, mainly the user-defined settings from the Settings.plist file, and + the device's data such as device ID, platform version, etc. + */ +- (void)webViewDidStartLoad:(UIWebView*)theWebView +{ + NSLog(@"Resetting plugins due to page load."); + CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController; + + [vc.commandQueue resetRequestId]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:self.enginePlugin.webView]]; +} + +/** + Called when the webview finishes loading. This stops the activity view. + */ +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + NSLog(@"Finished load of: %@", theWebView.request.URL); + CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController; + + // It's safe to release the lock even if this is just a sub-frame that's finished loading. + [CDVUserAgentUtil releaseLock:vc.userAgentLockToken]; + + /* + * Hide the Top Activity THROBBER in the Battery Bar + */ + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; + + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.enginePlugin.webView]]; +} + +- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController; + + [CDVUserAgentUtil releaseLock:vc.userAgentLockToken]; + + NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]]; + NSLog(@"%@", message); + + NSURL* errorUrl = vc.errorURL; + if (errorUrl) { + errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl]; + NSLog(@"%@", [errorUrl absoluteString]); + [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]]; + } +} + +- (BOOL)defaultResourcePolicyForURL:(NSURL*)url +{ + /* + * If a URL is being loaded that's a file url, just load it internally + */ + if ([url isFileURL]) { + return YES; + } + + return NO; +} + +- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL* url = [request URL]; + CDVViewController* vc = (CDVViewController*)self.enginePlugin.viewController; + + /* + * Execute any commands queued with cordova.exec() on the JS side. + * The part of the URL after gap:// is irrelevant. + */ + if ([[url scheme] isEqualToString:@"gap"]) { + [vc.commandQueue fetchCommandsFromJs]; + // The delegate is called asynchronously in this case, so we don't have to use + // flushCommandQueueWithDelayedJs (setTimeout(0)) as we do with hash changes. + [vc.commandQueue executePending]; + return NO; + } + + /* + * Give plugins the chance to handle the url + */ + BOOL anyPluginsResponded = NO; + BOOL shouldAllowRequest = NO; + + for (NSString* pluginName in vc.pluginObjects) { + CDVPlugin* plugin = [vc.pluginObjects objectForKey:pluginName]; + SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:"); + if ([plugin respondsToSelector:selector]) { + anyPluginsResponded = YES; + shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType)); + if (!shouldAllowRequest) { + break; + } + } + } + + if (anyPluginsResponded) { + return shouldAllowRequest; + } + + /* + * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview. + */ + BOOL shouldAllowNavigation = [self defaultResourcePolicyForURL:url]; + if (shouldAllowNavigation) { + return YES; + } else { + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + } + + return NO; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h new file mode 100644 index 0000000..96d6efc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDV.h @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVAvailability.h" +#import "CDVAvailabilityDeprecated.h" +#import "CDVAppDelegate.h" +#import "CDVPlugin.h" +#import "CDVPluginResult.h" +#import "CDVViewController.h" +#import "CDVCommandDelegate.h" +#import "CDVURLProtocol.h" +#import "CDVInvokedUrlCommand.h" +#import "CDVWhitelist.h" +#import "CDVScreenOrientationDelegate.h" +#import "CDVTimer.h" +#import "CDVUserAgentUtil.h" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h new file mode 100644 index 0000000..de5b518 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVViewController.h" + +@interface CDVAppDelegate : NSObject {} + +@property (nonatomic, strong) IBOutlet UIWindow* window; +@property (nonatomic, strong) IBOutlet CDVViewController* viewController; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.m new file mode 100644 index 0000000..13c2e7b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAppDelegate.m @@ -0,0 +1,105 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVAppDelegate.h" + +@implementation CDVAppDelegate + +@synthesize window, viewController; + +- (id)init +{ + /** If you need to do any extra app-specific initialization, you can do it here + * -jm + **/ + NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + + [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; + + int cacheSizeMemory = 8 * 1024 * 1024; // 8MB + int cacheSizeDisk = 32 * 1024 * 1024; // 32MB + NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"]; + [NSURLCache setSharedURLCache:sharedCache]; + + self = [super init]; + return self; +} + +#pragma mark UIApplicationDelegate implementation + +/** + * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up) + */ +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions +{ + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + + self.window = [[UIWindow alloc] initWithFrame:screenBounds]; + self.window.autoresizesSubviews = YES; + + // only set if not already set in subclass + if (self.viewController == nil) { + self.viewController = [[CDVViewController alloc] init]; + } + + // Set your app's start page by setting the tag in config.xml. + // If necessary, uncomment the line below to override it. + // self.viewController.startPage = @"index.html"; + + // NOTE: To customize the view's frame size (which defaults to full screen), override + // [self.viewController viewWillAppear:] in your view controller. + + self.window.rootViewController = self.viewController; + [self.window makeKeyAndVisible]; + + return YES; +} + +// this happens while we are running ( in the background, or from within our own app ) +// only valid if 40x-Info.plist specifies a protocol to handle +- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation +{ + if (!url) { + return NO; + } + + // all plugins will get the notification, and their handlers will be called + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + + return YES; +} + +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000 +- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window +#else +- (UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window +#endif +{ + // iPhone doesn't support upside down by default, while the iPad does. Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected). + NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown); + + return supportedInterfaceOrientations; +} + +- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application +{ + [[NSURLCache sharedURLCache] removeAllCachedResponses]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h new file mode 100644 index 0000000..4e33241 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailability.h @@ -0,0 +1,106 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVAvailabilityDeprecated.h" + +#define __CORDOVA_IOS__ + +#define __CORDOVA_0_9_6 906 +#define __CORDOVA_1_0_0 10000 +#define __CORDOVA_1_1_0 10100 +#define __CORDOVA_1_2_0 10200 +#define __CORDOVA_1_3_0 10300 +#define __CORDOVA_1_4_0 10400 +#define __CORDOVA_1_4_1 10401 +#define __CORDOVA_1_5_0 10500 +#define __CORDOVA_1_6_0 10600 +#define __CORDOVA_1_6_1 10601 +#define __CORDOVA_1_7_0 10700 +#define __CORDOVA_1_8_0 10800 +#define __CORDOVA_1_8_1 10801 +#define __CORDOVA_1_9_0 10900 +#define __CORDOVA_2_0_0 20000 +#define __CORDOVA_2_1_0 20100 +#define __CORDOVA_2_2_0 20200 +#define __CORDOVA_2_3_0 20300 +#define __CORDOVA_2_4_0 20400 +#define __CORDOVA_2_5_0 20500 +#define __CORDOVA_2_6_0 20600 +#define __CORDOVA_2_7_0 20700 +#define __CORDOVA_2_8_0 20800 +#define __CORDOVA_2_9_0 20900 +#define __CORDOVA_3_0_0 30000 +#define __CORDOVA_3_1_0 30100 +#define __CORDOVA_3_2_0 30200 +#define __CORDOVA_3_3_0 30300 +#define __CORDOVA_3_4_0 30400 +#define __CORDOVA_3_4_1 30401 +#define __CORDOVA_3_5_0 30500 +#define __CORDOVA_3_6_0 30600 +#define __CORDOVA_3_7_0 30700 +#define __CORDOVA_3_8_0 30800 +#define __CORDOVA_3_9_0 30900 +#define __CORDOVA_3_9_1 30901 +#define __CORDOVA_3_9_2 30902 +#define __CORDOVA_4_0_0 40000 +#define __CORDOVA_4_0_1 40001 +#define __CORDOVA_4_1_0 40100 +#define __CORDOVA_4_1_1 40101 +#define __CORDOVA_4_2_0 40200 +#define __CORDOVA_4_2_1 40201 +#define __CORDOVA_4_3_0 40300 +#define __CORDOVA_4_3_1 40301 +/* coho:next-version,insert-before */ +#define __CORDOVA_NA 99999 /* not available */ + +/* + #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0 + // do something when its at least 4.0.0 + #else + // do something else (non 4.0.0) + #endif + */ +#ifndef CORDOVA_VERSION_MIN_REQUIRED + /* coho:next-version-min-required,replace-after */ + #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_3_1 +#endif + +/* + Returns YES if it is at least version specified as NSString(X) + Usage: + if (IsAtLeastiOSVersion(@"5.1")) { + // do something for iOS 5.1 or greater + } + */ +#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending) + +/* Return the string version of the decimal version */ +#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \ + (CORDOVA_VERSION_MIN_REQUIRED / 10000), \ + (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \ + (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100] + +// Enable this to log all exec() calls. +#define CDV_ENABLE_EXEC_LOGGING 0 +#if CDV_ENABLE_EXEC_LOGGING + #define CDV_EXEC_LOG NSLog +#else + #define CDV_EXEC_LOG(...) do { \ +} while (NO) +#endif diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h new file mode 100644 index 0000000..abf7a16 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVAvailabilityDeprecated.h @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#ifdef __clang__ + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg))) +#else + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated())) +#endif diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h new file mode 100644 index 0000000..3d9d90c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegate.h @@ -0,0 +1,51 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVAvailability.h" +#import "CDVInvokedUrlCommand.h" + +@class CDVPlugin; +@class CDVPluginResult; +@class CDVWhitelist; + +typedef NSURL* (^ UrlTransformerBlock)(NSURL*); + +@protocol CDVCommandDelegate + +@property (nonatomic, readonly) NSDictionary* settings; +@property (nonatomic, copy) UrlTransformerBlock urlTransformer; + +- (NSString*)pathForResource:(NSString*)resourcepath; +- (id)getCommandInstance:(NSString*)pluginName; + +// Sends a plugin result to the JS. This is thread-safe. +- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId; +// Evaluates the given JS. This is thread-safe. +- (void)evalJs:(NSString*)js; +// Can be used to evaluate JS right away instead of scheduling it on the run-loop. +// This is required for dispatch resign and pause events, but should not be used +// without reason. Without the run-loop delay, alerts used in JS callbacks may result +// in dead-lock. This method must be called from the UI thread. +- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop; +// Runs the given block on a background thread using a shared thread-pool. +- (void)runInBackground:(void (^)())block; +// Returns the User-Agent of the associated UIWebView. +- (NSString*)userAgent; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h new file mode 100644 index 0000000..0531134 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.h @@ -0,0 +1,36 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVCommandDelegate.h" + +@class CDVViewController; +@class CDVCommandQueue; + +@interface CDVCommandDelegateImpl : NSObject { + @private + __weak CDVViewController* _viewController; + NSRegularExpression* _callbackIdPattern; + @protected + __weak CDVCommandQueue* _commandQueue; + BOOL _delayResponses; +} +- (id)initWithViewController:(CDVViewController*)viewController; +- (void)flushCommandQueueWithDelayedJs; +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m new file mode 100644 index 0000000..fd8b3e8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandDelegateImpl.m @@ -0,0 +1,186 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVCommandDelegateImpl.h" +#import "CDVJSON_private.h" +#import "CDVCommandQueue.h" +#import "CDVPluginResult.h" +#import "CDVViewController.h" + +@implementation CDVCommandDelegateImpl + +@synthesize urlTransformer; + +- (id)initWithViewController:(CDVViewController*)viewController +{ + self = [super init]; + if (self != nil) { + _viewController = viewController; + _commandQueue = _viewController.commandQueue; + + NSError* err = nil; + _callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err]; + if (err != nil) { + // Couldn't initialize Regex + NSLog(@"Error: Couldn't initialize regex"); + _callbackIdPattern = nil; + } + } + return self; +} + +- (NSString*)pathForResource:(NSString*)resourcepath +{ + NSBundle* mainBundle = [NSBundle mainBundle]; + NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]]; + NSString* filename = [directoryParts lastObject]; + + [directoryParts removeLastObject]; + + NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"]; + NSString* directoryStr = _viewController.wwwFolderName; + + if ([directoryPartsJoined length] > 0) { + directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]]; + } + + return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr]; +} + +- (void)flushCommandQueueWithDelayedJs +{ + _delayResponses = YES; + [_commandQueue executePending]; + _delayResponses = NO; +} + +- (void)evalJsHelper2:(NSString*)js +{ + CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]); + [_viewController.webViewEngine evaluateJavaScript:js completionHandler:^(id obj, NSError* error) { + // TODO: obj can be something other than string + if ([obj isKindOfClass:[NSString class]]) { + NSString* commandsJSON = (NSString*)obj; + if ([commandsJSON length] > 0) { + CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining."); + } + + [_commandQueue enqueueCommandBatch:commandsJSON]; + [_commandQueue executePending]; + } + }]; +} + +- (void)evalJsHelper:(NSString*)js +{ + // Cycle the run-loop before executing the JS. + // For _delayResponses - + // This ensures that we don't eval JS during the middle of an existing JS + // function (possible since UIWebViewDelegate callbacks can be synchronous). + // For !isMainThread - + // It's a hard error to eval on the non-UI thread. + // For !_commandQueue.currentlyExecuting - + // This works around a bug where sometimes alerts() within callbacks can cause + // dead-lock. + // If the commandQueue is currently executing, then we know that it is safe to + // execute the callback immediately. + // Using (dispatch_get_main_queue()) does *not* fix deadlocks for some reason, + // but performSelectorOnMainThread: does. + if (_delayResponses || ![NSThread isMainThread] || !_commandQueue.currentlyExecuting) { + [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO]; + } else { + [self evalJsHelper2:js]; + } +} + +- (BOOL)isValidCallbackId:(NSString*)callbackId +{ + if ((callbackId == nil) || (_callbackIdPattern == nil)) { + return NO; + } + + // Disallow if too long or if any invalid characters were found. + if (([callbackId length] > 100) || [_callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) { + return NO; + } + return YES; +} + +- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId +{ + CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status); + // This occurs when there is are no win/fail callbacks for the call. + if ([@"INVALID" isEqualToString:callbackId]) { + return; + } + // This occurs when the callback id is malformed. + if (![self isValidCallbackId:callbackId]) { + NSLog(@"Invalid callback id received by sendPluginResult"); + return; + } + int status = [result.status intValue]; + BOOL keepCallback = [result.keepCallback boolValue]; + NSString* argumentsAsJSON = [result argumentsAsJSON]; + BOOL debug = NO; + +#ifdef DEBUG + debug = YES; +#endif + + NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d, %d)", callbackId, status, argumentsAsJSON, keepCallback, debug]; + + [self evalJsHelper:js]; +} + +- (void)evalJs:(NSString*)js +{ + [self evalJs:js scheduledOnRunLoop:YES]; +} + +- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop +{ + js = [NSString stringWithFormat:@"try{cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})}catch(e){console.log('exception nativeEvalAndFetch : '+e);};", js]; + if (scheduledOnRunLoop) { + [self evalJsHelper:js]; + } else { + [self evalJsHelper2:js]; + } +} + +- (id)getCommandInstance:(NSString*)pluginName +{ + return [_viewController getCommandInstance:pluginName]; +} + +- (void)runInBackground:(void (^)())block +{ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); +} + +- (NSString*)userAgent +{ + return [_viewController userAgent]; +} + +- (NSDictionary*)settings +{ + return _viewController.settings; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h new file mode 100644 index 0000000..cb7bd6e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.h @@ -0,0 +1,39 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@class CDVInvokedUrlCommand; +@class CDVViewController; + +@interface CDVCommandQueue : NSObject + +@property (nonatomic, readonly) BOOL currentlyExecuting; + +- (id)initWithViewController:(CDVViewController*)viewController; +- (void)dispose; + +- (void)resetRequestId; +- (void)enqueueCommandBatch:(NSString*)batchJSON; + +- (void)fetchCommandsFromJs; +- (void)executePending; +- (BOOL)execute:(CDVInvokedUrlCommand*)command; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.m new file mode 100644 index 0000000..b78ed83 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.m @@ -0,0 +1,194 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#include +#import "CDVCommandQueue.h" +#import "CDVViewController.h" +#import "CDVCommandDelegateImpl.h" +#import "CDVJSON_private.h" +#import "CDVDebug.h" + +// Parse JS on the main thread if it's shorter than this. +static const NSInteger JSON_SIZE_FOR_MAIN_THREAD = 4 * 1024; // Chosen arbitrarily. +// Execute multiple commands in one go until this many seconds have passed. +static const double MAX_EXECUTION_TIME = .008; // Half of a 60fps frame. + +@interface CDVCommandQueue () { + NSInteger _lastCommandQueueFlushRequestId; + __weak CDVViewController* _viewController; + NSMutableArray* _queue; + NSTimeInterval _startExecutionTime; +} +@end + +@implementation CDVCommandQueue + +- (BOOL)currentlyExecuting +{ + return _startExecutionTime > 0; +} + +- (id)initWithViewController:(CDVViewController*)viewController +{ + self = [super init]; + if (self != nil) { + _viewController = viewController; + _queue = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)dispose +{ + // TODO(agrieve): Make this a zeroing weak ref once we drop support for 4.3. + _viewController = nil; +} + +- (void)resetRequestId +{ + _lastCommandQueueFlushRequestId = 0; +} + +- (void)enqueueCommandBatch:(NSString*)batchJSON +{ + if ([batchJSON length] > 0) { + NSMutableArray* commandBatchHolder = [[NSMutableArray alloc] init]; + [_queue addObject:commandBatchHolder]; + if ([batchJSON length] < JSON_SIZE_FOR_MAIN_THREAD) { + [commandBatchHolder addObject:[batchJSON cdv_JSONObject]]; + } else { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^() { + NSMutableArray* result = [batchJSON cdv_JSONObject]; + @synchronized(commandBatchHolder) { + [commandBatchHolder addObject:result]; + } + [self performSelectorOnMainThread:@selector(executePending) withObject:nil waitUntilDone:NO]; + }); + } + } +} + +- (void)fetchCommandsFromJs +{ + __weak CDVCommandQueue* weakSelf = self; + NSString* js = @"cordova.require('cordova/exec').nativeFetchMessages()"; + + [_viewController.webViewEngine evaluateJavaScript:js + completionHandler:^(id obj, NSError* error) { + if ((error == nil) && [obj isKindOfClass:[NSString class]]) { + NSString* queuedCommandsJSON = (NSString*)obj; + CDV_EXEC_LOG(@"Exec: Flushed JS->native queue (hadCommands=%d).", [queuedCommandsJSON length] > 0); + [weakSelf enqueueCommandBatch:queuedCommandsJSON]; + // this has to be called here now, because fetchCommandsFromJs is now async (previously: synchronous) + [self executePending]; + } + }]; +} + +- (void)executePending +{ + // Make us re-entrant-safe. + if (_startExecutionTime > 0) { + return; + } + @try { + _startExecutionTime = [NSDate timeIntervalSinceReferenceDate]; + + while ([_queue count] > 0) { + NSMutableArray* commandBatchHolder = _queue[0]; + NSMutableArray* commandBatch = nil; + @synchronized(commandBatchHolder) { + // If the next-up command is still being decoded, wait for it. + if ([commandBatchHolder count] == 0) { + break; + } + commandBatch = commandBatchHolder[0]; + } + + while ([commandBatch count] > 0) { + @autoreleasepool { + // Execute the commands one-at-a-time. + NSArray* jsonEntry = [commandBatch cdv_dequeue]; + if ([commandBatch count] == 0) { + [_queue removeObjectAtIndex:0]; + } + CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry]; + CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName); + + if (![self execute:command]) { +#ifdef DEBUG + NSString* commandJson = [jsonEntry cdv_JSONString]; + static NSUInteger maxLogLength = 1024; + NSString* commandString = ([commandJson length] > maxLogLength) ? + [NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] : + commandJson; + + DLog(@"FAILED pluginJSON = %@", commandString); +#endif + } + } + + // Yield if we're taking too long. + if (([_queue count] > 0) && ([NSDate timeIntervalSinceReferenceDate] - _startExecutionTime > MAX_EXECUTION_TIME)) { + [self performSelector:@selector(executePending) withObject:nil afterDelay:0]; + return; + } + } + } + } @finally + { + _startExecutionTime = 0; + } +} + +- (BOOL)execute:(CDVInvokedUrlCommand*)command +{ + if ((command.className == nil) || (command.methodName == nil)) { + NSLog(@"ERROR: Classname and/or methodName not found for command."); + return NO; + } + + // Fetch an instance of this class + CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className]; + + if (!([obj isKindOfClass:[CDVPlugin class]])) { + NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className); + return NO; + } + BOOL retVal = YES; + double started = [[NSDate date] timeIntervalSince1970] * 1000.0; + // Find the proper selector to call. + NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName]; + SEL normalSelector = NSSelectorFromString(methodName); + if ([obj respondsToSelector:normalSelector]) { + // [obj performSelector:normalSelector withObject:command]; + ((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command); + } else { + // There's no method to call, so throw an error. + NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className); + retVal = NO; + } + double elapsed = [[NSDate date] timeIntervalSince1970] * 1000.0 - started; + if (elapsed > 10) { + NSLog(@"THREAD WARNING: ['%@'] took '%f' ms. Plugin should use a background thread.", command.className, elapsed); + } + return retVal; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.h new file mode 100644 index 0000000..bae3d0f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.h @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +@interface CDVConfigParser : NSObject +{ + NSString* featureName; +} + +@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict; +@property (nonatomic, readonly, strong) NSMutableDictionary* settings; +@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames; +@property (nonatomic, readonly, strong) NSString* startPage; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.m new file mode 100644 index 0000000..ab32b4a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVConfigParser.m @@ -0,0 +1,81 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVConfigParser.h" + +@interface CDVConfigParser () + +@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict; +@property (nonatomic, readwrite, strong) NSMutableDictionary* settings; +@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames; +@property (nonatomic, readwrite, strong) NSString* startPage; + +@end + +@implementation CDVConfigParser + +@synthesize pluginsDict, settings, startPage, startupPluginNames; + +- (id)init +{ + self = [super init]; + if (self != nil) { + self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30]; + self.settings = [[NSMutableDictionary alloc] initWithCapacity:30]; + self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8]; + featureName = nil; + } + return self; +} + +- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict +{ + if ([elementName isEqualToString:@"preference"]) { + settings[[attributeDict[@"name"] lowercaseString]] = attributeDict[@"value"]; + } else if ([elementName isEqualToString:@"feature"]) { // store feature name to use with correct parameter set + featureName = [attributeDict[@"name"] lowercaseString]; + } else if ((featureName != nil) && [elementName isEqualToString:@"param"]) { + NSString* paramName = [attributeDict[@"name"] lowercaseString]; + id value = attributeDict[@"value"]; + if ([paramName isEqualToString:@"ios-package"]) { + pluginsDict[featureName] = value; + } + BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString : value]); + BOOL attribIsOnload = [@"true" isEqualToString :[attributeDict[@"onload"] lowercaseString]]; + if (paramIsOnload || attribIsOnload) { + [self.startupPluginNames addObject:featureName]; + } + } else if ([elementName isEqualToString:@"content"]) { + self.startPage = attributeDict[@"src"]; + } +} + +- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName +{ + if ([elementName isEqualToString:@"feature"]) { // no longer handling a feature so release + featureName = nil; + } +} + +- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError +{ + NSAssert(NO, @"config.xml parse error line %ld col %ld", (long)[parser lineNumber], (long)[parser columnNumber]); +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h new file mode 100644 index 0000000..993e0a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.h @@ -0,0 +1,52 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVInvokedUrlCommand : NSObject { + NSString* _callbackId; + NSString* _className; + NSString* _methodName; + NSArray* _arguments; +} + +@property (nonatomic, readonly) NSArray* arguments; +@property (nonatomic, readonly) NSString* callbackId; +@property (nonatomic, readonly) NSString* className; +@property (nonatomic, readonly) NSString* methodName; + ++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry; + +- (id)initWithArguments:(NSArray*)arguments + callbackId:(NSString*)callbackId + className:(NSString*)className + methodName:(NSString*)methodName; + +- (id)initFromJson:(NSArray*)jsonEntry; + +// Returns the argument at the given index. +// If index >= the number of arguments, returns nil. +// If the argument at the given index is NSNull, returns nil. +- (id)argumentAtIndex:(NSUInteger)index; +// Same as above, but returns defaultValue instead of nil. +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue; +// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m new file mode 100644 index 0000000..5b4281d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVInvokedUrlCommand.m @@ -0,0 +1,116 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVInvokedUrlCommand.h" +#import "CDVJSON_private.h" + +@implementation CDVInvokedUrlCommand + +@synthesize arguments = _arguments; +@synthesize callbackId = _callbackId; +@synthesize className = _className; +@synthesize methodName = _methodName; + ++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry +{ + return [[CDVInvokedUrlCommand alloc] initFromJson:jsonEntry]; +} + +- (id)initFromJson:(NSArray*)jsonEntry +{ + id tmp = [jsonEntry objectAtIndex:0]; + NSString* callbackId = tmp == [NSNull null] ? nil : tmp; + NSString* className = [jsonEntry objectAtIndex:1]; + NSString* methodName = [jsonEntry objectAtIndex:2]; + NSMutableArray* arguments = [jsonEntry objectAtIndex:3]; + + return [self initWithArguments:arguments + callbackId:callbackId + className:className + methodName:methodName]; +} + +- (id)initWithArguments:(NSArray*)arguments + callbackId:(NSString*)callbackId + className:(NSString*)className + methodName:(NSString*)methodName +{ + self = [super init]; + if (self != nil) { + _arguments = arguments; + _callbackId = callbackId; + _className = className; + _methodName = methodName; + } + [self massageArguments]; + return self; +} + +- (void)massageArguments +{ + NSMutableArray* newArgs = nil; + + for (NSUInteger i = 0, count = [_arguments count]; i < count; ++i) { + id arg = [_arguments objectAtIndex:i]; + if (![arg isKindOfClass:[NSDictionary class]]) { + continue; + } + NSDictionary* dict = arg; + NSString* type = [dict objectForKey:@"CDVType"]; + if (!type || ![type isEqualToString:@"ArrayBuffer"]) { + continue; + } + NSString* data = [dict objectForKey:@"data"]; + if (!data) { + continue; + } + if (newArgs == nil) { + newArgs = [NSMutableArray arrayWithArray:_arguments]; + _arguments = newArgs; + } + [newArgs replaceObjectAtIndex:i withObject:[[NSData alloc] initWithBase64EncodedString:data options:0]]; + } +} + +- (id)argumentAtIndex:(NSUInteger)index +{ + return [self argumentAtIndex:index withDefault:nil]; +} + +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue +{ + return [self argumentAtIndex:index withDefault:defaultValue andClass:nil]; +} + +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass +{ + if (index >= [_arguments count]) { + return defaultValue; + } + id ret = [_arguments objectAtIndex:index]; + if (ret == [NSNull null]) { + ret = defaultValue; + } + if ((aClass != nil) && ![ret isKindOfClass:aClass]) { + ret = defaultValue; + } + return ret; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.h new file mode 100644 index 0000000..cc43b16 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.h @@ -0,0 +1,39 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVPlugin.h" + +@interface CDVPlugin (CDVPluginResources) + +/* + This will return the localized string for a key in a .bundle that is named the same as your class + For example, if your plugin class was called Foo, and you have a Spanish localized strings file, it will + try to load the desired key from Foo.bundle/es.lproj/Localizable.strings + */ +- (NSString*)pluginLocalizedString:(NSString*)key; + +/* + This will return the image for a name in a .bundle that is named the same as your class + For example, if your plugin class was called Foo, and you have an image called "bar", + it will try to load the image from Foo.bundle/bar.png (and appropriately named retina versions) + */ +- (UIImage*)pluginImageResource:(NSString*)name; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.m new file mode 100644 index 0000000..5690738 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin+Resources.m @@ -0,0 +1,38 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPlugin+Resources.h" + +@implementation CDVPlugin (CDVPluginResources) + +- (NSString*)pluginLocalizedString:(NSString*)key +{ + NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:NSStringFromClass([self class]) ofType:@"bundle"]]; + + return [bundle localizedStringForKey:(key) value:nil table:nil]; +} + +- (UIImage*)pluginImageResource:(NSString*)name +{ + NSString* resourceIdentifier = [NSString stringWithFormat:@"%@.bundle/%@", NSStringFromClass([self class]), name]; + + return [UIImage imageNamed:resourceIdentifier]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h new file mode 100644 index 0000000..d59507a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.h @@ -0,0 +1,83 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import "CDVPluginResult.h" +#import "NSMutableArray+QueueAdditions.h" +#import "CDVCommandDelegate.h" +#import "CDVWebViewEngineProtocol.h" + +@interface UIView (org_apache_cordova_UIView_Extension) + +@property (nonatomic, weak) UIScrollView* scrollView; + +@end + +extern NSString* const CDVPageDidLoadNotification; +extern NSString* const CDVPluginHandleOpenURLNotification; +extern NSString* const CDVPluginResetNotification; +extern NSString* const CDVViewWillAppearNotification; +extern NSString* const CDVViewDidAppearNotification; +extern NSString* const CDVViewWillDisappearNotification; +extern NSString* const CDVViewDidDisappearNotification; +extern NSString* const CDVViewWillLayoutSubviewsNotification; +extern NSString* const CDVViewDidLayoutSubviewsNotification; +extern NSString* const CDVViewWillTransitionToSizeNotification; + +/* + * The local and remote push notification functionality has been removed from the core in cordova-ios 4.x, + * but these constants have unfortunately have not been removed, but will be removed in 5.x. + * + * To have the same functionality as 3.x, use a third-party plugin or the experimental + * https://github.com/apache/cordova-plugins/tree/master/notification-rebroadcast + */ +extern NSString* const CDVLocalNotification CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0"); +extern NSString* const CDVRemoteNotification CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0"); +extern NSString* const CDVRemoteNotificationError CDV_DEPRECATED(4.0, "Functionality removed in 4.0, constant will be removed in 5.0"); + +@interface CDVPlugin : NSObject {} + +@property (nonatomic, readonly, weak) UIView* webView; +@property (nonatomic, readonly, weak) id webViewEngine; + +@property (nonatomic, weak) UIViewController* viewController; +@property (nonatomic, weak) id commandDelegate; + +@property (readonly, assign) BOOL hasPendingOperation; + +- (void)pluginInitialize; + +- (void)handleOpenURL:(NSNotification*)notification; +- (void)onAppTerminate; +- (void)onMemoryWarning; +- (void)onReset; +- (void)dispose; + +/* + // see initWithWebView implementation + - (void) onPause {} + - (void) onResume {} + - (void) onOrientationWillChange {} + - (void) onOrientationDidChange {} + */ + +- (id)appDelegate; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.m new file mode 100644 index 0000000..f16f7fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPlugin.m @@ -0,0 +1,169 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPlugin.h" +#import "CDVPlugin+Private.h" +#import "CDVPlugin+Resources.h" +#import "CDVViewController.h" +#include + +@implementation UIView (org_apache_cordova_UIView_Extension) + +@dynamic scrollView; + +- (UIScrollView*)scrollView +{ + SEL scrollViewSelector = NSSelectorFromString(@"scrollView"); + + if ([self respondsToSelector:scrollViewSelector]) { + return ((id (*)(id, SEL))objc_msgSend)(self, scrollViewSelector); + } + + return nil; +} + +@end + +NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification"; +NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification"; +NSString* const CDVPluginResetNotification = @"CDVPluginResetNotification"; +NSString* const CDVLocalNotification = @"CDVLocalNotification"; +NSString* const CDVRemoteNotification = @"CDVRemoteNotification"; +NSString* const CDVRemoteNotificationError = @"CDVRemoteNotificationError"; +NSString* const CDVViewWillAppearNotification = @"CDVViewWillAppearNotification"; +NSString* const CDVViewDidAppearNotification = @"CDVViewDidAppearNotification"; +NSString* const CDVViewWillDisappearNotification = @"CDVViewWillDisappearNotification"; +NSString* const CDVViewDidDisappearNotification = @"CDVViewDidDisappearNotification"; +NSString* const CDVViewWillLayoutSubviewsNotification = @"CDVViewWillLayoutSubviewsNotification"; +NSString* const CDVViewDidLayoutSubviewsNotification = @"CDVViewDidLayoutSubviewsNotification"; +NSString* const CDVViewWillTransitionToSizeNotification = @"CDVViewWillTransitionToSizeNotification"; + +@interface CDVPlugin () + +@property (readwrite, assign) BOOL hasPendingOperation; +@property (nonatomic, readwrite, weak) id webViewEngine; + +@end + +@implementation CDVPlugin +@synthesize webViewEngine, viewController, commandDelegate, hasPendingOperation; +@dynamic webView; + +// Do not override these methods. Use pluginInitialize instead. +- (instancetype)initWithWebViewEngine:(id )theWebViewEngine +{ + self = [super init]; + if (self) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppTerminate) name:UIApplicationWillTerminateNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReset) name:CDVPluginResetNotification object:theWebViewEngine.engineWebView]; + + self.webViewEngine = theWebViewEngine; + } + return self; +} + +- (void)pluginInitialize +{ + // You can listen to more app notifications, see: + // http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728-CH3-DontLinkElementID_4 + + // NOTE: if you want to use these, make sure you uncomment the corresponding notification handler + + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; + + // Added in 2.5.0 + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView]; + //Added in 4.3.0 + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillAppear:) name:CDVViewWillAppearNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewDidAppear:) name:CDVViewDidAppearNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillDisappear:) name:CDVViewWillDisappearNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewDidDisappear:) name:CDVViewDidDisappearNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillLayoutSubviews:) name:CDVViewWillLayoutSubviewsNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewDidLayoutSubviews:) name:CDVViewDidLayoutSubviewsNotification object:nil]; + // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillTransitionToSize:) name:CDVViewWillTransitionToSizeNotification object:nil]; +} + +- (void)dispose +{ + viewController = nil; + commandDelegate = nil; +} + +- (UIView*)webView +{ + if (self.webViewEngine != nil) { + return self.webViewEngine.engineWebView; + } + + return nil; +} + +/* +// NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking UI, like alerts +- (void) onPause {} +- (void) onResume {} +- (void) onOrientationWillChange {} +- (void) onOrientationDidChange {} +*/ + +/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */ +- (void)handleOpenURL:(NSNotification*)notification +{ + // override to handle urls sent to your app + // register your url schemes in your App-Info.plist + + NSURL* url = [notification object]; + + if ([url isKindOfClass:[NSURL class]]) { + /* Do your thing! */ + } +} + +/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */ +- (void)onAppTerminate +{ + // override this if you need to do any cleanup on app exit +} + +- (void)onMemoryWarning +{ + // override to remove caches, etc +} + +- (void)onReset +{ + // Override to cancel any long-running requests when the WebView navigates or refreshes. +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; // this will remove all notifications unless added using addObserverForName:object:queue:usingBlock: +} + +- (id)appDelegate +{ + return [[UIApplication sharedApplication] delegate]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h new file mode 100644 index 0000000..56b8c23 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.h @@ -0,0 +1,66 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVAvailability.h" + +typedef enum { + CDVCommandStatus_NO_RESULT = 0, + CDVCommandStatus_OK, + CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION, + CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION, + CDVCommandStatus_INSTANTIATION_EXCEPTION, + CDVCommandStatus_MALFORMED_URL_EXCEPTION, + CDVCommandStatus_IO_EXCEPTION, + CDVCommandStatus_INVALID_ACTION, + CDVCommandStatus_JSON_EXCEPTION, + CDVCommandStatus_ERROR +} CDVCommandStatus; + +@interface CDVPluginResult : NSObject {} + +@property (nonatomic, strong, readonly) NSNumber* status; +@property (nonatomic, strong, readonly) id message; +@property (nonatomic, strong) NSNumber* keepCallback; +// This property can be used to scope the lifetime of another object. For example, +// Use it to store the associated NSData when `message` is created using initWithBytesNoCopy. +@property (nonatomic, strong) id associatedObject; + +- (CDVPluginResult*)init; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSInteger:(NSInteger)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSUInteger:(NSUInteger)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode; + ++ (void)setVerbose:(BOOL)verbose; ++ (BOOL)isVerbose; + +- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback; + +- (NSString*)argumentsAsJSON; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.m new file mode 100644 index 0000000..3521e6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVPluginResult.m @@ -0,0 +1,186 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVPluginResult.h" +#import "CDVJSON_private.h" +#import "CDVDebug.h" + +@interface CDVPluginResult () + +- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage; + +@end + +@implementation CDVPluginResult +@synthesize status, message, keepCallback, associatedObject; + +static NSArray* org_apache_cordova_CommandStatusMsgs; + +id messageFromArrayBuffer(NSData* data) +{ + return @{ + @"CDVType" : @"ArrayBuffer", + @"data" :[data base64EncodedStringWithOptions:0] + }; +} + +id massageMessage(id message) +{ + if ([message isKindOfClass:[NSData class]]) { + return messageFromArrayBuffer(message); + } + return message; +} + +id messageFromMultipart(NSArray* theMessages) +{ + NSMutableArray* messages = [NSMutableArray arrayWithArray:theMessages]; + + for (NSUInteger i = 0; i < messages.count; ++i) { + [messages replaceObjectAtIndex:i withObject:massageMessage([messages objectAtIndex:i])]; + } + + return @{ + @"CDVType" : @"MultiPart", + @"messages" : messages + }; +} + ++ (void)initialize +{ + org_apache_cordova_CommandStatusMsgs = [[NSArray alloc] initWithObjects:@"No result", + @"OK", + @"Class not found", + @"Illegal access", + @"Instantiation error", + @"Malformed url", + @"IO error", + @"Invalid action", + @"JSON error", + @"Error", + nil]; +} + +- (CDVPluginResult*)init +{ + return [self initWithStatus:CDVCommandStatus_NO_RESULT message:nil]; +} + +- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage +{ + self = [super init]; + if (self) { + status = [NSNumber numberWithInt:statusOrdinal]; + message = theMessage; + keepCallback = [NSNumber numberWithBool:NO]; + } + return self; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal +{ + return [[self alloc] initWithStatus:statusOrdinal message:nil]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:theMessage]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:theMessage]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInt:theMessage]]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSInteger:(NSInteger)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInteger:theMessage]]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSUInteger:(NSUInteger)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithUnsignedInteger:theMessage]]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithDouble:theMessage]]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithBool:theMessage]]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:theMessage]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage +{ + return [[self alloc] initWithStatus:statusOrdinal message:messageFromArrayBuffer(theMessage)]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages +{ + return [[self alloc] initWithStatus:statusOrdinal message:messageFromMultipart(theMessages)]; +} + ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode +{ + NSDictionary* errDict = @{@"code" :[NSNumber numberWithInt:errorCode]}; + + return [[self alloc] initWithStatus:statusOrdinal message:errDict]; +} + +- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback +{ + [self setKeepCallback:[NSNumber numberWithBool:bKeepCallback]]; +} + +- (NSString*)argumentsAsJSON +{ + id arguments = (self.message == nil ? [NSNull null] : self.message); + NSArray* argumentsWrappedInArray = [NSArray arrayWithObject:arguments]; + + NSString* argumentsJSON = [argumentsWrappedInArray cdv_JSONString]; + + argumentsJSON = [argumentsJSON substringWithRange:NSMakeRange(1, [argumentsJSON length] - 2)]; + + return argumentsJSON; +} + +static BOOL gIsVerbose = NO; ++ (void)setVerbose:(BOOL)verbose +{ + gIsVerbose = verbose; +} + ++ (BOOL)isVerbose +{ + return gIsVerbose; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h new file mode 100644 index 0000000..7226205 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@protocol CDVScreenOrientationDelegate + +- (NSUInteger)supportedInterfaceOrientations; +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; +- (BOOL)shouldAutorotate; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h new file mode 100644 index 0000000..6d31593 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVTimer : NSObject + ++ (void)start:(NSString*)name; ++ (void)stop:(NSString*)name; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.m new file mode 100644 index 0000000..784e94d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVTimer.m @@ -0,0 +1,123 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVTimer.h" + +#pragma mark CDVTimerItem + +@interface CDVTimerItem : NSObject + +@property (nonatomic, strong) NSString* name; +@property (nonatomic, strong) NSDate* started; +@property (nonatomic, strong) NSDate* ended; + +- (void)log; + +@end + +@implementation CDVTimerItem + +- (void)log +{ + NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0); +} + +@end + +#pragma mark CDVTimer + +@interface CDVTimer () + +@property (nonatomic, strong) NSMutableDictionary* items; + +@end + +@implementation CDVTimer + +#pragma mark object methods + +- (id)init +{ + if (self = [super init]) { + self.items = [NSMutableDictionary dictionaryWithCapacity:6]; + } + + return self; +} + +- (void)add:(NSString*)name +{ + if ([self.items objectForKey:[name lowercaseString]] == nil) { + CDVTimerItem* item = [CDVTimerItem new]; + item.name = name; + item.started = [NSDate new]; + [self.items setObject:item forKey:[name lowercaseString]]; + } else { + NSLog(@"Timer called '%@' already exists.", name); + } +} + +- (void)remove:(NSString*)name +{ + CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]]; + + if (item != nil) { + item.ended = [NSDate new]; + [item log]; + [self.items removeObjectForKey:[name lowercaseString]]; + } else { + NSLog(@"Timer called '%@' does not exist.", name); + } +} + +- (void)removeAll +{ + [self.items removeAllObjects]; +} + +#pragma mark class methods + ++ (void)start:(NSString*)name +{ + [[CDVTimer sharedInstance] add:name]; +} + ++ (void)stop:(NSString*)name +{ + [[CDVTimer sharedInstance] remove:name]; +} + ++ (void)clearAll +{ + [[CDVTimer sharedInstance] removeAll]; +} + ++ (CDVTimer*)sharedInstance +{ + static dispatch_once_t pred = 0; + __strong static CDVTimer* _sharedObject = nil; + + dispatch_once(&pred, ^{ + _sharedObject = [[self alloc] init]; + }); + + return _sharedObject; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h new file mode 100644 index 0000000..0561e04 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDVAvailability.h" + +@class CDVViewController; + +@interface CDVURLProtocol : NSURLProtocol {} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m new file mode 100644 index 0000000..7b2c5ce --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m @@ -0,0 +1,113 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import +#import "CDVURLProtocol.h" +#import "CDVCommandQueue.h" +#import "CDVViewController.h" + +// Contains a set of NSNumbers of addresses of controllers. It doesn't store +// the actual pointer to avoid retaining. +static NSMutableSet* gRegisteredControllers = nil; + +NSString* const kCDVAssetsLibraryPrefixes = @"assets-library://"; + +@implementation CDVURLProtocol + + ++ (BOOL)canInitWithRequest:(NSURLRequest*)theRequest +{ + NSURL* theUrl = [theRequest URL]; + + if ([[theUrl absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) { + return YES; + } + + return NO; +} + ++ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request +{ + // NSLog(@"%@ received %@", self, NSStringFromSelector(_cmd)); + return request; +} + +- (void)startLoading +{ + // NSLog(@"%@ received %@ - start", self, NSStringFromSelector(_cmd)); + NSURL* url = [[self request] URL]; + + if ([[url absoluteString] hasPrefix:kCDVAssetsLibraryPrefixes]) { + ALAssetsLibraryAssetForURLResultBlock resultBlock = ^(ALAsset* asset) { + if (asset) { + // We have the asset! Get the data and send it along. + ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation]; + NSString* MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)[assetRepresentation UTI], kUTTagClassMIMEType); + Byte* buffer = (Byte*)malloc((unsigned long)[assetRepresentation size]); + NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:0.0 length:(NSUInteger)[assetRepresentation size] error:nil]; + NSData* data = [NSData dataWithBytesNoCopy:buffer length:bufferSize freeWhenDone:YES]; + [self sendResponseWithResponseCode:200 data:data mimeType:MIMEType]; + } else { + // Retrieving the asset failed for some reason. Send an error. + [self sendResponseWithResponseCode:404 data:nil mimeType:nil]; + } + }; + ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError* error) { + // Retrieving the asset failed for some reason. Send an error. + [self sendResponseWithResponseCode:401 data:nil mimeType:nil]; + }; + + ALAssetsLibrary* assetsLibrary = [[ALAssetsLibrary alloc] init]; + [assetsLibrary assetForURL:url resultBlock:resultBlock failureBlock:failureBlock]; + return; + } + + NSString* body = [NSString stringWithFormat:@"Access not allowed to URL: %@", url]; + [self sendResponseWithResponseCode:401 data:[body dataUsingEncoding:NSASCIIStringEncoding] mimeType:nil]; +} + +- (void)stopLoading +{ + // do any cleanup here +} + ++ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB +{ + return NO; +} + +- (void)sendResponseWithResponseCode:(NSInteger)statusCode data:(NSData*)data mimeType:(NSString*)mimeType +{ + if (mimeType == nil) { + mimeType = @"text/plain"; + } + + NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[[self request] URL] statusCode:statusCode HTTPVersion:@"HTTP/1.1" headerFields:@{@"Content-Type" : mimeType}]; + + [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; + if (data != nil) { + [[self client] URLProtocol:self didLoadData:data]; + } + [[self client] URLProtocolDidFinishLoading:self]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h new file mode 100644 index 0000000..4de382f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVUserAgentUtil : NSObject ++ (NSString*)originalUserAgent; ++ (void)acquireLock:(void (^)(NSInteger lockToken))block; ++ (void)releaseLock:(NSInteger*)lockToken; ++ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken; +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m new file mode 100644 index 0000000..b589e1f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m @@ -0,0 +1,124 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVUserAgentUtil.h" + +#import + +// #define VerboseLog NSLog +#define VerboseLog(...) do {} while (0) + +static NSString* const kCdvUserAgentKey = @"Cordova-User-Agent"; +static NSString* const kCdvUserAgentVersionKey = @"Cordova-User-Agent-Version"; + +static NSString* gOriginalUserAgent = nil; +static NSInteger gNextLockToken = 0; +static NSInteger gCurrentLockToken = 0; +static NSMutableArray* gPendingSetUserAgentBlocks = nil; + +@implementation CDVUserAgentUtil + ++ (NSString*)originalUserAgent +{ + if (gOriginalUserAgent == nil) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppLocaleDidChange:) + name:NSCurrentLocaleDidChangeNotification object:nil]; + + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + NSString* systemVersion = [[UIDevice currentDevice] systemVersion]; + NSString* localeStr = [[NSLocale currentLocale] localeIdentifier]; + // Record the model since simulator can change it without re-install (CB-5420). + NSString* model = [UIDevice currentDevice].model; + // Record the version of the app so that we can bust the cache when it changes (CB-10078) + NSString* appVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"]; + NSString* systemAndLocale = [NSString stringWithFormat:@"%@ %@ %@ %@", appVersion, model, systemVersion, localeStr]; + + NSString* cordovaUserAgentVersion = [userDefaults stringForKey:kCdvUserAgentVersionKey]; + gOriginalUserAgent = [userDefaults stringForKey:kCdvUserAgentKey]; + BOOL cachedValueIsOld = ![systemAndLocale isEqualToString:cordovaUserAgentVersion]; + + if ((gOriginalUserAgent == nil) || cachedValueIsOld) { + UIWebView* sampleWebView = [[UIWebView alloc] initWithFrame:CGRectZero]; + gOriginalUserAgent = [sampleWebView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; + + [userDefaults setObject:gOriginalUserAgent forKey:kCdvUserAgentKey]; + [userDefaults setObject:systemAndLocale forKey:kCdvUserAgentVersionKey]; + + [userDefaults synchronize]; + } + } + return gOriginalUserAgent; +} + ++ (void)onAppLocaleDidChange:(NSNotification*)notification +{ + // TODO: We should figure out how to update the user-agent of existing UIWebViews when this happens. + // Maybe use the PDF bug (noted in setUserAgent:). + gOriginalUserAgent = nil; +} + ++ (void)acquireLock:(void (^)(NSInteger lockToken))block +{ + if (gCurrentLockToken == 0) { + gCurrentLockToken = ++gNextLockToken; + VerboseLog(@"Gave lock %d", gCurrentLockToken); + block(gCurrentLockToken); + } else { + if (gPendingSetUserAgentBlocks == nil) { + gPendingSetUserAgentBlocks = [[NSMutableArray alloc] initWithCapacity:4]; + } + VerboseLog(@"Waiting for lock"); + [gPendingSetUserAgentBlocks addObject:block]; + } +} + ++ (void)releaseLock:(NSInteger*)lockToken +{ + if (*lockToken == 0) { + return; + } + NSAssert(gCurrentLockToken == *lockToken, @"Got token %ld, expected %ld", (long)*lockToken, (long)gCurrentLockToken); + + VerboseLog(@"Released lock %d", *lockToken); + if ([gPendingSetUserAgentBlocks count] > 0) { + void (^block)() = [gPendingSetUserAgentBlocks objectAtIndex:0]; + [gPendingSetUserAgentBlocks removeObjectAtIndex:0]; + gCurrentLockToken = ++gNextLockToken; + NSLog(@"Gave lock %ld", (long)gCurrentLockToken); + block(gCurrentLockToken); + } else { + gCurrentLockToken = 0; + } + *lockToken = 0; +} + ++ (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken +{ + NSAssert(gCurrentLockToken == lockToken, @"Got token %ld, expected %ld", (long)lockToken, (long)gCurrentLockToken); + VerboseLog(@"User-Agent set to: %@", value); + + // Setting the UserAgent must occur before a UIWebView is instantiated. + // It is read per instantiation, so it does not affect previously created views. + // Except! When a PDF is loaded, all currently active UIWebViews reload their + // User-Agent from the NSUserDefaults some time after the DidFinishLoad of the PDF bah! + NSDictionary* dict = [[NSDictionary alloc] initWithObjectsAndKeys:value, @"UserAgent", nil]; + [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h new file mode 100644 index 0000000..90d33d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.h @@ -0,0 +1,91 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import "CDVAvailability.h" +#import "CDVInvokedUrlCommand.h" +#import "CDVCommandDelegate.h" +#import "CDVCommandQueue.h" +#import "CDVScreenOrientationDelegate.h" +#import "CDVPlugin.h" +#import "CDVWebViewEngineProtocol.h" + +@interface CDVViewController : UIViewController { + @protected + id _webViewEngine; + @protected + id _commandDelegate; + @protected + CDVCommandQueue* _commandQueue; + NSString* _userAgent; +} + +@property (nonatomic, readonly, weak) IBOutlet UIView* webView; + +@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects; +@property (nonatomic, readonly, strong) NSDictionary* pluginsMap; +@property (nonatomic, readonly, strong) NSMutableDictionary* settings; +@property (nonatomic, readonly, strong) NSXMLParser* configParser; + +@property (nonatomic, readwrite, copy) NSString* configFile; +@property (nonatomic, readwrite, copy) NSString* wwwFolderName; +@property (nonatomic, readwrite, copy) NSString* startPage; +@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue; +@property (nonatomic, readonly, strong) id webViewEngine; +@property (nonatomic, readonly, strong) id commandDelegate; + +/** + The complete user agent that Cordova will use when sending web requests. + */ +@property (nonatomic, readonly) NSString* userAgent; + +/** + The base user agent data that Cordova will use to build its user agent. If this + property isn't set, Cordova will use the standard web view user agent as its + base. + */ +@property (nonatomic, readwrite, copy) NSString* baseUserAgent; + +/** + Takes/Gives an array of UIInterfaceOrientation (int) objects + ex. UIInterfaceOrientationPortrait +*/ +@property (nonatomic, readwrite, strong) NSArray* supportedOrientations; + +/** + The address of the lock token used for controlling access to setting the user-agent + */ +@property (nonatomic, readonly) NSInteger* userAgentLockToken; + +- (UIView*)newCordovaViewWithFrame:(CGRect)bounds; + +- (NSString*)appURLScheme; +- (NSURL*)errorURL; + +- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations; +- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation; + +- (id)getCommandInstance:(NSString*)pluginName; +- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className; +- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName; + +- (void)parseSettingsWithParser:(NSObject *)delegate; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m new file mode 100644 index 0000000..4019c20 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m @@ -0,0 +1,719 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "CDV.h" +#import "CDVPlugin+Private.h" +#import "CDVUIWebViewDelegate.h" +#import "CDVConfigParser.h" +#import "CDVUserAgentUtil.h" +#import +#import "NSDictionary+CordovaPreferences.h" +#import "CDVLocalStorage.h" +#import "CDVCommandDelegateImpl.h" + +@interface CDVViewController () { + NSInteger _userAgentLockToken; +} + +@property (nonatomic, readwrite, strong) NSXMLParser* configParser; +@property (nonatomic, readwrite, strong) NSMutableDictionary* settings; +@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects; +@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames; +@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap; +@property (nonatomic, readwrite, strong) id webViewEngine; + +@property (readwrite, assign) BOOL initialized; + +@property (atomic, strong) NSURL* openURL; + +@end + +@implementation CDVViewController + +@synthesize supportedOrientations; +@synthesize pluginObjects, pluginsMap, startupPluginNames; +@synthesize configParser, settings; +@synthesize wwwFolderName, startPage, initialized, openURL, baseUserAgent; +@synthesize commandDelegate = _commandDelegate; +@synthesize commandQueue = _commandQueue; +@synthesize webViewEngine = _webViewEngine; +@dynamic webView; + +- (void)__init +{ + if ((self != nil) && !self.initialized) { + _commandQueue = [[CDVCommandQueue alloc] initWithViewController:self]; + _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:self]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillTerminate:) + name:UIApplicationWillTerminateNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:) + name:UIApplicationWillResignActiveNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:) + name:UIApplicationDidBecomeActiveNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground:) + name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:) + name:UIApplicationDidEnterBackgroundNotification object:nil]; + + // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist + self.supportedOrientations = [self parseInterfaceOrientations: + [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]]; + + [self printVersion]; + [self printMultitaskingInfo]; + [self printPlatformVersionWarning]; + self.initialized = YES; + } +} + +- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + [self __init]; + return self; +} + +- (id)initWithCoder:(NSCoder*)aDecoder +{ + self = [super initWithCoder:aDecoder]; + [self __init]; + return self; +} + +- (id)init +{ + self = [super init]; + [self __init]; + return self; +} + +- (void)printVersion +{ + NSLog(@"Apache Cordova native platform version %@ is starting.", CDV_VERSION); +} + +- (void)printPlatformVersionWarning +{ + if (!IsAtLeastiOSVersion(@"8.0")) { + NSLog(@"CRITICAL: For Cordova 4.0.0 and above, you will need to upgrade to at least iOS 8.0 or greater. Your current version of iOS is %@.", + [[UIDevice currentDevice] systemVersion] + ); + } +} + +- (void)printMultitaskingInfo +{ + UIDevice* device = [UIDevice currentDevice]; + BOOL backgroundSupported = NO; + + if ([device respondsToSelector:@selector(isMultitaskingSupported)]) { + backgroundSupported = device.multitaskingSupported; + } + + NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"]; + if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default) + exitsOnSuspend = [NSNumber numberWithBool:NO]; + } + + NSLog(@"Multi-tasking -> Device: %@, App: %@", (backgroundSupported ? @"YES" : @"NO"), (![exitsOnSuspend intValue]) ? @"YES" : @"NO"); +} + +-(NSString*)configFilePath{ + NSString* path = self.configFile ?: @"config.xml"; + + // if path is relative, resolve it against the main bundle + if(![path isAbsolutePath]){ + NSString* absolutePath = [[NSBundle mainBundle] pathForResource:path ofType:nil]; + if(!absolutePath){ + NSAssert(NO, @"ERROR: %@ not found in the main bundle!", path); + } + path = absolutePath; + } + + // Assert file exists + if (![[NSFileManager defaultManager] fileExistsAtPath:path]) { + NSAssert(NO, @"ERROR: %@ does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project.", path); + return nil; + } + + return path; +} + +- (void)parseSettingsWithParser:(NSObject *)delegate +{ + // read from config.xml in the app bundle + NSString* path = [self configFilePath]; + + NSURL* url = [NSURL fileURLWithPath:path]; + + self.configParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; + if (self.configParser == nil) { + NSLog(@"Failed to initialize XML parser."); + return; + } + [self.configParser setDelegate:((id < NSXMLParserDelegate >)delegate)]; + [self.configParser parse]; +} + +- (void)loadSettings +{ + CDVConfigParser* delegate = [[CDVConfigParser alloc] init]; + + [self parseSettingsWithParser:delegate]; + + // Get the plugin dictionary, whitelist and settings from the delegate. + self.pluginsMap = delegate.pluginsDict; + self.startupPluginNames = delegate.startupPluginNames; + self.settings = delegate.settings; + + // And the start folder/page. + if(self.wwwFolderName == nil){ + self.wwwFolderName = @"www"; + } + if(delegate.startPage && self.startPage == nil){ + self.startPage = delegate.startPage; + } + if (self.startPage == nil) { + self.startPage = @"index.html"; + } + + // Initialize the plugin objects dict. + self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20]; +} + +- (NSURL*)appUrl +{ + NSURL* appURL = nil; + + if ([self.startPage rangeOfString:@"://"].location != NSNotFound) { + appURL = [NSURL URLWithString:self.startPage]; + } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) { + appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]]; + } else if([self.wwwFolderName hasSuffix:@".bundle"]){ + // www folder is actually a bundle + NSBundle* bundle = [NSBundle bundleWithPath:self.wwwFolderName]; + appURL = [bundle URLForResource:self.startPage withExtension:nil]; + } else if([self.wwwFolderName hasSuffix:@".framework"]){ + // www folder is actually a framework + NSBundle* bundle = [NSBundle bundleWithPath:self.wwwFolderName]; + appURL = [bundle URLForResource:self.startPage withExtension:nil]; + } else { + // CB-3005 strip parameters from start page to check if page exists in resources + NSURL* startURL = [NSURL URLWithString:self.startPage]; + NSString* startFilePath = [self.commandDelegate pathForResource:[startURL path]]; + + if (startFilePath == nil) { + appURL = nil; + } else { + appURL = [NSURL fileURLWithPath:startFilePath]; + // CB-3005 Add on the query params or fragment. + NSString* startPageNoParentDirs = self.startPage; + NSRange r = [startPageNoParentDirs rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"?#"] options:0]; + if (r.location != NSNotFound) { + NSString* queryAndOrFragment = [self.startPage substringFromIndex:r.location]; + appURL = [NSURL URLWithString:queryAndOrFragment relativeToURL:appURL]; + } + } + } + + return appURL; +} + +- (NSURL*)errorURL +{ + NSURL* errorUrl = nil; + + id setting = [self.settings cordovaSettingForKey:@"ErrorUrl"]; + + if (setting) { + NSString* errorUrlString = (NSString*)setting; + if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) { + errorUrl = [NSURL URLWithString:errorUrlString]; + } else { + NSURL* url = [NSURL URLWithString:(NSString*)setting]; + NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]]; + if (errorFilePath) { + errorUrl = [NSURL fileURLWithPath:errorFilePath]; + } + } + } + + return errorUrl; +} + +- (UIView*)webView +{ + if (self.webViewEngine != nil) { + return self.webViewEngine.engineWebView; + } + + return nil; +} + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad +{ + [super viewDidLoad]; + + // Load settings + [self loadSettings]; + + NSString* backupWebStorageType = @"cloud"; // default value + + id backupWebStorage = [self.settings cordovaSettingForKey:@"BackupWebStorage"]; + if ([backupWebStorage isKindOfClass:[NSString class]]) { + backupWebStorageType = backupWebStorage; + } + [self.settings setCordovaSetting:backupWebStorageType forKey:@"BackupWebStorage"]; + + [CDVLocalStorage __fixupDatabaseLocationsWithBackupType:backupWebStorageType]; + + // // Instantiate the WebView /////////////// + + if (!self.webView) { + [self createGapView]; + } + + // ///////////////// + + /* + * Fire up CDVLocalStorage to work-around WebKit storage limitations: on all iOS 5.1+ versions for local-only backups, but only needed on iOS 5.1 for cloud backup. + With minimum iOS 7/8 supported, only first clause applies. + */ + if ([backupWebStorageType isEqualToString:@"local"]) { + NSString* localStorageFeatureName = @"localstorage"; + if ([self.pluginsMap objectForKey:localStorageFeatureName]) { // plugin specified in config + [self.startupPluginNames addObject:localStorageFeatureName]; + } + } + + if ([self.startupPluginNames count] > 0) { + [CDVTimer start:@"TotalPluginStartup"]; + + for (NSString* pluginName in self.startupPluginNames) { + [CDVTimer start:pluginName]; + [self getCommandInstance:pluginName]; + [CDVTimer stop:pluginName]; + } + + [CDVTimer stop:@"TotalPluginStartup"]; + } + + // ///////////////// + NSURL* appURL = [self appUrl]; + + [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { + _userAgentLockToken = lockToken; + [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken]; + if (appURL) { + NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0]; + [self.webViewEngine loadRequest:appReq]; + } else { + NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage]; + NSLog(@"%@", loadErr); + + NSURL* errorUrl = [self errorURL]; + if (errorUrl) { + errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [loadErr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] relativeToURL:errorUrl]; + NSLog(@"%@", [errorUrl absoluteString]); + [self.webViewEngine loadRequest:[NSURLRequest requestWithURL:errorUrl]]; + } else { + NSString* html = [NSString stringWithFormat:@" %@ ", loadErr]; + [self.webViewEngine loadHTMLString:html baseURL:nil]; + } + } + }]; +} + +-(void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewWillAppearNotification object:nil]]; +} + +-(void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewDidAppearNotification object:nil]]; +} + +-(void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewWillDisappearNotification object:nil]]; +} + +-(void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewDidDisappearNotification object:nil]]; +} + +-(void)viewWillLayoutSubviews +{ + [super viewWillLayoutSubviews]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewWillLayoutSubviewsNotification object:nil]]; +} + +-(void)viewDidLayoutSubviews +{ + [super viewDidLayoutSubviews]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewDidLayoutSubviewsNotification object:nil]]; +} + +-(void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator +{ + [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVViewWillTransitionToSizeNotification object:[NSValue valueWithCGSize:size]]]; +} + +- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations +{ + NSMutableArray* result = [[NSMutableArray alloc] init]; + + if (orientations != nil) { + NSEnumerator* enumerator = [orientations objectEnumerator]; + NSString* orientationString; + + while (orientationString = [enumerator nextObject]) { + if ([orientationString isEqualToString:@"UIInterfaceOrientationPortrait"]) { + [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]]; + } else if ([orientationString isEqualToString:@"UIInterfaceOrientationPortraitUpsideDown"]) { + [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortraitUpsideDown]]; + } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeLeft"]) { + [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft]]; + } else if ([orientationString isEqualToString:@"UIInterfaceOrientationLandscapeRight"]) { + [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]]; + } + } + } + + // default + if ([result count] == 0) { + [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]]; + } + + return result; +} + +- (BOOL)shouldAutorotate +{ + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + NSUInteger ret = 0; + + if ([self supportsOrientation:UIInterfaceOrientationPortrait]) { + ret = ret | (1 << UIInterfaceOrientationPortrait); + } + if ([self supportsOrientation:UIInterfaceOrientationPortraitUpsideDown]) { + ret = ret | (1 << UIInterfaceOrientationPortraitUpsideDown); + } + if ([self supportsOrientation:UIInterfaceOrientationLandscapeRight]) { + ret = ret | (1 << UIInterfaceOrientationLandscapeRight); + } + if ([self supportsOrientation:UIInterfaceOrientationLandscapeLeft]) { + ret = ret | (1 << UIInterfaceOrientationLandscapeLeft); + } + + return ret; +} + +- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation +{ + return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]]; +} + +- (UIView*)newCordovaViewWithFrame:(CGRect)bounds +{ + NSString* defaultWebViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaDefaultWebViewEngine"]; + NSString* webViewEngineClass = [self.settings cordovaSettingForKey:@"CordovaWebViewEngine"]; + + if (!defaultWebViewEngineClass) { + defaultWebViewEngineClass = @"CDVUIWebViewEngine"; + } + if (!webViewEngineClass) { + webViewEngineClass = defaultWebViewEngineClass; + } + + // Find webViewEngine + if (NSClassFromString(webViewEngineClass)) { + self.webViewEngine = [[NSClassFromString(webViewEngineClass) alloc] initWithFrame:bounds]; + // if a webView engine returns nil (not supported by the current iOS version) or doesn't conform to the protocol, or can't load the request, we use UIWebView + if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)] || ![self.webViewEngine canLoadRequest:[NSURLRequest requestWithURL:self.appUrl]]) { + self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds]; + } + } else { + self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds]; + } + + if ([self.webViewEngine isKindOfClass:[CDVPlugin class]]) { + [self registerPlugin:(CDVPlugin*)self.webViewEngine withClassName:webViewEngineClass]; + } + + return self.webViewEngine.engineWebView; +} + +- (NSString*)userAgent +{ + if (_userAgent != nil) { + return _userAgent; + } + + NSString* localBaseUserAgent; + if (self.baseUserAgent != nil) { + localBaseUserAgent = self.baseUserAgent; + } else if ([self.settings cordovaSettingForKey:@"OverrideUserAgent"] != nil) { + localBaseUserAgent = [self.settings cordovaSettingForKey:@"OverrideUserAgent"]; + } else { + localBaseUserAgent = [CDVUserAgentUtil originalUserAgent]; + } + NSString* appendUserAgent = [self.settings cordovaSettingForKey:@"AppendUserAgent"]; + if (appendUserAgent) { + _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent]; + } else { + // Use our address as a unique number to append to the User-Agent. + _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self]; + } + return _userAgent; +} + +- (void)createGapView +{ + CGRect webViewBounds = self.view.bounds; + + webViewBounds.origin = self.view.bounds.origin; + + UIView* view = [self newCordovaViewWithFrame:webViewBounds]; + + view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + [self.view addSubview:view]; + [self.view sendSubviewToBack:view]; +} + +- (void)didReceiveMemoryWarning +{ + // iterate through all the plugin objects, and call hasPendingOperation + // if at least one has a pending operation, we don't call [super didReceiveMemoryWarning] + + NSEnumerator* enumerator = [self.pluginObjects objectEnumerator]; + CDVPlugin* plugin; + + BOOL doPurge = YES; + + while ((plugin = [enumerator nextObject])) { + if (plugin.hasPendingOperation) { + NSLog(@"Plugin '%@' has a pending operation, memory purge is delayed for didReceiveMemoryWarning.", NSStringFromClass([plugin class])); + doPurge = NO; + } + } + + if (doPurge) { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + } + + // Release any cached data, images, etc. that aren't in use. +} + +- (void)viewDidUnload +{ + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; + + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + + [super viewDidUnload]; +} + +#pragma mark CordovaCommands + +- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className +{ + if ([plugin respondsToSelector:@selector(setViewController:)]) { + [plugin setViewController:self]; + } + + if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) { + [plugin setCommandDelegate:_commandDelegate]; + } + + [self.pluginObjects setObject:plugin forKey:className]; + [plugin pluginInitialize]; +} + +- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName +{ + if ([plugin respondsToSelector:@selector(setViewController:)]) { + [plugin setViewController:self]; + } + + if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) { + [plugin setCommandDelegate:_commandDelegate]; + } + + NSString* className = NSStringFromClass([plugin class]); + [self.pluginObjects setObject:plugin forKey:className]; + [self.pluginsMap setValue:className forKey:[pluginName lowercaseString]]; + [plugin pluginInitialize]; +} + +/** + Returns an instance of a CordovaCommand object, based on its name. If one exists already, it is returned. + */ +- (id)getCommandInstance:(NSString*)pluginName +{ + // first, we try to find the pluginName in the pluginsMap + // (acts as a whitelist as well) if it does not exist, we return nil + // NOTE: plugin names are matched as lowercase to avoid problems - however, a + // possible issue is there can be duplicates possible if you had: + // "org.apache.cordova.Foo" and "org.apache.cordova.foo" - only the lower-cased entry will match + NSString* className = [self.pluginsMap objectForKey:[pluginName lowercaseString]]; + + if (className == nil) { + return nil; + } + + id obj = [self.pluginObjects objectForKey:className]; + if (!obj) { + obj = [[NSClassFromString(className)alloc] initWithWebViewEngine:_webViewEngine]; + + if (obj != nil) { + [self registerPlugin:obj withClassName:className]; + } else { + NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName); + } + } + return obj; +} + +#pragma mark - + +- (NSString*)appURLScheme +{ + NSString* URLScheme = nil; + + NSArray* URLTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleURLTypes"]; + + if (URLTypes != nil) { + NSDictionary* dict = [URLTypes objectAtIndex:0]; + if (dict != nil) { + NSArray* URLSchemes = [dict objectForKey:@"CFBundleURLSchemes"]; + if (URLSchemes != nil) { + URLScheme = [URLSchemes objectAtIndex:0]; + } + } + } + + return URLScheme; +} + +#pragma mark - +#pragma mark UIApplicationDelegate impl + +/* + This method lets your application know that it is about to be terminated and purged from memory entirely + */ +- (void)onAppWillTerminate:(NSNotification*)notification +{ + // empty the tmp directory + NSFileManager* fileMgr = [[NSFileManager alloc] init]; + NSError* __autoreleasing err = nil; + + // clear contents of NSTemporaryDirectory + NSString* tempDirectoryPath = NSTemporaryDirectory(); + NSDirectoryEnumerator* directoryEnumerator = [fileMgr enumeratorAtPath:tempDirectoryPath]; + NSString* fileName = nil; + BOOL result; + + while ((fileName = [directoryEnumerator nextObject])) { + NSString* filePath = [tempDirectoryPath stringByAppendingPathComponent:fileName]; + result = [fileMgr removeItemAtPath:filePath error:&err]; + if (!result && err) { + NSLog(@"Failed to delete: %@ (error: %@)", filePath, err); + } + } +} + +/* + This method is called to let your application know that it is about to move from the active to inactive state. + You should use this method to pause ongoing tasks, disable timer, ... + */ +- (void)onAppWillResignActive:(NSNotification*)notification +{ + // NSLog(@"%@",@"applicationWillResignActive"); + [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resign');" scheduledOnRunLoop:NO]; +} + +/* + In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state. + You can use this method to undo many of the changes you made to your application upon entering the background. + invariably followed by applicationDidBecomeActive + */ +- (void)onAppWillEnterForeground:(NSNotification*)notification +{ + // NSLog(@"%@",@"applicationWillEnterForeground"); + [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"]; + + /** Clipboard fix **/ + UIPasteboard* pasteboard = [UIPasteboard generalPasteboard]; + NSString* string = pasteboard.string; + if (string) { + [pasteboard setValue:string forPasteboardType:@"public.text"]; + } +} + +// This method is called to let your application know that it moved from the inactive to active state. +- (void)onAppDidBecomeActive:(NSNotification*)notification +{ + // NSLog(@"%@",@"applicationDidBecomeActive"); + [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('active');"]; +} + +/* + In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method + when the user quits an application that supports background execution. + */ +- (void)onAppDidEnterBackground:(NSNotification*)notification +{ + // NSLog(@"%@",@"applicationDidEnterBackground"); + [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('pause', null, true);" scheduledOnRunLoop:NO]; +} + +// /////////////////////// + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + [_commandQueue dispose]; + [[self.pluginObjects allValues] makeObjectsPerformSelector:@selector(dispose)]; +} + +- (NSInteger*)userAgentLockToken +{ + return &_userAgentLockToken; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h new file mode 100644 index 0000000..34d07f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWebViewEngineProtocol.h @@ -0,0 +1,42 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#define kCDVWebViewEngineScriptMessageHandlers @"kCDVWebViewEngineScriptMessageHandlers" +#define kCDVWebViewEngineUIWebViewDelegate @"kCDVWebViewEngineUIWebViewDelegate" +#define kCDVWebViewEngineWKNavigationDelegate @"kCDVWebViewEngineWKNavigationDelegate" +#define kCDVWebViewEngineWKUIDelegate @"kCDVWebViewEngineWKUIDelegate" +#define kCDVWebViewEngineWebViewPreferences @"kCDVWebViewEngineWebViewPreferences" + +@protocol CDVWebViewEngineProtocol + +@property (nonatomic, strong, readonly) UIView* engineWebView; + +- (id)loadRequest:(NSURLRequest*)request; +- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL; +- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler; + +- (NSURL*)URL; +- (BOOL)canLoadRequest:(NSURLRequest*)request; + +- (instancetype)initWithFrame:(CGRect)frame; +- (void)updateWithInfo:(NSDictionary*)info; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h new file mode 100644 index 0000000..9165097 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.h @@ -0,0 +1,34 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +extern NSString* const kCDVDefaultWhitelistRejectionString; + +@interface CDVWhitelist : NSObject + +@property (nonatomic, copy) NSString* whitelistRejectionFormatString; + +- (id)initWithArray:(NSArray*)array; +- (BOOL)schemeIsAllowed:(NSString*)scheme; +- (BOOL)URLIsAllowed:(NSURL*)url; +- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure; +- (NSString*)errorStringForURL:(NSURL*)url; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.m new file mode 100644 index 0000000..552ea95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/CDVWhitelist.m @@ -0,0 +1,285 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVWhitelist.h" + +NSString* const kCDVDefaultWhitelistRejectionString = @"ERROR whitelist rejection: url='%@'"; +NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme"; + +@interface CDVWhitelistPattern : NSObject { + @private + NSRegularExpression* _scheme; + NSRegularExpression* _host; + NSNumber* _port; + NSRegularExpression* _path; +} + ++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards; +- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path; +- (bool)matches:(NSURL*)url; + +@end + +@implementation CDVWhitelistPattern + ++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards +{ + NSString* regex = [NSRegularExpression escapedPatternForString:pattern]; + + if (allowWildcards) { + regex = [regex stringByReplacingOccurrencesOfString:@"\\*" withString:@".*"]; + + /* [NSURL path] has the peculiarity that a trailing slash at the end of a path + * will be omitted. This regex tweak compensates for that. + */ + if ([regex hasSuffix:@"\\/.*"]) { + regex = [NSString stringWithFormat:@"%@(\\/.*)?", [regex substringToIndex:([regex length] - 4)]]; + } + } + return [NSString stringWithFormat:@"%@$", regex]; +} + +- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path +{ + self = [super init]; // Potentially change "self" + if (self) { + if ((scheme == nil) || [scheme isEqualToString:@"*"]) { + _scheme = nil; + } else { + _scheme = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:scheme allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil]; + } + if ([host isEqualToString:@"*"] || host == nil) { + _host = nil; + } else if ([host hasPrefix:@"*."]) { + _host = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithFormat:@"([a-z0-9.-]*\\.)?%@", [CDVWhitelistPattern regexFromPattern:[host substringFromIndex:2] allowWildcards:false]] options:NSRegularExpressionCaseInsensitive error:nil]; + } else { + _host = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:host allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil]; + } + if ((port == nil) || [port isEqualToString:@"*"]) { + _port = nil; + } else { + _port = [[NSNumber alloc] initWithInteger:[port integerValue]]; + } + if ((path == nil) || [path isEqualToString:@"/*"]) { + _path = nil; + } else { + _path = [NSRegularExpression regularExpressionWithPattern:[CDVWhitelistPattern regexFromPattern:path allowWildcards:YES] options:0 error:nil]; + } + } + return self; +} + +- (bool)matches:(NSURL*)url +{ + return (_scheme == nil || [_scheme numberOfMatchesInString:[url scheme] options:NSMatchingAnchored range:NSMakeRange(0, [[url scheme] length])]) && + (_host == nil || ([url host] != nil && [_host numberOfMatchesInString:[url host] options:NSMatchingAnchored range:NSMakeRange(0, [[url host] length])])) && + (_port == nil || [[url port] isEqualToNumber:_port]) && + (_path == nil || [_path numberOfMatchesInString:[url path] options:NSMatchingAnchored range:NSMakeRange(0, [[url path] length])]) + ; +} + +@end + +@interface CDVWhitelist () + +@property (nonatomic, readwrite, strong) NSMutableArray* whitelist; +@property (nonatomic, readwrite, strong) NSMutableSet* permittedSchemes; + +- (void)addWhiteListEntry:(NSString*)pattern; + +@end + +@implementation CDVWhitelist + +@synthesize whitelist, permittedSchemes, whitelistRejectionFormatString; + +- (id)initWithArray:(NSArray*)array +{ + self = [super init]; + if (self) { + self.whitelist = [[NSMutableArray alloc] init]; + self.permittedSchemes = [[NSMutableSet alloc] init]; + self.whitelistRejectionFormatString = kCDVDefaultWhitelistRejectionString; + + for (NSString* pattern in array) { + [self addWhiteListEntry:pattern]; + } + } + return self; +} + +- (BOOL)isIPv4Address:(NSString*)externalHost +{ + // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255. + // for our purposes, b can also be the wildcard character '*' + + // we could use a regex to solve this problem but then I would have two problems + // anyways, this is much clearer and maintainable + NSArray* octets = [externalHost componentsSeparatedByString:@"."]; + NSUInteger num_octets = [octets count]; + + // quick check + if (num_octets != 4) { + return NO; + } + + // restrict number parsing to 0-255 + NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; + [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]]; + [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]]; + + // iterate through each octet, and test for a number between 0-255 or if it equals '*' + for (NSUInteger i = 0; i < num_octets; ++i) { + NSString* octet = [octets objectAtIndex:i]; + + if ([octet isEqualToString:@"*"]) { // passes - check next octet + continue; + } else if ([numberFormatter numberFromString:octet] == nil) { // fails - not a number and not within our range, return + return NO; + } + } + + return YES; +} + +- (void)addWhiteListEntry:(NSString*)origin +{ + if (self.whitelist == nil) { + return; + } + + if ([origin isEqualToString:@"*"]) { + NSLog(@"Unlimited access to network resources"); + self.whitelist = nil; + self.permittedSchemes = nil; + } else { // specific access + NSRegularExpression* parts = [NSRegularExpression regularExpressionWithPattern:@"^((\\*|[A-Za-z-]+):/?/?)?(((\\*\\.)?[^*/:]+)|\\*)?(:(\\d+))?(/.*)?" options:0 error:nil]; + NSTextCheckingResult* m = [parts firstMatchInString:origin options:NSMatchingAnchored range:NSMakeRange(0, [origin length])]; + if (m != nil) { + NSRange r; + NSString* scheme = nil; + r = [m rangeAtIndex:2]; + if (r.location != NSNotFound) { + scheme = [origin substringWithRange:r]; + } + + NSString* host = nil; + r = [m rangeAtIndex:3]; + if (r.location != NSNotFound) { + host = [origin substringWithRange:r]; + } + + // Special case for two urls which are allowed to have empty hosts + if (([scheme isEqualToString:@"file"] || [scheme isEqualToString:@"content"]) && (host == nil)) { + host = @"*"; + } + + NSString* port = nil; + r = [m rangeAtIndex:7]; + if (r.location != NSNotFound) { + port = [origin substringWithRange:r]; + } + + NSString* path = nil; + r = [m rangeAtIndex:8]; + if (r.location != NSNotFound) { + path = [origin substringWithRange:r]; + } + + if (scheme == nil) { + // XXX making it stupid friendly for people who forget to include protocol/SSL + [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"http" host:host port:port path:path]]; + [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:@"https" host:host port:port path:path]]; + } else { + [self.whitelist addObject:[[CDVWhitelistPattern alloc] initWithScheme:scheme host:host port:port path:path]]; + } + + if (self.permittedSchemes != nil) { + if ([scheme isEqualToString:@"*"]) { + self.permittedSchemes = nil; + } else if (scheme != nil) { + [self.permittedSchemes addObject:scheme]; + } + } + } + } +} + +- (BOOL)schemeIsAllowed:(NSString*)scheme +{ + if ([scheme isEqualToString:@"http"] || + [scheme isEqualToString:@"https"] || + [scheme isEqualToString:@"ftp"] || + [scheme isEqualToString:@"ftps"]) { + return YES; + } + + return (self.permittedSchemes == nil) || [self.permittedSchemes containsObject:scheme]; +} + +- (BOOL)URLIsAllowed:(NSURL*)url +{ + return [self URLIsAllowed:url logFailure:YES]; +} + +- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure +{ + // Shortcut acceptance: Are all urls whitelisted ("*" in whitelist)? + if (whitelist == nil) { + return YES; + } + + // Shortcut rejection: Check that the scheme is supported + NSString* scheme = [[url scheme] lowercaseString]; + if (![self schemeIsAllowed:scheme]) { + if (logFailure) { + NSLog(@"%@", [self errorStringForURL:url]); + } + return NO; + } + + // http[s] and ftp[s] should also validate against the common set in the kCDVDefaultSchemeName list + if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"] || [scheme isEqualToString:@"ftps"]) { + NSURL* newUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@%@", kCDVDefaultSchemeName, [url host], [[url path] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]; + // If it is allowed, we are done. If not, continue to check for the actual scheme-specific list + if ([self URLIsAllowed:newUrl logFailure:NO]) { + return YES; + } + } + + // Check the url against patterns in the whitelist + for (CDVWhitelistPattern* p in self.whitelist) { + if ([p matches:url]) { + return YES; + } + } + + if (logFailure) { + NSLog(@"%@", [self errorStringForURL:url]); + } + // if we got here, the url host is not in the white-list, do nothing + return NO; +} + +- (NSString*)errorStringForURL:(NSURL*)url +{ + return [NSString stringWithFormat:self.whitelistRejectionFormatString, [url absoluteString]]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h new file mode 100644 index 0000000..9be2be2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.h @@ -0,0 +1,35 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface NSDictionary (CordovaPreferences) + +- (id)cordovaSettingForKey:(NSString*)key; +- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue; +- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue; + +@end + +@interface NSMutableDictionary (CordovaPreferences) + +- (void)setCordovaSetting:(id)value forKey:(NSString*)key; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m new file mode 100644 index 0000000..dcac40f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSDictionary+CordovaPreferences.m @@ -0,0 +1,63 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "NSDictionary+CordovaPreferences.h" +#import + +@implementation NSDictionary (CordovaPreferences) + +- (id)cordovaSettingForKey:(NSString*)key +{ + return [self objectForKey:[key lowercaseString]]; +} + +- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue +{ + BOOL value = defaultValue; + id prefObj = [self cordovaSettingForKey:key]; + + if (prefObj != nil) { + value = [(NSNumber*)prefObj boolValue]; + } + + return value; +} + +- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue +{ + CGFloat value = defaultValue; + id prefObj = [self cordovaSettingForKey:key]; + + if (prefObj != nil) { + value = [prefObj floatValue]; + } + + return value; +} + +@end + +@implementation NSMutableDictionary (CordovaPreferences) + +- (void)setCordovaSetting:(id)value forKey:(NSString*)key +{ + [self setObject:value forKey:[key lowercaseString]]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h new file mode 100644 index 0000000..79e6516 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.h @@ -0,0 +1,29 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface NSMutableArray (QueueAdditions) + +- (id)cdv_pop; +- (id)cdv_queueHead; +- (id)cdv_dequeue; +- (void)cdv_enqueue:(id)obj; + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m new file mode 100644 index 0000000..2b3acdc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/Classes/Public/NSMutableArray+QueueAdditions.m @@ -0,0 +1,58 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "NSMutableArray+QueueAdditions.h" + +@implementation NSMutableArray (QueueAdditions) + +- (id)cdv_queueHead +{ + if ([self count] == 0) { + return nil; + } + + return [self objectAtIndex:0]; +} + +- (__autoreleasing id)cdv_dequeue +{ + if ([self count] == 0) { + return nil; + } + + id head = [self objectAtIndex:0]; + if (head != nil) { + // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing + [self removeObjectAtIndex:0]; + } + + return head; +} + +- (id)cdv_pop +{ + return [self cdv_dequeue]; +} + +- (void)cdv_enqueue:(id)object +{ + [self addObject:object]; +} + +@end diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b258171 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj @@ -0,0 +1,526 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */; }; + 30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */; }; + 3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; }; + 3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */; }; + 7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */; }; + 7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */; }; + 7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; }; + 7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; }; + 7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; }; + 7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; }; + 7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */; }; + 7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */; }; + 7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */; }; + 7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */; }; + 7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */; }; + 7ED95D351AB9029B008C4574 /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D0F1AB9029B008C4574 /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; }; + 7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D121AB9029B008C4574 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D3C1AB9029B008C4574 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; }; + 7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; }; + 7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */; }; + 7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */; }; + 7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */; }; + 7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D201AB9029B008C4574 /* CDVPlugin.m */; }; + 7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; }; + 7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D241AB9029B008C4574 /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; }; + 7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */; }; + 7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */; }; + 7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; }; + 7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */; }; + 7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; }; + 7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; }; + A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; }; + A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewNavigationDelegate.m; sourceTree = ""; }; + 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewNavigationDelegate.h; sourceTree = ""; }; + 30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = ""; }; + 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVIntentAndNavigationFilter.h; sourceTree = ""; }; + 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVIntentAndNavigationFilter.m; sourceTree = ""; }; + 68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7ED95CF21AB9028C008C4574 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDebug.h; sourceTree = ""; }; + 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVJSON_private.h; sourceTree = ""; }; + 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVJSON_private.m; sourceTree = ""; }; + 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CDVPlugin+Private.h"; sourceTree = ""; }; + 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVHandleOpenURL.h; sourceTree = ""; }; + 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVHandleOpenURL.m; sourceTree = ""; }; + 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLocalStorage.h; sourceTree = ""; }; + 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLocalStorage.m; sourceTree = ""; }; + 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewDelegate.h; sourceTree = ""; }; + 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewDelegate.m; sourceTree = ""; }; + 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUIWebViewEngine.h; sourceTree = ""; }; + 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUIWebViewEngine.m; sourceTree = ""; }; + 7ED95D0F1AB9029B008C4574 /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDV.h; sourceTree = ""; }; + 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAppDelegate.h; sourceTree = ""; }; + 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVAppDelegate.m; sourceTree = ""; }; + 7ED95D121AB9029B008C4574 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailability.h; sourceTree = ""; }; + 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailabilityDeprecated.h; sourceTree = ""; }; + 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegate.h; sourceTree = ""; }; + 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegateImpl.h; sourceTree = ""; }; + 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandDelegateImpl.m; sourceTree = ""; }; + 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandQueue.h; sourceTree = ""; }; + 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandQueue.m; sourceTree = ""; }; + 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConfigParser.h; sourceTree = ""; }; + 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConfigParser.m; sourceTree = ""; }; + 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVInvokedUrlCommand.h; sourceTree = ""; }; + 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVInvokedUrlCommand.m; sourceTree = ""; }; + 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CDVPlugin+Resources.h"; sourceTree = ""; }; + 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CDVPlugin+Resources.m"; sourceTree = ""; }; + 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPlugin.h; sourceTree = ""; }; + 7ED95D201AB9029B008C4574 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPlugin.m; sourceTree = ""; }; + 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPluginResult.h; sourceTree = ""; }; + 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPluginResult.m; sourceTree = ""; }; + 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVScreenOrientationDelegate.h; sourceTree = ""; }; + 7ED95D241AB9029B008C4574 /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVTimer.h; sourceTree = ""; }; + 7ED95D251AB9029B008C4574 /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVTimer.m; sourceTree = ""; }; + 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVURLProtocol.h; sourceTree = ""; }; + 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVURLProtocol.m; sourceTree = ""; }; + 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVUserAgentUtil.h; sourceTree = ""; }; + 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVUserAgentUtil.m; sourceTree = ""; }; + 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVViewController.h; sourceTree = ""; }; + 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewController.m; sourceTree = ""; }; + 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngineProtocol.h; sourceTree = ""; }; + 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWhitelist.h; sourceTree = ""; }; + 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWhitelist.m; sourceTree = ""; }; + 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = ""; }; + 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = ""; }; + 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = ""; }; + 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = ""; }; + A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVGestureHandler.h; sourceTree = ""; }; + A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVGestureHandler.m; sourceTree = ""; }; + AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + 68A32D7114102E1C006B237C /* libCordova.a */, + ); + name = Products; + sourceTree = CORDOVALIB; + }; + 0867D691FE84028FC02AAC07 /* CordovaLib */ = { + isa = PBXGroup; + children = ( + 7ED95D0E1AB9029B008C4574 /* Public */, + 7ED95CF11AB9028C008C4574 /* Private */, + 034768DFFF38A50411DB9C8B /* Products */, + 30325A0B136B343700982B63 /* VERSION */, + ); + name = CordovaLib; + sourceTree = ""; + }; + 3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */ = { + isa = PBXGroup; + children = ( + 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */, + 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */, + ); + path = CDVIntentAndNavigationFilter; + sourceTree = ""; + }; + 7ED95CF11AB9028C008C4574 /* Private */ = { + isa = PBXGroup; + children = ( + AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */, + 7ED95CF21AB9028C008C4574 /* CDVDebug.h */, + 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */, + 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */, + 7ED95CF51AB9028C008C4574 /* CDVPlugin+Private.h */, + 7ED95CF61AB9028C008C4574 /* Plugins */, + ); + name = Private; + path = Classes/Private; + sourceTree = ""; + }; + 7ED95CF61AB9028C008C4574 /* Plugins */ = { + isa = PBXGroup; + children = ( + A3B082D11BB15CEA00D8DC35 /* CDVGestureHandler */, + 3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */, + 7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */, + 7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */, + 7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */, + ); + path = Plugins; + sourceTree = ""; + }; + 7ED95CF71AB9028C008C4574 /* CDVHandleOpenURL */ = { + isa = PBXGroup; + children = ( + 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */, + 7ED95CF91AB9028C008C4574 /* CDVHandleOpenURL.m */, + ); + path = CDVHandleOpenURL; + sourceTree = ""; + }; + 7ED95CFA1AB9028C008C4574 /* CDVLocalStorage */ = { + isa = PBXGroup; + children = ( + 7ED95CFB1AB9028C008C4574 /* CDVLocalStorage.h */, + 7ED95CFC1AB9028C008C4574 /* CDVLocalStorage.m */, + ); + path = CDVLocalStorage; + sourceTree = ""; + }; + 7ED95CFD1AB9028C008C4574 /* CDVUIWebViewEngine */ = { + isa = PBXGroup; + children = ( + 30193A4E1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m */, + 30193A4F1AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h */, + 7ED95CFE1AB9028C008C4574 /* CDVUIWebViewDelegate.h */, + 7ED95CFF1AB9028C008C4574 /* CDVUIWebViewDelegate.m */, + 7ED95D001AB9028C008C4574 /* CDVUIWebViewEngine.h */, + 7ED95D011AB9028C008C4574 /* CDVUIWebViewEngine.m */, + ); + path = CDVUIWebViewEngine; + sourceTree = ""; + }; + 7ED95D0E1AB9029B008C4574 /* Public */ = { + isa = PBXGroup; + children = ( + 7ED95D0F1AB9029B008C4574 /* CDV.h */, + 7ED95D101AB9029B008C4574 /* CDVAppDelegate.h */, + 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */, + 7ED95D121AB9029B008C4574 /* CDVAvailability.h */, + 7ED95D131AB9029B008C4574 /* CDVAvailabilityDeprecated.h */, + 7ED95D141AB9029B008C4574 /* CDVCommandDelegate.h */, + 7ED95D151AB9029B008C4574 /* CDVCommandDelegateImpl.h */, + 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */, + 7ED95D171AB9029B008C4574 /* CDVCommandQueue.h */, + 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */, + 7ED95D191AB9029B008C4574 /* CDVConfigParser.h */, + 7ED95D1A1AB9029B008C4574 /* CDVConfigParser.m */, + 7ED95D1B1AB9029B008C4574 /* CDVInvokedUrlCommand.h */, + 7ED95D1C1AB9029B008C4574 /* CDVInvokedUrlCommand.m */, + 7ED95D1D1AB9029B008C4574 /* CDVPlugin+Resources.h */, + 7ED95D1E1AB9029B008C4574 /* CDVPlugin+Resources.m */, + 7ED95D1F1AB9029B008C4574 /* CDVPlugin.h */, + 7ED95D201AB9029B008C4574 /* CDVPlugin.m */, + 7ED95D211AB9029B008C4574 /* CDVPluginResult.h */, + 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */, + 7ED95D231AB9029B008C4574 /* CDVScreenOrientationDelegate.h */, + 7ED95D241AB9029B008C4574 /* CDVTimer.h */, + 7ED95D251AB9029B008C4574 /* CDVTimer.m */, + 7ED95D261AB9029B008C4574 /* CDVURLProtocol.h */, + 7ED95D271AB9029B008C4574 /* CDVURLProtocol.m */, + 7ED95D281AB9029B008C4574 /* CDVUserAgentUtil.h */, + 7ED95D291AB9029B008C4574 /* CDVUserAgentUtil.m */, + 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */, + 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */, + 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */, + 7ED95D2D1AB9029B008C4574 /* CDVWhitelist.h */, + 7ED95D2E1AB9029B008C4574 /* CDVWhitelist.m */, + 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */, + 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */, + 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */, + 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */, + ); + name = Public; + path = Classes/Public; + sourceTree = ""; + }; + A3B082D11BB15CEA00D8DC35 /* CDVGestureHandler */ = { + isa = PBXGroup; + children = ( + A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */, + A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */, + ); + path = CDVGestureHandler; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D2AAC07A0554694100DB518D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */, + 7ED95D491AB9029B008C4574 /* CDVScreenOrientationDelegate.h in Headers */, + 7ED95D351AB9029B008C4574 /* CDV.h in Headers */, + A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */, + 7ED95D3B1AB9029B008C4574 /* CDVCommandDelegateImpl.h in Headers */, + 7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */, + 7ED95D531AB9029B008C4574 /* CDVWhitelist.h in Headers */, + 7ED95D361AB9029B008C4574 /* CDVAppDelegate.h in Headers */, + 7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */, + 7ED95D381AB9029B008C4574 /* CDVAvailability.h in Headers */, + 7ED95D0A1AB9028C008C4574 /* CDVUIWebViewDelegate.h in Headers */, + 7ED95D471AB9029B008C4574 /* CDVPluginResult.h in Headers */, + 7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */, + 7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */, + 7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */, + 7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */, + 7ED95D4C1AB9029B008C4574 /* CDVURLProtocol.h in Headers */, + 7ED95D3A1AB9029B008C4574 /* CDVCommandDelegate.h in Headers */, + 7ED95D391AB9029B008C4574 /* CDVAvailabilityDeprecated.h in Headers */, + 7ED95D4E1AB9029B008C4574 /* CDVUserAgentUtil.h in Headers */, + 7ED95D4A1AB9029B008C4574 /* CDVTimer.h in Headers */, + 7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */, + 7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */, + 7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */, + 7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */, + 7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */, + 7E7F69B61ABA35D8007546F4 /* CDVLocalStorage.h in Headers */, + 3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */, + 7E7F69B81ABA368F007546F4 /* CDVUIWebViewEngine.h in Headers */, + 7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */, + 30193A511AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D2AAC07D0554694100DB518D /* CordovaLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */; + buildPhases = ( + D2AAC07A0554694100DB518D /* Headers */, + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CordovaLib; + productName = CordovaLib; + productReference = 68A32D7114102E1C006B237C /* libCordova.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + }; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* CordovaLib */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */, + 7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */, + 7ED95D371AB9029B008C4574 /* CDVAppDelegate.m in Sources */, + 7ED95D0B1AB9028C008C4574 /* CDVUIWebViewDelegate.m in Sources */, + 7ED95D3C1AB9029B008C4574 /* CDVCommandDelegateImpl.m in Sources */, + 7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */, + 7ED95D541AB9029B008C4574 /* CDVWhitelist.m in Sources */, + 7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */, + 7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */, + 7ED95D4F1AB9029B008C4574 /* CDVUserAgentUtil.m in Sources */, + 7ED95D401AB9029B008C4574 /* CDVConfigParser.m in Sources */, + A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */, + 7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */, + 30193A501AE6350A0069A75F /* CDVUIWebViewNavigationDelegate.m in Sources */, + 7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */, + 7ED95D3E1AB9029B008C4574 /* CDVCommandQueue.m in Sources */, + 7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */, + 7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */, + 7ED95D4D1AB9029B008C4574 /* CDVURLProtocol.m in Sources */, + 7ED95D0D1AB9028C008C4574 /* CDVUIWebViewEngine.m in Sources */, + 7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */, + 7ED95D091AB9028C008C4574 /* CDVLocalStorage.m in Sources */, + 3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + DSTROOT = "/tmp/$(PROJECT_NAME).dst"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = CordovaLib_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + PRODUCT_NAME = Cordova; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + DSTROOT = "/tmp/$(PROJECT_NAME).dst"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = CordovaLib_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INSTALL_PATH = /usr/local/lib; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + PRODUCT_NAME = Cordova; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = "-DDEBUG"; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + ONLY_ACTIVE_ARCH = NO; + PUBLIC_HEADERS_FOLDER_PATH = include/Cordova; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib_Prefix.pch b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib_Prefix.pch new file mode 100644 index 0000000..9545580 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/CordovaLib_Prefix.pch @@ -0,0 +1,22 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#ifdef __OBJC__ + #import +#endif diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/VERSION b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/VERSION new file mode 100644 index 0000000..f77856a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/VERSION @@ -0,0 +1 @@ +4.3.1 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/cordova.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/cordova.js new file mode 100644 index 0000000..29be909 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/CordovaLib/cordova.js @@ -0,0 +1,1938 @@ +// Platform: ios +// a3732cb71d9b1dd590338e8cf44196f366d46da3 +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +;(function() { +var PLATFORM_VERSION_BUILD_LABEL = '4.3.1'; +// file: src/scripts/require.js + +/*jshint -W079 */ +/*jshint -W020 */ + +var require, + define; + +(function () { + var modules = {}, + // Stack of moduleIds currently being built. + requireStack = [], + // Map of module ID -> index into requireStack of modules currently being built. + inProgressModules = {}, + SEPARATOR = "."; + + + + function build(module) { + var factory = module.factory, + localRequire = function (id) { + var resultantId = id; + //Its a relative path, so lop off the last portion and add the id (minus "./") + if (id.charAt(0) === ".") { + resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2); + } + return require(resultantId); + }; + module.exports = {}; + delete module.factory; + factory(localRequire, module.exports, module); + return module.exports; + } + + require = function (id) { + if (!modules[id]) { + throw "module " + id + " not found"; + } else if (id in inProgressModules) { + var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; + throw "Cycle in require graph: " + cycle; + } + if (modules[id].factory) { + try { + inProgressModules[id] = requireStack.length; + requireStack.push(id); + return build(modules[id]); + } finally { + delete inProgressModules[id]; + requireStack.pop(); + } + } + return modules[id].exports; + }; + + define = function (id, factory) { + if (modules[id]) { + throw "module " + id + " already defined"; + } + + modules[id] = { + id: id, + factory: factory + }; + }; + + define.remove = function (id) { + delete modules[id]; + }; + + define.moduleMap = modules; +})(); + +//Export for use in node +if (typeof module === "object" && typeof require === "function") { + module.exports.require = require; + module.exports.define = define; +} + +// file: src/cordova.js +define("cordova", function(require, exports, module) { + +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error("cordova already defined"); +} + + +var channel = require('cordova/channel'); +var platform = require('cordova/platform'); + + +/** + * Intercept calls to addEventListener + removeEventListener and handle deviceready, + * resume, and pause events. + */ +var m_document_addEventListener = document.addEventListener; +var m_document_removeEventListener = document.removeEventListener; +var m_window_addEventListener = window.addEventListener; +var m_window_removeEventListener = window.removeEventListener; + +/** + * Houses custom event handlers to intercept on document + window event listeners. + */ +var documentEventHandlers = {}, + windowEventHandlers = {}; + +document.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof documentEventHandlers[e] != 'undefined') { + documentEventHandlers[e].subscribe(handler); + } else { + m_document_addEventListener.call(document, evt, handler, capture); + } +}; + +window.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof windowEventHandlers[e] != 'undefined') { + windowEventHandlers[e].subscribe(handler); + } else { + m_window_addEventListener.call(window, evt, handler, capture); + } +}; + +document.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof documentEventHandlers[e] != "undefined") { + documentEventHandlers[e].unsubscribe(handler); + } else { + m_document_removeEventListener.call(document, evt, handler, capture); + } +}; + +window.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof windowEventHandlers[e] != "undefined") { + windowEventHandlers[e].unsubscribe(handler); + } else { + m_window_removeEventListener.call(window, evt, handler, capture); + } +}; + +function createEvent(type, data) { + var event = document.createEvent('Events'); + event.initEvent(type, false, false); + if (data) { + for (var i in data) { + if (data.hasOwnProperty(i)) { + event[i] = data[i]; + } + } + } + return event; +} + + +var cordova = { + define:define, + require:require, + version:PLATFORM_VERSION_BUILD_LABEL, + platformVersion:PLATFORM_VERSION_BUILD_LABEL, + platformId:platform.id, + /** + * Methods to add/remove your own addEventListener hijacking on document + window. + */ + addWindowEventHandler:function(event) { + return (windowEventHandlers[event] = channel.create(event)); + }, + addStickyDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.createSticky(event)); + }, + addDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.create(event)); + }, + removeWindowEventHandler:function(event) { + delete windowEventHandlers[event]; + }, + removeDocumentEventHandler:function(event) { + delete documentEventHandlers[event]; + }, + /** + * Retrieve original event handlers that were replaced by Cordova + * + * @return object + */ + getOriginalHandlers: function() { + return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener}, + 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}}; + }, + /** + * Method to fire event from native code + * bNoDetach is required for events which cause an exception which needs to be caught in native code + */ + fireDocumentEvent: function(type, data, bNoDetach) { + var evt = createEvent(type, data); + if (typeof documentEventHandlers[type] != 'undefined') { + if( bNoDetach ) { + documentEventHandlers[type].fire(evt); + } + else { + setTimeout(function() { + // Fire deviceready on listeners that were registered before cordova.js was loaded. + if (type == 'deviceready') { + document.dispatchEvent(evt); + } + documentEventHandlers[type].fire(evt); + }, 0); + } + } else { + document.dispatchEvent(evt); + } + }, + fireWindowEvent: function(type, data) { + var evt = createEvent(type,data); + if (typeof windowEventHandlers[type] != 'undefined') { + setTimeout(function() { + windowEventHandlers[type].fire(evt); + }, 0); + } else { + window.dispatchEvent(evt); + } + }, + + /** + * Plugin callback mechanism. + */ + // Randomize the starting callbackId to avoid collisions after refreshing or navigating. + // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. + callbackId: Math.floor(Math.random() * 2000000000), + callbacks: {}, + callbackStatus: { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9 + }, + + /** + * Called by native code when returning successful result from an action. + */ + callbackSuccess: function(callbackId, args) { + cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning error result from an action. + */ + callbackError: function(callbackId, args) { + // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. + // Derive success from status. + cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning the result from an action. + */ + callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) { + try { + var callback = cordova.callbacks[callbackId]; + if (callback) { + if (isSuccess && status == cordova.callbackStatus.OK) { + callback.success && callback.success.apply(null, args); + } else if (!isSuccess) { + callback.fail && callback.fail.apply(null, args); + } + /* + else + Note, this case is intentionally not caught. + this can happen if isSuccess is true, but callbackStatus is NO_RESULT + which is used to remove a callback from the list without calling the callbacks + typically keepCallback is false in this case + */ + // Clear callback if not expecting any more results + if (!keepCallback) { + delete cordova.callbacks[callbackId]; + } + } + } + catch (err) { + var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err; + console && console.log && console.log(msg); + cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg }); + throw err; + } + }, + addConstructor: function(func) { + channel.onCordovaReady.subscribe(function() { + try { + func(); + } catch(e) { + console.log("Failed to run constructor: " + e); + } + }); + } +}; + + +module.exports = cordova; + +}); + +// file: src/common/argscheck.js +define("cordova/argscheck", function(require, exports, module) { + +var utils = require('cordova/utils'); + +var moduleExports = module.exports; + +var typeMap = { + 'A': 'Array', + 'D': 'Date', + 'N': 'Number', + 'S': 'String', + 'F': 'Function', + 'O': 'Object' +}; + +function extractParamName(callee, argIndex) { + return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex]; +} + +function checkArgs(spec, functionName, args, opt_callee) { + if (!moduleExports.enableChecks) { + return; + } + var errMsg = null; + var typeName; + for (var i = 0; i < spec.length; ++i) { + var c = spec.charAt(i), + cUpper = c.toUpperCase(), + arg = args[i]; + // Asterix means allow anything. + if (c == '*') { + continue; + } + typeName = utils.typeName(arg); + if ((arg === null || arg === undefined) && c == cUpper) { + continue; + } + if (typeName != typeMap[cUpper]) { + errMsg = 'Expected ' + typeMap[cUpper]; + break; + } + } + if (errMsg) { + errMsg += ', but got ' + typeName + '.'; + errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; + // Don't log when running unit tests. + if (typeof jasmine == 'undefined') { + console.error(errMsg); + } + throw TypeError(errMsg); + } +} + +function getValue(value, defaultValue) { + return value === undefined ? defaultValue : value; +} + +moduleExports.checkArgs = checkArgs; +moduleExports.getValue = getValue; +moduleExports.enableChecks = true; + + +}); + +// file: src/common/base64.js +define("cordova/base64", function(require, exports, module) { + +var base64 = exports; + +base64.fromArrayBuffer = function(arrayBuffer) { + var array = new Uint8Array(arrayBuffer); + return uint8ToBase64(array); +}; + +base64.toArrayBuffer = function(str) { + var decodedStr = typeof atob != 'undefined' ? atob(str) : new Buffer(str,'base64').toString('binary'); + var arrayBuffer = new ArrayBuffer(decodedStr.length); + var array = new Uint8Array(arrayBuffer); + for (var i=0, len=decodedStr.length; i < len; i++) { + array[i] = decodedStr.charCodeAt(i); + } + return arrayBuffer; +}; + +//------------------------------------------------------------------------------ + +/* This code is based on the performance tests at http://jsperf.com/b64tests + * This 12-bit-at-a-time algorithm was the best performing version on all + * platforms tested. + */ + +var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var b64_12bit; + +var b64_12bitTable = function() { + b64_12bit = []; + for (var i=0; i<64; i++) { + for (var j=0; j<64; j++) { + b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j]; + } + } + b64_12bitTable = function() { return b64_12bit; }; + return b64_12bit; +}; + +function uint8ToBase64(rawData) { + var numBytes = rawData.byteLength; + var output=""; + var segment; + var table = b64_12bitTable(); + for (var i=0;i> 12]; + output += table[segment & 0xfff]; + } + if (numBytes - i == 2) { + segment = (rawData[i] << 16) + (rawData[i+1] << 8); + output += table[segment >> 12]; + output += b64_6bit[(segment & 0xfff) >> 6]; + output += '='; + } else if (numBytes - i == 1) { + segment = (rawData[i] << 16); + output += table[segment >> 12]; + output += '=='; + } + return output; +} + +}); + +// file: src/common/builder.js +define("cordova/builder", function(require, exports, module) { + +var utils = require('cordova/utils'); + +function each(objects, func, context) { + for (var prop in objects) { + if (objects.hasOwnProperty(prop)) { + func.apply(context, [objects[prop], prop]); + } + } +} + +function clobber(obj, key, value) { + exports.replaceHookForTesting(obj, key); + var needsProperty = false; + try { + obj[key] = value; + } catch (e) { + needsProperty = true; + } + // Getters can only be overridden by getters. + if (needsProperty || obj[key] !== value) { + utils.defineGetter(obj, key, function() { + return value; + }); + } +} + +function assignOrWrapInDeprecateGetter(obj, key, value, message) { + if (message) { + utils.defineGetter(obj, key, function() { + console.log(message); + delete obj[key]; + clobber(obj, key, value); + return value; + }); + } else { + clobber(obj, key, value); + } +} + +function include(parent, objects, clobber, merge) { + each(objects, function (obj, key) { + try { + var result = obj.path ? require(obj.path) : {}; + + if (clobber) { + // Clobber if it doesn't exist. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else if (typeof obj.path !== 'undefined') { + // If merging, merge properties onto parent, otherwise, clobber. + if (merge) { + recursiveMerge(parent[key], result); + } else { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } + } + result = parent[key]; + } else { + // Overwrite if not currently defined. + if (typeof parent[key] == 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else { + // Set result to what already exists, so we can build children into it if they exist. + result = parent[key]; + } + } + + if (obj.children) { + include(result, obj.children, clobber, merge); + } + } catch(e) { + utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); + } + }); +} + +/** + * Merge properties from one object onto another recursively. Properties from + * the src object will overwrite existing target property. + * + * @param target Object to merge properties into. + * @param src Object to merge properties from. + */ +function recursiveMerge(target, src) { + for (var prop in src) { + if (src.hasOwnProperty(prop)) { + if (target.prototype && target.prototype.constructor === target) { + // If the target object is a constructor override off prototype. + clobber(target.prototype, prop, src[prop]); + } else { + if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { + recursiveMerge(target[prop], src[prop]); + } else { + clobber(target, prop, src[prop]); + } + } + } + } +} + +exports.buildIntoButDoNotClobber = function(objects, target) { + include(target, objects, false, false); +}; +exports.buildIntoAndClobber = function(objects, target) { + include(target, objects, true, false); +}; +exports.buildIntoAndMerge = function(objects, target) { + include(target, objects, true, true); +}; +exports.recursiveMerge = recursiveMerge; +exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; +exports.replaceHookForTesting = function() {}; + +}); + +// file: src/common/channel.js +define("cordova/channel", function(require, exports, module) { + +var utils = require('cordova/utils'), + nextGuid = 1; + +/** + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization, as well as for custom events thereafter. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. + * onNativeReady* Internal event that indicates the Cordova native side is ready. + * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. + * onDeviceReady* User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * + * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. + * All listeners that subscribe after the event is fired will be executed right away. + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + +/** + * Channel + * @constructor + * @param type String the channel name + */ +var Channel = function(type, sticky) { + this.type = type; + // Map of guid -> function. + this.handlers = {}; + // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. + this.state = sticky ? 1 : 0; + // Used in sticky mode to remember args passed to fire(). + this.fireArgs = null; + // Used by onHasSubscribersChange to know if there are any listeners. + this.numHandlers = 0; + // Function that is called when the first listener is subscribed, or when + // the last listener is unsubscribed. + this.onHasSubscribersChange = null; +}, + channel = { + /** + * Calls the provided function only after all of the channels specified + * have been fired. All channels must be sticky channels. + */ + join: function(h, c) { + var len = c.length, + i = len, + f = function() { + if (!(--i)) h(); + }; + for (var j=0; jNative messages. + isInContextOfEvalJs = 0, + failSafeTimerId = 0; + +function massageArgsJsToNative(args) { + if (!args || utils.typeName(args) != 'Array') { + return args; + } + var ret = []; + args.forEach(function(arg, i) { + if (utils.typeName(arg) == 'ArrayBuffer') { + ret.push({ + 'CDVType': 'ArrayBuffer', + 'data': base64.fromArrayBuffer(arg) + }); + } else { + ret.push(arg); + } + }); + return ret; +} + +function massageMessageNativeToJs(message) { + if (message.CDVType == 'ArrayBuffer') { + var stringToArrayBuffer = function(str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function(b64) { + return stringToArrayBuffer(atob(b64)); + }; + message = base64ToArrayBuffer(message.data); + } + return message; +} + +function convertMessageToArgsNativeToJs(message) { + var args = []; + if (!message || !message.hasOwnProperty('CDVType')) { + args.push(message); + } else if (message.CDVType == 'MultiPart') { + message.messages.forEach(function(e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; +} + +function iOSExec() { + + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);' + ); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = + {success:successCallback, fail:failCallback}; + } + + actionArgs = massageArgsJsToNative(actionArgs); + + var command = [callbackId, service, action, actionArgs]; + + // Stringify and queue the command. We stringify to command now to + // effectively clone the command arguments in case they are mutated before + // the command is executed. + commandQueue.push(JSON.stringify(command)); + + // If we're in the context of a stringByEvaluatingJavaScriptFromString call, + // then the queue will be flushed when it returns; no need for a poke. + // Also, if there is already a command in the queue, then we've already + // poked the native side, so there is no reason to do so again. + if (!isInContextOfEvalJs && commandQueue.length == 1) { + pokeNative(); + } +} + +// CB-10530 +function proxyChanged() { + var cexec = cordovaExec(); + + return (execProxy !== cexec && // proxy objects are different + iOSExec !== cexec // proxy object is not the current iOSExec + ); +} + +// CB-10106 +function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while(commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); + + commandString = commandQueue.shift(); + }; + return true; + } + + return false; +} + +function pokeNative() { + // CB-5488 - Don't attempt to create iframe before document.body is available. + if (!document.body) { + setTimeout(pokeNative); + return; + } + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; + } else { + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); + } + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function() { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } + } + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). +} + +iOSExec.nativeFetchMessages = function() { + // Stop listing for window detatch once native side confirms poke. + if (failSafeTimerId) { + clearTimeout(failSafeTimerId); + failSafeTimerId = 0; + } + // Each entry in commandQueue is a JSON string already. + if (!commandQueue.length) { + return ''; + } + var json = '[' + commandQueue.join(',') + ']'; + commandQueue.length = 0; + return json; +}; + +iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) { + return iOSExec.nativeEvalAndFetch(function() { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + function nc2() { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + } + setTimeout(nc2, 0); + }); +}; + +iOSExec.nativeEvalAndFetch = function(func) { + // This shouldn't be nested, but better to be safe. + isInContextOfEvalJs++; + try { + func(); + return iOSExec.nativeFetchMessages(); + } finally { + isInContextOfEvalJs--; + } +}; + +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec)? cexec : iOSExec; +} + +function execProxy() { + cordovaExec().apply(null, arguments); +}; + +execProxy.nativeFetchMessages = function() { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function() { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function() { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; + +}); + +// file: src/common/exec/proxy.js +define("cordova/exec/proxy", function(require, exports, module) { + + +// internal map of proxy function +var CommandProxyMap = {}; + +module.exports = { + + // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); + add:function(id,proxyObj) { + console.log("adding proxy for " + id); + CommandProxyMap[id] = proxyObj; + return proxyObj; + }, + + // cordova.commandProxy.remove("Accelerometer"); + remove:function(id) { + var proxy = CommandProxyMap[id]; + delete CommandProxyMap[id]; + CommandProxyMap[id] = null; + return proxy; + }, + + get:function(service,action) { + return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null ); + } +}; +}); + +// file: src/common/init.js +define("cordova/init", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; +} + +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} + +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +modulemapper.clobbers('cordova', 'cordova'); +modulemapper.clobbers('cordova/exec', 'cordova.exec'); +modulemapper.clobbers('cordova/exec', 'Cordova.exec'); + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + +}, platformInitChannelsArray); + + +}); + +// file: src/common/init_b.js +define("cordova/init_b", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; + +// setting exec +cordova.exec = require('cordova/exec'); + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; +} +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} + +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + +}, platformInitChannelsArray); + +}); + +// file: src/common/modulemapper.js +define("cordova/modulemapper", function(require, exports, module) { + +var builder = require('cordova/builder'), + moduleMap = define.moduleMap, + symbolList, + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + if (!(moduleName in moduleMap)) { + throw new Error('Module ' + moduleName + ' does not exist.'); + } + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: src/common/modulemapper_b.js +define("cordova/modulemapper_b", function(require, exports, module) { + +var builder = require('cordova/builder'), + symbolList = [], + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: /Users/shazron/Documents/git/apache/cordova-ios/cordova-js-src/platform.js +define("cordova/platform", function(require, exports, module) { + +module.exports = { + id: 'ios', + bootstrap: function() { + require('cordova/channel').onNativeReady.fire(); + } +}; + + +}); + +// file: src/common/pluginloader.js +define("cordova/pluginloader", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); +var urlutil = require('cordova/urlutil'); + +// Helper function to inject a + +If you are using node, you can install BigInteger with [npm](https://npmjs.org/). + + npm install big-integer + +Then you can include it in your code: + + var bigInt = require("big-integer"); + + +## Usage +### `bigInt(number, [base])` + +You can create a bigInt by calling the `bigInt` function. You can pass in + + - a string, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - a Javascript number, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - another bigInt. + - nothing, and it will return `bigInt.zero`. + + If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters "a-z" and "A-Z" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`). + +Examples: + + var zero = bigInt(); + var ninetyThree = bigInt(93); + var largeNumber = bigInt("75643564363473453456342378564387956906736546456235345"); + var googol = bigInt("1e100"); + var bigNumber = bigInt(largeNumber); + + var maximumByte = bigInt("FF", 16); + var fiftyFiveGoogol = bigInt("<55>0", googol); + +Note that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings. + +### Method Chaining + +Note that bigInt operations return bigInts, which allows you to chain methods, for example: + + var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses) + +### Constants + +There are three named constants already stored that you do not have to construct with the `bigInt` function yourself: + + - `bigInt.one`, equivalent to `bigInt(1)` + - `bigInt.zero`, equivalent to `bigInt(0)` + - `bigInt.minusOne`, equivalent to `bigInt(-1)` + +The numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example: + + - `bigInt[-999]`, equivalent to `bigInt(-999)` + - `bigInt[256]`, equivalent to `bigInt(256)` + +### Methods + +#### `abs()` + +Returns the absolute value of a bigInt. + + - `bigInt(-45).abs()` => `45` + - `bigInt(45).abs()` => `45` + +#### `add(number)` + +Performs addition. + + - `bigInt(5).add(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `and(number)` + +Performs the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(6).and(3)` => `2` + - `bigInt(6).and(-3)` => `4` + +#### `compare(number)` + +Performs a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`. + + - `bigInt(5).compare(5)` => `0` + - `bigInt(5).compare(4)` => `1` + - `bigInt(4).compare(5)` => `-1` + +#### `compareAbs(number)` + +Performs a comparison between the absolute value of two numbers. + + - `bigInt(5).compareAbs(-5)` => `0` + - `bigInt(5).compareAbs(4)` => `1` + - `bigInt(4).compareAbs(-5)` => `-1` + +#### `compareTo(number)` + +Alias for the `compare` method. + +#### `divide(number)` + +Performs integer division, disregarding the remainder. + + - `bigInt(59).divide(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `divmod(number)` + +Performs division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }` + - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `eq(number)` + +Alias for the `equals` method. + +#### `equals(number)` + +Checks if two numbers are equal. + + - `bigInt(5).equals(5)` => `true` + - `bigInt(4).equals(7)` => `false` + +#### `geq(number)` + +Alias for the `greaterOrEquals` method. + + +#### `greater(number)` + +Checks if the first number is greater than the second. + + - `bigInt(5).greater(6)` => `false` + - `bigInt(5).greater(5)` => `false` + - `bigInt(5).greater(4)` => `true` + +#### `greaterOrEquals(number)` + +Checks if the first number is greater than or equal to the second. + + - `bigInt(5).greaterOrEquals(6)` => `false` + - `bigInt(5).greaterOrEquals(5)` => `true` + - `bigInt(5).greaterOrEquals(4)` => `true` + +#### `gt(number)` + +Alias for the `greater` method. + +#### `isDivisibleBy(number)` + +Returns `true` if the first number is divisible by the second number, `false` otherwise. + + - `bigInt(999).isDivisibleBy(333)` => `true` + - `bigInt(99).isDivisibleBy(5)` => `false` + +#### `isEven()` + +Returns `true` if the number is even, `false` otherwise. + + - `bigInt(6).isEven()` => `true` + - `bigInt(3).isEven()` => `false` + +#### `isNegative()` + +Returns `true` if the number is negative, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(-23).isNegative()` => `true` + - `bigInt(50).isNegative()` => `false` + +#### `isOdd()` + +Returns `true` if the number is odd, `false` otherwise. + + - `bigInt(13).isOdd()` => `true` + - `bigInt(40).isOdd()` => `false` + +#### `isPositive()` + +Return `true` if the number is positive, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(54).isPositive()` => `true` + - `bigInt(-1).isPositive()` => `false` + +#### `isPrime()` + +Returns `true` if the number is prime, `false` otherwise. + + - `bigInt(5).isPrime()` => `true` + - `bigInt(6).isPrime()` => `false` + +#### `isProbablePrime([iterations])` + +Returns `true` if the number is very likely to be positive, `false` otherwise. +Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive. +This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test). + + - `bigInt(5).isProbablePrime()` => `true` + - `bigInt(49).isProbablePrime()` => `false` + - `bigInt(1729).isProbablePrime(50)` => `false` + +Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results. + +For example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`. + +#### `isUnit()` + +Returns `true` if the number is `1` or `-1`, `false` otherwise. + + - `bigInt.one.isUnit()` => `true` + - `bigInt.minusOne.isUnit()` => `true` + - `bigInt(5).isUnit()` => `false` + +#### `isZero()` + +Return `true` if the number is `0` or `-0`, `false` otherwise. + + - `bigInt.zero.isZero()` => `true` + - `bigInt("-0").isZero()` => `true` + - `bigInt(50).isZero()` => `false` + +#### `leq(number)` + +Alias for the `lesserOrEquals` method. + +#### `lesser(number)` + +Checks if the first number is lesser than the second. + + - `bigInt(5).lesser(6)` => `true` + - `bigInt(5).lesser(5)` => `false` + - `bigInt(5).lesser(4)` => `false` + +#### `lesserOrEquals(number)` + +Checks if the first number is less than or equal to the second. + + - `bigInt(5).lesserOrEquals(6)` => `true` + - `bigInt(5).lesserOrEquals(5)` => `true` + - `bigInt(5).lesserOrEquals(4)` => `false` + +#### `lt(number)` + +Alias for the `lesser` method. + +#### `minus(number)` + +Alias for the `subtract` method. + + - `bigInt(3).minus(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `mod(number)` + +Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).mod(5)` => `4` + - `bigInt(-5).mod(2)` => `-1` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `modInv(mod)` + +Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`. + + - `bigInt(3).modInv(11)` => `4` + - `bigInt(42).modInv(2017)` => `1969` + +#### `modPow(exp, mod)` + +Takes the number to the power `exp` modulo `mod`. + + - `bigInt(10).modPow(3, 30)` => `10` + +#### `multiply(number)` + +Performs multiplication. + + - `bigInt(111).multiply(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `neq(number)` + +Alias for the `notEquals` method. + +#### `next()` + +Adds one to the number. + + - `bigInt(6).next()` => `7` + +#### `not()` + +Performs the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(10).not()` => `-11` + - `bigInt(0).not()` => `-1` + +#### `notEquals(number)` + +Checks if two numbers are not equal. + + - `bigInt(5).notEquals(5)` => `false` + - `bigInt(4).notEquals(7)` => `true` + +#### `or(number)` + +Performs the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(13).or(10)` => `15` + - `bigInt(13).or(-8)` => `-3` + +#### `over(number)` + +Alias for the `divide` method. + + - `bigInt(59).over(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `plus(number)` + +Alias for the `add` method. + + - `bigInt(5).plus(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `pow(number)` + +Performs exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`. + + - `bigInt(16).pow(16)` => `18446744073709551616` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation) + +#### `prev(number)` + +Subtracts one from the number. + + - `bigInt(6).prev()` => `5` + +#### `remainder(number)` + +Alias for the `mod` method. + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `shiftLeft(n)` + +Shifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftLeft(2)` => `32` + - `bigInt(8).shiftLeft(-2)` => `2` + +#### `shiftRight(n)` + +Shifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftRight(2)` => `2` + - `bigInt(8).shiftRight(-2)` => `32` + +#### `square()` + +Squares the number + + - `bigInt(3).square()` => `9` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring) + +#### `subtract(number)` + +Performs subtraction. + + - `bigInt(3).subtract(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `times(number)` + +Alias for the `multiply` method. + + - `bigInt(111).times(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `toJSNumber()` + +Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt("18446744073709551616").toJSNumber()` => `18446744073709552000` + +#### `xor(number)` + +Performs the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(12).xor(5)` => `9` + - `bigInt(12).xor(-5)` => `-9` + +### Static Methods + +#### `gcd(a, b)` + +Finds the greatest common denominator of `a` and `b`. + + - `bigInt.gcd(42,56)` => `14` + +#### `isInstance(x)` + +Returns `true` if `x` is a BigInteger, `false` otherwise. + + - `bigInt.isInstance(bigInt(14))` => `true` + - `bigInt.isInstance(14)` => `false` + +#### `lcm(a,b)` + +Finds the least common multiple of `a` and `b`. + + - `bigInt.lcm(21, 6)` => `42` + +#### `max(a,b)` + +Returns the largest of `a` and `b`. + + - `bigInt.max(77, 432)` => `432` + +#### `min(a,b)` + +Returns the smallest of `a` and `b`. + + - `bigInt.min(77, 432)` => `77` + +#### `randBetween(min, max)` + +Returns a random number between `min` and `max`. + + - `bigInt.randBetween("-1e100", "1e100")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745` + + +### Override Methods + +#### `toString(radix = 10)` + +Converts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`. + + - `bigInt("1e9").toString()` => `"1000000000"` + - `bigInt("1e9").toString(16)` => `"3b9aca00"` + +**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string. + + - `bigInt("999999999999999999").toString()` => `"999999999999999999"` + - `String(bigInt("999999999999999999"))` => `"999999999999999999"` + - `bigInt("999999999999999999") + ""` => `1000000000000000000` + +Bases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets. + + - `bigInt(567890).toString(100)` => `"<56><78><90>"` + +Negative bases are also supported. + + - `bigInt(12345).toString(-10)` => `"28465"` + +Base 1 and base -1 are also supported. + + - `bigInt(-15).toString(1)` => `"-111111111111111"` + - `bigInt(-15).toString(-1)` => `"101010101010101010101010101010"` + +Base 0 is only allowed for the number zero. + + - `bigInt(0).toString(0)` => `0` + - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString) + +#### `valueOf()` + +Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion: + + - `bigInt("100") + bigInt("200") === 300; //true` + +## Contributors + +To contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting. + +The unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html). + +There are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/). + +## License + +This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/). \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/bower.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/bower.json new file mode 100755 index 0000000..c7c7291 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/bower.json @@ -0,0 +1,30 @@ +{ + "name": "big-integer", + "description": "An arbitrary length integer library for Javascript", + "main": "./BigInteger.js", + "authors": [ + "Peter Olson" + ], + "license": "Unlicense", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "homepage": "https://github.com/peterolson/BigInteger.js", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "coverage", + "spec", + "tests" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/package.json new file mode 100755 index 0000000..71042a8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/big-integer/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/bplist-parser" + ] + ], + "_from": "big-integer@>=1.6.7 <2.0.0", + "_id": "big-integer@1.6.17", + "_inCache": true, + "_location": "/big-integer", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/big-integer-1.6.17.tgz_1478721202721_0.8068355675786734" + }, + "_npmUser": { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/bplist-parser" + ], + "_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.17.tgz", + "_shasum": "f0dcf5109a949e42a993ee3e8fb2070452817b51", + "_shrinkwrap": null, + "_spec": "big-integer@^1.6.7", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/bplist-parser", + "author": { + "name": "Peter Olson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "bin": {}, + "bugs": { + "url": "https://github.com/peterolson/BigInteger.js/issues" + }, + "contributors": [], + "dependencies": {}, + "description": "An arbitrary length integer library for Javascript", + "devDependencies": { + "coveralls": "^2.11.4", + "jasmine": "2.1.x", + "jasmine-core": "^2.3.4", + "karma": "^0.13.3", + "karma-coverage": "^0.4.2", + "karma-jasmine": "^0.3.6", + "karma-phantomjs-launcher": "~0.1" + }, + "directories": {}, + "dist": { + "shasum": "f0dcf5109a949e42a993ee3e8fb2070452817b51", + "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.17.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "d25d0bfcd96f31001ec8572c8d01de4770d99e63", + "homepage": "https://github.com/peterolson/BigInteger.js#readme", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "license": "Unlicense", + "main": "./BigInteger", + "maintainers": [ + { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + } + ], + "name": "big-integer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/peterolson/BigInteger.js.git" + }, + "scripts": { + "test": "karma start my.conf.js" + }, + "version": "1.6.17" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/.npmignore new file mode 100755 index 0000000..a9b46ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/README.md new file mode 100755 index 0000000..bf3080b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/README.md @@ -0,0 +1,64 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) creator. + +## Installation + +```bash +$ npm install bplist-creator +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-creator'); + +var buffer = bplist({ + key1: [1, 2, 3] +}); +``` + +## Real/Double/Float handling + +Javascript don't have different types for `1` and `1.0`. This package +will automatically store numbers as the appropriate type, but can't +detect floats that is also integers. + +If you need to force a value to be written with the `real` type pass +an instance of `Real`. + +```javascript +var buffer = bplist({ + backgroundRed: new bplist.Real(1), + backgroundGreen: new bplist.Real(0), + backgroundBlue: new bplist.Real(0) +}); +``` + +In `xml` the corresponding tags is `` and ``. + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/bplistCreator.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/bplistCreator.js new file mode 100755 index 0000000..b480826 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/bplistCreator.js @@ -0,0 +1,404 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/main/java/com/dd/plist/BinaryPropertyListWriter.java + +var streamBuffers = require("stream-buffers"); + +var debug = false; + +function Real(value) { + this.value = value; +} + +module.exports = function(dicts) { + var buffer = new streamBuffers.WritableStreamBuffer(); + buffer.write(new Buffer("bplist00")); + + if (debug) { + console.log('create', require('util').inspect(dicts, false, 10)); + } + + if (dicts instanceof Array && dicts.length === 1) { + dicts = dicts[0]; + } + + var entries = toEntries(dicts); + if (debug) { + console.log('entries', entries); + } + var idSizeInBytes = computeIdSizeInBytes(entries.length); + var offsets = []; + var offsetSizeInBytes; + var offsetTableOffset; + + updateEntryIds(); + + entries.forEach(function(entry, entryIdx) { + offsets[entryIdx] = buffer.size(); + if (!entry) { + buffer.write(0x00); + } else { + write(entry); + } + }); + + writeOffsetTable(); + writeTrailer(); + return buffer.getContents(); + + function updateEntryIds() { + var strings = {}; + var entryId = 0; + entries.forEach(function(entry) { + if (entry.id) { + return; + } + if (entry.type === 'string') { + if (!entry.bplistOverride && strings.hasOwnProperty(entry.value)) { + entry.type = 'stringref'; + entry.id = strings[entry.value]; + } else { + strings[entry.value] = entry.id = entryId++; + } + } else { + entry.id = entryId++; + } + }); + + entries = entries.filter(function(entry) { + return (entry.type !== 'stringref'); + }); + } + + function writeTrailer() { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer'); + } + // 6 null bytes + buffer.write(new Buffer([0, 0, 0, 0, 0, 0])); + + // size of an offset + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer(offsetSizeInBytes):', offsetSizeInBytes); + } + writeByte(offsetSizeInBytes); + + // size of a ref + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer(offsetSizeInBytes):', idSizeInBytes); + } + writeByte(idSizeInBytes); + + // number of objects + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer(number of objects):', entries.length); + } + writeLong(entries.length); + + // top object + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer(top object)'); + } + writeLong(0); + + // offset table offset + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeTrailer(offset table offset):', offsetTableOffset); + } + writeLong(offsetTableOffset); + } + + function writeOffsetTable() { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeOffsetTable'); + } + offsetTableOffset = buffer.size(); + offsetSizeInBytes = computeOffsetSizeInBytes(offsetTableOffset); + offsets.forEach(function(offset) { + writeBytes(offset, offsetSizeInBytes); + }); + } + + function write(entry) { + switch (entry.type) { + case 'dict': + writeDict(entry); + break; + case 'number': + case 'double': + writeNumber(entry); + break; + case 'array': + writeArray(entry); + break; + case 'boolean': + writeBoolean(entry); + break; + case 'string': + case 'string-utf16': + writeString(entry); + break; + case 'data': + writeData(entry); + break; + default: + throw new Error("unhandled entry type: " + entry.type); + } + } + + function writeDict(entry) { + if (debug) { + var keysStr = entry.entryKeys.map(function(k) {return k.id;}); + var valsStr = entry.entryValues.map(function(k) {return k.id;}); + console.log('0x' + buffer.size().toString(16), 'writeDict', '(id: ' + entry.id + ')', '(keys: ' + keysStr + ')', '(values: ' + valsStr + ')'); + } + writeIntHeader(0xD, entry.entryKeys.length); + entry.entryKeys.forEach(function(entry) { + writeID(entry.id); + }); + entry.entryValues.forEach(function(entry) { + writeID(entry.id); + }); + } + + function writeNumber(entry) { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeNumber', entry.value, ' (type: ' + entry.type + ')', '(id: ' + entry.id + ')'); + } + + if (entry.type !== 'double' && parseFloat(entry.value.toFixed()) == entry.value) { + if (entry.value < 0) { + writeByte(0x13); + writeBytes(entry.value, 8); + } else if (entry.value <= 0xff) { + writeByte(0x10); + writeBytes(entry.value, 1); + } else if (entry.value <= 0xffff) { + writeByte(0x11); + writeBytes(entry.value, 2); + } else if (entry.value <= 0xffffffff) { + writeByte(0x12); + writeBytes(entry.value, 4); + } else { + writeByte(0x13); + writeBytes(entry.value, 8); + } + } else { + writeByte(0x23); + writeDouble(entry.value); + } + } + + function writeArray(entry) { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeArray (length: ' + entry.entries.length + ')', '(id: ' + entry.id + ')'); + } + writeIntHeader(0xA, entry.entries.length); + entry.entries.forEach(function(e) { + writeID(e.id); + }); + } + + function writeBoolean(entry) { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeBoolean', entry.value, '(id: ' + entry.id + ')'); + } + writeByte(entry.value ? 0x09 : 0x08); + } + + function writeString(entry) { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeString', entry.value, '(id: ' + entry.id + ')'); + } + if (entry.type === 'string-utf16') { + var utf16 = new Buffer(entry.value, 'ucs2'); + writeIntHeader(0x6, utf16.length / 2); + // needs to be big endian so swap the bytes + for (var i = 0; i < utf16.length; i += 2) { + var t = utf16[i + 0]; + utf16[i + 0] = utf16[i + 1]; + utf16[i + 1] = t; + } + buffer.write(utf16); + } else { + var utf8 = new Buffer(entry.value, 'utf8'); + writeIntHeader(0x5, utf8.length); + buffer.write(utf8); + } + } + + function writeData(entry) { + if (debug) { + console.log('0x' + buffer.size().toString(16), 'writeData', entry.value, '(id: ' + entry.id + ')'); + } + writeIntHeader(0x4, entry.value.length); + buffer.write(entry.value); + } + + function writeLong(l) { + writeBytes(l, 8); + } + + function writeByte(b) { + buffer.write(new Buffer([b])); + } + + function writeDouble(v) { + var buf = new Buffer(8); + buf.writeDoubleBE(v, 0); + buffer.write(buf); + } + + function writeIntHeader(kind, value) { + if (value < 15) { + writeByte((kind << 4) + value); + } else if (value < 256) { + writeByte((kind << 4) + 15); + writeByte(0x10); + writeBytes(value, 1); + } else if (value < 65536) { + writeByte((kind << 4) + 15); + writeByte(0x11); + writeBytes(value, 2); + } else { + writeByte((kind << 4) + 15); + writeByte(0x12); + writeBytes(value, 4); + } + } + + function writeID(id) { + writeBytes(id, idSizeInBytes); + } + + function writeBytes(value, bytes) { + // write low-order bytes big-endian style + var buf = new Buffer(bytes); + var z = 0; + // javascript doesn't handle large numbers + while (bytes > 4) { + buf[z++] = 0; + bytes--; + } + for (var i = bytes - 1; i >= 0; i--) { + buf[z++] = value >> (8 * i); + } + buffer.write(buf); + } +}; + +function toEntries(dicts) { + if (dicts.bplistOverride) { + return [dicts]; + } + + if (dicts instanceof Array) { + return toEntriesArray(dicts); + } else if (dicts instanceof Buffer) { + return [ + { + type: 'data', + value: dicts + } + ]; + } else if (dicts instanceof Real) { + return [ + { + type: 'double', + value: dicts.value + } + ]; + } else if (typeof(dicts) === 'object') { + return toEntriesObject(dicts); + } else if (typeof(dicts) === 'string') { + return [ + { + type: 'string', + value: dicts + } + ]; + } else if (typeof(dicts) === 'number') { + return [ + { + type: 'number', + value: dicts + } + ]; + } else if (typeof(dicts) === 'boolean') { + return [ + { + type: 'boolean', + value: dicts + } + ]; + } else { + throw new Error('unhandled entry: ' + dicts); + } +} + +function toEntriesArray(arr) { + if (debug) { + console.log('toEntriesArray'); + } + var results = [ + { + type: 'array', + entries: [] + } + ]; + arr.forEach(function(v) { + var entry = toEntries(v); + results[0].entries.push(entry[0]); + results = results.concat(entry); + }); + return results; +} + +function toEntriesObject(dict) { + if (debug) { + console.log('toEntriesObject'); + } + var results = [ + { + type: 'dict', + entryKeys: [], + entryValues: [] + } + ]; + Object.keys(dict).forEach(function(key) { + var entryKey = toEntries(key); + results[0].entryKeys.push(entryKey[0]); + results = results.concat(entryKey[0]); + }); + Object.keys(dict).forEach(function(key) { + var entryValue = toEntries(dict[key]); + results[0].entryValues.push(entryValue[0]); + results = results.concat(entryValue); + }); + return results; +} + +function computeOffsetSizeInBytes(maxOffset) { + if (maxOffset < 256) { + return 1; + } + if (maxOffset < 65536) { + return 2; + } + if (maxOffset < 4294967296) { + return 4; + } + return 8; +} + +function computeIdSizeInBytes(numberOfIds) { + if (numberOfIds < 256) { + return 1; + } + if (numberOfIds < 65536) { + return 2; + } + return 4; +} + +module.exports.Real = Real; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/package.json new file mode 100755 index 0000000..02c3228 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + { + "raw": "bplist-creator@0.0.4", + "scope": null, + "escapedName": "bplist-creator", + "name": "bplist-creator", + "rawSpec": "0.0.4", + "spec": "0.0.4", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simple-plist" + ] + ], + "_from": "bplist-creator@0.0.4", + "_id": "bplist-creator@0.0.4", + "_inCache": true, + "_location": "/bplist-creator", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "1.4.10", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-creator@0.0.4", + "scope": null, + "escapedName": "bplist-creator", + "name": "bplist-creator", + "rawSpec": "0.0.4", + "spec": "0.0.4", + "type": "version" + }, + "_requiredBy": [ + "/simple-plist" + ], + "_resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz", + "_shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991", + "_shrinkwrap": null, + "_spec": "bplist-creator@0.0.4", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simple-plist", + "author": { + "name": "https://github.com/nearinfinity/node-bplist-parser.git" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-creator/issues" + }, + "dependencies": { + "stream-buffers": "~0.2.3" + }, + "description": "Binary Mac OS X Plist (property list) creator.", + "devDependencies": { + "bplist-parser": "0.0.4", + "nodeunit": "0.7.4" + }, + "directories": {}, + "dist": { + "shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991", + "tarball": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz" + }, + "homepage": "https://github.com/nearinfinity/node-bplist-creator", + "keywords": [ + "bplist", + "plist", + "creator" + ], + "license": "MIT", + "main": "bplistCreator.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-creator", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-creator.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.0.4" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/airplay.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/airplay.bplist new file mode 100755 index 0000000..931adea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/airplay.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/binaryData.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/binaryData.bplist new file mode 100755 index 0000000..4c03581 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/binaryData.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/creatorTest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/creatorTest.js new file mode 100755 index 0000000..af427a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/creatorTest.js @@ -0,0 +1,197 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplistParser = require('bplist-parser'); +var bplistCreator = require('../'); + +module.exports = { +// 'iTunes Small': function(test) { +// var file = path.join(__dirname, "iTunes-small.bplist"); +// testFile(test, file); +// }, + + 'sample1': function(test) { + var file = path.join(__dirname, "sample1.bplist"); + testFile(test, file); + }, + + 'sample2': function(test) { + var file = path.join(__dirname, "sample2.bplist"); + testFile(test, file); + }, + + 'binary data': function(test) { + var file = path.join(__dirname, "binaryData.bplist"); + testFile(test, file); + }, + + 'airplay': function(test) { + var file = path.join(__dirname, "airplay.bplist"); + testFile(test, file); + }, + +// 'utf16': function(test) { +// var file = path.join(__dirname, "utf16.bplist"); +// testFile(test, file); +// }, + +// 'uid': function(test) { +// var file = path.join(__dirname, "uid.bplist"); +// testFile(test, file); +// } +}; + +function testFile(test, file) { + fs.readFile(file, function(err, fileData) { + if (err) { + return test.done(err); + } + + bplistParser.parseFile(file, function(err, dicts) { + if (err) { + return test.done(err); + } + + // airplay overrides + if (dicts && dicts[0] && dicts[0].loadedTimeRanges && dicts[0].loadedTimeRanges[0] && dicts[0].loadedTimeRanges[0].hasOwnProperty('start')) { + dicts[0].loadedTimeRanges[0].start = { + bplistOverride: true, + type: 'double', + value: dicts[0].loadedTimeRanges[0].start + }; + } + if (dicts && dicts[0] && dicts[0].loadedTimeRanges && dicts[0].seekableTimeRanges[0] && dicts[0].seekableTimeRanges[0].hasOwnProperty('start')) { + dicts[0].seekableTimeRanges[0].start = { + bplistOverride: true, + type: 'double', + value: dicts[0].seekableTimeRanges[0].start + }; + } + if (dicts && dicts[0] && dicts[0].hasOwnProperty('rate')) { + dicts[0].rate = { + bplistOverride: true, + type: 'double', + value: dicts[0].rate + }; + } + + // utf16 + if (dicts && dicts[0] && dicts[0].hasOwnProperty('NSHumanReadableCopyright')) { + dicts[0].NSHumanReadableCopyright = { + bplistOverride: true, + type: 'string-utf16', + value: dicts[0].NSHumanReadableCopyright + }; + } + if (dicts && dicts[0] && dicts[0].hasOwnProperty('CFBundleExecutable')) { + dicts[0].CFBundleExecutable = { + bplistOverride: true, + type: 'string', + value: dicts[0].CFBundleExecutable + }; + } + if (dicts && dicts[0] && dicts[0].CFBundleURLTypes && dicts[0].CFBundleURLTypes[0] && dicts[0].CFBundleURLTypes[0].hasOwnProperty('CFBundleURLSchemes')) { + dicts[0].CFBundleURLTypes[0].CFBundleURLSchemes[0] = { + bplistOverride: true, + type: 'string', + value: dicts[0].CFBundleURLTypes[0].CFBundleURLSchemes[0] + }; + } + if (dicts && dicts[0] && dicts[0].hasOwnProperty('CFBundleDisplayName')) { + dicts[0].CFBundleDisplayName = { + bplistOverride: true, + type: 'string', + value: dicts[0].CFBundleDisplayName + }; + } + if (dicts && dicts[0] && dicts[0].hasOwnProperty('DTPlatformBuild')) { + dicts[0].DTPlatformBuild = { + bplistOverride: true, + type: 'string', + value: dicts[0].DTPlatformBuild + }; + } + + var buf = bplistCreator(dicts); + compareBuffers(test, buf, fileData); + return test.done(); + }); + }); +} + +function compareBuffers(test, buf1, buf2) { + if (buf1.length !== buf2.length) { + printBuffers(buf1, buf2); + return test.fail("buffer size mismatch. found: " + buf1.length + ", expected: " + buf2.length + "."); + } + for (var i = 0; i < buf1.length; i++) { + if (buf1[i] !== buf2[i]) { + printBuffers(buf1, buf2); + return test.fail("buffer mismatch at offset 0x" + i.toString(16) + ". found: 0x" + buf1[i].toString(16) + ", expected: 0x" + buf2[i].toString(16) + "."); + } + } +} + +function printBuffers(buf1, buf2) { + var i, t; + for (var lineOffset = 0; lineOffset < buf1.length || lineOffset < buf2.length; lineOffset += 16) { + var line = ''; + + t = ('000000000' + lineOffset.toString(16)); + line += t.substr(t.length - 8) + ': '; + + for (i = 0; i < 16; i++) { + if (i == 8) { + line += ' '; + } + if (lineOffset + i < buf1.length) { + t = ('00' + buf1[lineOffset + i].toString(16)); + line += t.substr(t.length - 2) + ' '; + } else { + line += ' '; + } + } + line += ' '; + for (i = 0; i < 16; i++) { + if (lineOffset + i < buf1.length) { + t = String.fromCharCode(buf1[lineOffset + i]); + if (t < ' ' || t > '~') { + t = '.'; + } + line += t; + } else { + line += ' '; + } + } + + line += ' - '; + + for (i = 0; i < 16; i++) { + if (i == 8) { + line += ' '; + } + if (lineOffset + i < buf2.length) { + t = ('00' + buf2[lineOffset + i].toString(16)); + line += t.substr(t.length - 2) + ' '; + } else { + line += ' '; + } + } + line += ' '; + for (i = 0; i < 16; i++) { + if (lineOffset + i < buf2.length) { + t = String.fromCharCode(buf2[lineOffset + i]); + if (t < ' ' || t > '~') { + t = '.'; + } + line += t; + } else { + line += ' '; + } + } + + console.log(line); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/iTunes-small.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/iTunes-small.bplist new file mode 100755 index 0000000..b7edb14 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/iTunes-small.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample1.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample1.bplist new file mode 100755 index 0000000..5b808ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample1.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample2.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample2.bplist new file mode 100755 index 0000000..fc42979 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/sample2.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/uid.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/uid.bplist new file mode 100755 index 0000000..59f341e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/uid.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/utf16.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/utf16.bplist new file mode 100755 index 0000000..ba4bcfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-creator/test/utf16.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/.npmignore new file mode 100755 index 0000000..a9b46ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/README.md new file mode 100755 index 0000000..37e5e1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/bplistParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/bplistParser.js new file mode 100755 index 0000000..f8335bc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,357 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java + +var fs = require('fs'); +var bigInt = require("big-integer"); +var debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +var EPOCH = 978307200000; + +// UID object definition +var UID = exports.UID = function(id) { + this.UID = id; +} + +var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { + function tryParseBuffer(buffer) { + var err = null; + var result; + try { + result = parseBuffer(buffer); + } catch (ex) { + err = ex; + } + callback(err, result); + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } else { + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { return callback(err); } + tryParseBuffer(data); + }); + } +}; + +var parseBuffer = exports.parseBuffer = function (buffer) { + var result = {}; + + // check header + var header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + var trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + var offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + var objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + var numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + var topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + var offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + var offsetTable = []; + + for (var i = 0; i < numObjects; i++) { + var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + var offset = offsetTable[tableOffset]; + var type = buffer[offset]; + var objType = (type & 0xF0) >> 4; //First 4 bits + var objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function bufferToHexString(buffer) { + var str = ''; + var i; + for (i = 0; i < buffer.length; i++) { + if (buffer[i] != 0x00) { + break; + } + } + for (; i < buffer.length; i++) { + var part = '00' + buffer[i].toString(16); + str += part.substr(part.length - 2); + } + return str; + } + + function parseInteger() { + var length = Math.pow(2, objInfo); + if (length > 4) { + var data = buffer.slice(offset + 1, offset + 1 + length); + var str = bufferToHexString(data); + return bigInt(str, 16); + } if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseUID() { + var length = objInfo + 1; + if (length < exports.maxObjectSize) { + return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length))); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseReal() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + var realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + else if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + var dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + var dataoffset = 1; + var length = objInfo; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + var enc = "utf8"; + var length = objInfo; + var stroffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + var stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + var plistString = new Buffer(buffer.slice(offset + stroffset, offset + stroffset + length)); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseArray() { + var length = objInfo; + var arrayoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + var array = []; + for (var i = 0; i < length; i++) { + var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + var length = objInfo; + var dictoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + var dict = {}; + for (var i = 0; i < length; i++) { + var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + var key = parseObject(keyRef); + var val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + var l = 0; + for (var i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + var data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + var len = buffer.length; + for (var i = 0; i < len; i += 2) { + var a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/package.json new file mode 100755 index 0000000..f9ef738 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + { + "raw": "bplist-parser@^0.1.0", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "bplist-parser@>=0.1.0 <0.2.0", + "_id": "bplist-parser@0.1.1", + "_inCache": true, + "_location": "/bplist-parser", + "_nodeVersion": "5.1.0", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "3.4.0", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-parser@^0.1.0", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "_shrinkwrap": null, + "_spec": "bplist-parser@^0.1.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Joe Ferner", + "email": "joe.ferner@nearinfinity.com" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-parser/issues" + }, + "dependencies": { + "big-integer": "^1.6.7" + }, + "description": "Binary plist parser.", + "devDependencies": { + "nodeunit": "~0.9.1" + }, + "directories": {}, + "dist": { + "shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz" + }, + "gitHead": "c4f22650de2cc95edd21a6e609ff0654a2b951bd", + "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme", + "keywords": [ + "bplist", + "plist", + "parser" + ], + "license": "MIT", + "main": "bplistParser.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.1.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/airplay.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/airplay.bplist new file mode 100755 index 0000000..931adea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/airplay.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/iTunes-small.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/iTunes-small.bplist new file mode 100755 index 0000000..b7edb14 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/iTunes-small.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.bplist new file mode 100755 index 0000000..6da9c04 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.xml new file mode 100755 index 0000000..cc6cb03 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/int64.xml @@ -0,0 +1,10 @@ + + + + + zero + 0 + int64item + 12345678901234567890 + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/parseTest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/parseTest.js new file mode 100755 index 0000000..67e7bfa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/parseTest.js @@ -0,0 +1,159 @@ +'use strict'; + +// tests are adapted from https://github.com/TooTallNate/node-plist + +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplist = require('../'); + +module.exports = { + 'iTunes Small': function (test) { + var file = path.join(__dirname, "iTunes-small.bplist"); + var startTime1 = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); + var dict = dicts[0]; + test.equal(dict['Application Version'], "9.0.3"); + test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); + test.done(); + }); + }, + + 'sample1': function (test) { + var file = path.join(__dirname, "sample1.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); + test.done(); + }); + }, + + 'sample2': function (test) { + var file = path.join(__dirname, "sample2.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); + test.done(); + }); + }, + + 'airplay': function (test) { + var file = path.join(__dirname, "airplay.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['duration'], 5555.0495000000001); + test.equal(dict['position'], 4.6269989039999997); + test.done(); + }); + }, + + 'utf16': function (test) { + var file = path.join(__dirname, "utf16.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], 'sellStuff'); + test.equal(dict['CFBundleShortVersionString'], '2.6.1'); + test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); + test.done(); + }); + }, + + 'utf16chinese': function (test) { + var file = path.join(__dirname, "utf16_chinese.plist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], '天翼阅读'); + test.equal(dict['CFBundleDisplayName'], '天翼阅读'); + test.done(); + }); + }, + + + + 'uid': function (test) { + var file = path.join(__dirname, "uid.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.deepEqual(dict['$objects'][1]['NS.keys'], [{UID:2}, {UID:3}, {UID:4}]); + test.deepEqual(dict['$objects'][1]['NS.objects'], [{UID: 5}, {UID:6}, {UID:7}]); + test.deepEqual(dict['$top']['root'], {UID:1}); + test.done(); + }); + }, + + 'int64': function (test) { + var file = path.join(__dirname, "int64.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['zero'], '0'); + test.equal(dict['int64item'], '12345678901234567890'); + test.done(); + }); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample1.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample1.bplist new file mode 100755 index 0000000..5b808ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample1.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample2.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample2.bplist new file mode 100755 index 0000000..fc42979 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/sample2.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/uid.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/uid.bplist new file mode 100755 index 0000000..59f341e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/uid.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16.bplist new file mode 100755 index 0000000..ba4bcfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16_chinese.plist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16_chinese.plist new file mode 100755 index 0000000..ba1e2d7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/bplist-parser/test/utf16_chinese.plist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/README.md new file mode 100755 index 0000000..1793929 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/README.md @@ -0,0 +1,122 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/index.js new file mode 100755 index 0000000..955f27c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/package.json new file mode 100755 index 0000000..4e02fe2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/brace-expansion/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/minimatch" + ] + ], + "_from": "brace-expansion@>=1.0.0 <2.0.0", + "_id": "brace-expansion@1.1.6", + "_inCache": true, + "_location": "/brace-expansion", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "2.15.8", + "_phantomChildren": {}, + "_requested": { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "_shrinkwrap": null, + "_spec": "brace-expansion@^1.0.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, + "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "name": "brace-expansion", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/.travis.yml new file mode 100755 index 0000000..f1d0f13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/LICENSE new file mode 100755 index 0000000..ee27ba4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/README.markdown b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/README.markdown new file mode 100755 index 0000000..408f70a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/example/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/example/map.js new file mode 100755 index 0000000..3365621 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/index.js new file mode 100755 index 0000000..b29a781 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/package.json new file mode 100755 index 0000000..dcf9698 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + { + "raw": "concat-map@0.0.1", + "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/brace-expansion" + ] + ], + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inCache": true, + "_location": "/concat-map", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "raw": "concat-map@0.0.1", + "scope": null, + "escapedName": "concat-map", + "name": "concat-map", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_shrinkwrap": null, + "_spec": "concat-map@0.0.1", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/brace-expansion", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "dependencies": {}, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "homepage": "https://github.com/substack/node-concat-map", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "concat-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "0.0.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/test/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/test/map.js new file mode 100755 index 0000000..fdbd702 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jscs.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jscs.json new file mode 100755 index 0000000..5cc7e26 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jscs.json @@ -0,0 +1,24 @@ +{ + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true, + "validateLineBreaks": "LF", + "validateIndentation": 4, + "requireLineFeedAtFileEnd": true, + + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforePostfixUnaryOperators": true, + "requireSpaceAfterLineComment": true, + "requireCapitalizedConstructors": true, + + "disallowSpacesInNamedFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jshintignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jshintignore new file mode 100755 index 0000000..d606f61 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.jshintignore @@ -0,0 +1 @@ +spec/fixtures/* diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.npmignore new file mode 100755 index 0000000..5d14118 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.npmignore @@ -0,0 +1,2 @@ +spec +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.ratignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.ratignore new file mode 100755 index 0000000..26f7205 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/.ratignore @@ -0,0 +1,2 @@ +fixtures +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/README.md new file mode 100755 index 0000000..c5dcfd5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/README.md @@ -0,0 +1,153 @@ + + +# cordova-common +Expoeses shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms. +## Exposed APIs + +### `events` + +Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli + +Usage: +```js +var events = require('cordova-common').events; +events.emit('warn', 'Some warning message') +``` + +There are the following events supported by cordova-cli: `verbose`, `log`, `info`, `warn`, `error`. + +### `CordovaError` + +An error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (`instanceof` check succeeds). + +Usage: + +```js +var CordovaError = require('cordova-common').CordovaError; +throw new CordovaError('Some error message', SOME_ERR_CODE); +``` + +See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes. + +### `ConfigParser` + +Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md). + +Usage: +```js +var ConfigParser = require('cordova-common').ConfigParser; +var appConfig = new ConfigParser('path/to/cordova-app/config.xml'); +console.log(appconfig.name() + ':' + appConfig.version()); +``` + +### `PluginInfoProvider` and `PluginInfo` + +`PluginInfo` is a wrapper for cordova plugins' `plugin.xml` files. This class may be instantiated directly or via `PluginInfoProvider`. The difference is that `PluginInfoProvider` caches `PluginInfo` instances based on plugin source directory. + +Usage: +```js +var PluginInfo: require('cordova-common').PluginInfo; +var PluginInfoProvider: require('cordova-common').PluginInfoProvider; + +// The following instances are equal +var plugin1 = new PluginInfo('path/to/plugin_directory'); +var plugin2 = new PluginInfoProvider().get('path/to/plugin_directory'); + +console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version) +``` + +### `ActionStack` + +Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines. + +Usage: +```js +var ActionStack = require('cordova-common').ActionStack; +var stack = new ActionStack() + +var action1 = stack.createAction(task1, [], task1_reverter, []); +var action2 = stack.createAction(task2, [], task2_reverter, []); + +stack.push(action1); +stack.push(action2); + +stack.process() +.then(function() { + // all actions succeded +}) +.catch(function(error){ + // One of actions failed with error +}) +``` + +### `superspawn` + +Module for spawning child processes with some advanced logic. + +Usage: +```js +var superspawn = require('cordova-common').superspawn; +superspawn.spawn('adb', ['devices']) +.progress(function(data){ + if (data.stderr) + console.error('"adb devices" raised an error: ' + data.stderr); +}) +.then(function(devices){ + // Do something... +}) +``` + +### `xmlHelpers` + +A set of utility methods for dealing with xml files. + +Usage: +```js +var xml = require('cordova-common').xmlHelpers; + +var xmlDoc1 = xml.parseElementtreeSync('some/xml/file'); +var xmlDoc2 = xml.parseElementtreeSync('another/xml/file'); + +xml.mergeXml(doc1, doc2); // doc2 now contains all the nodes from doc1 +``` + +### Other APIs + +The APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines. + +``` +PlatformJson +ConfigChanges +ConfigKeeper +ConfigFile +mungeUtil +``` + +## Setup +* Clone this repository onto your local machine + `git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git` +* In terminal, navigate to the inner cordova-common directory + `cd cordova-lib/cordova-common` +* Install dependencies and npm-link + `npm install && npm link` +* Navigate to cordova-lib directory and link cordova-common + `cd ../cordova-lib && npm link cordova-common && npm install` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/RELEASENOTES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/RELEASENOTES.md new file mode 100755 index 0000000..02dbcee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/RELEASENOTES.md @@ -0,0 +1,87 @@ + +# Cordova-common Release Notes + +### 1.5.1 (Oct 12, 2016) +* [CB-12002](https://issues.apache.org/jira/browse/CB-12002) Add `getAllowIntents()` to `ConfigParser` +* [CB-11998](https://issues.apache.org/jira/browse/CB-11998) `cordova platform add` error with `cordova-common@1.5.0` + +### 1.5.0 (Oct 06, 2016) +* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) Add test case for different `edit-config` targets +* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add `edit-config` to `config.xml` +* [CB-11936](https://issues.apache.org/jira/browse/CB-11936) Support four new **App Transport Security (ATS)** keys +* update `config.xml` location if it is a **Android Studio** project. +* use `array` methods and `object.keys` for iterating. avoiding `for-in` loops +* [CB-11517](https://issues.apache.org/jira/browse/CB-11517) Allow `.folder` matches +* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) check `edit-config` target exists + +### 1.4.1 (Aug 09, 2016) +* Add general purpose `ConfigParser.getAttribute` API +* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common` +* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly +* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it +* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing + +### 1.4.0 (Jul 12, 2016) +* [CB-11023](https://issues.apache.org/jira/browse/CB-11023) Add edit-config functionality + +### 1.3.0 (May 12, 2016) +* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging +* [CB-11194](https://issues.apache.org/jira/browse/CB-11194) Improve cordova load time +* [CB-1117](https://issues.apache.org/jira/browse/CB-1117) Add `FileUpdater` module to `cordova-common`. +* [CB-11131](https://issues.apache.org/jira/browse/CB-11131) Fix `TypeError: message.toUpperCase` is not a function in `CordovaLogger` + +### 1.2.0 (Apr 18, 2016) +* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Save modulesMetadata to both www and platform_www when necessary +* [CB-10833](https://issues.apache.org/jira/browse/CB-10833) Deduplicate common logic for plugin installation/uninstallation +* [CB-10822](https://issues.apache.org/jira/browse/CB-10822) Manage plugins/modules metadata using PlatformJson +* [CB-10940](https://issues.apache.org/jira/browse/CB-10940) Can't add Android platform from path +* [CB-10965](https://issues.apache.org/jira/browse/CB-10965) xml helper allows multiple instances to be merge in config.xml + +### 1.1.1 (Mar 18, 2016) +* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Update test to reflect merging of [CB-9264](https://issues.apache.org/jira/browse/CB-9264) fix +* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Platform-specific configuration preferences don't override global settings +* [CB-9264](https://issues.apache.org/jira/browse/CB-9264) Duplicate entries in `config.xml` +* [CB-10791](https://issues.apache.org/jira/browse/CB-10791) Add `adjustLoggerLevel` to `cordova-common.CordovaLogger` +* [CB-10662](https://issues.apache.org/jira/browse/CB-10662) Add tests for `ConfigParser.getStaticResources` +* [CB-10622](https://issues.apache.org/jira/browse/CB-10622) fix target attribute being ignored for images in `config.xml`. +* [CB-10583](https://issues.apache.org/jira/browse/CB-10583) Protect plugin preferences from adding extra Array properties. + +### 1.1.0 (Feb 16, 2016) +* [CB-10482](https://issues.apache.org/jira/browse/CB-10482) Remove references to windows8 from cordova-lib/cli +* [CB-10430](https://issues.apache.org/jira/browse/CB-10430) Adds forwardEvents method to easily connect two EventEmitters +* [CB-10176](https://issues.apache.org/jira/browse/CB-10176) Adds CordovaLogger class, based on logger module from cordova-cli +* [CB-10052](https://issues.apache.org/jira/browse/CB-10052) Expose child process' io streams via promise progress notification +* [CB-10497](https://issues.apache.org/jira/browse/CB-10497) Prefer .bat over .cmd on windows platform +* [CB-9984](https://issues.apache.org/jira/browse/CB-9984) Bumps plist version and fixes failing cordova-common test + +### 1.0.0 (Oct 29, 2015) + +* [CB-9890](https://issues.apache.org/jira/browse/CB-9890) Documents cordova-common +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Correct cordova-lib -> cordova-common in README +* Pick ConfigParser changes from apache@0c3614e +* [CB-9743](https://issues.apache.org/jira/browse/CB-9743) Removes system frameworks handling from ConfigChanges +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Cleans out code which has been moved to `cordova-common` +* Pick ConfigParser changes from apache@ddb027b +* Picking CordovaError changes from apache@a3b1fca +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Adds tests and fixtures based on existing cordova-lib ones +* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Initial implementation for cordova-common + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/cordova-common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/cordova-common.js new file mode 100755 index 0000000..801d510 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/cordova-common.js @@ -0,0 +1,47 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var addProperty = require('./src/util/addProperty'); + +module.exports = { }; + +addProperty(module, 'events', './src/events'); +addProperty(module, 'superspawn', './src/superspawn'); + +addProperty(module, 'ActionStack', './src/ActionStack'); +addProperty(module, 'CordovaError', './src/CordovaError/CordovaError'); +addProperty(module, 'CordovaLogger', './src/CordovaLogger'); +addProperty(module, 'CordovaCheck', './src/CordovaCheck'); +addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext'); +addProperty(module, 'PlatformJson', './src/PlatformJson'); +addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser'); +addProperty(module, 'FileUpdater', './src/FileUpdater'); + +addProperty(module, 'PluginInfo', './src/PluginInfo/PluginInfo'); +addProperty(module, 'PluginInfoProvider', './src/PluginInfo/PluginInfoProvider'); + +addProperty(module, 'PluginManager', './src/PluginManager'); + +addProperty(module, 'ConfigChanges', './src/ConfigChanges/ConfigChanges'); +addProperty(module, 'ConfigKeeper', './src/ConfigChanges/ConfigKeeper'); +addProperty(module, 'ConfigFile', './src/ConfigChanges/ConfigFile'); +addProperty(module, 'mungeUtil', './src/ConfigChanges/munge-util'); + +addProperty(module, 'xmlHelpers', './src/util/xml-helpers'); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/package.json new file mode 100755 index 0000000..b73fefd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/package.json @@ -0,0 +1,130 @@ +{ + "_args": [ + [ + { + "raw": "cordova-common@^1.5.0", + "scope": null, + "escapedName": "cordova-common", + "name": "cordova-common", + "rawSpec": "^1.5.0", + "spec": ">=1.5.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "cordova-common@>=1.5.0 <2.0.0", + "_id": "cordova-common@1.5.1", + "_inCache": true, + "_location": "/cordova-common", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cordova-common-1.5.1.tgz_1476725179180_0.39604957425035536" + }, + "_npmUser": { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "cordova-common@^1.5.0", + "scope": null, + "escapedName": "cordova-common", + "name": "cordova-common", + "rawSpec": "^1.5.0", + "spec": ">=1.5.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.5.1.tgz", + "_shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3", + "_shrinkwrap": null, + "_spec": "cordova-common@^1.5.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB", + "email": "dev@cordova.apache.org" + }, + "contributors": [], + "dependencies": { + "ansi": "^0.3.1", + "bplist-parser": "^0.1.0", + "cordova-registry-mapper": "^1.1.8", + "elementtree": "^0.1.6", + "glob": "^5.0.13", + "minimatch": "^3.0.0", + "osenv": "^0.1.3", + "plist": "^1.2.0", + "q": "^1.4.1", + "semver": "^5.0.1", + "shelljs": "^0.5.3", + "underscore": "^1.8.3", + "unorm": "^1.3.3" + }, + "description": "Apache Cordova tools and platforms shared routines", + "devDependencies": { + "istanbul": "^0.3.17", + "jasmine-node": "^1.14.5", + "jshint": "^2.8.0", + "promise-matchers": "^0.9.6", + "rewire": "^2.5.1" + }, + "directories": {}, + "dist": { + "shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3", + "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.5.1.tgz" + }, + "engineStrict": true, + "engines": { + "node": ">=0.9.9" + }, + "license": "Apache-2.0", + "main": "cordova-common.js", + "maintainers": [ + { + "name": "bowserj", + "email": "bowserj@apache.org" + }, + { + "name": "kotikov.vladimir", + "email": "kotikov.vladimir@gmail.com" + }, + { + "name": "purplecabbage", + "email": "purplecabbage@gmail.com" + }, + { + "name": "shazron", + "email": "shazron@gmail.com" + }, + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + { + "name": "timbarham", + "email": "npmjs@barhams.info" + } + ], + "name": "cordova-common", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git" + }, + "scripts": { + "cover": "node node_modules/istanbul/lib/cli.js cover --root src --print detail node_modules/jasmine-node/bin/jasmine-node -- spec", + "jasmine": "node node_modules/jasmine-node/bin/jasmine-node --captureExceptions --color spec", + "jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec", + "test": "npm run jshint && npm run jasmine" + }, + "version": "1.5.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/.jshintrc new file mode 100755 index 0000000..89a121c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/.jshintrc @@ -0,0 +1,10 @@ +{ + "node": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": true + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js new file mode 100755 index 0000000..5ef6f84 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js @@ -0,0 +1,85 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint quotmark:false */ + +var events = require('./events'), + Q = require('q'); + +function ActionStack() { + this.stack = []; + this.completed = []; +} + +ActionStack.prototype = { + createAction:function(handler, action_params, reverter, revert_params) { + return { + handler:{ + run:handler, + params:action_params + }, + reverter:{ + run:reverter, + params:revert_params + } + }; + }, + push:function(tx) { + this.stack.push(tx); + }, + // Returns a promise. + process:function(platform) { + events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...'); + + while (this.stack.length) { + var action = this.stack.shift(); + var handler = action.handler.run; + var action_params = action.handler.params; + + try { + handler.apply(null, action_params); + } catch(e) { + events.emit('warn', 'Error during processing of action! Attempting to revert...'); + this.stack.unshift(action); + var issue = 'Uh oh!\n'; + // revert completed tasks + while(this.completed.length) { + var undo = this.completed.shift(); + var revert = undo.reverter.run; + var revert_params = undo.reverter.params; + + try { + revert.apply(null, revert_params); + } catch(err) { + events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:'); + issue += 'A reversion action failed: ' + err.message + '\n'; + } + } + e.message = issue + e.message; + return Q.reject(e); + } + this.completed.push(action); + } + events.emit('verbose', 'Action stack processing complete.'); + + return Q(); + } +}; + +module.exports = ActionStack; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js new file mode 100755 index 0000000..6a80730 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js @@ -0,0 +1,544 @@ +/* + * + * Copyright 2013 Anis Kadri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* + * This module deals with shared configuration / dependency "stuff". That is: + * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml. + * - plist files in iOS + * Essentially, any type of shared resources that we need to handle with awareness + * of how potentially multiple plugins depend on a single shared resource, should be + * handled in this module. + * + * The implementation uses an object as a hash table, with "leaves" of the table tracking + * reference counts. + */ + +/* jshint sub:true */ + +var fs = require('fs'), + path = require('path'), + et = require('elementtree'), + semver = require('semver'), + events = require('../events'), + ConfigKeeper = require('./ConfigKeeper'), + CordovaLogger = require('../CordovaLogger'); + +var mungeutil = require('./munge-util'); +var xml_helpers = require('../util/xml-helpers'); + +exports.PlatformMunger = PlatformMunger; + +exports.process = function(plugins_dir, project_dir, platform, platformJson, pluginInfoProvider) { + var munger = new PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider); + munger.process(plugins_dir); + munger.save_all(); +}; + +/****************************************************************************** +* PlatformMunger class +* +* Can deal with config file of a single project. +* Parsed config files are cached in a ConfigKeeper object. +******************************************************************************/ +function PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider) { + this.platform = platform; + this.project_dir = project_dir; + this.config_keeper = new ConfigKeeper(project_dir); + this.platformJson = platformJson; + this.pluginInfoProvider = pluginInfoProvider; +} + +// Write out all unsaved files. +PlatformMunger.prototype.save_all = PlatformMunger_save_all; +function PlatformMunger_save_all() { + this.config_keeper.save_all(); + this.platformJson.save(); +} + +// Apply a munge object to a single config file. +// The remove parameter tells whether to add the change or remove it. +PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge; +function PlatformMunger_apply_file_munge(file, munge, remove) { + var self = this; + + for (var selector in munge.parents) { + for (var xml_child in munge.parents[selector]) { + // this xml child is new, graft it (only if config file exists) + var config_file = self.config_keeper.get(self.project_dir, self.platform, file); + if (config_file.exists) { + if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]); + else config_file.graft_child(selector, munge.parents[selector][xml_child]); + } + } + } +} + + +PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes; +function remove_plugin_changes(pluginInfo, is_top_level) { + var self = this; + var platform_config = self.platformJson.root; + var plugin_vars = is_top_level ? + platform_config.installed_plugins[pluginInfo.id] : + platform_config.dependent_plugins[pluginInfo.id]; + var edit_config_changes = null; + if(pluginInfo.getEditConfigs) { + edit_config_changes = pluginInfo.getEditConfigs(self.platform); + } + + // get config munge, aka how did this plugin change various config files + var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + // global munge looks at all plugins' changes to config files + var global_munge = platform_config.config_munge; + var munge = mungeutil.decrement_munge(global_munge, config_munge); + + for (var file in munge.files) { + // CB-6976 Windows Universal Apps. Compatibility fix for existing plugins. + if (self.platform == 'windows' && file == 'package.appxmanifest' && + !fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) { + // New windows template separate manifest files for Windows10, Windows8.1 and WP8.1 + var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows10.appxmanifest']; + /* jshint loopfunc:true */ + substs.forEach(function(subst) { + events.emit('verbose', 'Applying munge to ' + subst); + self.apply_file_munge(subst, munge.files[file], true); + }); + /* jshint loopfunc:false */ + } + self.apply_file_munge(file, munge.files[file], /* remove = */ true); + } + + // Remove from installed_plugins + self.platformJson.removePlugin(pluginInfo.id, is_top_level); + return self; +} + + +PlatformMunger.prototype.add_plugin_changes = add_plugin_changes; +function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) { + var self = this; + var platform_config = self.platformJson.root; + + var edit_config_changes = null; + if(pluginInfo.getEditConfigs) { + edit_config_changes = pluginInfo.getEditConfigs(self.platform); + } + + var config_munge; + + if (!edit_config_changes || edit_config_changes.length === 0) { + // get config munge, aka how should this plugin change various config files + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars); + } + else { + var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force); + + if (isConflictingInfo.conflictWithConfigxml) { + throw new Error(pluginInfo.id + + ' cannot be added. changes in this plugin conflicts with changes in config.xml. Conflicts must be resolved before plugin can be added.'); + } + if (plugin_force) { + CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.'); + + // remove conflicting munges + var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); + for (var conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + + // force add new munges + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + } + else if(isConflictingInfo.conflictFound) { + throw new Error('There was a conflict trying to modify attributes with in plugin ' + pluginInfo.id + + '. The conflicting plugin, ' + isConflictingInfo.conflictingPlugin + ', already modified the same attributes. The conflict must be resolved before ' + + pluginInfo.id + ' can be added. You may use --force to add the plugin and overwrite the conflicting attributes.'); + } + else { + // no conflicts, will handle edit-config + config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); + } + } + + self = munge_helper(should_increment, self, platform_config, config_munge); + + // Move to installed/dependent_plugins + self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level); + return self; +} + + +// Handle edit-config changes from config.xml +PlatformMunger.prototype.add_config_changes = add_config_changes; +function add_config_changes(config, should_increment) { + var self = this; + var platform_config = self.platformJson.root; + + var config_munge; + var edit_config_changes = null; + if(config.getEditConfigs) { + edit_config_changes = config.getEditConfigs(self.platform); + } + + if (!edit_config_changes || edit_config_changes.length === 0) { + // There are no edit-config changes to add, return here + return self; + } + else { + var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, true /*always force overwrite other edit-config*/); + + if(isConflictingInfo.conflictFound) { + var conflict_munge; + var conflict_file; + + if (Object.keys(isConflictingInfo.configxmlMunge.files).length !== 0) { + // silently remove conflicting config.xml munges so new munges can be added + conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.configxmlMunge); + for (conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + } + if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) { + CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes'); + + // remove conflicting plugin.xml munges + conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); + for (conflict_file in conflict_munge.files) { + self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); + } + } + } + // Add config.xml edit-config munges + config_munge = self.generate_config_xml_munge(config, edit_config_changes, 'config.xml'); + } + + self = munge_helper(should_increment, self, platform_config, config_munge); + + // Move to installed/dependent_plugins + return self; +} + +function munge_helper(should_increment, self, platform_config, config_munge) { + // global munge looks at all changes to config files + + // TODO: The should_increment param is only used by cordova-cli and is going away soon. + // If should_increment is set to false, avoid modifying the global_munge (use clone) + // and apply the entire config_munge because it's already a proper subset of the global_munge. + var munge, global_munge; + if (should_increment) { + global_munge = platform_config.config_munge; + munge = mungeutil.increment_munge(global_munge, config_munge); + } else { + global_munge = mungeutil.clone_munge(platform_config.config_munge); + munge = config_munge; + } + + for (var file in munge.files) { + // CB-6976 Windows Universal Apps. Compatibility fix for existing plugins. + if (self.platform == 'windows' && file == 'package.appxmanifest' && + !fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) { + var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows10.appxmanifest']; + /* jshint loopfunc:true */ + substs.forEach(function(subst) { + events.emit('verbose', 'Applying munge to ' + subst); + self.apply_file_munge(subst, munge.files[file]); + }); + /* jshint loopfunc:false */ + } + + self.apply_file_munge(file, munge.files[file]); + } + + return self; +} + + +// Load the global munge from platform json and apply all of it. +// Used by cordova prepare to re-generate some config file from platform +// defaults and the global munge. +PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ; +function reapply_global_munge () { + var self = this; + + var platform_config = self.platformJson.root; + var global_munge = platform_config.config_munge; + for (var file in global_munge.files) { + self.apply_file_munge(file, global_munge.files[file]); + } + + return self; +} + +// generate_plugin_config_munge +// Generate the munge object from config.xml +PlatformMunger.prototype.generate_config_xml_munge = generate_config_xml_munge; +function generate_config_xml_munge(config, edit_config_changes, type) { + + var munge = { files: {} }; + var changes = edit_config_changes; + var id; + + if(!changes) { + return munge; + } + + if (type === 'config.xml') { + id = type; + } + else { + id = config.id; + } + + changes.forEach(function(change) { + change.xmls.forEach(function(xml) { + // 1. stringify each xml + var stringified = (new et.ElementTree(xml)).write({xml_declaration:false}); + // 2. add into munge + if (change.mode) { + mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id }); + } + }); + }); + return munge; +} + + +// generate_plugin_config_munge +// Generate the munge object from plugin.xml + vars +PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge; +function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) { + var self = this; + + vars = vars || {}; + var munge = { files: {} }; + var changes = pluginInfo.getConfigFiles(self.platform); + + if(edit_config_changes) { + Array.prototype.push.apply(changes, edit_config_changes); + } + + // Demux 'package.appxmanifest' into relevant platform-specific appx manifests. + // Only spend the cycles if there are version-specific plugin settings + if (self.platform === 'windows' && + changes.some(function(change) { + return ((typeof change.versions !== 'undefined') || + (typeof change.deviceTarget !== 'undefined')); + })) + { + var manifests = { + 'windows': { + '8.1.0': 'package.windows.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'phone': { + '8.1.0': 'package.phone.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'all': { + '8.1.0': ['package.windows.appxmanifest', 'package.phone.appxmanifest'], + '10.0.0': 'package.windows10.appxmanifest' + } + }; + + var oldChanges = changes; + changes = []; + + oldChanges.forEach(function(change, changeIndex) { + // Only support semver/device-target demux for package.appxmanifest + // Pass through in case something downstream wants to use it + if (change.target !== 'package.appxmanifest') { + changes.push(change); + return; + } + + var hasVersion = (typeof change.versions !== 'undefined'); + var hasTargets = (typeof change.deviceTarget !== 'undefined'); + + // No semver/device-target for this config-file, pass it through + if (!(hasVersion || hasTargets)) { + changes.push(change); + return; + } + + var targetDeviceSet = hasTargets ? change.deviceTarget : 'all'; + if (['windows', 'phone', 'all'].indexOf(targetDeviceSet) === -1) { + // target-device couldn't be resolved, fix it up here to a valid value + targetDeviceSet = 'all'; + } + var knownWindowsVersionsForTargetDeviceSet = Object.keys(manifests[targetDeviceSet]); + + // at this point, 'change' targets package.appxmanifest and has a version attribute + knownWindowsVersionsForTargetDeviceSet.forEach(function(winver) { + // This is a local function that creates the new replacement representing the + // mutation. Used to save code further down. + var createReplacement = function(manifestFile, originalChange) { + var replacement = { + target: manifestFile, + parent: originalChange.parent, + after: originalChange.after, + xmls: originalChange.xmls, + versions: originalChange.versions, + deviceTarget: originalChange.deviceTarget + }; + return replacement; + }; + + // version doesn't satisfy, so skip + if (hasVersion && !semver.satisfies(winver, change.versions)) { + return; + } + + var versionSpecificManifests = manifests[targetDeviceSet][winver]; + if (versionSpecificManifests.constructor === Array) { + // e.g. all['8.1.0'] === ['pkg.windows.appxmanifest', 'pkg.phone.appxmanifest'] + versionSpecificManifests.forEach(function(manifestFile) { + changes.push(createReplacement(manifestFile, change)); + }); + } + else { + // versionSpecificManifests is actually a single string + changes.push(createReplacement(versionSpecificManifests, change)); + } + }); + }); + } + + changes.forEach(function(change) { + change.xmls.forEach(function(xml) { + // 1. stringify each xml + var stringified = (new et.ElementTree(xml)).write({xml_declaration:false}); + // interp vars + if (vars) { + Object.keys(vars).forEach(function(key) { + var regExp = new RegExp('\\$' + key, 'g'); + stringified = stringified.replace(regExp, vars[key]); + }); + } + // 2. add into munge + if (change.mode) { + if (change.mode !== 'remove') { + mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id }); + } + } + else { + mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after }); + } + }); + }); + return munge; +} + +function is_conflicting(editchanges, config_munge, self, force) { + var files = config_munge.files; + var conflictFound = false; + var conflictWithConfigxml = false; + var conflictingMunge = { files: {} }; + var configxmlMunge = { files: {} }; + var conflictingParent; + var conflictingPlugin; + + editchanges.forEach(function(editchange) { + if (files[editchange.file]) { + var parents = files[editchange.file].parents; + var target = parents[editchange.target]; + + // Check if the edit target will resolve to an existing target + if (!target || target.length === 0) { + var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data; + var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target); + var resolveTarget; + + if (resolveEditTarget) { + for (var parent in parents) { + resolveTarget = xml_helpers.resolveParent(file_xml, parent); + if (resolveEditTarget === resolveTarget) { + conflictingParent = parent; + target = parents[parent]; + break; + } + } + } + } + else { + conflictingParent = editchange.target; + } + + if (target && target.length !== 0) { + // conflict has been found + conflictFound = true; + + if (editchange.id === 'config.xml') { + if (target[0].id === 'config.xml') { + // Keep track of config.xml/config.xml edit-config conflicts + mungeutil.deep_add(configxmlMunge, editchange.file, conflictingParent, target[0]); + } + else { + // Keep track of config.xml x plugin.xml edit-config conflicts + mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); + } + } + else { + if (target[0].id === 'config.xml') { + // plugin.xml cannot overwrite config.xml changes even if --force is used + conflictWithConfigxml = true; + return; + } + + if (force) { + // Need to find all conflicts when --force is used, track conflicting munges + mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); + } + else { + // plugin cannot overwrite other plugin changes without --force + conflictingPlugin = target[0].plugin; + return; + } + } + } + } + }); + + return {conflictFound: conflictFound, conflictingPlugin: conflictingPlugin, conflictingMunge: conflictingMunge, + configxmlMunge: configxmlMunge, conflictWithConfigxml:conflictWithConfigxml}; +} + +// Go over the prepare queue and apply the config munges for each plugin +// that has been (un)installed. +PlatformMunger.prototype.process = PlatformMunger_process; +function PlatformMunger_process(plugins_dir) { + var self = this; + var platform_config = self.platformJson.root; + + // Uninstallation first + platform_config.prepare_queue.uninstalled.forEach(function(u) { + var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); + self.remove_plugin_changes(pluginInfo, u.topLevel); + }); + + // Now handle installation + platform_config.prepare_queue.installed.forEach(function(u) { + var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); + self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true, u.force); + }); + + // Empty out installed/ uninstalled queues. + platform_config.prepare_queue.uninstalled = []; + platform_config.prepare_queue.installed = []; +} +/**** END of PlatformMunger ****/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js new file mode 100755 index 0000000..4a58008 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js @@ -0,0 +1,240 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var fs = require('fs'); +var path = require('path'); + +var modules = {}; +var addProperty = require('../util/addProperty'); + +// Use delay loading to ensure plist and other node modules to not get loaded +// on Android, Windows platforms +addProperty(module, 'bplist', 'bplist-parser', modules); +addProperty(module, 'et', 'elementtree', modules); +addProperty(module, 'glob', 'glob', modules); +addProperty(module, 'plist', 'plist', modules); +addProperty(module, 'plist_helpers', '../util/plist-helpers', modules); +addProperty(module, 'xml_helpers', '../util/xml-helpers', modules); + +/****************************************************************************** +* ConfigFile class +* +* Can load and keep various types of config files. Provides some functionality +* specific to some file types such as grafting XML children. In most cases it +* should be instantiated by ConfigKeeper. +* +* For plugin.xml files use as: +* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml'); +* +* TODO: Consider moving it out to a separate file and maybe partially with +* overrides in platform handlers. +******************************************************************************/ +function ConfigFile(project_dir, platform, file_tag) { + this.project_dir = project_dir; + this.platform = platform; + this.file_tag = file_tag; + this.is_changed = false; + + this.load(); +} + +// ConfigFile.load() +ConfigFile.prototype.load = ConfigFile_load; +function ConfigFile_load() { + var self = this; + + // config file may be in a place not exactly specified in the target + var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag); + + if ( !filepath || !fs.existsSync(filepath) ) { + self.exists = false; + return; + } + self.exists = true; + self.mtime = fs.statSync(self.filepath).mtime; + + var ext = path.extname(filepath); + // Windows8 uses an appxmanifest, and wp8 will likely use + // the same in a future release + if (ext == '.xml' || ext == '.appxmanifest') { + self.type = 'xml'; + self.data = modules.xml_helpers.parseElementtreeSync(filepath); + } else { + // plist file + self.type = 'plist'; + // TODO: isBinaryPlist() reads the file and then parse re-reads it again. + // We always write out text plist, not binary. + // Do we still need to support binary plist? + // If yes, use plist.parseStringSync() and read the file once. + self.data = isBinaryPlist(filepath) ? + modules.bplist.parseBuffer(fs.readFileSync(filepath)) : + modules.plist.parse(fs.readFileSync(filepath, 'utf8')); + } +} + +ConfigFile.prototype.save = function ConfigFile_save() { + var self = this; + if (self.type === 'xml') { + fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8'); + } else { + // plist + var regExp = new RegExp('[ \t\r\n]+?', 'g'); + fs.writeFileSync(self.filepath, modules.plist.build(self.data).replace(regExp, '')); + } + self.is_changed = false; +}; + +ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml_child) { + var self = this; + var filepath = self.filepath; + var result; + if (self.type === 'xml') { + var xml_to_graft = [modules.et.XML(xml_child.xml)]; + switch (xml_child.mode) { + case 'merge': + result = modules.xml_helpers.graftXMLMerge(self.data, xml_to_graft, selector, xml_child); + break; + case 'overwrite': + result = modules.xml_helpers.graftXMLOverwrite(self.data, xml_to_graft, selector, xml_child); + break; + case 'remove': + result= true; + break; + default: + result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after); + } + if ( !result) { + throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install'); + } + } else { + // plist file + result = modules.plist_helpers.graftPLIST(self.data, xml_child.xml, selector); + if ( !result ) { + throw new Error('Unable to graft plist "' + filepath + '" during config install'); + } + } + self.is_changed = true; +}; + +ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml_child) { + var self = this; + var filepath = self.filepath; + var result; + if (self.type === 'xml') { + var xml_to_graft = [modules.et.XML(xml_child.xml)]; + switch (xml_child.mode) { + case 'merge': + case 'overwrite': + result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child); + break; + case 'remove': + result = modules.xml_helpers.prunXMLRemove(self.data, selector, xml_to_graft); + break; + default: + result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector); + } + } else { + // plist file + result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector); + } + if (!result) { + var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.'; + throw new Error(err_msg); + } + self.is_changed = true; +}; + +// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards. +// Resolve to a real path in this function. +// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project. +function resolveConfigFilePath(project_dir, platform, file) { + var filepath = path.join(project_dir, file); + var matches; + + if (file.indexOf('*') > -1) { + // handle wildcards in targets using glob. + matches = modules.glob.sync(path.join(project_dir, '**', file)); + if (matches.length) filepath = matches[0]; + + // [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist + if(matches.length > 1 && file.indexOf('-Info.plist')>-1){ + var plistName = getIOSProjectname(project_dir)+'-Info.plist'; + for (var i=0; i < matches.length; i++) { + if(matches[i].indexOf(plistName) > -1){ + filepath = matches[i]; + break; + } + } + } + return filepath; + } + + // special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file. + // TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman. + if (file == 'config.xml') { + if (platform == 'ubuntu') { + filepath = path.join(project_dir, 'config.xml'); + } else if (platform == 'ios') { + var iospath = getIOSProjectname(project_dir); + filepath = path.join(project_dir,iospath, 'config.xml'); + } else if (platform == 'android') { + filepath = path.join(project_dir, 'res', 'xml', 'config.xml'); + } else { + matches = modules.glob.sync(path.join(project_dir, '**', 'config.xml')); + if (matches.length) filepath = matches[0]; + } + return filepath; + } + + // XXX this checks for android studio projects + // only if none of the options above are satisfied does this get called + if(platform === 'android' && !fs.existsSync(filepath)) { + filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml'); + } + + // None of the special cases matched, returning project_dir/file. + return filepath; +} + +// Find out the real name of an iOS project +// TODO: glob is slow, need a better way or caching, or avoid using more than once. +function getIOSProjectname(project_dir) { + var matches = modules.glob.sync(path.join(project_dir, '*.xcodeproj')); + var iospath; + if (matches.length === 1) { + iospath = path.basename(matches[0],'.xcodeproj'); + } else { + var msg; + if (matches.length === 0) { + msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir; + } else { + msg = 'There are multiple *.xcodeproj dirs in ' + project_dir; + } + throw new Error(msg); + } + return iospath; +} + +// determine if a plist file is binary +function isBinaryPlist(filename) { + // I wish there was a synchronous way to read only the first 6 bytes of a + // file. This is wasteful :/ + var buf = '' + fs.readFileSync(filename, 'utf8'); + // binary plists start with a magic header, "bplist" + return buf.substring(0, 6) === 'bplist'; +} + +module.exports = ConfigFile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js new file mode 100755 index 0000000..894e922 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js @@ -0,0 +1,65 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var path = require('path'); +var ConfigFile = require('./ConfigFile'); + +/****************************************************************************** +* ConfigKeeper class +* +* Used to load and store config files to avoid re-parsing and writing them out +* multiple times. +* +* The config files are referred to by a fake path constructed as +* project_dir/platform/file +* where file is the name used for the file in config munges. +******************************************************************************/ +function ConfigKeeper(project_dir, plugins_dir) { + this.project_dir = project_dir; + this.plugins_dir = plugins_dir; + this._cached = {}; +} + +ConfigKeeper.prototype.get = function ConfigKeeper_get(project_dir, platform, file) { + var self = this; + + // This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml + // https://issues.apache.org/jira/browse/CB-6414 + if(file == 'config.xml' && platform == 'android'){ + file = 'res/xml/config.xml'; + } + var fake_path = path.join(project_dir, platform, file); + + if (self._cached[fake_path]) { + return self._cached[fake_path]; + } + // File was not cached, need to load. + var config_file = new ConfigFile(project_dir, platform, file); + self._cached[fake_path] = config_file; + return config_file; +}; + + +ConfigKeeper.prototype.save_all = function ConfigKeeper_save_all() { + var self = this; + Object.keys(self._cached).forEach(function (fake_path) { + var config_file = self._cached[fake_path]; + if (config_file.is_changed) config_file.save(); + }); +}; + +module.exports = ConfigKeeper; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js new file mode 100755 index 0000000..0149bab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/munge-util.js @@ -0,0 +1,163 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var _ = require('underscore'); + +// add the count of [key1][key2]...[keyN] to obj +// return true if it didn't exist before +exports.deep_add = function deep_add(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + return exports.process_munge(obj, true/*createParents*/, function (parentArray, k) { + var found = _.find(parentArray, function(element) { + return element.xml == k.xml; + }); + if (found) { + found.after = found.after || k.after; + found.count += k.count; + } else { + parentArray.push(k); + } + return !found; + }, keys); +}; + +// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0 +// return true if it was removed or not found +exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + var result = exports.process_munge(obj, false/*createParents*/, function (parentArray, k) { + var index = -1; + var found = _.find(parentArray, function (element) { + index++; + return element.xml == k.xml; + }); + if (found) { + if (parentArray[index].oldAttrib) { + k.oldAttrib = _.extend({}, parentArray[index].oldAttrib); + } + found.count -= k.count; + if (found.count > 0) { + return false; + } + else { + parentArray.splice(index, 1); + } + } + return undefined; + }, keys); + + return typeof result === 'undefined' ? true : result; +}; + +// search for [key1][key2]...[keyN] +// return the object or undefined if not found +exports.deep_find = function deep_find(obj, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + + return exports.process_munge(obj, false/*createParents?*/, function (parentArray, k) { + return _.find(parentArray, function (element) { + return element.xml == (k.xml || k); + }); + }, keys); +}; + +// Execute func passing it the parent array and the xmlChild key. +// When createParents is true, add the file and parent items they are missing +// When createParents is false, stop and return undefined if the file and/or parent items are missing + +exports.process_munge = function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) { + if ( !Array.isArray(keys) ) { + keys = Array.prototype.slice.call(arguments, 1); + } + var k = keys[0]; + if (keys.length == 1) { + return func(obj, k); + } else if (keys.length == 2) { + if (!obj.parents[k] && !createParents) { + return undefined; + } + obj.parents[k] = obj.parents[k] || []; + return exports.process_munge(obj.parents[k], createParents, func, keys.slice(1)); + } else if (keys.length == 3){ + if (!obj.files[k] && !createParents) { + return undefined; + } + obj.files[k] = obj.files[k] || { parents: {} }; + return exports.process_munge(obj.files[k], createParents, func, keys.slice(1)); + } else { + throw new Error('Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).'); + } +}; + +// All values from munge are added to base as +// base[file][selector][child] += munge[file][selector][child] +// Returns a munge object containing values that exist in munge +// but not in base. +exports.increment_munge = function increment_munge(base, munge) { + var diff = { files: {} }; + + for (var file in munge.files) { + for (var selector in munge.files[file].parents) { + for (var xml_child in munge.files[file].parents[selector]) { + var val = munge.files[file].parents[selector][xml_child]; + // if node not in base, add it to diff and base + // else increment it's value in base without adding to diff + var newlyAdded = exports.deep_add(base, [file, selector, val]); + if (newlyAdded) { + exports.deep_add(diff, file, selector, val); + } + } + } + } + return diff; +}; + +// Update the base munge object as +// base[file][selector][child] -= munge[file][selector][child] +// nodes that reached zero value are removed from base and added to the returned munge +// object. +exports.decrement_munge = function decrement_munge(base, munge) { + var zeroed = { files: {} }; + + for (var file in munge.files) { + for (var selector in munge.files[file].parents) { + for (var xml_child in munge.files[file].parents[selector]) { + var val = munge.files[file].parents[selector][xml_child]; + // if node not in base, add it to diff and base + // else increment it's value in base without adding to diff + var removed = exports.deep_remove(base, [file, selector, val]); + if (removed) { + exports.deep_add(zeroed, file, selector, val); + } + } + } + } + return zeroed; +}; + +// For better readability where used +exports.clone_munge = function clone_munge(munge) { + return exports.increment_munge({}, munge); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js new file mode 100755 index 0000000..6e74ce3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js @@ -0,0 +1,544 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true */ + +var et = require('elementtree'), + xml= require('../util/xml-helpers'), + CordovaError = require('../CordovaError/CordovaError'), + fs = require('fs'), + events = require('../events'); + + +/** Wraps a config.xml file */ +function ConfigParser(path) { + this.path = path; + try { + this.doc = xml.parseElementtreeSync(path); + this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc); + et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0'); + } catch (e) { + console.error('Parsing '+path+' failed'); + throw e; + } + var r = this.doc.getroot(); + if (r.tag !== 'widget') { + throw new CordovaError(path + ' has incorrect root node name (expected "widget", was "' + r.tag + '")'); + } +} + +function getNodeTextSafe(el) { + return el && el.text && el.text.trim(); +} + +function findOrCreate(doc, name) { + var ret = doc.find(name); + if (!ret) { + ret = new et.Element(name); + doc.getroot().append(ret); + } + return ret; +} + +function getCordovaNamespacePrefix(doc){ + var rootAtribs = Object.getOwnPropertyNames(doc.getroot().attrib); + var prefix = 'cdv'; + for (var j = 0; j < rootAtribs.length; j++ ) { + if(rootAtribs[j].indexOf('xmlns:') === 0 && + doc.getroot().attrib[rootAtribs[j]] === 'http://cordova.apache.org/ns/1.0'){ + var strings = rootAtribs[j].split(':'); + prefix = strings[1]; + break; + } + } + return prefix; +} + +/** + * Finds the value of an element's attribute + * @param {String} attributeName Name of the attribute to search for + * @param {Array} elems An array of ElementTree nodes + * @return {String} + */ +function findElementAttributeValue(attributeName, elems) { + + elems = Array.isArray(elems) ? elems : [ elems ]; + + var value = elems.filter(function (elem) { + return elem.attrib.name.toLowerCase() === attributeName.toLowerCase(); + }).map(function (filteredElems) { + return filteredElems.attrib.value; + }).pop(); + + return value ? value : ''; +} + +ConfigParser.prototype = { + getAttribute: function(attr) { + return this.doc.getroot().attrib[attr]; + }, + + packageName: function(id) { + return this.getAttribute('id'); + }, + setPackageName: function(id) { + this.doc.getroot().attrib['id'] = id; + }, + android_packageName: function() { + return this.getAttribute('android-packageName'); + }, + android_activityName: function() { + return this.getAttribute('android-activityName'); + }, + ios_CFBundleIdentifier: function() { + return this.getAttribute('ios-CFBundleIdentifier'); + }, + name: function() { + return getNodeTextSafe(this.doc.find('name')); + }, + setName: function(name) { + var el = findOrCreate(this.doc, 'name'); + el.text = name; + }, + description: function() { + return getNodeTextSafe(this.doc.find('description')); + }, + setDescription: function(text) { + var el = findOrCreate(this.doc, 'description'); + el.text = text; + }, + version: function() { + return this.getAttribute('version'); + }, + windows_packageVersion: function() { + return this.getAttribute('windows-packageVersion'); + }, + android_versionCode: function() { + return this.getAttribute('android-versionCode'); + }, + ios_CFBundleVersion: function() { + return this.getAttribute('ios-CFBundleVersion'); + }, + setVersion: function(value) { + this.doc.getroot().attrib['version'] = value; + }, + author: function() { + return getNodeTextSafe(this.doc.find('author')); + }, + getGlobalPreference: function (name) { + return findElementAttributeValue(name, this.doc.findall('preference')); + }, + setGlobalPreference: function (name, value) { + var pref = this.doc.find('preference[@name="' + name + '"]'); + if (!pref) { + pref = new et.Element('preference'); + pref.attrib.name = name; + this.doc.getroot().append(pref); + } + pref.attrib.value = value; + }, + getPlatformPreference: function (name, platform) { + return findElementAttributeValue(name, this.doc.findall('platform[@name=\'' + platform + '\']/preference')); + }, + getPreference: function(name, platform) { + + var platformPreference = ''; + + if (platform) { + platformPreference = this.getPlatformPreference(name, platform); + } + + return platformPreference ? platformPreference : this.getGlobalPreference(name); + + }, + /** + * Returns all resources for the platform specified. + * @param {String} platform The platform. + * @param {string} resourceName Type of static resources to return. + * "icon" and "splash" currently supported. + * @return {Array} Resources for the platform specified. + */ + getStaticResources: function(platform, resourceName) { + var ret = [], + staticResources = []; + if (platform) { // platform specific icons + this.doc.findall('platform[@name=\'' + platform + '\']/' + resourceName).forEach(function(elt){ + elt.platform = platform; // mark as platform specific resource + staticResources.push(elt); + }); + } + // root level resources + staticResources = staticResources.concat(this.doc.findall(resourceName)); + // parse resource elements + var that = this; + staticResources.forEach(function (elt) { + var res = {}; + res.src = elt.attrib.src; + res.target = elt.attrib.target || undefined; + res.density = elt.attrib['density'] || elt.attrib[that.cdvNamespacePrefix+':density'] || elt.attrib['gap:density']; + res.platform = elt.platform || null; // null means icon represents default icon (shared between platforms) + res.width = +elt.attrib.width || undefined; + res.height = +elt.attrib.height || undefined; + + // default icon + if (!res.width && !res.height && !res.density) { + ret.defaultResource = res; + } + ret.push(res); + }); + + /** + * Returns resource with specified width and/or height. + * @param {number} width Width of resource. + * @param {number} height Height of resource. + * @return {Resource} Resource object or null if not found. + */ + ret.getBySize = function(width, height) { + return ret.filter(function(res) { + if (!res.width && !res.height) { + return false; + } + return ((!res.width || (width == res.width)) && + (!res.height || (height == res.height))); + })[0] || null; + }; + + /** + * Returns resource with specified density. + * @param {string} density Density of resource. + * @return {Resource} Resource object or null if not found. + */ + ret.getByDensity = function(density) { + return ret.filter(function(res) { + return res.density == density; + })[0] || null; + }; + + /** Returns default icons */ + ret.getDefault = function() { + return ret.defaultResource; + }; + + return ret; + }, + + /** + * Returns all icons for specific platform. + * @param {string} platform Platform name + * @return {Resource[]} Array of icon objects. + */ + getIcons: function(platform) { + return this.getStaticResources(platform, 'icon'); + }, + + /** + * Returns all splash images for specific platform. + * @param {string} platform Platform name + * @return {Resource[]} Array of Splash objects. + */ + getSplashScreens: function(platform) { + return this.getStaticResources(platform, 'splash'); + }, + + /** + * Returns all hook scripts for the hook type specified. + * @param {String} hook The hook type. + * @param {Array} platforms Platforms to look for scripts into (root scripts will be included as well). + * @return {Array} Script elements. + */ + getHookScripts: function(hook, platforms) { + var self = this; + var scriptElements = self.doc.findall('./hook'); + + if(platforms) { + platforms.forEach(function (platform) { + scriptElements = scriptElements.concat(self.doc.findall('./platform[@name="' + platform + '"]/hook')); + }); + } + + function filterScriptByHookType(el) { + return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; + } + + return scriptElements.filter(filterScriptByHookType); + }, + /** + * Returns a list of plugin (IDs). + * + * This function also returns any plugin's that + * were defined using the legacy tags. + * @return {string[]} Array of plugin IDs + */ + getPluginIdList: function () { + var plugins = this.doc.findall('plugin'); + var result = plugins.map(function(plugin){ + return plugin.attrib.name; + }); + var features = this.doc.findall('feature'); + features.forEach(function(element ){ + var idTag = element.find('./param[@name="id"]'); + if(idTag){ + result.push(idTag.attrib.value); + } + }); + return result; + }, + getPlugins: function () { + return this.getPluginIdList().map(function (pluginId) { + return this.getPlugin(pluginId); + }, this); + }, + /** + * Adds a plugin element. Does not check for duplicates. + * @name addPlugin + * @function + * @param {object} attributes name and spec are supported + * @param {Array|object} variables name, value or arbitary object + */ + addPlugin: function (attributes, variables) { + if (!attributes && !attributes.name) return; + var el = new et.Element('plugin'); + el.attrib.name = attributes.name; + if (attributes.spec) { + el.attrib.spec = attributes.spec; + } + + // support arbitrary object as variables source + if (variables && typeof variables === 'object' && !Array.isArray(variables)) { + variables = Object.keys(variables) + .map(function (variableName) { + return {name: variableName, value: variables[variableName]}; + }); + } + + if (variables) { + variables.forEach(function (variable) { + el.append(new et.Element('variable', { name: variable.name, value: variable.value })); + }); + } + this.doc.getroot().append(el); + }, + /** + * Retrives the plugin with the given id or null if not found. + * + * This function also returns any plugin's that + * were defined using the legacy tags. + * @name getPlugin + * @function + * @param {String} id + * @returns {object} plugin including any variables + */ + getPlugin: function(id){ + if(!id){ + return undefined; + } + var pluginElement = this.doc.find('./plugin/[@name="' + id + '"]'); + if (null === pluginElement) { + var legacyFeature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..'); + if(legacyFeature){ + events.emit('log', 'Found deprecated feature entry for ' + id +' in config.xml.'); + return featureToPlugin(legacyFeature); + } + return undefined; + } + var plugin = {}; + + plugin.name = pluginElement.attrib.name; + plugin.spec = pluginElement.attrib.spec || pluginElement.attrib.src || pluginElement.attrib.version; + plugin.variables = {}; + var variableElements = pluginElement.findall('variable'); + variableElements.forEach(function(varElement){ + var name = varElement.attrib.name; + var value = varElement.attrib.value; + if(name){ + plugin.variables[name] = value; + } + }); + return plugin; + }, + /** + * Remove the plugin entry with give name (id). + * + * This function also operates on any plugin's that + * were defined using the legacy tags. + * @name removePlugin + * @function + * @param id name of the plugin + */ + removePlugin: function(id){ + if(id){ + var plugins = this.doc.findall('./plugin/[@name="' + id + '"]') + .concat(this.doc.findall('./feature/param[@name="id"][@value="' + id + '"]/..')); + var children = this.doc.getroot().getchildren(); + plugins.forEach(function (plugin) { + var idx = children.indexOf(plugin); + if (idx > -1) { + children.splice(idx, 1); + } + }); + } + }, + + // Add any element to the root + addElement: function(name, attributes) { + var el = et.Element(name); + for (var a in attributes) { + el.attrib[a] = attributes[a]; + } + this.doc.getroot().append(el); + }, + + /** + * Adds an engine. Does not check for duplicates. + * @param {String} name the engine name + * @param {String} spec engine source location or version (optional) + */ + addEngine: function(name, spec){ + if(!name) return; + var el = et.Element('engine'); + el.attrib.name = name; + if(spec){ + el.attrib.spec = spec; + } + this.doc.getroot().append(el); + }, + /** + * Removes all the engines with given name + * @param {String} name the engine name. + */ + removeEngine: function(name){ + var engines = this.doc.findall('./engine/[@name="' +name+'"]'); + for(var i=0; i < engines.length; i++){ + var children = this.doc.getroot().getchildren(); + var idx = children.indexOf(engines[i]); + if(idx > -1){ + children.splice(idx,1); + } + } + }, + getEngines: function(){ + var engines = this.doc.findall('./engine'); + return engines.map(function(engine){ + var spec = engine.attrib.spec || engine.attrib.version; + return { + 'name': engine.attrib.name, + 'spec': spec ? spec : null + }; + }); + }, + /* Get all the access tags */ + getAccesses: function() { + var accesses = this.doc.findall('./access'); + return accesses.map(function(access){ + var minimum_tls_version = access.attrib['minimum-tls-version']; /* String */ + var requires_forward_secrecy = access.attrib['requires-forward-secrecy']; /* Boolean */ + var requires_certificate_transparency = access.attrib['requires-certificate-transparency']; /* Boolean */ + var allows_arbitrary_loads_in_web_content = access.attrib['allows-arbitrary-loads-in-web-content']; /* Boolean */ + var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean */ + var allows_local_networking = access.attrib['allows-local-networking']; /* Boolean */ + + return { + 'origin': access.attrib.origin, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy, + 'requires_certificate_transparency' : requires_certificate_transparency, + 'allows_arbitrary_loads_in_web_content' : allows_arbitrary_loads_in_web_content, + 'allows_arbitrary_loads_in_media' : allows_arbitrary_loads_in_media, + 'allows_local_networking' : allows_local_networking + }; + }); + }, + /* Get all the allow-navigation tags */ + getAllowNavigations: function() { + var allow_navigations = this.doc.findall('./allow-navigation'); + return allow_navigations.map(function(allow_navigation){ + var minimum_tls_version = allow_navigation.attrib['minimum-tls-version']; /* String */ + var requires_forward_secrecy = allow_navigation.attrib['requires-forward-secrecy']; /* Boolean */ + var requires_certificate_transparency = allow_navigation.attrib['requires-certificate-transparency']; /* Boolean */ + + return { + 'href': allow_navigation.attrib.href, + 'minimum_tls_version': minimum_tls_version, + 'requires_forward_secrecy' : requires_forward_secrecy, + 'requires_certificate_transparency' : requires_certificate_transparency + }; + }); + }, + /* Get all the allow-intent tags */ + getAllowIntents: function() { + var allow_intents = this.doc.findall('./allow-intent'); + return allow_intents.map(function(allow_intent){ + return { + 'href': allow_intent.attrib.href + }; + }); + }, + /* Get all edit-config tags */ + getEditConfigs: function(platform) { + var platform_tag = this.doc.find('./platform[@name="' + platform + '"]'); + var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : []; + + var edit_configs = this.doc.findall('edit-config').concat(platform_edit_configs); + + return edit_configs.map(function(tag) { + var editConfig = + { + file : tag.attrib['file'], + target : tag.attrib['target'], + mode : tag.attrib['mode'], + id : 'config.xml', + xmls : tag.getchildren() + }; + return editConfig; + }); + }, + write:function() { + fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8'); + } +}; + +function featureToPlugin(featureElement) { + var plugin = {}; + plugin.variables = []; + var pluginVersion, + pluginSrc; + + var nodes = featureElement.findall('param'); + nodes.forEach(function (element) { + var n = element.attrib.name; + var v = element.attrib.value; + if (n === 'id') { + plugin.name = v; + } else if (n === 'version') { + pluginVersion = v; + } else if (n === 'url' || n === 'installPath') { + pluginSrc = v; + } else { + plugin.variables[n] = v; + } + }); + + var spec = pluginSrc || pluginVersion; + if (spec) { + plugin.spec = spec; + } + + return plugin; +} +module.exports = ConfigParser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/README.md new file mode 100755 index 0000000..e5cd1bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/ConfigParser/README.md @@ -0,0 +1,86 @@ + + +# Cordova-Lib + +## ConfigParser + +wraps a valid cordova config.xml file + +### Usage + +### Include the ConfigParser module in a projet + + var ConfigParser = require('cordova-lib').configparser; + +### Create a new ConfigParser + + var config = new ConfigParser('path/to/config/xml/'); + +### Utility Functions + +#### packageName(id) +returns document root 'id' attribute value +#### Usage + + config.packageName: function(id) + +/* + * sets document root element 'id' attribute to @id + * + * @id - new id value + * + */ +#### setPackageName(id) +set document root 'id' attribute to + function(id) { + this.doc.getroot().attrib['id'] = id; + }, + +### + name: function() { + return getNodeTextSafe(this.doc.find('name')); + }, + setName: function(name) { + var el = findOrCreate(this.doc, 'name'); + el.text = name; + }, + +### read the description element + + config.description() + + var text = "New and improved description of App" + setDescription(text) + +### version management + version() + android_versionCode() + ios_CFBundleVersion() + setVersion() + +### read author element + + config.author(); + +### read preference + + config.getPreference(name); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaCheck.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaCheck.js new file mode 100755 index 0000000..46e733f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaCheck.js @@ -0,0 +1,76 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var fs = require('fs'), + path = require('path'); + +function isRootDir(dir) { + if (fs.existsSync(path.join(dir, 'www'))) { + if (fs.existsSync(path.join(dir, 'config.xml'))) { + // For sure is. + if (fs.existsSync(path.join(dir, 'platforms'))) { + return 2; + } else { + return 1; + } + } + // Might be (or may be under platforms/). + if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) { + return 1; + } + } + return 0; +} + +// Runs up the directory chain looking for a .cordova directory. +// IF it is found we are in a Cordova project. +// Omit argument to use CWD. +function isCordova(dir) { + if (!dir) { + // Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687). + var pwd = process.env.PWD; + var cwd = process.cwd(); + if (pwd && pwd != cwd && pwd != 'undefined') { + return isCordova(pwd) || isCordova(cwd); + } + return isCordova(cwd); + } + var bestReturnValueSoFar = false; + for (var i = 0; i < 1000; ++i) { + var result = isRootDir(dir); + if (result === 2) { + return dir; + } + if (result === 1) { + bestReturnValueSoFar = dir; + } + var parentDir = path.normalize(path.join(dir, '..')); + // Detect fs root. + if (parentDir == dir) { + return bestReturnValueSoFar; + } + dir = parentDir; + } + console.error('Hit an unhandled case in CordovaCheck.isCordova'); + return false; +} + +module.exports = { + findProjectRoot : isCordova +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js new file mode 100755 index 0000000..7262448 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaError.js @@ -0,0 +1,91 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint proto:true */ + +var EOL = require('os').EOL; + +/** + * A derived exception class. See usage example in cli.js + * Based on: + * stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/8460753#8460753 + * @param {String} message Error message + * @param {Number} [code=0] Error code + * @param {CordovaExternalToolErrorContext} [context] External tool error context object + * @constructor + */ +function CordovaError(message, code, context) { + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + this.message = message; + this.code = code || CordovaError.UNKNOWN_ERROR; + this.context = context; +} +CordovaError.prototype.__proto__ = Error.prototype; + +// TODO: Extend error codes according the projects specifics +CordovaError.UNKNOWN_ERROR = 0; +CordovaError.EXTERNAL_TOOL_ERROR = 1; + +/** + * Translates instance's error code number into error code name, e.g. 0 -> UNKNOWN_ERROR + * @returns {string} Error code string name + */ +CordovaError.prototype.getErrorCodeName = function() { + for(var key in CordovaError) { + if(CordovaError.hasOwnProperty(key)) { + if(CordovaError[key] === this.code) { + return key; + } + } + } +}; + +/** + * Converts CordovaError instance to string representation + * @param {Boolean} [isVerbose] Set up verbose mode. Used to provide more + * details including information about error code name and context + * @return {String} Stringified error representation + */ +CordovaError.prototype.toString = function(isVerbose) { + var message = '', codePrefix = ''; + + if(this.code !== CordovaError.UNKNOWN_ERROR) { + codePrefix = 'code: ' + this.code + (isVerbose ? (' (' + this.getErrorCodeName() + ')') : '') + ' '; + } + + if(this.code === CordovaError.EXTERNAL_TOOL_ERROR) { + if(typeof this.context !== 'undefined') { + if(isVerbose) { + message = codePrefix + EOL + this.context.toString(isVerbose) + '\n failed with an error: ' + + this.message + EOL + 'Stack trace: ' + this.stack; + } else { + message = codePrefix + '\'' + this.context.toString(isVerbose) + '\' ' + this.message; + } + } else { + message = 'External tool failed with an error: ' + this.message; + } + } else { + message = isVerbose ? codePrefix + this.stack : codePrefix + this.message; + } + + return message; +}; + +module.exports = CordovaError; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js new file mode 100755 index 0000000..ca9a4aa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js @@ -0,0 +1,48 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +/* jshint proto:true */ + +var path = require('path'); + +/** + * @param {String} cmd Command full path + * @param {String[]} args Command args + * @param {String} [cwd] Command working directory + * @constructor + */ +function CordovaExternalToolErrorContext(cmd, args, cwd) { + this.cmd = cmd; + // Helper field for readability + this.cmdShortName = path.basename(cmd); + this.args = args; + this.cwd = cwd; +} + +CordovaExternalToolErrorContext.prototype.toString = function(isVerbose) { + if(isVerbose) { + return 'External tool \'' + this.cmdShortName + '\'' + + '\nCommand full path: ' + this.cmd + '\nCommand args: ' + this.args + + (typeof this.cwd !== 'undefined' ? '\nCommand cwd: ' + this.cwd : ''); + } + + return this.cmdShortName; +}; + +module.exports = CordovaExternalToolErrorContext; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaLogger.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaLogger.js new file mode 100755 index 0000000..71bc7e8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/CordovaLogger.js @@ -0,0 +1,220 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +var ansi = require('ansi'); +var EventEmitter = require('events').EventEmitter; +var CordovaError = require('./CordovaError/CordovaError'); +var EOL = require('os').EOL; + +var INSTANCE; + +/** + * @class CordovaLogger + * + * Implements logging facility that anybody could use. Should not be + * instantiated directly, `CordovaLogger.get()` method should be used instead + * to acquire logger instance + */ +function CordovaLogger () { + this.levels = {}; + this.colors = {}; + this.stdout = process.stdout; + this.stderr = process.stderr; + + this.stdoutCursor = ansi(this.stdout); + this.stderrCursor = ansi(this.stderr); + + this.addLevel('verbose', 1000, 'grey'); + this.addLevel('normal' , 2000); + this.addLevel('warn' , 2000, 'yellow'); + this.addLevel('info' , 3000, 'blue'); + this.addLevel('error' , 5000, 'red'); + this.addLevel('results' , 10000); + + this.setLevel('normal'); +} + +/** + * Static method to create new or acquire existing instance. + * + * @return {CordovaLogger} Logger instance + */ +CordovaLogger.get = function () { + return INSTANCE || (INSTANCE = new CordovaLogger()); +}; + +CordovaLogger.VERBOSE = 'verbose'; +CordovaLogger.NORMAL = 'normal'; +CordovaLogger.WARN = 'warn'; +CordovaLogger.INFO = 'info'; +CordovaLogger.ERROR = 'error'; +CordovaLogger.RESULTS = 'results'; + +/** + * Emits log message to process' stdout/stderr depending on message's severity + * and current log level. If severity is less than current logger's level, + * then the message is ignored. + * + * @param {String} logLevel The message's log level. The logger should have + * corresponding level added (via logger.addLevel), otherwise + * `CordovaLogger.NORMAL` level will be used. + * @param {String} message The message, that should be logged to process' + * stdio + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.log = function (logLevel, message) { + // if there is no such logLevel defined, or provided level has + // less severity than active level, then just ignore this call and return + if (!this.levels[logLevel] || this.levels[logLevel] < this.levels[this.logLevel]) + // return instance to allow to chain calls + return this; + + var isVerbose = this.logLevel === 'verbose'; + var cursor = this.stdoutCursor; + + if (message instanceof Error || logLevel === CordovaLogger.ERROR) { + message = formatError(message, isVerbose); + cursor = this.stderrCursor; + } + + var color = this.colors[logLevel]; + if (color) { + cursor.bold().fg[color](); + } + + cursor.write(message).reset().write(EOL); + + return this; +}; + +/** + * Adds a new level to logger instance. This method also creates a shortcut + * method to log events with the level provided (i.e. after adding new level + * 'debug', the method `debug(message)`, equal to logger.log('debug', message), + * will be added to logger instance) + * + * @param {String} level A log level name. The levels with the following + * names added by default to every instance: 'verbose', 'normal', 'warn', + * 'info', 'error', 'results' + * @param {Number} severity A number that represents level's severity. + * @param {String} color A valid color name, that will be used to log + * messages with this level. Any CSS color code or RGB value is allowed + * (according to ansi documentation: + * https://github.com/TooTallNate/ansi.js#features) + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.addLevel = function (level, severity, color) { + + this.levels[level] = severity; + + if (color) { + this.colors[level] = color; + } + + // Define own method with corresponding name + if (!this[level]) { + this[level] = this.log.bind(this, level); + } + + return this; +}; + +/** + * Sets the current logger level to provided value. If logger doesn't have level + * with this name, `CordovaLogger.NORMAL` will be used. + * + * @param {String} logLevel Level name. The level with this name should be + * added to logger before. + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.setLevel = function (logLevel) { + this.logLevel = this.levels[logLevel] ? logLevel : CordovaLogger.NORMAL; + + return this; +}; + +/** + * Adjusts the current logger level according to the passed options. + * + * @param {Object|Array} opts An object or args array with options + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.adjustLevel = function (opts) { + if (opts.verbose || (Array.isArray(opts) && opts.indexOf('--verbose') !== -1)) { + this.setLevel('verbose'); + } else if (opts.silent || (Array.isArray(opts) && opts.indexOf('--silent') !== -1)) { + this.setLevel('error'); + } + + return this; +}; + +/** + * Attaches logger to EventEmitter instance provided. + * + * @param {EventEmitter} eventEmitter An EventEmitter instance to attach + * logger to. + * + * @return {CordovaLogger} Current instance, to allow calls chaining. + */ +CordovaLogger.prototype.subscribe = function (eventEmitter) { + + if (!(eventEmitter instanceof EventEmitter)) + throw new Error('Subscribe method only accepts an EventEmitter instance as argument'); + + eventEmitter.on('verbose', this.verbose) + .on('log', this.normal) + .on('info', this.info) + .on('warn', this.warn) + .on('warning', this.warn) + // Set up event handlers for logging and results emitted as events. + .on('results', this.results); + + return this; +}; + +function formatError(error, isVerbose) { + var message = ''; + + if (error instanceof CordovaError) { + message = error.toString(isVerbose); + } else if (error instanceof Error) { + if (isVerbose) { + message = error.stack; + } else { + message = error.message; + } + } else { + // Plain text error message + message = error; + } + + if (typeof message === 'string' && message.toUpperCase().indexOf('ERROR:') !== 0) { + // Needed for backward compatibility with external tools + message = 'Error: ' + message; + } + + return message; +} + +module.exports = CordovaLogger; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/FileUpdater.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/FileUpdater.js new file mode 100755 index 0000000..8b6876b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/FileUpdater.js @@ -0,0 +1,416 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +"use strict"; + +var fs = require("fs"); +var path = require("path"); +var shell = require("shelljs"); +var minimatch = require("minimatch"); + +/** + * Logging callback used in the FileUpdater methods. + * @callback loggingCallback + * @param {string} message A message describing a single file update operation. + */ + +/** + * Updates a target file or directory with a source file or directory. (Directory updates are + * not recursive.) Stats for target and source items must be passed in. This is an internal + * helper function used by other methods in this module. + * + * @param {?string} sourcePath Source file or directory to be used to update the + * destination. If the source is null, then the destination is deleted if it exists. + * @param {?fs.Stats} sourceStats An instance of fs.Stats for the source path, or null if + * the source does not exist. + * @param {string} targetPath Required destination file or directory to be updated. If it does + * not exist, it will be created. + * @param {?fs.Stats} targetStats An instance of fs.Stats for the target path, or null if + * the target does not exist. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log) { + var updated = false; + + var rootDir = (options && options.rootDir) || ""; + var copyAll = (options && options.all) || false; + + var targetFullPath = path.join(rootDir || "", targetPath); + + if (sourceStats) { + var sourceFullPath = path.join(rootDir || "", sourcePath); + + if (targetStats) { + // The target exists. But if the directory status doesn't match the source, delete it. + if (targetStats.isDirectory() && !sourceStats.isDirectory()) { + log("rmdir " + targetPath + " (source is a file)"); + shell.rm("-rf", targetFullPath); + targetStats = null; + updated = true; + } else if (!targetStats.isDirectory() && sourceStats.isDirectory()) { + log("delete " + targetPath + " (source is a directory)"); + shell.rm("-f", targetFullPath); + targetStats = null; + updated = true; + } + } + + if (!targetStats) { + if (sourceStats.isDirectory()) { + // The target directory does not exist, so it should be created. + log("mkdir " + targetPath); + shell.mkdir("-p", targetFullPath); + updated = true; + } else if (sourceStats.isFile()) { + // The target file does not exist, so it should be copied from the source. + log("copy " + sourcePath + " " + targetPath + (copyAll ? "" : " (new file)")); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } + } else if (sourceStats.isFile() && targetStats.isFile()) { + // The source and target paths both exist and are files. + if (copyAll) { + // The caller specified all files should be copied. + log("copy " + sourcePath + " " + targetPath); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } else { + // Copy if the source has been modified since it was copied to the target, or if + // the file sizes are different. (The latter catches most cases in which something + // was done to the file after copying.) Comparison is >= rather than > to allow + // for timestamps lacking sub-second precision in some filesystems. + if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() || + sourceStats.size !== targetStats.size) { + log("copy " + sourcePath + " " + targetPath + " (updated file)"); + shell.cp("-f", sourceFullPath, targetFullPath); + updated = true; + } + } + } + } else if (targetStats) { + // The target exists but the source is null, so the target should be deleted. + if (targetStats.isDirectory()) { + log("rmdir " + targetPath + (copyAll ? "" : " (no source)")); + shell.rm("-rf", targetFullPath); + } else { + log("delete " + targetPath + (copyAll ? "" : " (no source)")); + shell.rm("-f", targetFullPath); + } + updated = true; + } + + return updated; +} + +/** + * Helper for updatePath and updatePaths functions. Queries stats for source and target + * and ensures target directory exists before copying a file. + */ +function updatePathInternal(sourcePath, targetPath, options, log) { + var rootDir = (options && options.rootDir) || ""; + var targetFullPath = path.join(rootDir, targetPath); + var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null; + var sourceStats = null; + + if (sourcePath) { + // A non-null source path was specified. It should exist. + var sourceFullPath = path.join(rootDir, sourcePath); + if (!fs.existsSync(sourceFullPath)) { + throw new Error("Source path does not exist: " + sourcePath); + } + + sourceStats = fs.statSync(sourceFullPath); + + // Create the target's parent directory if it doesn't exist. + var parentDir = path.dirname(targetFullPath); + if (!fs.existsSync(parentDir)) { + shell.mkdir("-p", parentDir); + } + } + + return updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log); +} + +/** + * Updates a target file or directory with a source file or directory. (Directory updates are + * not recursive.) + * + * @param {?string} sourcePath Source file or directory to be used to update the + * destination. If the source is null, then the destination is deleted if it exists. + * @param {string} targetPath Required destination file or directory to be updated. If it does + * not exist, it will be created. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePath(sourcePath, targetPath, options, log) { + if (sourcePath !== null && typeof sourcePath !== "string") { + throw new Error("A source path (or null) is required."); + } + + if (!targetPath || typeof targetPath !== "string") { + throw new Error("A target path is required."); + } + + log = log || function(message) { }; + + return updatePathInternal(sourcePath, targetPath, options, log); +} + +/** + * Updates files and directories based on a mapping from target paths to source paths. Targets + * with null sources in the map are deleted. + * + * @param {Object} pathMap A dictionary mapping from target paths to source paths. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function updatePaths(pathMap, options, log) { + if (!pathMap || typeof pathMap !== "object" || Array.isArray(pathMap)) { + throw new Error("An object mapping from target paths to source paths is required."); + } + + log = log || function(message) { }; + + var updated = false; + + // Iterate in sorted order to ensure directories are created before files under them. + Object.keys(pathMap).sort().forEach(function (targetPath) { + var sourcePath = pathMap[targetPath]; + updated = updatePathInternal(sourcePath, targetPath, options, log) || updated; + }); + + return updated; +} + +/** + * Updates a target directory with merged files and subdirectories from source directories. + * + * @param {string|string[]} sourceDirs Required source directory or array of source directories + * to be merged into the target. The directories are listed in order of precedence; files in + * directories later in the array supersede files in directories earlier in the array + * (regardless of timestamps). + * @param {string} targetDir Required destination directory to be updated. If it does not exist, + * it will be created. If it exists, newer files from source directories will be copied over, + * and files missing in the source directories will be deleted. + * @param {Object} [options] Optional additional parameters for the update. + * @param {string} [options.rootDir] Optional root directory (such as a project) to which target + * and source path parameters are relative; may be omitted if the paths are absolute. The + * rootDir is always omitted from any logged paths, to make the logs easier to read. + * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. + * Otherwise, a file is copied if the source's last-modified time is greather than or + * equal to the target's last-modified time, or if the file sizes are different. + * @param {string|string[]} [options.include] Optional glob string or array of glob strings that + * are tested against both target and source relative paths to determine if they are included + * in the merge-and-update. If unspecified, all items are included. + * @param {string|string[]} [options.exclude] Optional glob string or array of glob strings that + * are tested against both target and source relative paths to determine if they are excluded + * from the merge-and-update. Exclusions override inclusions. If unspecified, no items are + * excluded. + * @param {loggingCallback} [log] Optional logging callback that takes a string message + * describing any file operations that are performed. + * @return {boolean} true if any changes were made, or false if the force flag is not set + * and everything was up to date + */ +function mergeAndUpdateDir(sourceDirs, targetDir, options, log) { + if (sourceDirs && typeof sourceDirs === "string") { + sourceDirs = [ sourceDirs ]; + } else if (!Array.isArray(sourceDirs)) { + throw new Error("A source directory path or array of paths is required."); + } + + if (!targetDir || typeof targetDir !== "string") { + throw new Error("A target directory path is required."); + } + + log = log || function(message) { }; + + var rootDir = (options && options.rootDir) || ""; + + var include = (options && options.include) || [ "**" ]; + if (typeof include === "string") { + include = [ include ]; + } else if (!Array.isArray(include)) { + throw new Error("Include parameter must be a glob string or array of glob strings."); + } + + var exclude = (options && options.exclude) || []; + if (typeof exclude === "string") { + exclude = [ exclude ]; + } else if (!Array.isArray(exclude)) { + throw new Error("Exclude parameter must be a glob string or array of glob strings."); + } + + // Scan the files in each of the source directories. + var sourceMaps = sourceDirs.map(function (sourceDir) { + return path.join(rootDir, sourceDir); + }).map(function (sourcePath) { + if (!fs.existsSync(sourcePath)) { + throw new Error("Source directory does not exist: " + sourcePath); + } + return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude); + }); + + // Scan the files in the target directory, if it exists. + var targetMap = {}; + var targetFullPath = path.join(rootDir, targetDir); + if (fs.existsSync(targetFullPath)) { + targetMap = mapDirectory(rootDir, targetDir, include, exclude); + } + + var pathMap = mergePathMaps(sourceMaps, targetMap, targetDir); + + var updated = false; + + // Iterate in sorted order to ensure directories are created before files under them. + Object.keys(pathMap).sort().forEach(function (subPath) { + var entry = pathMap[subPath]; + updated = updatePathWithStats( + entry.sourcePath, + entry.sourceStats, + entry.targetPath, + entry.targetStats, + options, + log) || updated; + }); + + return updated; +} + +/** + * Creates a dictionary map of all files and directories under a path. + */ +function mapDirectory(rootDir, subDir, include, exclude) { + var dirMap = { "": { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } }; + mapSubdirectory(rootDir, subDir, "", include, exclude, dirMap); + return dirMap; + + function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) { + var itemMapped = false; + var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir)); + + items.forEach(function(item) { + var relativePath = path.join(relativeDir, item); + if(!matchGlobArray(relativePath, exclude)) { + // Stats obtained here (required at least to know where to recurse in directories) + // are saved for later, where the modified times may also be used. This minimizes + // the number of file I/O operations performed. + var fullPath = path.join(rootDir, subDir, relativePath); + var stats = fs.statSync(fullPath); + + if (stats.isDirectory()) { + // Directories are included if either something under them is included or they + // match an include glob. + if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) || + matchGlobArray(relativePath, include)) { + dirMap[relativePath] = { subDir: subDir, stats: stats }; + itemMapped = true; + } + } else if (stats.isFile()) { + // Files are included only if they match an include glob. + if (matchGlobArray(relativePath, include)) { + dirMap[relativePath] = { subDir: subDir, stats: stats }; + itemMapped = true; + } + } + } + }); + return itemMapped; + } + + function matchGlobArray(path, globs) { + return globs.some(function(elem) { + return minimatch(path, elem, {dot:true}); + }); + } +} + +/** + * Merges together multiple source maps and a target map into a single mapping from + * relative paths to objects with target and source paths and stats. + */ +function mergePathMaps(sourceMaps, targetMap, targetDir) { + // Merge multiple source maps together, along with target path info. + // Entries in later source maps override those in earlier source maps. + // Target stats will be filled in below for targets that exist. + var pathMap = {}; + sourceMaps.forEach(function (sourceMap) { + Object.keys(sourceMap).forEach(function(sourceSubPath){ + var sourceEntry = sourceMap[sourceSubPath]; + pathMap[sourceSubPath] = { + targetPath: path.join(targetDir, sourceSubPath), + targetStats: null, + sourcePath: path.join(sourceEntry.subDir, sourceSubPath), + sourceStats: sourceEntry.stats + }; + }); + }); + + // Fill in target stats for targets that exist, and create entries + // for targets that don't have any corresponding sources. + Object.keys(targetMap).forEach(function(subPath){ + var entry = pathMap[subPath]; + if (entry) { + entry.targetStats = targetMap[subPath].stats; + } else { + pathMap[subPath] = { + targetPath: path.join(targetDir, subPath), + targetStats: targetMap[subPath].stats, + sourcePath: null, + sourceStats: null + }; + } + }); + + return pathMap; +} + +module.exports = { + updatePath: updatePath, + updatePaths: updatePaths, + mergeAndUpdateDir: mergeAndUpdateDir +}; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PlatformJson.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PlatformJson.js new file mode 100755 index 0000000..ab94b5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PlatformJson.js @@ -0,0 +1,278 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +/* jshint sub:true */ + +var fs = require('fs'); +var path = require('path'); +var shelljs = require('shelljs'); +var mungeutil = require('./ConfigChanges/munge-util'); +var pluginMappernto = require('cordova-registry-mapper').newToOld; +var pluginMapperotn = require('cordova-registry-mapper').oldToNew; + +function PlatformJson(filePath, platform, root) { + this.filePath = filePath; + this.platform = platform; + this.root = fix_munge(root || {}); +} + +PlatformJson.load = function(plugins_dir, platform) { + var filePath = path.join(plugins_dir, platform + '.json'); + var root = null; + if (fs.existsSync(filePath)) { + root = JSON.parse(fs.readFileSync(filePath, 'utf-8')); + } + return new PlatformJson(filePath, platform, root); +}; + +PlatformJson.prototype.save = function() { + shelljs.mkdir('-p', path.dirname(this.filePath)); + fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 4), 'utf-8'); +}; + +/** + * Indicates whether the specified plugin is installed as a top-level (not as + * dependency to others) + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed as top-level, otherwise false. + */ +PlatformJson.prototype.isPluginTopLevel = function(pluginId) { + var installedPlugins = this.root.installed_plugins; + return installedPlugins[pluginId] || + installedPlugins[pluginMappernto[pluginId]] || + installedPlugins[pluginMapperotn[pluginId]]; +}; + +/** + * Indicates whether the specified plugin is installed as a dependency to other + * plugin. + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed as a dependency, otherwise false. + */ +PlatformJson.prototype.isPluginDependent = function(pluginId) { + var dependentPlugins = this.root.dependent_plugins; + return dependentPlugins[pluginId] || + dependentPlugins[pluginMappernto[pluginId]] || + dependentPlugins[pluginMapperotn[pluginId]]; +}; + +/** + * Indicates whether plugin is installed either as top-level or as dependency. + * @method function + * @param {String} pluginId A plugin id to check for. + * @return {Boolean} true if plugin installed, otherwise false. + */ +PlatformJson.prototype.isPluginInstalled = function(pluginId) { + return this.isPluginTopLevel(pluginId) || + this.isPluginDependent(pluginId); +}; + +PlatformJson.prototype.addPlugin = function(pluginId, variables, isTopLevel) { + var pluginsList = isTopLevel ? + this.root.installed_plugins : + this.root.dependent_plugins; + + pluginsList[pluginId] = variables; + + return this; +}; + +/** + * @chaining + * Generates and adds metadata for provided plugin into associated .json file + * + * @param {PluginInfo} pluginInfo A pluginInfo instance to add metadata from + * @returns {this} Current PlatformJson instance to allow calls chaining + */ +PlatformJson.prototype.addPluginMetadata = function (pluginInfo) { + + var installedModules = this.root.modules || []; + + var installedPaths = installedModules.map(function (installedModule) { + return installedModule.file; + }); + + var modulesToInstall = pluginInfo.getJsModules(this.platform) + .map(function (module) { + return new ModuleMetadata(pluginInfo.id, module); + }) + .filter(function (metadata) { + // Filter out modules which are already added to metadata + return installedPaths.indexOf(metadata.file) === -1; + }); + + this.root.modules = installedModules.concat(modulesToInstall); + + this.root.plugin_metadata = this.root.plugin_metadata || {}; + this.root.plugin_metadata[pluginInfo.id] = pluginInfo.version; + + return this; +}; + +PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) { + var pluginsList = isTopLevel ? + this.root.installed_plugins : + this.root.dependent_plugins; + + delete pluginsList[pluginId]; + + return this; +}; + +/** + * @chaining + * Removes metadata for provided plugin from associated file + * + * @param {PluginInfo} pluginInfo A PluginInfo instance to which modules' metadata + * we need to remove + * + * @returns {this} Current PlatformJson instance to allow calls chaining + */ +PlatformJson.prototype.removePluginMetadata = function (pluginInfo) { + var modulesToRemove = pluginInfo.getJsModules(this.platform) + .map(function (jsModule) { + return ['plugins', pluginInfo.id, jsModule.src].join('/'); + }); + + var installedModules = this.root.modules || []; + this.root.modules = installedModules + .filter(function (installedModule) { + // Leave only those metadatas which 'file' is not in removed modules + return (modulesToRemove.indexOf(installedModule.file) === -1); + }); + + if (this.root.plugin_metadata) { + delete this.root.plugin_metadata[pluginInfo.id]; + } + + return this; +}; + +PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level, force) { + this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level, 'force':force}); +}; + +PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, is_top_level) { + this.root.prepare_queue.uninstalled.push({'plugin':pluginId, 'id':pluginId, 'topLevel':is_top_level}); +}; + +/** + * Moves plugin, specified by id to top-level plugins. If plugin is top-level + * already, then does nothing. + * @method function + * @param {String} pluginId A plugin id to make top-level. + * @return {PlatformJson} PlatformJson instance. + */ +PlatformJson.prototype.makeTopLevel = function(pluginId) { + var plugin = this.root.dependent_plugins[pluginId]; + if (plugin) { + delete this.root.dependent_plugins[pluginId]; + this.root.installed_plugins[pluginId] = plugin; + } + return this; +}; + +/** + * Generates a metadata for all installed plugins and js modules. The resultant + * string is ready to be written to 'cordova_plugins.js' + * + * @returns {String} cordova_plugins.js contents + */ +PlatformJson.prototype.generateMetadata = function () { + return [ + 'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {', + 'module.exports = ' + JSON.stringify(this.root.modules, null, 4) + ';', + 'module.exports.metadata = ', + '// TOP OF METADATA', + JSON.stringify(this.root.plugin_metadata, null, 4) + ';', + '// BOTTOM OF METADATA', + '});' // Close cordova.define. + ].join('\n'); +}; + +/** + * @chaining + * Generates and then saves metadata to specified file. Doesn't check if file exists. + * + * @param {String} destination File metadata will be written to + * @return {PlatformJson} PlatformJson instance + */ +PlatformJson.prototype.generateAndSaveMetadata = function (destination) { + var meta = this.generateMetadata(); + shelljs.mkdir('-p', path.dirname(destination)); + fs.writeFileSync(destination, meta, 'utf-8'); + + return this; +}; + +// convert a munge from the old format ([file][parent][xml] = count) to the current one +function fix_munge(root) { + root.prepare_queue = root.prepare_queue || {installed:[], uninstalled:[]}; + root.config_munge = root.config_munge || {files: {}}; + root.installed_plugins = root.installed_plugins || {}; + root.dependent_plugins = root.dependent_plugins || {}; + + var munge = root.config_munge; + if (!munge.files) { + var new_munge = { files: {} }; + for (var file in munge) { + for (var selector in munge[file]) { + for (var xml_child in munge[file][selector]) { + var val = parseInt(munge[file][selector][xml_child]); + for (var i = 0; i < val; i++) { + mungeutil.deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]); + } + } + } + } + root.config_munge = new_munge; + } + + return root; +} + +/** + * @constructor + * @class ModuleMetadata + * + * Creates a ModuleMetadata object that represents module entry in 'cordova_plugins.js' + * file at run time + * + * @param {String} pluginId Plugin id where this module installed from + * @param (JsModule|Object) jsModule A js-module entry from PluginInfo class to generate metadata for + */ +function ModuleMetadata (pluginId, jsModule) { + + if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id'); + if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties'); + + this.id = pluginId + '.' + ( jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1] ); + this.file = ['plugins', pluginId, jsModule.src].join('/'); + this.pluginId = pluginId; + + if (jsModule.clobbers && jsModule.clobbers.length > 0) { + this.clobbers = jsModule.clobbers.map(function(o) { return o.target; }); + } + if (jsModule.merges && jsModule.merges.length > 0) { + this.merges = jsModule.merges.map(function(o) { return o.target; }); + } + if (jsModule.runs) { + this.runs = true; + } +} + +module.exports = PlatformJson; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js new file mode 100755 index 0000000..0be0c41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js @@ -0,0 +1,423 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true, laxcomma:true, laxbreak:true */ + +/* +A class for holidng the information currently stored in plugin.xml +It should also be able to answer questions like whether the plugin +is compatible with a given engine version. + +TODO (kamrik): refactor this to not use sync functions and return promises. +*/ + + +var path = require('path') + , fs = require('fs') + , xml_helpers = require('../util/xml-helpers') + , CordovaError = require('../CordovaError/CordovaError') + ; + +function PluginInfo(dirname) { + var self = this; + + // METHODS + // Defined inside the constructor to avoid the "this" binding problems. + + // tag + // Example: + // Used to require a variable to be specified via --variable when installing the plugin. + // returns { key : default | null} + self.getPreferences = getPreferences; + function getPreferences(platform) { + return _getTags(self._et, 'preference', platform, _parsePreference) + .reduce(function (preferences, pref) { + preferences[pref.preference] = pref.default; + return preferences; + }, {}); + } + + function _parsePreference(prefTag) { + var name = prefTag.attrib.name.toUpperCase(); + var def = prefTag.attrib.default || null; + return {preference: name, default: def}; + } + + // + self.getAssets = getAssets; + function getAssets(platform) { + var assets = _getTags(self._et, 'asset', platform, _parseAsset); + return assets; + } + + function _parseAsset(tag) { + var src = tag.attrib.src; + var target = tag.attrib.target; + + if ( !src || !target) { + var msg = + 'Malformed tag. Both "src" and "target" attributes' + + 'must be specified in\n' + + self.filepath + ; + throw new Error(msg); + } + + var asset = { + itemType: 'asset', + src: src, + target: target + }; + return asset; + } + + + // + // Example: + // + self.getDependencies = getDependencies; + function getDependencies(platform) { + var deps = _getTags( + self._et, + 'dependency', + platform, + _parseDependency + ); + return deps; + } + + function _parseDependency(tag) { + var dep = + { id : tag.attrib.id + , url : tag.attrib.url || '' + , subdir : tag.attrib.subdir || '' + , commit : tag.attrib.commit + }; + + dep.git_ref = dep.commit; + + if ( !dep.id ) { + var msg = + ' tag is missing id attribute in ' + + self.filepath + ; + throw new CordovaError(msg); + } + return dep; + } + + + // tag + self.getConfigFiles = getConfigFiles; + function getConfigFiles(platform) { + var configFiles = _getTags(self._et, 'config-file', platform, _parseConfigFile); + return configFiles; + } + + function _parseConfigFile(tag) { + var configFile = + { target : tag.attrib['target'] + , parent : tag.attrib['parent'] + , after : tag.attrib['after'] + , xmls : tag.getchildren() + // To support demuxing via versions + , versions : tag.attrib['versions'] + , deviceTarget: tag.attrib['device-target'] + }; + return configFile; + } + + self.getEditConfigs = getEditConfigs; + function getEditConfigs(platform) { + var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs); + return editConfigs; + } + + function _parseEditConfigs(tag) { + var editConfig = + { file : tag.attrib['file'] + , target : tag.attrib['target'] + , mode : tag.attrib['mode'] + , xmls : tag.getchildren() + }; + return editConfig; + } + + // tags, both global and within a + // TODO (kamrik): Do we ever use under ? Example wanted. + self.getInfo = getInfo; + function getInfo(platform) { + var infos = _getTags( + self._et, + 'info', + platform, + function(elem) { return elem.text; } + ); + // Filter out any undefined or empty strings. + infos = infos.filter(Boolean); + return infos; + } + + // + // Examples: + // + // + self.getSourceFiles = getSourceFiles; + function getSourceFiles(platform) { + var sourceFiles = _getTagsInPlatform(self._et, 'source-file', platform, _parseSourceFile); + return sourceFiles; + } + + function _parseSourceFile(tag) { + return { + itemType: 'source-file', + src: tag.attrib.src, + framework: isStrTrue(tag.attrib.framework), + weak: isStrTrue(tag.attrib.weak), + compilerFlags: tag.attrib['compiler-flags'], + targetDir: tag.attrib['target-dir'] + }; + } + + // + // Example: + // + self.getHeaderFiles = getHeaderFiles; + function getHeaderFiles(platform) { + var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function(tag) { + return { + itemType: 'header-file', + src: tag.attrib.src, + targetDir: tag.attrib['target-dir'] + }; + }); + return headerFiles; + } + + // + // Example: + // + self.getResourceFiles = getResourceFiles; + function getResourceFiles(platform) { + var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function(tag) { + return { + itemType: 'resource-file', + src: tag.attrib.src, + target: tag.attrib.target, + versions: tag.attrib.versions, + deviceTarget: tag.attrib['device-target'], + arch: tag.attrib.arch + }; + }); + return resourceFiles; + } + + // + // Example: + // + self.getLibFiles = getLibFiles; + function getLibFiles(platform) { + var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function(tag) { + return { + itemType: 'lib-file', + src: tag.attrib.src, + arch: tag.attrib.arch, + Include: tag.attrib.Include, + versions: tag.attrib.versions, + deviceTarget: tag.attrib['device-target'] || tag.attrib.target + }; + }); + return libFiles; + } + + // + // Example: + // + self.getHookScripts = getHookScripts; + function getHookScripts(hook, platforms) { + var scriptElements = self._et.findall('./hook'); + + if(platforms) { + platforms.forEach(function (platform) { + scriptElements = scriptElements.concat(self._et.findall('./platform[@name="' + platform + '"]/hook')); + }); + } + + function filterScriptByHookType(el) { + return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; + } + + return scriptElements.filter(filterScriptByHookType); + } + + self.getJsModules = getJsModules; + function getJsModules(platform) { + var modules = _getTags(self._et, 'js-module', platform, _parseJsModule); + return modules; + } + + function _parseJsModule(tag) { + var ret = { + itemType: 'js-module', + name: tag.attrib.name, + src: tag.attrib.src, + clobbers: tag.findall('clobbers').map(function(tag) { return { target: tag.attrib.target }; }), + merges: tag.findall('merges').map(function(tag) { return { target: tag.attrib.target }; }), + runs: tag.findall('runs').length > 0 + }; + + return ret; + } + + self.getEngines = function() { + return self._et.findall('engines/engine').map(function(n) { + return { + name: n.attrib.name, + version: n.attrib.version, + platform: n.attrib.platform, + scriptSrc: n.attrib.scriptSrc + }; + }); + }; + + self.getPlatforms = function() { + return self._et.findall('platform').map(function(n) { + return { name: n.attrib.name }; + }); + }; + + self.getPlatformsArray = function() { + return self._et.findall('platform').map(function(n) { + return n.attrib.name; + }); + }; + self.getFrameworks = function(platform) { + return _getTags(self._et, 'framework', platform, function(el) { + var ret = { + itemType: 'framework', + type: el.attrib.type, + parent: el.attrib.parent, + custom: isStrTrue(el.attrib.custom), + src: el.attrib.src, + spec: el.attrib.spec, + weak: isStrTrue(el.attrib.weak), + versions: el.attrib.versions, + targetDir: el.attrib['target-dir'], + deviceTarget: el.attrib['device-target'] || el.attrib.target, + arch: el.attrib.arch + }; + return ret; + }); + }; + + self.getFilesAndFrameworks = getFilesAndFrameworks; + function getFilesAndFrameworks(platform) { + // Please avoid changing the order of the calls below, files will be + // installed in this order. + var items = [].concat( + self.getSourceFiles(platform), + self.getHeaderFiles(platform), + self.getResourceFiles(platform), + self.getFrameworks(platform), + self.getLibFiles(platform) + ); + return items; + } + ///// End of PluginInfo methods ///// + + + ///// PluginInfo Constructor logic ///// + self.filepath = path.join(dirname, 'plugin.xml'); + if (!fs.existsSync(self.filepath)) { + throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.'); + } + + self.dir = dirname; + var et = self._et = xml_helpers.parseElementtreeSync(self.filepath); + var pelem = et.getroot(); + self.id = pelem.attrib.id; + self.version = pelem.attrib.version; + + // Optional fields + self.name = pelem.findtext('name'); + self.description = pelem.findtext('description'); + self.license = pelem.findtext('license'); + self.repo = pelem.findtext('repo'); + self.issue = pelem.findtext('issue'); + self.keywords = pelem.findtext('keywords'); + self.info = pelem.findtext('info'); + if (self.keywords) { + self.keywords = self.keywords.split(',').map( function(s) { return s.trim(); } ); + } + self.getKeywordsAndPlatforms = function () { + var ret = self.keywords || []; + return ret.concat('ecosystem:cordova').concat(addCordova(self.getPlatformsArray())); + }; +} // End of PluginInfo constructor. + +// Helper function used to prefix every element of an array with cordova- +// Useful when we want to modify platforms to be cordova-platform +function addCordova(someArray) { + var newArray = someArray.map(function(element) { + return 'cordova-' + element; + }); + return newArray; +} + +// Helper function used by most of the getSomething methods of PluginInfo. +// Get all elements of a given name. Both in root and in platform sections +// for the given platform. If transform is given and is a function, it is +// applied to each element. +function _getTags(pelem, tag, platform, transform) { + var platformTag = pelem.find('./platform[@name="' + platform + '"]'); + var tagsInRoot = pelem.findall(tag); + tagsInRoot = tagsInRoot || []; + var tagsInPlatform = platformTag ? platformTag.findall(tag) : []; + var tags = tagsInRoot.concat(tagsInPlatform); + if ( typeof transform === 'function' ) { + tags = tags.map(transform); + } + return tags; +} + +// Same as _getTags() but only looks inside a platform section. +function _getTagsInPlatform(pelem, tag, platform, transform) { + var platformTag = pelem.find('./platform[@name="' + platform + '"]'); + var tags = platformTag ? platformTag.findall(tag) : []; + if ( typeof transform === 'function' ) { + tags = tags.map(transform); + } + return tags; +} + +// Check if x is a string 'true'. +function isStrTrue(x) { + return String(x).toLowerCase() == 'true'; +} + +module.exports = PluginInfo; +// Backwards compat: +PluginInfo.PluginInfo = PluginInfo; +PluginInfo.loadPluginsDir = function(dir) { + var PluginInfoProvider = require('./PluginInfoProvider'); + return new PluginInfoProvider().getAllWithinSearchPath(dir); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js new file mode 100755 index 0000000..6240119 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js @@ -0,0 +1,82 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +/* jshint sub:true, laxcomma:true, laxbreak:true */ + +var fs = require('fs'); +var path = require('path'); +var PluginInfo = require('./PluginInfo'); +var events = require('../events'); + +function PluginInfoProvider() { + this._cache = {}; + this._getAllCache = {}; +} + +PluginInfoProvider.prototype.get = function(dirName) { + var absPath = path.resolve(dirName); + if (!this._cache[absPath]) { + this._cache[absPath] = new PluginInfo(dirName); + } + return this._cache[absPath]; +}; + +// Normally you don't need to put() entries, but it's used +// when copying plugins, and in unit tests. +PluginInfoProvider.prototype.put = function(pluginInfo) { + var absPath = path.resolve(pluginInfo.dir); + this._cache[absPath] = pluginInfo; +}; + +// Used for plugin search path processing. +// Given a dir containing multiple plugins, create a PluginInfo object for +// each of them and return as array. +// Should load them all in parallel and return a promise, but not yet. +PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) { + var absPath = path.resolve(dirName); + if (!this._getAllCache[absPath]) { + this._getAllCache[absPath] = getAllHelper(absPath, this); + } + return this._getAllCache[absPath]; +}; + +function getAllHelper(absPath, provider) { + if (!fs.existsSync(absPath)){ + return []; + } + // If dir itself is a plugin, return it in an array with one element. + if (fs.existsSync(path.join(absPath, 'plugin.xml'))) { + return [provider.get(absPath)]; + } + var subdirs = fs.readdirSync(absPath); + var plugins = []; + subdirs.forEach(function(subdir) { + var d = path.join(absPath, subdir); + if (fs.existsSync(path.join(d, 'plugin.xml'))) { + try { + plugins.push(provider.get(d)); + } catch (e) { + events.emit('warn', 'Error parsing ' + path.join(d, 'plugin.xml.\n' + e.stack)); + } + } + }); + return plugins; +} + +module.exports = PluginInfoProvider; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js new file mode 100755 index 0000000..e8968f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js @@ -0,0 +1,152 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); + +var ActionStack = require('./ActionStack'); +var PlatformJson = require('./PlatformJson'); +var CordovaError = require('./CordovaError/CordovaError'); +var PlatformMunger = require('./ConfigChanges/ConfigChanges').PlatformMunger; +var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider'); + +/** + * @constructor + * @class PluginManager + * Represents an entity for adding/removing plugins for platforms + * + * @param {String} platform Platform name + * @param {Object} locations - Platform files and directories + * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from + */ +function PluginManager(platform, locations, ideProject) { + this.platform = platform; + this.locations = locations; + this.project = ideProject; + + var platformJson = PlatformJson.load(locations.root, platform); + this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider()); +} + + +/** + * @constructs PluginManager + * A convenience shortcut to new PluginManager(...) + * + * @param {String} platform Platform name + * @param {Object} locations - Platform files and directories + * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from + * @returns new PluginManager instance + */ +PluginManager.get = function(platform, locations, ideProject) { + return new PluginManager(platform, locations, ideProject); +}; + +PluginManager.INSTALL = 'install'; +PluginManager.UNINSTALL = 'uninstall'; + +module.exports = PluginManager; + +/** + * Describes and implements common plugin installation/uninstallation routine. The flow is the following: + * * Validate and set defaults for options. Note that options are empty by default. Everything + * needed for platform IDE project must be passed from outside. Plugin variables (which + * are the part of the options) also must be already populated with 'PACKAGE_NAME' variable. + * * Collect all plugin's native and web files, get installers/uninstallers and process + * all these via ActionStack. + * * Save the IDE project, so the changes made by installers are persisted. + * * Generate config changes munge for plugin and apply it to all required files + * * Generate metadata for plugin and plugin modules and save it to 'cordova_plugins.js' + * + * @param {PluginInfo} plugin A PluginInfo structure representing plugin to install + * @param {Object} [options={}] An installation options. It is expected but is not necessary + * that options would contain 'variables' inner object with 'PACKAGE_NAME' field set by caller. + * + * @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise. + */ +PluginManager.prototype.doOperation = function (operation, plugin, options) { + if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL) + return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"')); + + if (!plugin || plugin.constructor.name !== 'PluginInfo') + return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance')); + + // Set default to empty object to play safe when accesing properties + options = options || {}; + + var self = this; + var actions = new ActionStack(); + + // gather all files need to be handled during operation ... + plugin.getFilesAndFrameworks(this.platform) + .concat(plugin.getAssets(this.platform)) + .concat(plugin.getJsModules(this.platform)) + // ... put them into stack ... + .forEach(function(item) { + var installer = self.project.getInstaller(item.itemType); + var uninstaller = self.project.getUninstaller(item.itemType); + var actionArgs = [item, plugin, self.project, options]; + + var action; + if (operation === PluginManager.INSTALL) { + action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]); + } else /* op === PluginManager.UNINSTALL */{ + action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]); + } + actions.push(action); + }); + + // ... and run through the action stack + return actions.process(this.platform) + .then(function () { + if (self.project.write) { + self.project.write(); + } + + if (operation === PluginManager.INSTALL) { + // Ignore passed `is_top_level` option since platform itself doesn't know + // anything about managing dependencies - it's responsibility of caller. + self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true, options.force); + self.munger.platformJson.addPluginMetadata(plugin); + } else { + self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true); + self.munger.platformJson.removePluginMetadata(plugin); + } + + // Save everything (munge and plugin/modules metadata) + self.munger.save_all(); + + var metadata = self.munger.platformJson.generateMetadata(); + fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8'); + + // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified + if (options.usePlatformWww) { + fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8'); + } + }); +}; + +PluginManager.prototype.addPlugin = function (plugin, installOptions) { + return this.doOperation(PluginManager.INSTALL, plugin, installOptions); +}; + +PluginManager.prototype.removePlugin = function (plugin, uninstallOptions) { + return this.doOperation(PluginManager.UNINSTALL, plugin, uninstallOptions); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/events.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/events.js new file mode 100755 index 0000000..e702bd8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/events.js @@ -0,0 +1,72 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var EventEmitter = require('events').EventEmitter; + +var INSTANCE = new EventEmitter(); +var EVENTS_RECEIVER; + +module.exports = INSTANCE; + +/** + * Sets up current instance to forward emitted events to another EventEmitter + * instance. + * + * @param {EventEmitter} [eventEmitter] The emitter instance to forward + * events to. Falsy value, when passed, disables forwarding. + */ +module.exports.forwardEventsTo = function (eventEmitter) { + + // If no argument is specified disable events forwarding + if (!eventEmitter) { + EVENTS_RECEIVER = undefined; + return; + } + + if (!(eventEmitter instanceof EventEmitter)) + throw new Error('Cordova events can be redirected to another EventEmitter instance only'); + + // CB-10940 Skipping forwarding to self to avoid infinite recursion. + // This is the case when the modules are npm-linked. + if (this !== eventEmitter) { + EVENTS_RECEIVER = eventEmitter; + } else { + // Reset forwarding if we are subscribing to self + EVENTS_RECEIVER = undefined; + } +}; + +var emit = INSTANCE.emit; + +/** + * This method replaces original 'emit' method to allow events forwarding. + * + * @return {eventEmitter} Current instance to allow calls chaining, as + * original 'emit' does + */ +module.exports.emit = function () { + + var args = Array.prototype.slice.call(arguments); + + if (EVENTS_RECEIVER) { + EVENTS_RECEIVER.emit.apply(EVENTS_RECEIVER, args); + } + + return emit.apply(this, args); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js new file mode 100755 index 0000000..a3f1431 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js @@ -0,0 +1,184 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var child_process = require('child_process'); +var fs = require('fs'); +var path = require('path'); +var _ = require('underscore'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('./events'); +var iswin32 = process.platform == 'win32'; + +// On Windows, spawn() for batch files requires absolute path & having the extension. +function resolveWindowsExe(cmd) { + var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs']; + function isValidExe(c) { + return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c); + } + if (isValidExe(cmd)) { + return cmd; + } + cmd = shell.which(cmd) || cmd; + if (!isValidExe(cmd)) { + winExtensions.some(function(ext) { + if (fs.existsSync(cmd + ext)) { + cmd = cmd + ext; + return true; + } + }); + } + return cmd; +} + +function maybeQuote(a) { + if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"'; + return a; +} + +/** + * A special implementation for child_process.spawn that handles + * Windows-specific issues with batch files and spaces in paths. Returns a + * promise that succeeds only for return code 0. It is also possible to + * subscribe on spawned process' stdout and stderr streams using progress + * handler for resultant promise. + * + * @example spawn('mycommand', [], {stdio: 'pipe'}) .progress(function (stdio){ + * if (stdio.stderr) { console.error(stdio.stderr); } }) + * .then(function(result){ // do other stuff }) + * + * @param {String} cmd A command to spawn + * @param {String[]} [args=[]] An array of arguments, passed to spawned + * process + * @param {Object} [opts={}] A configuration object + * @param {String|String[]|Object} opts.stdio Property that configures how + * spawned process' stdio will behave. Has the same meaning and possible + * values as 'stdio' options for child_process.spawn method + * (https://nodejs.org/api/child_process.html#child_process_options_stdio). + * @param {Object} [env={}] A map of extra environment variables + * @param {String} [cwd=process.cwd()] Working directory for the command + * @param {Boolean} [chmod=false] If truthy, will attempt to set the execute + * bit before executing on non-Windows platforms + * + * @return {Promise} A promise that is either fulfilled if the spawned + * process is exited with zero error code or rejected otherwise. If the + * 'stdio' option set to 'default' or 'pipe', the promise also emits progress + * messages with the following contents: + * { + * 'stdout': ..., + * 'stderr': ... + * } + */ +exports.spawn = function(cmd, args, opts) { + args = args || []; + opts = opts || {}; + var spawnOpts = {}; + var d = Q.defer(); + + if (iswin32) { + cmd = resolveWindowsExe(cmd); + // If we couldn't find the file, likely we'll end up failing, + // but for things like "del", cmd will do the trick. + if (path.extname(cmd) != '.exe') { + var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"'; + // We need to use /s to ensure that spaces are parsed properly with cmd spawned content + args = [['/s', '/c', cmdArgs].join(' ')]; + cmd = 'cmd'; + spawnOpts.windowsVerbatimArguments = true; + } else if (!fs.existsSync(cmd)) { + // We need to use /s to ensure that spaces are parsed properly with cmd spawned content + args = ['/s', '/c', cmd].concat(args).map(maybeQuote); + } + } + + if (opts.stdio !== 'default') { + // Ignore 'default' value for stdio because it corresponds to child_process's default 'pipe' option + spawnOpts.stdio = opts.stdio; + } + + if (opts.cwd) { + spawnOpts.cwd = opts.cwd; + } + + if (opts.env) { + spawnOpts.env = _.extend(_.extend({}, process.env), opts.env); + } + + if (opts.chmod && !iswin32) { + try { + // This fails when module is installed in a system directory (e.g. via sudo npm install) + fs.chmodSync(cmd, '755'); + } catch (e) { + // If the perms weren't set right, then this will come as an error upon execution. + } + } + + events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' ')); + + var child = child_process.spawn(cmd, args, spawnOpts); + var capturedOut = ''; + var capturedErr = ''; + + if (child.stdout) { + child.stdout.setEncoding('utf8'); + child.stdout.on('data', function(data) { + capturedOut += data; + d.notify({'stdout': data}); + }); + } + + if (child.stderr) { + child.stderr.setEncoding('utf8'); + child.stderr.on('data', function(data) { + capturedErr += data; + d.notify({'stderr': data}); + }); + } + + child.on('close', whenDone); + child.on('error', whenDone); + function whenDone(arg) { + child.removeListener('close', whenDone); + child.removeListener('error', whenDone); + var code = typeof arg == 'number' ? arg : arg && arg.code; + + events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args); + if (code === 0) { + d.resolve(capturedOut.trim()); + } else { + var errMsg = cmd + ': Command failed with exit code ' + code; + if (capturedErr) { + errMsg += ' Error output:\n' + capturedErr.trim(); + } + var err = new Error(errMsg); + err.code = code; + d.reject(err); + } + } + + return d.promise; +}; + +exports.maybeSpawn = function(cmd, args, opts) { + if (fs.existsSync(cmd)) { + return exports.spawn(cmd, args, opts); + } + return Q(null); +}; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/addProperty.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/addProperty.js new file mode 100755 index 0000000..7dc4dc1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/addProperty.js @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +module.exports = function addProperty(module, property, modulePath, obj) { + + obj = obj || module.exports; + // Add properties as getter to delay load the modules on first invocation + Object.defineProperty(obj, property, { + configurable: true, + get: function () { + var delayLoadedModule = module.require(modulePath); + obj[property] = delayLoadedModule; + return delayLoadedModule; + } + }); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/plist-helpers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/plist-helpers.js new file mode 100755 index 0000000..9dee5c6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/plist-helpers.js @@ -0,0 +1,101 @@ +/* + * + * Copyright 2013 Brett Rudd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// contains PLIST utility functions +var __ = require('underscore'); +var plist = require('plist'); + +// adds node to doc at selector +module.exports.graftPLIST = graftPLIST; +function graftPLIST(doc, xml, selector) { + var obj = plist.parse(''+xml+''); + + var node = doc[selector]; + if (node && Array.isArray(node) && Array.isArray(obj)){ + node = node.concat(obj); + for (var i =0;i. If we have two dicts we merge them instead of + // overriding the old one. See CB-6472 + if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)){//arrays checked above + __.extend(obj,node); + } + doc[selector] = obj; + } + + return true; +} + +// removes node from doc at selector +module.exports.prunePLIST = prunePLIST; +function prunePLIST(doc, xml, selector) { + var obj = plist.parse(''+xml+''); + + pruneOBJECT(doc, selector, obj); + + return true; +} + +function pruneOBJECT(doc, selector, fragment) { + if (Array.isArray(fragment) && Array.isArray(doc[selector])) { + var empty = true; + for (var i in fragment) { + for (var j in doc[selector]) { + empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty; + } + } + if (empty) + { + delete doc[selector]; + return true; + } + } + else if (nodeEqual(doc[selector], fragment)) { + delete doc[selector]; + return true; + } + + return false; +} + +function nodeEqual(node1, node2) { + if (typeof node1 != typeof node2) + return false; + else if (typeof node1 == 'string') { + node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)'); + return new RegExp('^' + node2 + '$').test(node1); + } + else { + for (var key in node2) { + if (!nodeEqual(node1[key], node2[key])) return false; + } + return true; + } +} + +// escape string for use in regex +function escapeRE(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '$&'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/xml-helpers.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/xml-helpers.js new file mode 100755 index 0000000..9a1e82d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-common/src/util/xml-helpers.js @@ -0,0 +1,366 @@ +/* + * + * Copyright 2013 Anis Kadri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint sub:true, laxcomma:true */ + +/** + * contains XML utility functions, some of which are specific to elementtree + */ + +var fs = require('fs') + , path = require('path') + , _ = require('underscore') + , et = require('elementtree') + ; + + var ROOT = /^\/([^\/]*)/, + ABSOLUTE = /^\/([^\/]*)\/(.*)/; + +module.exports = { + // compare two et.XML nodes, see if they match + // compares tagName, text, attributes and children (recursively) + equalNodes: function(one, two) { + if (one.tag != two.tag) { + return false; + } else if (one.text.trim() != two.text.trim()) { + return false; + } else if (one._children.length != two._children.length) { + return false; + } + + if (!attribMatch(one, two)) return false; + + for (var i = 0; i < one._children.length; i++) { + if (!module.exports.equalNodes(one._children[i], two._children[i])) { + return false; + } + } + + return true; + }, + + // adds node to doc at selector, creating parent if it doesn't exist + graftXML: function(doc, nodes, selector, after) { + var parent = module.exports.resolveParent(doc, selector); + if (!parent) { + //Try to create the parent recursively if necessary + try { + var parentToCreate = et.XML('<' + path.basename(selector) + '>'), + parentSelector = path.dirname(selector); + + this.graftXML(doc, [parentToCreate], parentSelector); + } catch (e) { + return false; + } + parent = module.exports.resolveParent(doc, selector); + if (!parent) return false; + } + + nodes.forEach(function (node) { + // check if child is unique first + if (uniqueChild(node, parent)) { + var children = parent.getchildren(); + var insertIdx = after ? findInsertIdx(children, after) : children.length; + + //TODO: replace with parent.insert after the bug in ElementTree is fixed + parent.getchildren().splice(insertIdx, 0, node); + } + }); + + return true; + }, + + // adds new attributes to doc at selector + // Will only merge if attribute has not been modified already or --force is used + graftXMLMerge: function(doc, nodes, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + // saves the attributes of the original xml before making changes + xml.oldAttrib = _.extend({}, target.attrib); + + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + target.attrib[attribute] = node.attrib[attribute]; + } + }); + + return true; + }, + + // overwrite all attributes to doc at selector with new attributes + // Will only overwrite if attribute has not been modified already or --force is used + graftXMLOverwrite: function(doc, nodes, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + // saves the attributes of the original xml before making changes + xml.oldAttrib = _.extend({}, target.attrib); + + // remove old attributes from target + var targetAttributes = target.attrib; + for (var targetAttribute in targetAttributes) { + delete targetAttributes[targetAttribute]; + } + + // add new attributes to target + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + target.attrib[attribute] = node.attrib[attribute]; + } + }); + + return true; + }, + + // removes node from doc at selector + pruneXML: function(doc, nodes, selector) { + var parent = module.exports.resolveParent(doc, selector); + if (!parent) return false; + + nodes.forEach(function (node) { + var matchingKid = null; + if ((matchingKid = findChild(node, parent)) !== null) { + // stupid elementtree takes an index argument it doesn't use + // and does not conform to the python lib + parent.remove(matchingKid); + } + }); + + return true; + }, + + // restores attributes from doc at selector + pruneXMLRestore: function(doc, selector, xml) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + if (xml.oldAttrib) { + target.attrib = _.extend({}, xml.oldAttrib); + } + + return true; + }, + + prunXMLRemove: function(doc, selector, nodes) { + var target = module.exports.resolveParent(doc, selector); + if (!target) return false; + + nodes.forEach(function (node) { + var attributes = node.attrib; + for (var attribute in attributes) { + if (target.attrib[attribute]) { + delete target.attrib[attribute]; + } + } + }); + + return true; + + }, + + + parseElementtreeSync: function (filename) { + var contents = fs.readFileSync(filename, 'utf-8'); + if(contents) { + //Windows is the BOM. Skip the Byte Order Mark. + contents = contents.substring(contents.indexOf('<')); + } + return new et.ElementTree(et.XML(contents)); + }, + + resolveParent: function (doc, selector) { + var parent, tagName, subSelector; + + // handle absolute selector (which elementtree doesn't like) + if (ROOT.test(selector)) { + tagName = selector.match(ROOT)[1]; + // test for wildcard "any-tag" root selector + if (tagName == '*' || tagName === doc._root.tag) { + parent = doc._root; + + // could be an absolute path, but not selecting the root + if (ABSOLUTE.test(selector)) { + subSelector = selector.match(ABSOLUTE)[2]; + parent = parent.find(subSelector); + } + } else { + return false; + } + } else { + parent = doc.find(selector); + } + return parent; + } +}; + +function findChild(node, parent) { + var matchingKids = parent.findall(node.tag) + , i, j; + + for (i = 0, j = matchingKids.length ; i < j ; i++) { + if (module.exports.equalNodes(node, matchingKids[i])) { + return matchingKids[i]; + } + } + return null; +} + +function uniqueChild(node, parent) { + var matchingKids = parent.findall(node.tag) + , i = 0; + + if (matchingKids.length === 0) { + return true; + } else { + for (i; i < matchingKids.length; i++) { + if (module.exports.equalNodes(node, matchingKids[i])) { + return false; + } + } + return true; + } +} + +// Find the index at which to insert an entry. After is a ;-separated priority list +// of tags after which the insertion should be made. E.g. If we need to +// insert an element C, and the rule is that the order of children has to be +// As, Bs, Cs. After will be equal to "C;B;A". +function findInsertIdx(children, after) { + var childrenTags = children.map(function(child) { return child.tag; }); + var afters = after.split(';'); + var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); }); + var foundIndex = _.find(afterIndexes, function(index) { return index != -1; }); + + //add to the beginning if no matching nodes are found + return typeof foundIndex === 'undefined' ? 0 : foundIndex+1; +} + +var BLACKLIST = ['platform', 'feature','plugin','engine']; +var SINGLETONS = ['content', 'author', 'name']; +function mergeXml(src, dest, platform, clobber) { + // Do nothing for blacklisted tags. + if (BLACKLIST.indexOf(src.tag) != -1) return; + + //Handle attributes + Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) { + if (clobber || !dest.attrib[attribute]) { + dest.attrib[attribute] = src.attrib[attribute]; + } + }); + //Handle text + if (src.text && (clobber || !dest.text)) { + dest.text = src.text; + } + //Handle children + src.getchildren().forEach(mergeChild); + + //Handle platform + if (platform) { + src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) { + platformElement.getchildren().forEach(mergeChild); + }); + } + + //Handle duplicate preference tags (by name attribute) + removeDuplicatePreferences(dest); + + function mergeChild (srcChild) { + var srcTag = srcChild.tag, + destChild = new et.Element(srcTag), + foundChild, + query = srcTag + '', + shouldMerge = true; + + if (BLACKLIST.indexOf(srcTag) !== -1) return; + + if (SINGLETONS.indexOf(srcTag) !== -1) { + foundChild = dest.find(query); + if (foundChild) { + destChild = foundChild; + dest.remove(destChild); + } + } else { + //Check for an exact match and if you find one don't add + var mergeCandidates = dest.findall(query) + .filter(function (foundChild) { + return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild); + }); + + if (mergeCandidates.length > 0) { + destChild = mergeCandidates[0]; + dest.remove(destChild); + shouldMerge = false; + } + } + + mergeXml(srcChild, destChild, platform, clobber && shouldMerge); + dest.append(destChild); + } + + function removeDuplicatePreferences(xml) { + // reduce preference tags to a hashtable to remove dupes + var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) { + previousValue[ currentValue.attrib.name ] = currentValue.attrib.value; + return previousValue; + }, {}); + + // remove all preferences + xml.findall('preference[@name][@value]').forEach(function(pref) { + xml.remove(pref); + }); + + // write new preferences + Object.keys(prefHash).forEach(function(key, index) { + var element = et.SubElement(xml, 'preference'); + element.set('name', key); + element.set('value', this[key]); + }, prefHash); + } +} + +// Expose for testing. +module.exports.mergeXml = mergeXml; + +function textMatch(elm1, elm2) { + var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '', + text2 = elm2.text ? elm2.text.replace(/\s+/, '') : ''; + return (text1 === '' || text1 === text2); +} + +function attribMatch(one, two) { + var oneAttribKeys = Object.keys(one.attrib); + var twoAttribKeys = Object.keys(two.attrib); + + if (oneAttribKeys.length != twoAttribKeys.length) { + return false; + } + + for (var i = 0; i < oneAttribKeys.length; i++) { + var attribName = oneAttribKeys[i]; + + if (one.attrib[attribName] != two.attrib[attribName]) { + return false; + } + } + + return true; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.npmignore new file mode 100755 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.travis.yml new file mode 100755 index 0000000..ae381fc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +sudo: false +node_js: + - "0.10" +install: npm install +script: + - npm test diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/README.md new file mode 100755 index 0000000..3b93e5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/README.md @@ -0,0 +1,14 @@ +[![Build Status](https://travis-ci.org/stevengill/cordova-registry-mapper.svg?branch=master)](https://travis-ci.org/stevengill/cordova-registry-mapper) + +#Cordova Registry Mapper + +This module is used to map Cordova plugin ids to package names and vice versa. + +When Cordova users add plugins to their projects using ids +(e.g. `cordova plugin add org.apache.cordova.device`), +this module will map that id to the corresponding package name so `cordova-lib` knows what to fetch from **npm**. + +This module was created so the Apache Cordova project could migrate its plugins from +the [Cordova Registry](http://registry.cordova.io/) +to [npm](https://registry.npmjs.com/) +instead of having to maintain a registry. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/index.js new file mode 100755 index 0000000..4550774 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/index.js @@ -0,0 +1,204 @@ +var map = { + 'org.apache.cordova.battery-status':'cordova-plugin-battery-status', + 'org.apache.cordova.camera':'cordova-plugin-camera', + 'org.apache.cordova.console':'cordova-plugin-console', + 'org.apache.cordova.contacts':'cordova-plugin-contacts', + 'org.apache.cordova.device':'cordova-plugin-device', + 'org.apache.cordova.device-motion':'cordova-plugin-device-motion', + 'org.apache.cordova.device-orientation':'cordova-plugin-device-orientation', + 'org.apache.cordova.dialogs':'cordova-plugin-dialogs', + 'org.apache.cordova.file':'cordova-plugin-file', + 'org.apache.cordova.file-transfer':'cordova-plugin-file-transfer', + 'org.apache.cordova.geolocation':'cordova-plugin-geolocation', + 'org.apache.cordova.globalization':'cordova-plugin-globalization', + 'org.apache.cordova.inappbrowser':'cordova-plugin-inappbrowser', + 'org.apache.cordova.media':'cordova-plugin-media', + 'org.apache.cordova.media-capture':'cordova-plugin-media-capture', + 'org.apache.cordova.network-information':'cordova-plugin-network-information', + 'org.apache.cordova.splashscreen':'cordova-plugin-splashscreen', + 'org.apache.cordova.statusbar':'cordova-plugin-statusbar', + 'org.apache.cordova.vibration':'cordova-plugin-vibration', + 'org.apache.cordova.test-framework':'cordova-plugin-test-framework', + 'com.msopentech.websql' : 'cordova-plugin-websql', + 'com.msopentech.indexeddb' : 'cordova-plugin-indexeddb', + 'com.microsoft.aad.adal' : 'cordova-plugin-ms-adal', + 'com.microsoft.capptain' : 'capptain-cordova', + 'com.microsoft.services.aadgraph' : 'cordova-plugin-ms-aad-graph', + 'com.microsoft.services.files' : 'cordova-plugin-ms-files', + 'om.microsoft.services.outlook' : 'cordova-plugin-ms-outlook', + 'com.pbakondy.sim' : 'cordova-plugin-sim', + 'android.support.v4' : 'cordova-plugin-android-support-v4', + 'android.support.v7-appcompat' : 'cordova-plugin-android-support-v7-appcompat', + 'com.google.playservices' : 'cordova-plugin-googleplayservices', + 'com.google.cordova.admob' : 'cordova-plugin-admobpro', + 'com.rjfun.cordova.extension' : 'cordova-plugin-extension', + 'com.rjfun.cordova.plugin.admob' : 'cordova-plugin-admob', + 'com.rjfun.cordova.flurryads' : 'cordova-plugin-flurry', + 'com.rjfun.cordova.facebookads' : 'cordova-plugin-facebookads', + 'com.rjfun.cordova.httpd' : 'cordova-plugin-httpd', + 'com.rjfun.cordova.iad' : 'cordova-plugin-iad', + 'com.rjfun.cordova.iflyspeech' : 'cordova-plugin-iflyspeech', + 'com.rjfun.cordova.lianlianpay' : 'cordova-plugin-lianlianpay', + 'com.rjfun.cordova.mobfox' : 'cordova-plugin-mobfox', + 'com.rjfun.cordova.mopub' : 'cordova-plugin-mopub', + 'com.rjfun.cordova.mmedia' : 'cordova-plugin-mmedia', + 'com.rjfun.cordova.nativeaudio' : 'cordova-plugin-nativeaudio', + 'com.rjfun.cordova.plugin.paypalmpl' : 'cordova-plugin-paypalmpl', + 'com.rjfun.cordova.smartadserver' : 'cordova-plugin-smartadserver', + 'com.rjfun.cordova.sms' : 'cordova-plugin-sms', + 'com.rjfun.cordova.wifi' : 'cordova-plugin-wifi', + 'com.ohh2ahh.plugins.appavailability' : 'cordova-plugin-appavailability', + 'org.adapt-it.cordova.fonts' : 'cordova-plugin-fonts', + 'de.martinreinhardt.cordova.plugins.barcodeScanner' : 'cordova-plugin-barcodescanner', + 'de.martinreinhardt.cordova.plugins.urlhandler' : 'cordova-plugin-urlhandler', + 'de.martinreinhardt.cordova.plugins.email' : 'cordova-plugin-email', + 'de.martinreinhardt.cordova.plugins.certificates' : 'cordova-plugin-certificates', + 'de.martinreinhardt.cordova.plugins.sqlite' : 'cordova-plugin-sqlite', + 'fr.smile.cordova.fileopener' : 'cordova-plugin-fileopener', + 'org.smile.websqldatabase.initializer' : 'cordova-plugin-websqldatabase-initializer', + 'org.smile.websqldatabase.wpdb' : 'cordova-plugin-websqldatabase', + 'org.jboss.aerogear.cordova.push' : 'aerogear-cordova-push', + 'org.jboss.aerogear.cordova.oauth2' : 'aerogear-cordova-oauth2', + 'org.jboss.aerogear.cordova.geo' : 'aerogear-cordova-geo', + 'org.jboss.aerogear.cordova.crypto' : 'aerogear-cordova-crypto', + 'org.jboss.aerogaer.cordova.otp' : 'aerogear-cordova-otp', + 'uk.co.ilee.applewatch' : 'cordova-plugin-apple-watch', + 'uk.co.ilee.directions' : 'cordova-plugin-directions', + 'uk.co.ilee.gamecenter' : 'cordova-plugin-game-center', + 'uk.co.ilee.jailbreakdetection' : 'cordova-plugin-jailbreak-detection', + 'uk.co.ilee.nativetransitions' : 'cordova-plugin-native-transitions', + 'uk.co.ilee.pedometer' : 'cordova-plugin-pedometer', + 'uk.co.ilee.shake' : 'cordova-plugin-shake', + 'uk.co.ilee.touchid' : 'cordova-plugin-touchid', + 'com.knowledgecode.cordova.websocket' : 'cordova-plugin-websocket', + 'com.elixel.plugins.settings' : 'cordova-plugin-settings', + 'com.cowbell.cordova.geofence' : 'cordova-plugin-geofence', + 'com.blackberry.community.preventsleep' : 'cordova-plugin-preventsleep', + 'com.blackberry.community.gamepad' : 'cordova-plugin-gamepad', + 'com.blackberry.community.led' : 'cordova-plugin-led', + 'com.blackberry.community.thumbnail' : 'cordova-plugin-thumbnail', + 'com.blackberry.community.mediakeys' : 'cordova-plugin-mediakeys', + 'com.blackberry.community.simplebtlehrplugin' : 'cordova-plugin-bluetoothheartmonitor', + 'com.blackberry.community.simplebeaconplugin' : 'cordova-plugin-bluetoothibeacon', + 'com.blackberry.community.simplebtsppplugin' : 'cordova-plugin-bluetoothspp', + 'com.blackberry.community.clipboard' : 'cordova-plugin-clipboard', + 'com.blackberry.community.curl' : 'cordova-plugin-curl', + 'com.blackberry.community.qt' : 'cordova-plugin-qtbridge', + 'com.blackberry.community.upnp' : 'cordova-plugin-upnp', + 'com.blackberry.community.PasswordCrypto' : 'cordova-plugin-password-crypto', + 'com.blackberry.community.deviceinfoplugin' : 'cordova-plugin-deviceinfo', + 'com.blackberry.community.gsecrypto' : 'cordova-plugin-bb-crypto', + 'com.blackberry.community.mongoose' : 'cordova-plugin-mongoose', + 'com.blackberry.community.sysdialog' : 'cordova-plugin-bb-sysdialog', + 'com.blackberry.community.screendisplay' : 'cordova-plugin-screendisplay', + 'com.blackberry.community.messageplugin' : 'cordova-plugin-bb-messageretrieve', + 'com.blackberry.community.emailsenderplugin' : 'cordova-plugin-emailsender', + 'com.blackberry.community.audiometadata' : 'cordova-plugin-audiometadata', + 'com.blackberry.community.deviceemails' : 'cordova-plugin-deviceemails', + 'com.blackberry.community.audiorecorder' : 'cordova-plugin-audiorecorder', + 'com.blackberry.community.vibration' : 'cordova-plugin-vibrate-intense', + 'com.blackberry.community.SMSPlugin' : 'cordova-plugin-bb-sms', + 'com.blackberry.community.extractZipFile' : 'cordova-plugin-bb-zip', + 'com.blackberry.community.lowlatencyaudio' : 'cordova-plugin-bb-nativeaudio', + 'com.blackberry.community.barcodescanner' : 'phonegap-plugin-barcodescanner', + 'com.blackberry.app' : 'cordova-plugin-bb-app', + 'com.blackberry.bbm.platform' : 'cordova-plugin-bbm', + 'com.blackberry.connection' : 'cordova-plugin-bb-connection', + 'com.blackberry.identity' : 'cordova-plugin-bb-identity', + 'com.blackberry.invoke.card' : 'cordova-plugin-bb-card', + 'com.blackberry.invoke' : 'cordova-plugin-bb-invoke', + 'com.blackberry.invoked' : 'cordova-plugin-bb-invoked', + 'com.blackberry.io.filetransfer' : 'cordova-plugin-bb-filetransfer', + 'com.blackberry.io' : 'cordova-plugin-bb-io', + 'com.blackberry.notification' : 'cordova-plugin-bb-notification', + 'com.blackberry.payment' : 'cordova-plugin-bb-payment', + 'com.blackberry.pim.calendar' : 'cordova-plugin-bb-calendar', + 'com.blackberry.pim.contacts' : 'cordova-plugin-bb-contacts', + 'com.blackberry.pim.lib' : 'cordova-plugin-bb-pimlib', + 'com.blackberry.push' : 'cordova-plugin-bb-push', + 'com.blackberry.screenshot' : 'cordova-plugin-screenshot', + 'com.blackberry.sensors' : 'cordova-plugin-bb-sensors', + 'com.blackberry.system' : 'cordova-plugin-bb-system', + 'com.blackberry.ui.contextmenu' : 'cordova-plugin-bb-ctxmenu', + 'com.blackberry.ui.cover' : 'cordova-plugin-bb-cover', + 'com.blackberry.ui.dialog' : 'cordova-plugin-bb-dialog', + 'com.blackberry.ui.input' : 'cordova-plugin-touch-keyboard', + 'com.blackberry.ui.toast' : 'cordova-plugin-toast', + 'com.blackberry.user.identity' : 'cordova-plugin-bb-idservice', + 'com.blackberry.utils' : 'cordova-plugin-bb-utils', + 'net.yoik.cordova.plugins.screenorientation' : 'cordova-plugin-screen-orientation', + 'com.phonegap.plugins.barcodescanner' : 'phonegap-plugin-barcodescanner', + 'com.manifoldjs.hostedwebapp' : 'cordova-plugin-hostedwebapp', + 'com.initialxy.cordova.themeablebrowser' : 'cordova-plugin-themeablebrowser', + 'gr.denton.photosphere' : 'cordova-plugin-panoramaviewer', + 'nl.x-services.plugins.actionsheet' : 'cordova-plugin-actionsheet', + 'nl.x-services.plugins.socialsharing' : 'cordova-plugin-x-socialsharing', + 'nl.x-services.plugins.googleplus' : 'cordova-plugin-googleplus', + 'nl.x-services.plugins.insomnia' : 'cordova-plugin-insomnia', + 'nl.x-services.plugins.toast' : 'cordova-plugin-x-toast', + 'nl.x-services.plugins.calendar' : 'cordova-plugin-calendar', + 'nl.x-services.plugins.launchmyapp' : 'cordova-plugin-customurlscheme', + 'nl.x-services.plugins.flashlight' : 'cordova-plugin-flashlight', + 'nl.x-services.plugins.sslcertificatechecker' : 'cordova-plugin-sslcertificatechecker', + 'com.bridge.open' : 'cordova-open', + 'com.bridge.safe' : 'cordova-safe', + 'com.disusered.open' : 'cordova-open', + 'com.disusered.safe' : 'cordova-safe', + 'me.apla.cordova.app-preferences' : 'cordova-plugin-app-preferences', + 'com.konotor.cordova' : 'cordova-plugin-konotor', + 'io.intercom.cordova' : 'cordova-plugin-intercom', + 'com.onesignal.plugins.onesignal' : 'onesignal-cordova-plugin', + 'com.danjarvis.document-contract': 'cordova-plugin-document-contract', + 'com.eface2face.iosrtc' : 'cordova-plugin-iosrtc', + 'com.mobileapptracking.matplugin' : 'cordova-plugin-tune', + 'com.marianhello.cordova.background-geolocation' : 'cordova-plugin-mauron85-background-geolocation', + 'fr.louisbl.cordova.locationservices' : 'cordova-plugin-locationservices', + 'fr.louisbl.cordova.gpslocation' : 'cordova-plugin-gpslocation', + 'com.hiliaox.weibo' : 'cordova-plugin-weibo', + 'com.uxcam.cordova.plugin' : 'cordova-uxcam', + 'de.fastr.phonegap.plugins.downloader' : 'cordova-plugin-fastrde-downloader', + 'de.fastr.phonegap.plugins.injectView' : 'cordova-plugin-fastrde-injectview', + 'de.fastr.phonegap.plugins.CheckGPS' : 'cordova-plugin-fastrde-checkgps', + 'de.fastr.phonegap.plugins.md5chksum' : 'cordova-plugin-fastrde-md5', + 'io.repro.cordova' : 'cordova-plugin-repro', + 're.notifica.cordova': 'cordova-plugin-notificare-push', + 'com.megster.cordova.ble': 'cordova-plugin-ble-central', + 'com.megster.cordova.bluetoothserial': 'cordova-plugin-bluetooth-serial', + 'com.megster.cordova.rfduino': 'cordova-plugin-rfduino', + 'cz.velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', + 'cz.Velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', + 'org.scriptotek.appinfo': 'cordova-plugin-appinfo', + 'com.yezhiming.cordova.appinfo': 'cordova-plugin-appinfo', + 'pl.makingwaves.estimotebeacons': 'cordova-plugin-estimote', + 'com.evothings.ble': 'cordova-plugin-ble', + 'com.appsee.plugin' : 'cordova-plugin-appsee', + 'am.armsoft.plugins.listpicker': 'cordova-plugin-listpicker', + 'com.pushbots.push': 'pushbots-cordova-plugin', + 'com.admob.google': 'cordova-admob', + 'admob.ads.google': 'cordova-admob-ads', + 'admob.google.plugin': 'admob-google', + 'com.admob.admobads': 'admob-ads', + 'com.connectivity.monitor': 'cordova-connectivity-monitor', + 'com.ios.libgoogleadmobads': 'cordova-libgoogleadmobads', + 'com.google.play.services': 'cordova-google-play-services', + 'android.support.v13': 'cordova-android-support-v13', + 'android.support.v4': 'cordova-android-support-v4', // Duplicated key ;) + 'com.analytics.google': 'cordova-plugin-analytics', + 'com.analytics.adid.google': 'cordova-plugin-analytics-adid', + 'com.chariotsolutions.nfc.plugin': 'phonegap-nfc', + 'com.samz.mixpanel': 'cordova-plugin-mixpanel', + 'de.appplant.cordova.common.RegisterUserNotificationSettings': 'cordova-plugin-registerusernotificationsettings', + 'plugin.google.maps': 'cordova-plugin-googlemaps', + 'xu.li.cordova.wechat': 'cordova-plugin-wechat', + 'es.keensoft.fullscreenimage': 'cordova-plugin-fullscreenimage', + 'com.arcoirislabs.plugin.mqtt' : 'cordova-plugin-mqtt' +}; + +module.exports.oldToNew = map; + +var reverseMap = {}; +Object.keys(map).forEach(function(elem){ + reverseMap[map[elem]] = elem; +}); + +module.exports.newToOld = reverseMap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/package.json new file mode 100755 index 0000000..7c43b3b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + { + "raw": "cordova-registry-mapper@^1.1.8", + "scope": null, + "escapedName": "cordova-registry-mapper", + "name": "cordova-registry-mapper", + "rawSpec": "^1.1.8", + "spec": ">=1.1.8 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "cordova-registry-mapper@>=1.1.8 <2.0.0", + "_id": "cordova-registry-mapper@1.1.15", + "_inCache": true, + "_location": "/cordova-registry-mapper", + "_nodeVersion": "5.4.1", + "_npmUser": { + "name": "stevegill", + "email": "stevengill97@gmail.com" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "raw": "cordova-registry-mapper@^1.1.8", + "scope": null, + "escapedName": "cordova-registry-mapper", + "name": "cordova-registry-mapper", + "rawSpec": "^1.1.8", + "spec": ">=1.1.8 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", + "_shasum": "e244b9185b8175473bff6079324905115f83dc7c", + "_shrinkwrap": null, + "_spec": "cordova-registry-mapper@^1.1.8", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Steve Gill" + }, + "bugs": { + "url": "https://github.com/stevengill/cordova-registry-mapper/issues" + }, + "dependencies": {}, + "description": "Maps old plugin ids to new plugin names for fetching from npm", + "devDependencies": { + "tape": "^3.5.0" + }, + "directories": {}, + "dist": { + "shasum": "e244b9185b8175473bff6079324905115f83dc7c", + "tarball": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz" + }, + "gitHead": "00af0f028ec94154a364eeabe38b8e22320647bd", + "homepage": "https://github.com/stevengill/cordova-registry-mapper#readme", + "keywords": [ + "cordova", + "plugins" + ], + "license": "Apache version 2.0", + "main": "index.js", + "maintainers": [ + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + } + ], + "name": "cordova-registry-mapper", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/stevengill/cordova-registry-mapper.git" + }, + "scripts": { + "test": "node tests/test.js" + }, + "version": "1.1.15" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/tests/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/tests/test.js new file mode 100755 index 0000000..35343be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/cordova-registry-mapper/tests/test.js @@ -0,0 +1,11 @@ +var test = require('tape'); +var oldToNew = require('../index').oldToNew; +var newToOld = require('../index').newToOld; + +test('plugin mappings exist', function(t) { + t.plan(2); + + t.equal('cordova-plugin-device', oldToNew['org.apache.cordova.device']); + + t.equal('org.apache.cordova.device', newToOld['cordova-plugin-device']); +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.npmignore new file mode 100755 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.travis.yml new file mode 100755 index 0000000..6f27c96 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/.travis.yml @@ -0,0 +1,10 @@ +language: node_js + +node_js: + - 0.6 + +script: make test + +notifications: + email: + - tomaz+travisci@tomaz.me diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/CHANGES.md new file mode 100755 index 0000000..50d415d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/CHANGES.md @@ -0,0 +1,39 @@ +elementtree v0.1.6 (in development) + +* Add support for CData elements. (#14) + [hermannpencole] + +elementtree v0.1.5 - 2012-11-14 + +* Fix a bug in the find() and findtext() method which could manifest itself + under some conditions. + [metagriffin] + +elementtree v0.1.4 - 2012-10-15 + +* Allow user to use namespaced attributes when using find* functions. + [Andrew Lunny] + +elementtree v0.1.3 - 2012-09-21 + +* Improve the output of text content in the tags (strip unnecessary line break + characters). + +[Darryl Pogue] + +elementtree v0.1.2 - 2012-09-04 + + * Allow user to pass 'indent' option to ElementTree.write method. If this + option is specified (e.g. {'indent': 4}). XML will be pretty printed. + [Darryl Pogue, Tomaz Muraus] + + * Bump sax dependency version. + +elementtree v0.1.1 - 2011-09-23 + + * Improve special character escaping. + [Ryan Phillips] + +elementtree v0.1.0 - 2011-09-05 + + * Initial release. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/LICENSE.txt b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/LICENSE.txt new file mode 100755 index 0000000..6b0b127 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/Makefile new file mode 100755 index 0000000..ab7c4e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/Makefile @@ -0,0 +1,21 @@ +TESTS := \ + tests/test-simple.js + + + +PATH := ./node_modules/.bin:$(PATH) + +WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey') + +default: test + +test: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}" + +tap: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}" + +coverage: + NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}" + +.PHONY: default test coverage tap scope diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/NOTICE new file mode 100755 index 0000000..28ad70a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/NOTICE @@ -0,0 +1,5 @@ +node-elementtree +Copyright (c) 2011, Rackspace, Inc. + +The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/README.md new file mode 100755 index 0000000..738420c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/README.md @@ -0,0 +1,141 @@ +node-elementtree +==================== + +node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module. + +Installation +==================== + + $ npm install elementtree + +Using the library +==================== + +For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage). + +Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm). + +Example 1 – Creating An XML Document +==================== + +This example shows how to build a valid XML document that can be published to +Atom Hopper. Atom Hopper is used internally as a bridge from products all the +way to collecting revenue, called “Usage.” MaaS and other products send similar +events to it every time user performs an action on a resource +(e.g. creates,updates or deletes). Below is an example of leveraging the API +to create a new XML document. + +```javascript +var et = require('elementtree'); +var XML = et.XML; +var ElementTree = et.ElementTree; +var element = et.Element; +var subElement = et.SubElement; + +var date, root, tenantId, serviceName, eventType, usageId, dataCenter, region, +checks, resourceId, category, startTime, resourceName, etree, xml; + +date = new Date(); + +root = element('entry'); +root.set('xmlns', 'http://www.w3.org/2005/Atom'); + +tenantId = subElement(root, 'TenantId'); +tenantId.text = '12345'; + +serviceName = subElement(root, 'ServiceName'); +serviceName.text = 'MaaS'; + +resourceId = subElement(root, 'ResourceID'); +resourceId.text = 'enAAAA'; + +usageId = subElement(root, 'UsageID'); +usageId.text = '550e8400-e29b-41d4-a716-446655440000'; + +eventType = subElement(root, 'EventType'); +eventType.text = 'create'; + +category = subElement(root, 'category'); +category.set('term', 'monitoring.entity.create'); + +dataCenter = subElement(root, 'DataCenter'); +dataCenter.text = 'global'; + +region = subElement(root, 'Region'); +region.text = 'global'; + +startTime = subElement(root, 'StartTime'); +startTime.text = date; + +resourceName = subElement(root, 'ResourceName'); +resourceName.text = 'entity'; + +etree = new ElementTree(root); +xml = etree.write({'xml_declaration': false}); +console.log(xml); +``` + +As you can see, both et.Element and et.SubElement are factory methods which +return a new instance of Element and SubElement class, respectively. +When you create a new element (tag) you can use set method to set an attribute. +To set the tag value, assign a value to the .text attribute. + +This example would output a document that looks like this: + +```xml + + 12345 + MaaS + enAAAA + 550e8400-e29b-41d4-a716-446655440000 + create + + global + global + Sun Apr 29 2012 16:37:32 GMT-0700 (PDT) + entity + +``` + +Example 2 – Parsing An XML Document +==================== + +This example shows how to parse an XML document and use simple XPath selectors. +For demonstration purposes, we will use the XML document located at +https://gist.github.com/2554343. + +Behind the scenes, node-elementtree uses Isaac’s sax library for parsing XML, +but the library has a concept of “parsers,” which means it’s pretty simple to +add support for a different parser. + +```javascript +var fs = require('fs'); + +var et = require('elementtree'); + +var XML = et.XML; +var ElementTree = et.ElementTree; +var element = et.Element; +var subElement = et.SubElement; + +var data, etree; + +data = fs.readFileSync('document.xml').toString(); +etree = et.parse(data); + +console.log(etree.findall('./entry/TenantId').length); // 2 +console.log(etree.findtext('./entry/ServiceName')); // MaaS +console.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create +console.log(etree.findall('*/category/[@term="monitoring.entity.update"]').length); // 1 +``` + +Build status +==================== + +[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree) + + +License +==================== + +node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/constants.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/constants.js new file mode 100755 index 0000000..b057faf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/constants.js @@ -0,0 +1,20 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var DEFAULT_PARSER = 'sax'; + +exports.DEFAULT_PARSER = DEFAULT_PARSER; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementpath.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementpath.js new file mode 100755 index 0000000..2e93f47 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementpath.js @@ -0,0 +1,343 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var sprintf = require('./sprintf').sprintf; + +var utils = require('./utils'); +var SyntaxError = require('./errors').SyntaxError; + +var _cache = {}; + +var RE = new RegExp( + "(" + + "'[^']*'|\"[^\"]*\"|" + + "::|" + + "//?|" + + "\\.\\.|" + + "\\(\\)|" + + "[/.*:\\[\\]\\(\\)@=])|" + + "((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" + + "\\s+", 'g' +); + +var xpath_tokenizer = utils.findall.bind(null, RE); + +function prepare_tag(next, token) { + var tag = token[0]; + + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem._children.forEach(function(e) { + if (e.tag === tag) { + rv.push(e); + } + }); + } + + return rv; + } + + return select; +} + +function prepare_star(next, token) { + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem._children.forEach(function(e) { + rv.push(e); + }); + } + + return rv; + } + + return select; +} + +function prepare_dot(next, token) { + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + rv.push(elem); + } + + return rv; + } + + return select; +} + +function prepare_iter(next, token) { + var tag; + token = next(); + + if (token[1] === '*') { + tag = '*'; + } + else if (!token[1]) { + tag = token[0] || ''; + } + else { + throw new SyntaxError(token); + } + + function select(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + elem.iter(tag, function(e) { + if (e !== elem) { + rv.push(e); + } + }); + } + + return rv; + } + + return select; +} + +function prepare_dot_dot(next, token) { + function select(context, result) { + var i, len, elem, rv = [], parent_map = context.parent_map; + + if (!parent_map) { + context.parent_map = parent_map = {}; + + context.root.iter(null, function(p) { + p._children.forEach(function(e) { + parent_map[e] = p; + }); + }); + } + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (parent_map.hasOwnProperty(elem)) { + rv.push(parent_map[elem]); + } + } + + return rv; + } + + return select; +} + + +function prepare_predicate(next, token) { + var tag, key, value, select; + token = next(); + + if (token[1] === '@') { + // attribute + token = next(); + + if (token[1]) { + throw new SyntaxError(token, 'Invalid attribute predicate'); + } + + key = token[0]; + token = next(); + + if (token[1] === ']') { + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.get(key)) { + rv.push(elem); + } + } + + return rv; + }; + } + else if (token[1] === '=') { + value = next()[1]; + + if (value[0] === '"' || value[value.length - 1] === '\'') { + value = value.slice(1, value.length - 1); + } + else { + throw new SyntaxError(token, 'Ivalid comparison target'); + } + + token = next(); + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.get(key) === value) { + rv.push(elem); + } + } + + return rv; + }; + } + + if (token[1] !== ']') { + throw new SyntaxError(token, 'Invalid attribute predicate'); + } + } + else if (!token[1]) { + tag = token[0] || ''; + token = next(); + + if (token[1] !== ']') { + throw new SyntaxError(token, 'Invalid node predicate'); + } + + select = function(context, result) { + var i, len, elem, rv = []; + + for (i = 0, len = result.length; i < len; i++) { + elem = result[i]; + + if (elem.find(tag)) { + rv.push(elem); + } + } + + return rv; + }; + } + else { + throw new SyntaxError(null, 'Invalid predicate'); + } + + return select; +} + + + +var ops = { + "": prepare_tag, + "*": prepare_star, + ".": prepare_dot, + "..": prepare_dot_dot, + "//": prepare_iter, + "[": prepare_predicate, +}; + +function _SelectorContext(root) { + this.parent_map = null; + this.root = root; +} + +function findall(elem, path) { + var selector, result, i, len, token, value, select, context; + + if (_cache.hasOwnProperty(path)) { + selector = _cache[path]; + } + else { + // TODO: Use smarter cache purging approach + if (Object.keys(_cache).length > 100) { + _cache = {}; + } + + if (path.charAt(0) === '/') { + throw new SyntaxError(null, 'Cannot use absolute path on element'); + } + + result = xpath_tokenizer(path); + selector = []; + + function getToken() { + return result.shift(); + } + + token = getToken(); + while (true) { + var c = token[1] || ''; + value = ops[c](getToken, token); + + if (!value) { + throw new SyntaxError(null, sprintf('Invalid path: %s', path)); + } + + selector.push(value); + token = getToken(); + + if (!token) { + break; + } + else if (token[1] === '/') { + token = getToken(); + } + + if (!token) { + break; + } + } + + _cache[path] = selector; + } + + // Execute slector pattern + result = [elem]; + context = new _SelectorContext(elem); + + for (i = 0, len = selector.length; i < len; i++) { + select = selector[i]; + result = select(context, result); + } + + return result || []; +} + +function find(element, path) { + var resultElements = findall(element, path); + + if (resultElements && resultElements.length > 0) { + return resultElements[0]; + } + + return null; +} + +function findtext(element, path, defvalue) { + var resultElements = findall(element, path); + + if (resultElements && resultElements.length > 0) { + return resultElements[0].text; + } + + return defvalue; +} + + +exports.find = find; +exports.findall = findall; +exports.findtext = findtext; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementtree.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementtree.js new file mode 100755 index 0000000..61d9276 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/elementtree.js @@ -0,0 +1,611 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var sprintf = require('./sprintf').sprintf; + +var utils = require('./utils'); +var ElementPath = require('./elementpath'); +var TreeBuilder = require('./treebuilder').TreeBuilder; +var get_parser = require('./parser').get_parser; +var constants = require('./constants'); + +var element_ids = 0; + +function Element(tag, attrib) +{ + this._id = element_ids++; + this.tag = tag; + this.attrib = {}; + this.text = null; + this.tail = null; + this._children = []; + + if (attrib) { + this.attrib = utils.merge(this.attrib, attrib); + } +} + +Element.prototype.toString = function() +{ + return sprintf("", this.tag, this._id); +}; + +Element.prototype.makeelement = function(tag, attrib) +{ + return new Element(tag, attrib); +}; + +Element.prototype.len = function() +{ + return this._children.length; +}; + +Element.prototype.getItem = function(index) +{ + return this._children[index]; +}; + +Element.prototype.setItem = function(index, element) +{ + this._children[index] = element; +}; + +Element.prototype.delItem = function(index) +{ + this._children.splice(index, 1); +}; + +Element.prototype.getSlice = function(start, stop) +{ + return this._children.slice(start, stop); +}; + +Element.prototype.setSlice = function(start, stop, elements) +{ + var i; + var k = 0; + for (i = start; i < stop; i++, k++) { + this._children[i] = elements[k]; + } +}; + +Element.prototype.delSlice = function(start, stop) +{ + this._children.splice(start, stop - start); +}; + +Element.prototype.append = function(element) +{ + this._children.push(element); +}; + +Element.prototype.extend = function(elements) +{ + this._children.concat(elements); +}; + +Element.prototype.insert = function(index, element) +{ + this._children[index] = element; +}; + +Element.prototype.remove = function(element) +{ + this._children = this._children.filter(function(e) { + /* TODO: is this the right way to do this? */ + if (e._id === element._id) { + return false; + } + return true; + }); +}; + +Element.prototype.getchildren = function() { + return this._children; +}; + +Element.prototype.find = function(path) +{ + return ElementPath.find(this, path); +}; + +Element.prototype.findtext = function(path, defvalue) +{ + return ElementPath.findtext(this, path, defvalue); +}; + +Element.prototype.findall = function(path, defvalue) +{ + return ElementPath.findall(this, path, defvalue); +}; + +Element.prototype.clear = function() +{ + this.attrib = {}; + this._children = []; + this.text = null; + this.tail = null; +}; + +Element.prototype.get = function(key, defvalue) +{ + if (this.attrib[key] !== undefined) { + return this.attrib[key]; + } + else { + return defvalue; + } +}; + +Element.prototype.set = function(key, value) +{ + this.attrib[key] = value; +}; + +Element.prototype.keys = function() +{ + return Object.keys(this.attrib); +}; + +Element.prototype.items = function() +{ + return utils.items(this.attrib); +}; + +/* + * In python this uses a generator, but in v8 we don't have em, + * so we use a callback instead. + **/ +Element.prototype.iter = function(tag, callback) +{ + var self = this; + var i, child; + + if (tag === "*") { + tag = null; + } + + if (tag === null || this.tag === tag) { + callback(self); + } + + for (i = 0; i < this._children.length; i++) { + child = this._children[i]; + child.iter(tag, function(e) { + callback(e); + }); + } +}; + +Element.prototype.itertext = function(callback) +{ + this.iter(null, function(e) { + if (e.text) { + callback(e.text); + } + + if (e.tail) { + callback(e.tail); + } + }); +}; + + +function SubElement(parent, tag, attrib) { + var element = parent.makeelement(tag, attrib); + parent.append(element); + return element; +} + +function Comment(text) { + var element = new Element(Comment); + if (text) { + element.text = text; + } + return element; +} + +function CData(text) { + var element = new Element(CData); + if (text) { + element.text = text; + } + return element; +} + +function ProcessingInstruction(target, text) +{ + var element = new Element(ProcessingInstruction); + element.text = target; + if (text) { + element.text = element.text + " " + text; + } + return element; +} + +function QName(text_or_uri, tag) +{ + if (tag) { + text_or_uri = sprintf("{%s}%s", text_or_uri, tag); + } + this.text = text_or_uri; +} + +QName.prototype.toString = function() { + return this.text; +}; + +function ElementTree(element) +{ + this._root = element; +} + +ElementTree.prototype.getroot = function() { + return this._root; +}; + +ElementTree.prototype._setroot = function(element) { + this._root = element; +}; + +ElementTree.prototype.parse = function(source, parser) { + if (!parser) { + parser = get_parser(constants.DEFAULT_PARSER); + parser = new parser.XMLParser(new TreeBuilder()); + } + + parser.feed(source); + this._root = parser.close(); + return this._root; +}; + +ElementTree.prototype.iter = function(tag, callback) { + this._root.iter(tag, callback); +}; + +ElementTree.prototype.find = function(path) { + return this._root.find(path); +}; + +ElementTree.prototype.findtext = function(path, defvalue) { + return this._root.findtext(path, defvalue); +}; + +ElementTree.prototype.findall = function(path) { + return this._root.findall(path); +}; + +/** + * Unlike ElementTree, we don't write to a file, we return you a string. + */ +ElementTree.prototype.write = function(options) { + var sb = []; + options = utils.merge({ + encoding: 'utf-8', + xml_declaration: null, + default_namespace: null, + method: 'xml'}, options); + + if (options.xml_declaration !== false) { + sb.push("\n"); + } + + if (options.method === "text") { + _serialize_text(sb, self._root, encoding); + } + else { + var qnames, namespaces, indent, indent_string; + var x = _namespaces(this._root, options.encoding, options.default_namespace); + qnames = x[0]; + namespaces = x[1]; + + if (options.hasOwnProperty('indent')) { + indent = 0; + indent_string = new Array(options.indent + 1).join(' '); + } + else { + indent = false; + } + + if (options.method === "xml") { + _serialize_xml(function(data) { + sb.push(data); + }, this._root, options.encoding, qnames, namespaces, indent, indent_string); + } + else { + /* TODO: html */ + throw new Error("unknown serialization method "+ options.method); + } + } + + return sb.join(""); +}; + +var _namespace_map = { + /* "well-known" namespace prefixes */ + "http://www.w3.org/XML/1998/namespace": "xml", + "http://www.w3.org/1999/xhtml": "html", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", + "http://schemas.xmlsoap.org/wsdl/": "wsdl", + /* xml schema */ + "http://www.w3.org/2001/XMLSchema": "xs", + "http://www.w3.org/2001/XMLSchema-instance": "xsi", + /* dublic core */ + "http://purl.org/dc/elements/1.1/": "dc", +}; + +function register_namespace(prefix, uri) { + if (/ns\d+$/.test(prefix)) { + throw new Error('Prefix format reserved for internal use'); + } + + if (_namespace_map.hasOwnProperty(uri) && _namespace_map[uri] === prefix) { + delete _namespace_map[uri]; + } + + _namespace_map[uri] = prefix; +} + + +function _escape(text, encoding, isAttribute, isText) { + if (text) { + text = text.toString(); + text = text.replace(/&/g, '&'); + text = text.replace(//g, '>'); + if (!isText) { + text = text.replace(/\n/g, ' '); + text = text.replace(/\r/g, ' '); + } + if (isAttribute) { + text = text.replace(/"/g, '"'); + } + } + return text; +} + +/* TODO: benchmark single regex */ +function _escape_attrib(text, encoding) { + return _escape(text, encoding, true); +} + +function _escape_cdata(text, encoding) { + return _escape(text, encoding, false); +} + +function _escape_text(text, encoding) { + return _escape(text, encoding, false, true); +} + +function _namespaces(elem, encoding, default_namespace) { + var qnames = {}; + var namespaces = {}; + + if (default_namespace) { + namespaces[default_namespace] = ""; + } + + function encode(text) { + return text; + } + + function add_qname(qname) { + if (qname[0] === "{") { + var tmp = qname.substring(1).split("}", 2); + var uri = tmp[0]; + var tag = tmp[1]; + var prefix = namespaces[uri]; + + if (prefix === undefined) { + prefix = _namespace_map[uri]; + if (prefix === undefined) { + prefix = "ns" + Object.keys(namespaces).length; + } + if (prefix !== "xml") { + namespaces[uri] = prefix; + } + } + + if (prefix) { + qnames[qname] = sprintf("%s:%s", prefix, tag); + } + else { + qnames[qname] = tag; + } + } + else { + if (default_namespace) { + throw new Error('cannot use non-qualified names with default_namespace option'); + } + + qnames[qname] = qname; + } + } + + + elem.iter(null, function(e) { + var i; + var tag = e.tag; + var text = e.text; + var items = e.items(); + + if (tag instanceof QName && qnames[tag.text] === undefined) { + add_qname(tag.text); + } + else if (typeof(tag) === "string") { + add_qname(tag); + } + else if (tag !== null && tag !== Comment && tag !== CData && tag !== ProcessingInstruction) { + throw new Error('Invalid tag type for serialization: '+ tag); + } + + if (text instanceof QName && qnames[text.text] === undefined) { + add_qname(text.text); + } + + items.forEach(function(item) { + var key = item[0], + value = item[1]; + if (key instanceof QName) { + key = key.text; + } + + if (qnames[key] === undefined) { + add_qname(key); + } + + if (value instanceof QName && qnames[value.text] === undefined) { + add_qname(value.text); + } + }); + }); + return [qnames, namespaces]; +} + +function _serialize_xml(write, elem, encoding, qnames, namespaces, indent, indent_string) { + var tag = elem.tag; + var text = elem.text; + var items; + var i; + + var newlines = indent || (indent === 0); + write(Array(indent + 1).join(indent_string)); + + if (tag === Comment) { + write(sprintf("", _escape_cdata(text, encoding))); + } + else if (tag === ProcessingInstruction) { + write(sprintf("", _escape_cdata(text, encoding))); + } + else if (tag === CData) { + text = text || ''; + write(sprintf("", text)); + } + else { + tag = qnames[tag]; + if (tag === undefined) { + if (text) { + write(_escape_text(text, encoding)); + } + elem.iter(function(e) { + _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); + }); + } + else { + write("<" + tag); + items = elem.items(); + + if (items || namespaces) { + items.sort(); // lexical order + + items.forEach(function(item) { + var k = item[0], + v = item[1]; + + if (k instanceof QName) { + k = k.text; + } + + if (v instanceof QName) { + v = qnames[v.text]; + } + else { + v = _escape_attrib(v, encoding); + } + write(sprintf(" %s=\"%s\"", qnames[k], v)); + }); + + if (namespaces) { + items = utils.items(namespaces); + items.sort(function(a, b) { return a[1] < b[1]; }); + + items.forEach(function(item) { + var k = item[1], + v = item[0]; + + if (k) { + k = ':' + k; + } + + write(sprintf(" xmlns%s=\"%s\"", k, _escape_attrib(v, encoding))); + }); + } + } + + if (text || elem.len()) { + if (text && text.toString().match(/^\s*$/)) { + text = null; + } + + write(">"); + if (!text && newlines) { + write("\n"); + } + + if (text) { + write(_escape_text(text, encoding)); + } + elem._children.forEach(function(e) { + _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); + }); + + if (!text && indent) { + write(Array(indent + 1).join(indent_string)); + } + write(""); + } + else { + write(" />"); + } + } + } + + if (newlines) { + write("\n"); + } +} + +function parse(source, parser) { + var tree = new ElementTree(); + tree.parse(source, parser); + return tree; +} + +function tostring(element, options) { + return new ElementTree(element).write(options); +} + +exports.PI = ProcessingInstruction; +exports.Comment = Comment; +exports.CData = CData; +exports.ProcessingInstruction = ProcessingInstruction; +exports.SubElement = SubElement; +exports.QName = QName; +exports.ElementTree = ElementTree; +exports.ElementPath = ElementPath; +exports.Element = function(tag, attrib) { + return new Element(tag, attrib); +}; + +exports.XML = function(data) { + var et = new ElementTree(); + return et.parse(data); +}; + +exports.parse = parse; +exports.register_namespace = register_namespace; +exports.tostring = tostring; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/errors.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/errors.js new file mode 100755 index 0000000..e8742be --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/errors.js @@ -0,0 +1,31 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var util = require('util'); + +var sprintf = require('./sprintf').sprintf; + +function SyntaxError(token, msg) { + msg = msg || sprintf('Syntax Error at token %s', token.toString()); + this.token = token; + this.message = msg; + Error.call(this, msg); +} + +util.inherits(SyntaxError, Error); + +exports.SyntaxError = SyntaxError; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parser.js new file mode 100755 index 0000000..7307ee4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parser.js @@ -0,0 +1,33 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* TODO: support node-expat C++ module optionally */ + +var util = require('util'); +var parsers = require('./parsers/index'); + +function get_parser(name) { + if (name === 'sax') { + return parsers.sax; + } + else { + throw new Error('Invalid parser: ' + name); + } +} + + +exports.get_parser = get_parser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/index.js new file mode 100755 index 0000000..5eac5c8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/index.js @@ -0,0 +1 @@ +exports.sax = require('./sax'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/sax.js new file mode 100755 index 0000000..69b0a59 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/parsers/sax.js @@ -0,0 +1,56 @@ +var util = require('util'); + +var sax = require('sax'); + +var TreeBuilder = require('./../treebuilder').TreeBuilder; + +function XMLParser(target) { + this.parser = sax.parser(true); + + this.target = (target) ? target : new TreeBuilder(); + + this.parser.onopentag = this._handleOpenTag.bind(this); + this.parser.ontext = this._handleText.bind(this); + this.parser.oncdata = this._handleCdata.bind(this); + this.parser.ondoctype = this._handleDoctype.bind(this); + this.parser.oncomment = this._handleComment.bind(this); + this.parser.onclosetag = this._handleCloseTag.bind(this); + this.parser.onerror = this._handleError.bind(this); +} + +XMLParser.prototype._handleOpenTag = function(tag) { + this.target.start(tag.name, tag.attributes); +}; + +XMLParser.prototype._handleText = function(text) { + this.target.data(text); +}; + +XMLParser.prototype._handleCdata = function(text) { + this.target.data(text); +}; + +XMLParser.prototype._handleDoctype = function(text) { +}; + +XMLParser.prototype._handleComment = function(comment) { +}; + +XMLParser.prototype._handleCloseTag = function(tag) { + this.target.end(tag); +}; + +XMLParser.prototype._handleError = function(err) { + throw err; +}; + +XMLParser.prototype.feed = function(chunk) { + this.parser.write(chunk); +}; + +XMLParser.prototype.close = function() { + this.parser.close(); + return this.target.close(); +}; + +exports.XMLParser = XMLParser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/sprintf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/sprintf.js new file mode 100755 index 0000000..f802c1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/sprintf.js @@ -0,0 +1,86 @@ +/* + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var cache = {}; + + +// Do any others need escaping? +var TO_ESCAPE = { + '\'': '\\\'', + '\n': '\\n' +}; + + +function populate(formatter) { + var i, type, + key = formatter, + prev = 0, + arg = 1, + builder = 'return \''; + + for (i = 0; i < formatter.length; i++) { + if (formatter[i] === '%') { + type = formatter[i + 1]; + + switch (type) { + case 's': + builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \''; + prev = i + 2; + arg++; + break; + case 'j': + builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \''; + prev = i + 2; + arg++; + break; + case '%': + builder += formatter.slice(prev, i + 1); + prev = i + 2; + i++; + break; + } + + + } else if (TO_ESCAPE[formatter[i]]) { + builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]]; + prev = i + 1; + } + } + + builder += formatter.slice(prev) + '\';'; + cache[key] = new Function(builder); +} + + +/** + * A fast version of sprintf(), which currently only supports the %s and %j. + * This caches a formatting function for each format string that is used, so + * you should only use this sprintf() will be called many times with a single + * format string and a limited number of format strings will ever be used (in + * general this means that format strings should be string literals). + * + * @param {String} formatter A format string. + * @param {...String} var_args Values that will be formatted by %s and %j. + * @return {String} The formatted output. + */ +exports.sprintf = function(formatter, var_args) { + if (!cache[formatter]) { + populate(formatter); + } + + return cache[formatter].apply(null, arguments); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/treebuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/treebuilder.js new file mode 100755 index 0000000..393a98f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/treebuilder.js @@ -0,0 +1,60 @@ +function TreeBuilder(element_factory) { + this._data = []; + this._elem = []; + this._last = null; + this._tail = null; + if (!element_factory) { + /* evil circular dep */ + element_factory = require('./elementtree').Element; + } + this._factory = element_factory; +} + +TreeBuilder.prototype.close = function() { + return this._last; +}; + +TreeBuilder.prototype._flush = function() { + if (this._data) { + if (this._last !== null) { + var text = this._data.join(""); + if (this._tail) { + this._last.tail = text; + } + else { + this._last.text = text; + } + } + this._data = []; + } +}; + +TreeBuilder.prototype.data = function(data) { + this._data.push(data); +}; + +TreeBuilder.prototype.start = function(tag, attrs) { + this._flush(); + var elem = this._factory(tag, attrs); + this._last = elem; + + if (this._elem.length) { + this._elem[this._elem.length - 1].append(elem); + } + + this._elem.push(elem); + + this._tail = null; +}; + +TreeBuilder.prototype.end = function(tag) { + this._flush(); + this._last = this._elem.pop(); + if (this._last.tag !== tag) { + throw new Error("end tag mismatch"); + } + this._tail = 1; + return this._last; +}; + +exports.TreeBuilder = TreeBuilder; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/utils.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/utils.js new file mode 100755 index 0000000..b08a670 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/lib/utils.js @@ -0,0 +1,72 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * @param {Object} hash. + * @param {Array} ignored. + */ +function items(hash, ignored) { + ignored = ignored || null; + var k, rv = []; + + function is_ignored(key) { + if (!ignored || ignored.length === 0) { + return false; + } + + return ignored.indexOf(key); + } + + for (k in hash) { + if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) { + rv.push([k, hash[k]]); + } + } + + return rv; +} + + +function findall(re, str) { + var match, matches = []; + + while ((match = re.exec(str))) { + matches.push(match); + } + + return matches; +} + +function merge(a, b) { + var c = {}, attrname; + + for (attrname in a) { + if (a.hasOwnProperty(attrname)) { + c[attrname] = a[attrname]; + } + } + for (attrname in b) { + if (b.hasOwnProperty(attrname)) { + c[attrname] = b[attrname]; + } + } + return c; +} + +exports.items = items; +exports.findall = findall; +exports.merge = merge; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/package.json new file mode 100755 index 0000000..d22e3ca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "elementtree@^0.1.6", + "scope": null, + "escapedName": "elementtree", + "name": "elementtree", + "rawSpec": "^0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "elementtree@>=0.1.6 <0.2.0", + "_id": "elementtree@0.1.6", + "_inCache": true, + "_location": "/elementtree", + "_npmUser": { + "name": "rphillips", + "email": "ryan@trolocsis.com" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "elementtree@^0.1.6", + "scope": null, + "escapedName": "elementtree", + "name": "elementtree", + "rawSpec": "^0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", + "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "_shrinkwrap": null, + "_spec": "elementtree@^0.1.6", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Rackspace US, Inc." + }, + "bugs": { + "url": "https://github.com/racker/node-elementtree/issues" + }, + "contributors": [ + { + "name": "Paul Querna", + "email": "paul.querna@rackspace.com" + }, + { + "name": "Tomaz Muraus", + "email": "tomaz.muraus@rackspace.com" + } + ], + "dependencies": { + "sax": "0.3.5" + }, + "description": "XML Serialization and Parsing module based on Python's ElementTree.", + "devDependencies": { + "whiskey": "0.8.x" + }, + "directories": { + "lib": "lib" + }, + "dist": { + "shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "tarball": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "homepage": "https://github.com/racker/node-elementtree", + "keywords": [ + "xml", + "sax", + "parser", + "seralization", + "elementtree" + ], + "licenses": [ + { + "type": "Apache", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "main": "lib/elementtree.js", + "maintainers": [ + { + "name": "rphillips", + "email": "ryan@trolocsis.com" + } + ], + "name": "elementtree", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/racker/node-elementtree.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.1.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml1.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml1.xml new file mode 100755 index 0000000..72c33ae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml1.xml @@ -0,0 +1,17 @@ + + + dd + test_object_1 + 4281c348eaf83e70ddce0e07221c3d28 + 14 + application/octetstream + 2009-02-03T05:26:32.612278 + + + test_object_2 + b039efe731ad111bc1b0ef221c3849d0 + 64 + application/octetstream + 2009-02-03T05:26:32.612278 + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml2.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml2.xml new file mode 100755 index 0000000..5f94bbd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/data/xml2.xml @@ -0,0 +1,14 @@ + + + + Hello World + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/test-simple.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/test-simple.js new file mode 100755 index 0000000..1fc04b8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/elementtree/tests/test-simple.js @@ -0,0 +1,339 @@ +/** + * Copyright 2011 Rackspace + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +var fs = require('fs'); +var path = require('path'); + +var sprintf = require('./../lib/sprintf').sprintf; +var et = require('elementtree'); +var XML = et.XML; +var ElementTree = et.ElementTree; +var Element = et.Element; +var SubElement = et.SubElement; +var SyntaxError = require('./../lib/errors').SyntaxError; + +function readFile(name) { + return fs.readFileSync(path.join(__dirname, '/data/', name), 'utf8'); +} + +exports['test_simplest'] = function(test, assert) { + /* Ported from */ + var Element = et.Element; + var root = Element('root'); + root.append(Element('one')); + root.append(Element('two')); + root.append(Element('three')); + assert.equal(3, root.len()); + assert.equal('one', root.getItem(0).tag); + assert.equal('two', root.getItem(1).tag); + assert.equal('three', root.getItem(2).tag); + test.finish(); +}; + + +exports['test_attribute_values'] = function(test, assert) { + var XML = et.XML; + var root = XML(''); + assert.equal('Alpha', root.attrib['alpha']); + assert.equal('Beta', root.attrib['beta']); + assert.equal('Gamma', root.attrib['gamma']); + test.finish(); +}; + + +exports['test_findall'] = function(test, assert) { + var XML = et.XML; + var root = XML(''); + + assert.equal(root.findall("c").length, 1); + assert.equal(root.findall(".//c").length, 2); + assert.equal(root.findall(".//b").length, 3); + assert.equal(root.findall(".//b")[0]._children.length, 1); + assert.equal(root.findall(".//b")[1]._children.length, 0); + assert.equal(root.findall(".//b")[2]._children.length, 0); + assert.deepEqual(root.findall('.//b')[0], root.getchildren()[0]); + + test.finish(); +}; + +exports['test_find'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + var c = SubElement(a, 'c'); + + assert.deepEqual(a.find('./b/..'), a); + test.finish(); +}; + +exports['test_elementtree_find_qname'] = function(test, assert) { + var tree = new et.ElementTree(XML('')); + assert.deepEqual(tree.find(new et.QName('c')), tree.getroot()._children[2]); + test.finish(); +}; + +exports['test_attrib_ns_clear'] = function(test, assert) { + var attribNS = '{http://foo/bar}x'; + + var par = Element('par'); + par.set(attribNS, 'a'); + var child = SubElement(par, 'child'); + child.set(attribNS, 'b'); + + assert.equal('a', par.get(attribNS)); + assert.equal('b', child.get(attribNS)); + + par.clear(); + assert.equal(null, par.get(attribNS)); + assert.equal('b', child.get(attribNS)); + test.finish(); +}; + +exports['test_create_tree_and_parse_simple'] = function(test, assert) { + var i = 0; + var e = new Element('bar', {}); + var expected = "\n" + + 'ponies'; + + SubElement(e, "blah", {a: 11}); + SubElement(e, "blah", {a: 12}); + var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); + se.text = 'ponies'; + + se.itertext(function(text) { + assert.equal(text, 'ponies'); + i++; + }); + + assert.equal(i, 1); + var etree = new ElementTree(e); + var xml = etree.write(); + assert.equal(xml, expected); + test.finish(); +}; + +exports['test_write_with_options'] = function(test, assert) { + var i = 0; + var e = new Element('bar', {}); + var expected1 = "\n" + + '\n' + + ' \n' + + ' test\n' + + ' \n' + + ' \n' + + ' ponies\n' + + '\n'; + var expected2 = "\n" + + '\n' + + ' \n' + + ' test\n' + + ' \n' + + ' \n' + + ' ponies\n' + + '\n'; + + var expected3 = "\n" + + '\n' + + ' \n' + + ' Hello World\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' Test & Test & Test\n' + + ' \n' + + '\n'; + + var se1 = SubElement(e, "blah", {a: 11}); + var se2 = SubElement(se1, "baz", {d: 11}); + se2.text = 'test'; + SubElement(e, "blah", {a: 12}); + var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); + se.text = 'ponies'; + + se.itertext(function(text) { + assert.equal(text, 'ponies'); + i++; + }); + + assert.equal(i, 1); + var etree = new ElementTree(e); + var xml1 = etree.write({'indent': 4}); + var xml2 = etree.write({'indent': 2}); + assert.equal(xml1, expected1); + assert.equal(xml2, expected2); + + var file = readFile('xml2.xml'); + var etree2 = et.parse(file); + var xml3 = etree2.write({'indent': 4}); + assert.equal(xml3, expected3); + test.finish(); +}; + +exports['test_parse_and_find_2'] = function(test, assert) { + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + assert.equal(etree.findall('./object').length, 2); + assert.equal(etree.findall('[@name]').length, 1); + assert.equal(etree.findall('[@name="test_container_1"]').length, 1); + assert.equal(etree.findall('[@name=\'test_container_1\']').length, 1); + assert.equal(etree.findall('./object')[0].findtext('name'), 'test_object_1'); + assert.equal(etree.findtext('./object/name'), 'test_object_1'); + assert.equal(etree.findall('.//bytes').length, 2); + assert.equal(etree.findall('*/bytes').length, 2); + assert.equal(etree.findall('*/foobar').length, 0); + + test.finish(); +}; + +exports['test_namespaced_attribute'] = function(test, assert) { + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + assert.equal(etree.findall('*/bytes[@android:type="cool"]').length, 1); + + test.finish(); +} + +exports['test_syntax_errors'] = function(test, assert) { + var expressions = [ './/@bar', '[@bar', '[@foo=bar]', '[@', '/bar' ]; + var errCount = 0; + var data = readFile('xml1.xml'); + var etree = et.parse(data); + + expressions.forEach(function(expression) { + try { + etree.findall(expression); + } + catch (err) { + errCount++; + } + }); + + assert.equal(errCount, expressions.length); + test.finish(); +}; + +exports['test_register_namespace'] = function(test, assert){ + var prefix = 'TESTPREFIX'; + var namespace = 'http://seriously.unknown/namespace/URI'; + var errCount = 0; + + var etree = Element(sprintf('{%s}test', namespace)); + assert.equal(et.tostring(etree, { 'xml_declaration': false}), + sprintf('', namespace)); + + et.register_namespace(prefix, namespace); + var etree = Element(sprintf('{%s}test', namespace)); + assert.equal(et.tostring(etree, { 'xml_declaration': false}), + sprintf('<%s:test xmlns:%s="%s" />', prefix, prefix, namespace)); + + try { + et.register_namespace('ns25', namespace); + } + catch (err) { + errCount++; + } + + assert.equal(errCount, 1, 'Reserved prefix used, but exception was not thrown'); + test.finish(); +}; + +exports['test_tostring'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + var c = SubElement(a, 'c'); + c.text = 543; + + assert.equal(et.tostring(a, { 'xml_declaration': false }), '543'); + assert.equal(et.tostring(c, { 'xml_declaration': false }), '543'); + test.finish(); +}; + +exports['test_escape'] = function(test, assert) { + var a = Element('a'); + var b = SubElement(a, 'b'); + b.text = '&&&&<>"\n\r'; + + assert.equal(et.tostring(a, { 'xml_declaration': false }), '&&&&<>\"\n\r'); + test.finish(); +}; + +exports['test_find_null'] = function(test, assert) { + var root = Element('root'); + var node = SubElement(root, 'node'); + var leaf = SubElement(node, 'leaf'); + leaf.text = 'ipsum'; + + assert.equal(root.find('node/leaf'), leaf); + assert.equal(root.find('no-such-node/leaf'), null); + test.finish(); +}; + +exports['test_findtext_null'] = function(test, assert) { + var root = Element('root'); + var node = SubElement(root, 'node'); + var leaf = SubElement(node, 'leaf'); + leaf.text = 'ipsum'; + + assert.equal(root.findtext('node/leaf'), 'ipsum'); + assert.equal(root.findtext('no-such-node/leaf'), null); + test.finish(); +}; + +exports['test_remove'] = function(test, assert) { + var root = Element('root'); + var node1 = SubElement(root, 'node1'); + var node2 = SubElement(root, 'node2'); + var node3 = SubElement(root, 'node3'); + + assert.equal(root.len(), 3); + + root.remove(node2); + + assert.equal(root.len(), 2); + assert.equal(root.getItem(0).tag, 'node1') + assert.equal(root.getItem(1).tag, 'node3') + + test.finish(); +}; + +exports['test_cdata_write'] = function(test, assert) { + var root, etree, xml, values, value, i; + + values = [ + 'if(0>1) then true;', + 'ponies hello', + '' + ]; + + for (i = 0; i < values.length; i++) { + value = values[i]; + + root = Element('root'); + root.append(et.CData(value)); + etree = new ElementTree(root); + xml = etree.write({'xml_declaration': false}); + + assert.equal(xml, sprintf('', value)); + } + + test.finish(); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/README.md new file mode 100755 index 0000000..063cf95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/README.md @@ -0,0 +1,377 @@ +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) + +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Negation + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird, and for the time being, this should be +avoided. The behavior is deprecated in version 5, and will be removed +entirely in version 6. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* `cb` {Function} + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* return: {Array} filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` {String} pattern to search for +* `options` {Object} +* `cb` {Function} Called when an error occurs, or matches are found + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'DIR'` - Path exists, and is not a directory + * `'FILE'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the matched. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of patterns to exclude matches. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `nonegate` Suppress deprecated `negate` behavior. (See below.) + Default=true +* `nocomment` Suppress deprecated `comment` behavior. (See below.) + Default=true + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +**Note**: In version 5 of this module, negation and comments are +**disabled** by default. You can explicitly set `nonegate:false` or +`nocomment:false` to re-enable them. They are going away entirely in +version 6. + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird. It is better to use the `ignore` option +to set a pattern or set of patterns to exclude from matches. If you +want the "everything except *x*" type of behavior, you can use `**` as +the main pattern, and set an `ignore` for the things to exclude. + +The comments feature is added in minimatch, primarily to more easily +support use cases like ignore files, where a `#` at the start of a +line makes the pattern "empty". However, in the context of a +straightforward filesystem globber, "comments" don't make much sense. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/common.js new file mode 100755 index 0000000..e36a631 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/common.js @@ -0,0 +1,245 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern) + } + + return { + matcher: new Minimatch(pattern), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = options.cwd + self.changedCwd = path.resolve(options.cwd) !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.nomount = !!options.nomount + + // disable comments and negation unless the user explicitly + // passes in false as the option. + options.nonegate = options.nonegate === false ? false : true + options.nocomment = options.nocomment === false ? false : true + deprecationWarning(options) + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +// TODO(isaacs): remove entirely in v6 +// exported to reset in tests +exports.deprecationWarned +function deprecationWarning(options) { + if (!options.nonegate || !options.nocomment) { + if (process.noDeprecation !== true && !exports.deprecationWarned) { + var msg = 'glob WARNING: comments and negation will be disabled in v6' + if (process.throwDeprecation) + throw new Error(msg) + else if (process.traceDeprecation) + console.trace(msg) + else + console.error(msg) + + exports.deprecationWarned = true + } + } +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + return !(/\/$/.test(e)) + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/glob.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/glob.js new file mode 100755 index 0000000..022d2ac --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/glob.js @@ -0,0 +1,752 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +glob.hasMagic = function (pattern, options_) { + var options = util._extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + + function done () { + --self._processing + if (self._processing <= 0) + self._finish() + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/package.json new file mode 100755 index 0000000..278fdb6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "glob@^5.0.13", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^5.0.13", + "spec": ">=5.0.13 <6.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "glob@>=5.0.13 <6.0.0", + "_id": "glob@5.0.15", + "_inCache": true, + "_location": "/glob", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "glob@^5.0.13", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "^5.0.13", + "spec": ">=5.0.13 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "_shrinkwrap": null, + "_spec": "glob@^5.0.13", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "description": "a little globber", + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^1.1.4", + "tick": "0.0.6" + }, + "directories": {}, + "dist": { + "shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", + "tarball": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "gitHead": "3a7e71d453dd80e75b196fd262dd23ed54beeceb", + "homepage": "https://github.com/isaacs/node-glob#readme", + "license": "ISC", + "main": "glob.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "bench": "bash benchmark.sh", + "benchclean": "node benchclean.js", + "prepublish": "npm run benchclean", + "prof": "bash prof.sh && cat profile.txt", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + }, + "version": "5.0.15" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/sync.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/sync.js new file mode 100755 index 0000000..09883d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/glob/sync.js @@ -0,0 +1,460 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/LICENSE new file mode 100755 index 0000000..05eeeb8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/README.md new file mode 100755 index 0000000..6dc8929 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/inflight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/inflight.js new file mode 100755 index 0000000..48202b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/inflight.js @@ -0,0 +1,54 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/package.json new file mode 100755 index 0000000..ec25ea5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inflight/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "inflight@^1.0.4", + "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob" + ] + ], + "_from": "inflight@>=1.0.4 <2.0.0", + "_id": "inflight@1.0.6", + "_inCache": true, + "_location": "/inflight", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inflight@^1.0.4", + "scope": null, + "escapedName": "inflight", + "name": "inflight", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "_shrinkwrap": null, + "_spec": "inflight@^1.0.4", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "description": "Add callbacks to requests in flight to avoid async duplication", + "devDependencies": { + "tap": "^7.1.2" + }, + "directories": {}, + "dist": { + "shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "files": [ + "inflight.js" + ], + "gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57", + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "inflight", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/inflight.git" + }, + "scripts": { + "test": "tap test.js --100" + }, + "version": "1.0.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/LICENSE new file mode 100755 index 0000000..dea3013 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/README.md new file mode 100755 index 0000000..b1c5665 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits.js new file mode 100755 index 0000000..3b94763 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits_browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits_browser.js new file mode 100755 index 0000000..c1e78a7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/package.json new file mode 100755 index 0000000..0c2fa45 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/inherits/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "inherits@2", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob" + ] + ], + "_from": "inherits@>=2.0.0 <3.0.0", + "_id": "inherits@2.0.3", + "_inCache": true, + "_location": "/inherits", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inherits@2", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_shasum": "633c2c83e3da42a502f52466022480f4208261de", + "_shrinkwrap": null, + "_spec": "inherits@2", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": { + "tap": "^7.1.0" + }, + "directories": {}, + "dist": { + "shasum": "633c2c83e3da42a502f52466022480f4208261de", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/CONTRIBUTING.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/CONTRIBUTING.md new file mode 100755 index 0000000..b132d71 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/CONTRIBUTING.md @@ -0,0 +1,29 @@ +## Contributing to ios-sim + +Github url: + + https://github.com/phonegap/ios-sim + +Git clone url: + + https://github.com/phonegap/ios-sim.git + +## Filing an issue + +Please run the commands below in your Terminal.app and include it in the issue: + +``` +1. sw_vers -productVersion +2. ios-sim --version +3. xcodebuild -version +4. xcode-select --print-path +5. gcc --version +``` +Also include **command line arguments** you used for ios-sim. + + +## Sending a Pull Request + +Please **create a topic branch** for your issue before submitting your pull request. You will be asked to re-submit if your pull request contains unrelated commits. + +Please elaborate regarding the problem the pull request is supposed to solve, and perhaps also link to any relevant issues the pull request is trying to fix. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/ISSUE_TEMPLATE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/ISSUE_TEMPLATE.md new file mode 100755 index 0000000..92a642a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,24 @@ +## MUST READ BEFORE YOU FILE (DELETE THIS SECTION BEFORE FILING) + +Include the **command line arguments** you used for ios-sim. + +Don't forget to check out the [README](https://github.com/phonegap/ios-sim/blob/master/README.md) before filing this issue, to see if there are any known issues. + +# Expected behavior + + +# Actual behavior. + + +# Steps to reproduce the problem + + +# System Specs + +Please run the commands below in your Terminal.app and include it in the issue. Check when done and include results below. + +- [ ] 1. sw_vers -productVersion +- [ ] 2. ios-sim --version +- [ ] 3. xcodebuild -version +- [ ] 4. xcode-select --print-path +- [ ] 5. gcc --version diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.jscsrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.jscsrc new file mode 100755 index 0000000..a0a41ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.jscsrc @@ -0,0 +1,40 @@ +{ + "disallowTabs": true, + "preset": "google", + "fileExtensions": [".js", "jscs"], + + "requireSemicolons": true, + "requireParenthesesAroundIIFE": true, + "maximumLineLength": 120, + "validateLineBreaks": "LF", + "validateIndentation": 4, + "disallowTrailingComma": true, + "disallowUnusedParams": true, + + "disallowSpacesInsideObjectBrackets": null, + "disallowImplicitTypeConversion": ["string"], + + "safeContextKeyword": "_this", + + "disallowMultipleVarDecl": { + allExcept: ['require'] + }, + + "requireCamelCaseOrUpperCaseIdentifiers" : false, + + "jsDoc": { + "checkAnnotations": "closurecompiler", + "checkParamNames": true, + "requireParamTypes": true, + "checkRedundantParams": true, + "checkReturnTypes": true, + "checkRedundantReturns": true, + "requireReturnTypes": true, + "checkTypes": "capitalizedNativeCase", + "checkRedundantAccess": true, + "requireNewlineAfterDescription": true + }, + + "excludeFiles": [ + ] +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.npmignore new file mode 100755 index 0000000..71ffef6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.npmignore @@ -0,0 +1,7 @@ +node_modules +build +*.swp +.DS_Store +*.xcworkspace +xcuserdata +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.travis.yml new file mode 100755 index 0000000..30150ba --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/.travis.yml @@ -0,0 +1,16 @@ +language: node_js +sudo: false +git: + depth: 10 +node_js: +- '0.10' +- '0.12' +- '4' +- '6' +install: +- npm install +script: +- npm test +notifications: + slack: + secure: gn0YH0MCFOYR3Dd8Vsx3K/J9G0aazhnRjQVfqbeRKN3f6vToKif1CxhiDLXI6cxEB5DBiAtpK58jkoDYrXoNLGuSbiTHBJ+ankU8aG3s0OTIHa/8I0TjRKjBRc0PrMV7n7EiLC6LQxNe0x0mMSE1gdOUeS1UrZ5ZiVrS1u0eHHs= diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/LICENSE new file mode 100755 index 0000000..f5768b4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/README.md new file mode 100755 index 0000000..3fa70cc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/README.md @@ -0,0 +1,100 @@ +[![Build status](https://ci.appveyor.com/api/projects/status/0kw833771uu622fs?svg=true)](https://ci.appveyor.com/project/shazron/ios-sim) +[![Build Status](https://travis-ci.org/phonegap/ios-sim.svg?branch=master)](https://travis-ci.org/phonegap/ios-sim) + +ios-sim +======= + +Supports Xcode 6 only since version 3.x. + +The ios-sim tool is a command-line utility that launches an iOS application on the iOS Simulator. This allows for niceties such as automated testing without having to open Xcode. + +Features +-------- + +* Choose the device family to simulate, i.e. iPhone or iPad. Run using "showdevicetypes" option to see available device types, and pass it in as the "devicetypeid" parameter. + +See the `--help` option for more info. + +The unimplemented options below are in the [backlog](https://github.com/phonegap/ios-sim/milestones/ios-sim%204.2.0) + +Usage +----- + +``` + + Usage: ios-sim [--args ...] + + Commands: + showsdks List the available iOS SDK versions + showdevicetypes List the available device types + launch Launch the application at the specified path on the iOS Simulator + start Launch iOS Simulator without an app + install Install the application at the specified path on the iOS Simulator without launching the app + + Options: + --version Print the version of ios-sim + --help Show this help text + --exit Exit after startup + --log The path where log of the app running in the Simulator will be redirected to + --devicetypeid The id of the device type that should be simulated (Xcode6+). Use 'showdevicetypes' to list devices. + e.g "com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone6, 8.0" + + Removed in version 4.x: + --stdout The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim) + --stderr The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim) + --sdk The iOS SDK version to run the application on (defaults to the latest) + --family The device type that should be simulated (defaults to `iphone') + --retina Start a retina device + --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch)) + --64bit In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit)) + + Unimplemented in this version: + --verbose Set the output level to verbose + --timeout The timeout time to wait for a response from the Simulator. Default value: 30 seconds + --args <...> All following arguments will be passed on to the application + --env A plist file containing environment key-value pairs that should be set + --setenv NAME=VALUE Set an environment variable + +``` + +Installation +------------ + +Choose one of the following installation methods. + +### Node JS + +Install using node.js (at least 0.10.20): + + $ npm install ios-sim -g + +### Zip + +Download a zip file: + + $ curl -L https://github.com/phonegap/ios-sim/archive/master.zip -o ios-sim.zip + $ unzip ios-sim.zip + +### Git + +Download using git clone: + + $ git clone git://github.com/phonegap/ios-sim.git + +Troubleshooting +--------------- + +Make sure you enable Developer Mode on your machine: + + $ DevToolsSecurity -enable + +Make sure multiple instances of launchd_sim are not running: + + $ killall launchd_sim + +License +------- + +This project is available under the MIT license. See [LICENSE][license]. + +[license]: https://github.com/phonegap/ios-sim/blob/master/LICENSE diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/appveyor.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/appveyor.yml new file mode 100755 index 0000000..14b9f99 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/appveyor.yml @@ -0,0 +1,19 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml +environment: + matrix: + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "6" + +install: + - ps: Install-Product node $env:nodejs_version + - npm install + +build: off + +test_script: + - node --version + - npm --version + - npm test diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim new file mode 100755 index 0000000..bab9b88 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim @@ -0,0 +1,42 @@ +#!/usr/bin/env node +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +// Set this to 1 to enable timestamp collection via addTs(). +if (0) { + var ts = []; + addTs = function(name) { + ts.push([name, new Date]); + } + process.on('exit', function() { + for (var i = 0; i < ts.length - 1; ++i) { + var e1 = ts[i]; + var e2 = ts[i+1]; + console.log(e1[0] + ' -> ' + e2[0] + ' = ' + (e2[1] - e1[1])); + } + console.log('total: ' + (ts[ts.length-1][1] - ts[0][1])); + }); +} else { + addTs = function() {}; +} + +addTs('start'); +var cli = require('../src/cli'); +cli(process.argv); +addTs('end'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim.cmd b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim.cmd new file mode 100755 index 0000000..18927ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/bin/ios-sim.cmd @@ -0,0 +1 @@ +@node "%~dpn0" %* diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/doc/help.txt b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/doc/help.txt new file mode 100755 index 0000000..8174cfe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/doc/help.txt @@ -0,0 +1,33 @@ +Usage: ios-sim [--args ...] + +Commands: + showsdks List the available iOS SDK versions + showdevicetypes List the available device types + launch Launch the application at the specified path on the iOS Simulator + start Launch iOS Simulator without an app + install Install the application at the specified path on the iOS Simulator without launching the app + +Options: + --version Print the version of ios-sim + --help Show this help text + --exit Exit after startup + --log The path where log of the app running in the Simulator will be redirected to + --devicetypeid The id of the device type that should be simulated (Xcode6+). Use 'showdevicetypes' to list devices. + e.g "com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone6, 8.0" + +Removed in version 4.x: + --stdout The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim) + --stderr The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim) + --sdk The iOS SDK version to run the application on (defaults to the latest) + --family The device type that should be simulated (defaults to `iphone') + --retina Start a retina device + --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch)) + --64bit In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit)) + +Unimplemented since version 4.x: + --verbose Set the output level to verbose + --timeout The timeout time to wait for a response from the Simulator. Default value: 30 seconds + --args <...> All following arguments will be passed on to the application + --env A plist file containing environment key-value pairs that should be set + --setenv NAME=VALUE Set an environment variable + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/ios-sim.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/ios-sim.js new file mode 100755 index 0000000..4547126 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/ios-sim.js @@ -0,0 +1,4 @@ +var iossim = require('./src/lib.js'); +iossim.init(); + +exports = module.exports = iossim; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/.npmignore new file mode 100755 index 0000000..a9b46ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/README.md new file mode 100755 index 0000000..37e5e1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/bplistParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/bplistParser.js new file mode 100755 index 0000000..e818454 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,332 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java + +var fs = require('fs'); +var debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +var EPOCH = 978307200000; + +var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { + function tryParseBuffer(buffer) { + var err = null; + var result; + try { + result = parseBuffer(buffer); + } catch (ex) { + err = ex; + } + callback(err, result); + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } else { + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { return callback(err); } + tryParseBuffer(data); + }); + } +}; + +var parseBuffer = exports.parseBuffer = function (buffer) { + var result = {}; + + // check header + var header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + var trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + var offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + var objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + var numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + var topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + var offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + var offsetTable = []; + + for (var i = 0; i < numObjects; i++) { + var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + var offset = offsetTable[tableOffset]; + var type = buffer[offset]; + var objType = (type & 0xF0) >> 4; //First 4 bits + var objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function parseInteger() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseUID() { + var length = objInfo + 1; + if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseReal() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + var realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + else if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + var dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + var dataoffset = 1; + var length = objInfo; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + var enc = "utf8"; + var length = objInfo; + var stroffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + var stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + var plistString = buffer.slice(offset + stroffset, offset + stroffset + length); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseArray() { + var length = objInfo; + var arrayoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + var array = []; + for (var i = 0; i < length; i++) { + var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + var length = objInfo; + var dictoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + var dict = {}; + for (var i = 0; i < length; i++) { + var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + var key = parseObject(keyRef); + var val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + var l = 0; + for (var i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + var data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + var len = buffer.length; + for (var i = 0; i < len; i += 2) { + var a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/package.json new file mode 100755 index 0000000..e5ba054 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "bplist-parser@^0.0.6", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.0.6", + "spec": ">=0.0.6 <0.0.7", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim" + ] + ], + "_from": "bplist-parser@>=0.0.6 <0.0.7", + "_id": "bplist-parser@0.0.6", + "_inCache": true, + "_location": "/ios-sim/bplist-parser", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "1.4.14", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-parser@^0.0.6", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.0.6", + "spec": ">=0.0.6 <0.0.7", + "type": "range" + }, + "_requiredBy": [ + "/ios-sim" + ], + "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "_shasum": "38da3471817df9d44ab3892e27707bbbd75a11b9", + "_shrinkwrap": null, + "_spec": "bplist-parser@^0.0.6", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim", + "author": { + "name": "Joe Ferner", + "email": "joe.ferner@nearinfinity.com" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-parser/issues" + }, + "dependencies": {}, + "description": "Binary plist parser.", + "devDependencies": { + "nodeunit": "~0.7.4" + }, + "directories": {}, + "dist": { + "shasum": "38da3471817df9d44ab3892e27707bbbd75a11b9", + "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz" + }, + "gitHead": "a2230a5df3c7014ffbe5761bcb091ea2d061b47b", + "homepage": "https://github.com/nearinfinity/node-bplist-parser", + "keywords": [ + "bplist", + "plist", + "parser" + ], + "license": "MIT", + "main": "bplistParser.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.0.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/airplay.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/airplay.bplist new file mode 100755 index 0000000..931adea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/airplay.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/iTunes-small.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/iTunes-small.bplist new file mode 100755 index 0000000..b7edb14 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/iTunes-small.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/parseTest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/parseTest.js new file mode 100755 index 0000000..dcb6dd0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/parseTest.js @@ -0,0 +1,120 @@ +'use strict'; + +// tests are adapted from https://github.com/TooTallNate/node-plist + +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplist = require('../'); + +module.exports = { + 'iTunes Small': function (test) { + var file = path.join(__dirname, "iTunes-small.bplist"); + var startTime1 = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); + var dict = dicts[0]; + test.equal(dict['Application Version'], "9.0.3"); + test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); + test.done(); + }); + }, + + 'sample1': function (test) { + var file = path.join(__dirname, "sample1.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); + test.done(); + }); + }, + + 'sample2': function (test) { + var file = path.join(__dirname, "sample2.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); + test.done(); + }); + }, + + 'airplay': function (test) { + var file = path.join(__dirname, "airplay.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['duration'], 5555.0495000000001); + test.equal(dict['position'], 4.6269989039999997); + test.done(); + }); + }, + + 'utf16': function (test) { + var file = path.join(__dirname, "utf16.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], 'sellStuff'); + test.equal(dict['CFBundleShortVersionString'], '2.6.1'); + test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); + test.done(); + }); + }, + + 'uid': function (test) { + var file = path.join(__dirname, "uid.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.deepEqual(dict['$objects'][1]['NS.keys'], [2, 3, 4]); + test.deepEqual(dict['$objects'][1]['NS.objects'], [5, 6, 7]); + test.equal(dict['$top']['root'], 1); + test.done(); + }); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample1.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample1.bplist new file mode 100755 index 0000000..5b808ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample1.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample2.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample2.bplist new file mode 100755 index 0000000..fc42979 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/sample2.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/uid.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/uid.bplist new file mode 100755 index 0000000..59f341e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/uid.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/utf16.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/utf16.bplist new file mode 100755 index 0000000..ba4bcfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/bplist-parser/test/utf16.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/.npmignore new file mode 100755 index 0000000..e69de29 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/LICENSE new file mode 100755 index 0000000..05a4010 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/README.md new file mode 100755 index 0000000..e364799 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/README.md @@ -0,0 +1,206 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you go half-insane just trying to manage them all, and put +it off with duct-tape solutions until you see exactly to the core of the +problem, and finally snap and write an awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many" : [String, Array] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk 1000 -fp # unknown opts are ok. +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --blatzk true -fp # but they need a value +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many 1 --many null --many foo +{ many: ["1", "null", "foo"] } + +$ node my-program.js --many foo +{ many: ["foo"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* Number: Must be numeric. +* url: A url. If it doesn't parse, it isn't accepted. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents, and numeric values will be +interpreted as a number. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid +options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/bin/nopt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/bin/nopt.js new file mode 100755 index 0000000..df90c72 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/bin/nopt.js @@ -0,0 +1,44 @@ +#!/usr/bin/env node +var nopt = require("../lib/nopt") + , types = { num: Number + , bool: Boolean + , help: Boolean + , list: Array + , "num-list": [Number, Array] + , "str-list": [String, Array] + , "bool-list": [Boolean, Array] + , str: String } + , shorthands = { s: [ "--str", "astring" ] + , b: [ "--bool" ] + , nb: [ "--no-bool" ] + , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] + , "?": ["--help"] + , h: ["--help"] + , H: ["--help"] + , n: [ "--num", "125" ] } + , parsed = nopt( types + , shorthands + , process.argv + , 2 ) + +console.log("parsed", parsed) + +if (parsed.help) { + console.log("") + console.log("nopt cli tester") + console.log("") + console.log("types") + console.log(Object.keys(types).map(function M (t) { + var type = types[t] + if (Array.isArray(type)) { + return [t, type.map(function (type) { return type.name })] + } + return [t, type && type.name] + }).reduce(function (s, i) { + s[i[0]] = i[1] + return s + }, {})) + console.log("") + console.log("shorthands") + console.log(shorthands) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/examples/my-program.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/examples/my-program.js new file mode 100755 index 0000000..142447e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/examples/my-program.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +//process.env.DEBUG_NOPT = 1 + +// my-program.js +var nopt = require("../lib/nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag", "true"] + , "g" : ["--flag"] + , "s" : "--flag" + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + +console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/lib/nopt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/lib/nopt.js new file mode 100755 index 0000000..ff41bbc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/lib/nopt.js @@ -0,0 +1,530 @@ +// info about each config option. + +var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG + ? function () { console.error.apply(console, arguments) } + : function () {} + +var url = require("url") + , path = require("path") + , Stream = require("stream").Stream + , abbrev = require("abbrev") + +module.exports = exports = nopt +exports.clean = clean + +exports.typeDefs = + { String : { type: String, validate: validateString } + , Boolean : { type: Boolean, validate: validateBoolean } + , url : { type: url, validate: validateUrl } + , Number : { type: Number, validate: validateNumber } + , path : { type: path, validate: validatePath } + , Stream : { type: Stream, validate: validateStream } + } + +function nopt (types, shorthands, args, slice) { + args = args || process.argv + types = types || {} + shorthands = shorthands || {} + if (typeof slice !== "number") slice = 2 + + debug(types, shorthands, args, slice) + + args = args.slice(slice) + var data = {} + , key + , remain = [] + , cooked = args + , original = args.slice(0) + + parse(args, data, remain, types, shorthands) + // now data is full + clean(data, types, exports.typeDefs) + data.argv = {remain:remain,cooked:cooked,original:original} + data.argv.toString = function () { + return this.original.map(JSON.stringify).join(" ") + } + return data +} + +function clean (data, types, typeDefs) { + typeDefs = typeDefs || exports.typeDefs + var remove = {} + , typeDefault = [false, true, null, String, Number] + + Object.keys(data).forEach(function (k) { + if (k === "argv") return + var val = data[k] + , isArray = Array.isArray(val) + , type = types[k] + if (!isArray) val = [val] + if (!type) type = typeDefault + if (type === Array) type = typeDefault.concat(Array) + if (!Array.isArray(type)) type = [type] + + debug("val=%j", val) + debug("types=", type) + val = val.map(function (val) { + // if it's an unknown value, then parse false/true/null/numbers + if (typeof val === "string") { + debug("string %j", val) + val = val.trim() + if ((val === "null" && ~type.indexOf(null)) + || (val === "true" && + (~type.indexOf(true) || ~type.indexOf(Boolean))) + || (val === "false" && + (~type.indexOf(false) || ~type.indexOf(Boolean)))) { + val = JSON.parse(val) + debug("jsonable %j", val) + } else if (~type.indexOf(Number) && !isNaN(val)) { + debug("convert to number", val) + val = +val + } + } + + if (!types.hasOwnProperty(k)) { + return val + } + + // allow `--no-blah` to set 'blah' to null if null is allowed + if (val === false && ~type.indexOf(null) && + !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val = null + } + + var d = {} + d[k] = val + debug("prevalidated val", d, val, types[k]) + if (!validate(d, k, val, types[k], typeDefs)) { + if (exports.invalidHandler) { + exports.invalidHandler(k, val, types[k], data) + } else if (exports.invalidHandler !== false) { + debug("invalid: "+k+"="+val, types[k]) + } + return remove + } + debug("validated val", d, val, types[k]) + return d[k] + }).filter(function (val) { return val !== remove }) + + if (!val.length) delete data[k] + else if (isArray) { + debug(isArray, data[k], val) + data[k] = val + } else data[k] = val[0] + + debug("k=%s val=%j", k, val, data[k]) + }) +} + +function validateString (data, k, val) { + data[k] = String(val) +} + +function validatePath (data, k, val) { + data[k] = path.resolve(String(val)) + return true +} + +function validateNumber (data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)) + if (isNaN(val)) return false + data[k] = +val +} + +function validateBoolean (data, k, val) { + if (val instanceof Boolean) val = val.valueOf() + else if (typeof val === "string") { + if (!isNaN(val)) val = !!(+val) + else if (val === "null" || val === "false") val = false + else val = true + } else val = !!val + data[k] = val +} + +function validateUrl (data, k, val) { + val = url.parse(String(val)) + if (!val.host) return false + data[k] = val.href +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +function validate (data, k, val, type, typeDefs) { + // arrays are lists of types. + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i ++) { + if (type[i] === Array) continue + if (validate(data, k, val, type[i], typeDefs)) return true + } + delete data[k] + return false + } + + // an array of anything? + if (type === Array) return true + + // NaN is poisonous. Means that something is not allowed. + if (type !== type) { + debug("Poison NaN", k, val, type) + delete data[k] + return false + } + + // explicit list of values + if (val === type) { + debug("Explicitly allowed %j", val) + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + return true + } + + // now go through the list of typeDefs, validate against each one. + var ok = false + , types = Object.keys(typeDefs) + for (var i = 0, l = types.length; i < l; i ++) { + debug("test type %j %j %j", k, val, types[i]) + var t = typeDefs[types[i]] + if (t && type === t.type) { + var d = {} + ok = false !== t.validate(d, k, val) + val = d[k] + if (ok) { + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + break + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]) + + if (!ok) delete data[k] + return ok +} + +function parse (args, data, remain, types, shorthands) { + debug("parse", args, data, remain) + + var key = null + , abbrevs = abbrev(Object.keys(types)) + , shortAbbr = abbrev(Object.keys(shorthands)) + + for (var i = 0; i < args.length; i ++) { + var arg = args[i] + debug("arg", arg) + + if (arg.match(/^-{2,}$/)) { + // done with keys. + // the rest are args. + remain.push.apply(remain, args.slice(i + 1)) + args[i] = "--" + break + } + if (arg.charAt(0) === "-") { + if (arg.indexOf("=") !== -1) { + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) + } + // see if it's a shorthand + // if so, splice and back up to re-parse it. + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) + debug("arg=%j shRes=%j", arg, shRes) + if (shRes) { + debug(arg, shRes) + args.splice.apply(args, [i, 1].concat(shRes)) + if (arg !== shRes[0]) { + i -- + continue + } + } + arg = arg.replace(/^-+/, "") + var no = false + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no + arg = arg.substr(3) + } + + if (abbrevs[arg]) arg = abbrevs[arg] + + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + + var val + , la = args[i + 1] + + var isBool = no || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + (la === "false" && + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + + if (isBool) { + // just set and move along + val = !no + // however, also support --bool true or --bool false + if (la === "true" || la === "false") { + val = JSON.parse(la) + la = null + if (no) val = !val + i ++ + } + + // also support "foo":[Boolean, "bar"] and "--foo bar" + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { + // an explicit type + val = la + i ++ + } else if ( la === "null" && ~types[arg].indexOf(null) ) { + // null allowed + val = null + i ++ + } else if ( !la.match(/^-{2,}[^-]/) && + !isNaN(la) && + ~types[arg].indexOf(Number) ) { + // number + val = +la + i ++ + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + // string + val = la + i ++ + } + } + + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + continue + } + + if (la && la.match(/^-{2,}$/)) { + la = undefined + i -- + } + + val = la === undefined ? true : la + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + i ++ + continue + } + remain.push(arg) + } +} + +function resolveShort (arg, shorthands, shortAbbr, abbrevs) { + // handle single-char shorthands glommed together, like + // npm ls -glp, but only if there is one dash, and only if + // all of the chars are single-char shorthands, and it's + // not a match to some other abbrev. + arg = arg.replace(/^-+/, '') + if (abbrevs[arg] && !shorthands[arg]) { + return null + } + if (shortAbbr[arg]) { + arg = shortAbbr[arg] + } else { + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { l[r] = true ; return l }, {}) + shorthands.___singles = singles + } + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) + } + + if (shorthands[arg] && !Array.isArray(shorthands[arg])) { + shorthands[arg] = shorthands[arg].split(/\s+/) + } + return shorthands[arg] +} + +if (module === require.main) { +var assert = require("assert") + , util = require("util") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } + + , types = + { aoa: Array + , nullstream: [null, Stream] + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + } + +; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know the-rules --and so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, 100]} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(types, shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + console.log(util.inspect(actual, false, 2, true), parsed.remain) + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + assert.equal(e, a) + } + assert.deepEqual(rem, parsed.remain) + }) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/package.json new file mode 100755 index 0000000..54dca73 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/node_modules/nopt/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "nopt@1.0.9", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim" + ] + ], + "_defaultsLoaded": true, + "_engineSupported": true, + "_from": "nopt@1.0.9", + "_id": "nopt@1.0.9", + "_inCache": true, + "_location": "/ios-sim/nopt", + "_nodeVersion": "v0.5.8-pre", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "1.0.30", + "_phantomChildren": {}, + "_requested": { + "raw": "nopt@1.0.9", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "_requiredBy": [ + "/ios-sim" + ], + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "_shasum": "3bc0d7cba7bfb0d5a676dbed7c0ebe48a4fd454e", + "_shrinkwrap": null, + "_spec": "nopt@1.0.9", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "bugs": { + "url": "https://github.com/isaacs/nopt/issues" + }, + "dependencies": { + "abbrev": "1" + }, + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3bc0d7cba7bfb0d5a676dbed7c0ebe48a4fd454e", + "tarball": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/isaacs/nopt#readme", + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/nopt/raw/master/LICENSE" + }, + "main": "lib/nopt.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "nopt", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/nopt.git" + }, + "scripts": { + "test": "node lib/nopt.js" + }, + "version": "1.0.9" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/package.json new file mode 100755 index 0000000..1fc773e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + { + "raw": "ios-sim@^5.0.12", + "scope": null, + "escapedName": "ios-sim", + "name": "ios-sim", + "rawSpec": "^5.0.12", + "spec": ">=5.0.12 <6.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "ios-sim@>=5.0.12 <6.0.0", + "_id": "ios-sim@5.0.12", + "_inCache": true, + "_location": "/ios-sim", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/ios-sim-5.0.12.tgz_1480357903209_0.8315212763845921" + }, + "_npmUser": { + "name": "shazron", + "email": "shazron@gmail.com" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": { + "abbrev": "1.0.9" + }, + "_requested": { + "raw": "ios-sim@^5.0.12", + "scope": null, + "escapedName": "ios-sim", + "name": "ios-sim", + "rawSpec": "^5.0.12", + "spec": ">=5.0.12 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.12.tgz", + "_shasum": "0b07436ce1bf663bda9a3fb75412f41a1dec465b", + "_shrinkwrap": null, + "_spec": "ios-sim@^5.0.12", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Shazron Abdullah" + }, + "bin": { + "ios-sim": "./bin/ios-sim" + }, + "bugs": { + "url": "https://github.com/phonegap/ios-sim/issues" + }, + "dependencies": { + "bplist-parser": "^0.0.6", + "nopt": "1.0.9", + "plist": "^1.2.0", + "simctl": "^0.1.0" + }, + "description": "launch iOS apps into the iOS Simulator from the command line (Xcode 7.0+)", + "devDependencies": { + "jasmine-node": "^1.14.5", + "jscs": "^2.11.0", + "jshint": "^2.9.1" + }, + "directories": {}, + "dist": { + "shasum": "0b07436ce1bf663bda9a3fb75412f41a1dec465b", + "tarball": "https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.12.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "0e0cafacca40434702a53538b11169a345070495", + "homepage": "https://github.com/phonegap/ios-sim#readme", + "keywords": [ + "ios-sim", + "iOS Simulator" + ], + "license": "MIT", + "main": "ios-sim.js", + "maintainers": [ + { + "name": "macdonst", + "email": "simon.macdonald@gmail.com" + }, + { + "name": "purplecabbage", + "email": "purplecabbage@gmail.com" + }, + { + "name": "shazron", + "email": "shazron@gmail.com" + }, + { + "name": "stevegill", + "email": "stevengill97@gmail.com" + } + ], + "name": "ios-sim", + "optionalDependencies": {}, + "preferGlobal": "true", + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/phonegap/ios-sim.git" + }, + "scripts": { + "jasmine": "jasmine-node --captureExceptions --color spec", + "jscs": "jscs src ./ios-sim.js", + "jshint": "jshint src ./ios-sim.js", + "postjshint": "npm run jscs", + "posttest": "npm run jshint", + "test": "npm run jasmine" + }, + "version": "5.0.12" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/cli.spec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/cli.spec.js new file mode 100755 index 0000000..fe233b7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/cli.spec.js @@ -0,0 +1,30 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +describe('cli end-to-end', function() { + + beforeEach(function() { + }); + + afterEach(function() { + }); + + // it('', function(done) { + // }); +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/commands.spec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/commands.spec.js new file mode 100755 index 0000000..da27ae8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/commands.spec.js @@ -0,0 +1,30 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +describe('commands end-to-end', function() { + + beforeEach(function() { + }); + + afterEach(function() { + }); + + // it('', function(done) { + // }); +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/lib.spec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/lib.spec.js new file mode 100755 index 0000000..d832717 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/spec/lib.spec.js @@ -0,0 +1,30 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +describe('lib end-to-end', function() { + + beforeEach(function() { + }); + + afterEach(function() { + }); + + // it('', function(done) { + // }); +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/cli.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/cli.js new file mode 100755 index 0000000..ba15ed1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/cli.js @@ -0,0 +1,102 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var path = require('path'), + command_lib = require('./commands'), + help = require('./help'); +var nopt; + +/* + * init + * + * initializes nopt and simctl + * nopt, and simctl are require()d in try-catch below to print a nice error + * message if one of them is not installed. + */ +function init() { + try { + nopt = require('nopt'); + command_lib.init(); + } catch (e) { + console.error( + 'Please run npm install from this directory:\n\t' + + path.dirname(__dirname) + ); + process.exit(2); + } +} + +function cli(inputArgs) { + var knownOpts = + { + 'version': Boolean, + 'help': Boolean, + 'verbose': Boolean, + 'exit': Boolean, + 'use-gdb': Boolean, + 'uuid': String, + 'env': String, + 'setenv': String, + 'stdout': path, + 'stderr': path, + 'timeout': Number, + 'args': Array, + 'devicetypeid': String + }; + + var shortHands = null; + + // If no inputArgs given, use process.argv. + inputArgs = inputArgs || process.argv; + + init(); + + var args = nopt(knownOpts, shortHands, inputArgs); + + process.on('uncaughtException', function(err) { + if (!args.verbose) { + console.error(err.message); + } else { + console.error(err.stack); + } + process.exit(1); + }); + + var cmd = args.argv.remain[0]; + + // some options do *not* need commands and can be run + if (args.help) { + help(); + } else if (args.version) { + console.log(require('../package').version); + } else if (cmd && command_lib[cmd]) { // command found + command_lib[cmd](args); + } else { + help(); + process.exit(1); + } +} + +module.exports = cli; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/commands.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/commands.js new file mode 100755 index 0000000..e801223 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/commands.js @@ -0,0 +1,85 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var path = require('path'), + fs = require('fs'), + help = require('./help'), + lib = require('./lib'), + util = require('util'); + +var command_lib = { + + init: function() { + lib.init(); + }, + + //jscs:disable disallowUnusedParams + showsdks: function(args) { + lib.showsdks(); + }, + //jscs:enable disallowUnusedParams + + //jscs:disable disallowUnusedParams + showdevicetypes: function(args) { + lib.showdevicetypes(); + }, + //jscs:enable disallowUnusedParams + + launch: function(args) { + var wait_for_debugger = false; + var app_path; + + if (args.argv.remain.length < 2) { + help(); + process.exit(1); + } + + app_path = args.argv.remain[1]; + + lib.launch(app_path, args.devicetypeid, args.log, args.exit, args.args); + }, + + install: function(args) { + var app_identifier; + var argv; + var app_path; + var info_plist_path; + + if (args.argv.remain.length < 2) { + help(); + process.exit(1); + } + + app_path = args.argv.remain[1]; + + lib.install(app_path, args.devicetypeid, args.log, args.exit); + }, + + start: function(args) { + lib.start(args.devicetypeid); + } +}; + +module.exports = command_lib; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/help.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/help.js new file mode 100755 index 0000000..c2e3306 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/help.js @@ -0,0 +1,41 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var fs = require('fs'), + path = require('path'); + +function help() { + var docdir = path.join(__dirname, '..', 'doc'); + var helpfile = path.join(docdir, 'help.txt'); + + if (fs.existsSync(helpfile)) { + var s = fs.readFileSync(helpfile).toString('utf8'); + console.log(s); + } else { + console.log('Help file missing.'); + } +} + +module.exports = help; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/lib.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/lib.js new file mode 100755 index 0000000..c7fcba2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/ios-sim/src/lib.js @@ -0,0 +1,403 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +//jscs:disable maximumLineLength + +var path = require('path'), + fs = require('fs'), + help = require('./help'), + util = require('util'); +var simctl; +var bplist; +var plist; + +function findFirstAvailableDevice(list) { + /* + // Example result: + { + name : 'iPhone 6', + id : 'A1193D97-F5EE-468D-9DBA-786F403766E6', + runtime : 'iOS 8.3' + } + */ + + // the object to return + var ret_obj = { + name: null, + id: null, + runtime: null + }; + + var available_runtimes = {}; + + list.runtimes.forEach(function(runtime) { + if (runtime.available) { + available_runtimes[ runtime.name ] = true; + } + }); + + list.devices.some(function(deviceGroup) { + deviceGroup.devices.some(function(device) { + if (available_runtimes[deviceGroup.runtime]) { + ret_obj = { + name: device.name, + id: device.id, + runtime: deviceGroup.runtime + }; + return true; + } + return false; + }); + return false; + }); + + return ret_obj; +} + +function findRuntimesGroupByDeviceProperty(list, deviceProperty, availableOnly) { + /* + // Example result: + { + "iPhone 6" : [ "iOS 8.2", "iOS 8.3"], + "iPhone 6 Plus" : [ "iOS 8.2", "iOS 8.3"] + } + */ + + var runtimes = {}; + var available_runtimes = {}; + + list.runtimes.forEach(function(runtime) { + if (runtime.available) { + available_runtimes[ runtime.name ] = true; + } + }); + + list.devices.forEach(function(deviceGroup) { + deviceGroup.devices.forEach(function(device) { + var devicePropertyValue = device[deviceProperty]; + + if (!runtimes[devicePropertyValue]) { + runtimes[devicePropertyValue] = []; + } + if (availableOnly) { + if (available_runtimes[deviceGroup.runtime]) { + runtimes[devicePropertyValue].push(deviceGroup.runtime); + } + } else { + runtimes[devicePropertyValue].push(deviceGroup.runtime); + } + }); + }); + + return runtimes; +} + +function findAvailableRuntime(list, device_name) { + + var all_druntimes = findRuntimesGroupByDeviceProperty(list, 'name', true); + var druntime = all_druntimes[ filterDeviceName(device_name) ]; + var runtime_found = druntime && druntime.length > 0; + + if (!runtime_found) { + console.error(util.format('No available runtimes could be found for "%s".', device_name)); + process.exit(1); + } + + // return most modern runtime + return druntime.sort().pop(); +} + +function getDeviceFromDeviceTypeId(devicetypeid) { + /* + // Example result: + { + name : 'iPhone 6', + id : 'A1193D97-F5EE-468D-9DBA-786F403766E6', + runtime : 'iOS 8.3' + } + */ + + // the object to return + var ret_obj = { + name: null, + id: null, + runtime: null + }; + + var options = { 'silent': true }; + var list = simctl.list(options).json; + + var arr = []; + if (devicetypeid) { + arr = devicetypeid.split(','); + } + + // get the devicetype from --devicetypeid + // --devicetypeid is a string in the form "devicetype, runtime_version" (optional: runtime_version) + var devicetype = null; + if (arr.length < 1) { + var dv = findFirstAvailableDevice(list); + console.error(util.format('--devicetypeid was not specified, using first available device: %s.', dv.name)); + return dv; + } else { + devicetype = arr[0].trim(); + if (arr.length > 1) { + ret_obj.runtime = arr[1].trim(); + } + } + + // check whether devicetype has the "com.apple.CoreSimulator.SimDeviceType." prefix, if not, add it + var prefix = 'com.apple.CoreSimulator.SimDeviceType.'; + if (devicetype.indexOf(prefix) !== 0) { + devicetype = prefix + devicetype; + } + + // now find the devicename from the devicetype + var devicename_found = list.devicetypes.some(function(deviceGroup) { + if (deviceGroup.id === devicetype) { + ret_obj.name = deviceGroup.name; + return true; + } + + return false; + }); + + // device name not found, exit + if (!devicename_found) { + console.error(util.format('Device type "%s" could not be found.', devicetype)); + process.exit(1); + } + + // if runtime_version was not specified, we use a default. Use first available that has the device + if (!ret_obj.runtime) { + ret_obj.runtime = findAvailableRuntime(list, ret_obj.name); + } + + // prepend iOS to runtime version, if necessary + if (ret_obj.runtime.indexOf('iOS') === -1) { + ret_obj.runtime = util.format('iOS %s', ret_obj.runtime); + } + + // now find the deviceid (by runtime and devicename) + var deviceid_found = list.devices.some(function(deviceGroup) { + // found the runtime, now find the actual device matching devicename + if (deviceGroup.runtime === ret_obj.runtime) { + return deviceGroup.devices.some(function(device) { + if (filterDeviceName(device.name) === filterDeviceName(ret_obj.name)) { + ret_obj.id = device.id; + return true; + } + return false; + }); + } + return false; + }); + + if (!deviceid_found) { + console.error( + util.format('Device id for device name "%s" and runtime "%s" could not be found, or is not available.', ret_obj.name, ret_obj.runtime) + ); + process.exit(1); + } + + return ret_obj; +} + +// replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices' +function filterDeviceName(deviceName) { + // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices' + if (deviceName.indexOf('iPad Pro') === 0) { + return deviceName.replace(/\-/g, ' ').trim(); + } + return deviceName; +} + +var lib = { + + init: function() { + if (!simctl) { + simctl = require('simctl'); + } + var output = simctl.check_prerequisites(); + if (output.code !== 0) { + console.error(output.output); + process.exit(2); + } + + if (!bplist) { + bplist = require('bplist-parser'); + } + }, + + //jscs:disable disallowUnusedParams + showsdks: function(args) { + var options = { silent: true, runtimes: true }; + var list = simctl.list(options).json; + + console.log('Simulator SDK Roots:'); + list.runtimes.forEach(function(runtime) { + if (runtime.available) { + console.log(util.format('"%s" (%s)', runtime.name, runtime.build)); + console.log(util.format('\t(unknown)')); + } + }); + }, + //jscs:enable disallowUnusedParams + + //jscs:disable disallowUnusedParams + getdevicetypes: function(args) { + var options = { silent: true }; + var list = simctl.list(options).json; + + var druntimes = findRuntimesGroupByDeviceProperty(list, 'name', true); + var name_id_map = {}; + + list.devicetypes.forEach(function(device) { + name_id_map[ filterDeviceName(device.name) ] = device.id; + }); + + list = []; + var remove = function(runtime) { + // remove "iOS" prefix in runtime, remove prefix "com.apple.CoreSimulator.SimDeviceType." in id + list.push(util.format('%s, %s', name_id_map[ deviceName ].replace(/^com.apple.CoreSimulator.SimDeviceType./, ''), runtime.replace(/^iOS /, ''))); + }; + + for (var deviceName in druntimes) { + var runtimes = druntimes[ deviceName ]; + var dname = filterDeviceName(deviceName); + + if (!(dname in name_id_map)) { + continue; + } + runtimes.forEach(remove); + } + return list; + }, + //jscs:enable disallowUnusedParams + + //jscs:disable disallowUnusedParams + showdevicetypes: function(args) { + this.getdevicetypes().forEach(function(device) { + console.log(device); + }); + }, + //jscs:enable disallowUnusedParams + + launch: function(app_path, devicetypeid, log, exit, argv) { + var wait_for_debugger = false; + var info_plist_path; + var app_identifier; + + info_plist_path = path.join(app_path,'Info.plist'); + if (!fs.existsSync(info_plist_path)) { + console.error(info_plist_path + ' file not found.'); + process.exit(1); + } + + bplist.parseFile(info_plist_path, function(err, obj) { + + if (err) { + // try to see if a regular plist parser will work + if (!plist) { + plist = require('plist'); + } + obj = plist.parse(fs.readFileSync(info_plist_path, 'utf8')); + if (obj) { + app_identifier = obj.CFBundleIdentifier; + } else { + throw err; + } + } else { + app_identifier = obj[0].CFBundleIdentifier; + } + + argv = argv || []; + + // get the deviceid from --devicetypeid + // --devicetypeid is a string in the form "devicetype, runtime_version" (optional: runtime_version) + var device = getDeviceFromDeviceTypeId(devicetypeid); + + // so now we have the deviceid, we can proceed + simctl.extensions.start(device.id); + simctl.install(device.id, app_path); + simctl.launch(wait_for_debugger, device.id, app_identifier, argv); + simctl.extensions.log(device.id, log); + if (log) { + console.log(util.format('logPath: %s', path.resolve(log))); + } + if (exit) { + process.exit(0); + } + }); + }, + + install: function(app_path, devicetypeid, log, exit) { + var wait_for_debugger = false; + var info_plist_path; + var app_identifier; + + info_plist_path = path.join(app_path,'Info.plist'); + if (!fs.existsSync(info_plist_path)) { + console.error(info_plist_path + ' file not found.'); + process.exit(1); + } + + bplist.parseFile(info_plist_path, function(err, obj) { + + if (err) { + throw err; + } + + app_identifier = obj[0].CFBundleIdentifier; + + // get the deviceid from --devicetypeid + // --devicetypeid is a string in the form "devicetype, runtime_version" (optional: runtime_version) + var device = getDeviceFromDeviceTypeId(devicetypeid); + + // so now we have the deviceid, we can proceed + simctl.extensions.start(device.id); + simctl.install(device.id, app_path); + + simctl.extensions.log(device.id, log); + if (log) { + console.log(util.format('logPath: %s', path.resolve(log))); + } + if (exit) { + process.exit(0); + } + }); + }, + + start: function(devicetypeid) { + var device = {}; + try { + device = getDeviceFromDeviceTypeId(devicetypeid); + } catch (e) { + console.error(e); + } + + simctl.extensions.start(device.id); + } +}; + +module.exports = lib; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/LICENSE new file mode 100755 index 0000000..9cd87e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/README.md new file mode 100755 index 0000000..fd98e5c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/README.md @@ -0,0 +1,121 @@ +# lodash v3.10.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. + +Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): +```bash +$ lodash modularize modern exports=node -o ./ +$ lodash modern -d -o ./index.js +``` + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash +``` + +In Node.js/io.js: + +```js +// load the modern build +var _ = require('lodash'); +// or a method category +var array = require('lodash/array'); +// or a method (great for smaller builds with browserify/webpack) +var chunk = require('lodash/array/chunk'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details. + +**Note:**
    +Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
    +Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. + +## Module formats + +lodash is also available in a variety of other builds & module formats. + + * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds + * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds + * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build + +## Further Reading + + * [API Documentation](https://lodash.com/docs) + * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) + * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) + * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) + * [More Resources](https://github.com/lodash/lodash/wiki/Resources) + +## Features + + * ~100% [code coverage](https://coveralls.io/r/lodash) + * Follows [semantic versioning](http://semver.org/) for releases + * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining + * [_(…)](https://lodash.com/docs#_) supports implicit chaining + * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order + * [_.at](https://lodash.com/docs#at) for cherry-picking collection values + * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch + * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) + * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size + * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions + * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control + * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties + * [_.fill](https://lodash.com/docs#fill) to fill arrays with values + * [_.findKey](https://lodash.com/docs#findKey) for finding keys + * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) + * [_.forEach](https://lodash.com/docs#forEach) supports exiting early + * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties + * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties + * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting + * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods + * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range + * [_.isNative](https://lodash.com/docs#isNative) to check for native functions + * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects + * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays + * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object + * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons + * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) + * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) + * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods + * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition + * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior + * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays + * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers + * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions + * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking + * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values + * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders + * [_.support](https://lodash.com/docs#support) for flagging environment features + * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) + * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects + * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined + * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties + * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) + * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), & + [more](https://lodash.com/docs "_.ceil & _.floor") math methods + * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & + [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders + * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & + [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods + * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & + [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks + * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & + [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) + * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & + [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods + * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & + [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings + * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences + * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence + +## Support + +Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6. +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array.js new file mode 100755 index 0000000..e5121fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array.js @@ -0,0 +1,44 @@ +module.exports = { + 'chunk': require('./array/chunk'), + 'compact': require('./array/compact'), + 'difference': require('./array/difference'), + 'drop': require('./array/drop'), + 'dropRight': require('./array/dropRight'), + 'dropRightWhile': require('./array/dropRightWhile'), + 'dropWhile': require('./array/dropWhile'), + 'fill': require('./array/fill'), + 'findIndex': require('./array/findIndex'), + 'findLastIndex': require('./array/findLastIndex'), + 'first': require('./array/first'), + 'flatten': require('./array/flatten'), + 'flattenDeep': require('./array/flattenDeep'), + 'head': require('./array/head'), + 'indexOf': require('./array/indexOf'), + 'initial': require('./array/initial'), + 'intersection': require('./array/intersection'), + 'last': require('./array/last'), + 'lastIndexOf': require('./array/lastIndexOf'), + 'object': require('./array/object'), + 'pull': require('./array/pull'), + 'pullAt': require('./array/pullAt'), + 'remove': require('./array/remove'), + 'rest': require('./array/rest'), + 'slice': require('./array/slice'), + 'sortedIndex': require('./array/sortedIndex'), + 'sortedLastIndex': require('./array/sortedLastIndex'), + 'tail': require('./array/tail'), + 'take': require('./array/take'), + 'takeRight': require('./array/takeRight'), + 'takeRightWhile': require('./array/takeRightWhile'), + 'takeWhile': require('./array/takeWhile'), + 'union': require('./array/union'), + 'uniq': require('./array/uniq'), + 'unique': require('./array/unique'), + 'unzip': require('./array/unzip'), + 'unzipWith': require('./array/unzipWith'), + 'without': require('./array/without'), + 'xor': require('./array/xor'), + 'zip': require('./array/zip'), + 'zipObject': require('./array/zipObject'), + 'zipWith': require('./array/zipWith') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/chunk.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/chunk.js new file mode 100755 index 0000000..c8be1fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/chunk.js @@ -0,0 +1,46 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/compact.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/compact.js new file mode 100755 index 0000000..1dc1c55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/compact.js @@ -0,0 +1,30 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/difference.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/difference.js new file mode 100755 index 0000000..128932a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/difference.js @@ -0,0 +1,29 @@ +var baseDifference = require('../internal/baseDifference'), + baseFlatten = require('../internal/baseFlatten'), + isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ +var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; +}); + +module.exports = difference; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/drop.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/drop.js new file mode 100755 index 0000000..039a0b5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/drop.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = drop; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRight.js new file mode 100755 index 0000000..14b5eb6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRightWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRightWhile.js new file mode 100755 index 0000000..be158bd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropWhile.js new file mode 100755 index 0000000..d9eabae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/dropWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/fill.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/fill.js new file mode 100755 index 0000000..2c8f6da --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/fill.js @@ -0,0 +1,44 @@ +var baseFill = require('../internal/baseFill'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ +function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findIndex.js new file mode 100755 index 0000000..2a6b8e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ +var findIndex = createFindIndex(); + +module.exports = findIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findLastIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findLastIndex.js new file mode 100755 index 0000000..d6d8eca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/findLastIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ +var findLastIndex = createFindIndex(true); + +module.exports = findLastIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/first.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/first.js new file mode 100755 index 0000000..b3b9c79 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/first.js @@ -0,0 +1,22 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ +function first(array) { + return array ? array[0] : undefined; +} + +module.exports = first; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flatten.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flatten.js new file mode 100755 index 0000000..dc2eff8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flatten.js @@ -0,0 +1,32 @@ +var baseFlatten = require('../internal/baseFlatten'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it's only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ +function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; +} + +module.exports = flatten; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flattenDeep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flattenDeep.js new file mode 100755 index 0000000..9f775fe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/flattenDeep.js @@ -0,0 +1,21 @@ +var baseFlatten = require('../internal/baseFlatten'); + +/** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ +function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; +} + +module.exports = flattenDeep; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/head.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/head.js new file mode 100755 index 0000000..1961b08 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/head.js @@ -0,0 +1 @@ +module.exports = require('./first'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/indexOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/indexOf.js new file mode 100755 index 0000000..4cfc682 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/indexOf.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + binaryIndex = require('../internal/binaryIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); +} + +module.exports = indexOf; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/initial.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/initial.js new file mode 100755 index 0000000..59b7a7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/initial.js @@ -0,0 +1,20 @@ +var dropRight = require('./dropRight'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + return dropRight(array, 1); +} + +module.exports = initial; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/intersection.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/intersection.js new file mode 100755 index 0000000..f218432 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/intersection.js @@ -0,0 +1,58 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + cacheIndexOf = require('../internal/cacheIndexOf'), + createCache = require('../internal/createCache'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ +var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = baseIndexOf, + isCommon = true, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; +}); + +module.exports = intersection; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/last.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/last.js new file mode 100755 index 0000000..299af31 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/last.js @@ -0,0 +1,19 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/lastIndexOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/lastIndexOf.js new file mode 100755 index 0000000..02b8062 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/lastIndexOf.js @@ -0,0 +1,60 @@ +var binaryIndex = require('../internal/binaryIndex'), + indexOfNaN = require('../internal/indexOfNaN'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = lastIndexOf; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/object.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/object.js new file mode 100755 index 0000000..f4a3453 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/object.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pull.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pull.js new file mode 100755 index 0000000..7bcbb4a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pull.js @@ -0,0 +1,52 @@ +var baseIndexOf = require('../internal/baseIndexOf'); + +/** Used for native method references. */ +var arrayProto = Array.prototype; + +/** Native method references. */ +var splice = arrayProto.splice; + +/** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ +function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = baseIndexOf, + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = pull; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pullAt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pullAt.js new file mode 100755 index 0000000..4ca2476 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/pullAt.js @@ -0,0 +1,40 @@ +var baseAt = require('../internal/baseAt'), + baseCompareAscending = require('../internal/baseCompareAscending'), + baseFlatten = require('../internal/baseFlatten'), + basePullAt = require('../internal/basePullAt'), + restParam = require('../function/restParam'); + +/** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ +var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; +}); + +module.exports = pullAt; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/remove.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/remove.js new file mode 100755 index 0000000..0cf979b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/remove.js @@ -0,0 +1,64 @@ +var baseCallback = require('../internal/baseCallback'), + basePullAt = require('../internal/basePullAt'); + +/** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ +function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = baseCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; +} + +module.exports = remove; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/rest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/rest.js new file mode 100755 index 0000000..9bfb734 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/rest.js @@ -0,0 +1,21 @@ +var drop = require('./drop'); + +/** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ +function rest(array) { + return drop(array, 1); +} + +module.exports = rest; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/slice.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/slice.js new file mode 100755 index 0000000..48ef1a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/slice.js @@ -0,0 +1,30 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); +} + +module.exports = slice; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedIndex.js new file mode 100755 index 0000000..6903bca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedIndex.js @@ -0,0 +1,53 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it's invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ +var sortedIndex = createSortedIndex(); + +module.exports = sortedIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedLastIndex.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedLastIndex.js new file mode 100755 index 0000000..81a4a86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/sortedLastIndex.js @@ -0,0 +1,25 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ +var sortedLastIndex = createSortedIndex(true); + +module.exports = sortedLastIndex; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/tail.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/tail.js new file mode 100755 index 0000000..c5dfe77 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/tail.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/take.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/take.js new file mode 100755 index 0000000..875917a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/take.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ +function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = take; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRight.js new file mode 100755 index 0000000..6e89c87 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ +function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = takeRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRightWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRightWhile.js new file mode 100755 index 0000000..5464d13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ +function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true) + : []; +} + +module.exports = takeRightWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeWhile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeWhile.js new file mode 100755 index 0000000..f7e28a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/takeWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ +function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3)) + : []; +} + +module.exports = takeWhile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/union.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/union.js new file mode 100755 index 0000000..53cefe4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/union.js @@ -0,0 +1,24 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseUniq = require('../internal/baseUniq'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ +var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); +}); + +module.exports = union; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/uniq.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/uniq.js new file mode 100755 index 0000000..ae937ef --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/uniq.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseUniq = require('../internal/baseUniq'), + isIterateeCall = require('../internal/isIterateeCall'), + sortedUniq = require('../internal/sortedUniq'); + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it's invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); + return (isSorted) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); +} + +module.exports = uniq; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unique.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unique.js new file mode 100755 index 0000000..396de1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unique.js @@ -0,0 +1 @@ +module.exports = require('./uniq'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzip.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzip.js new file mode 100755 index 0000000..0a539fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzip.js @@ -0,0 +1,47 @@ +var arrayFilter = require('../internal/arrayFilter'), + arrayMap = require('../internal/arrayMap'), + baseProperty = require('../internal/baseProperty'), + isArrayLike = require('../internal/isArrayLike'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ +function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; +} + +module.exports = unzip; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzipWith.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzipWith.js new file mode 100755 index 0000000..324a2b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/unzipWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('../internal/arrayMap'), + arrayReduce = require('../internal/arrayReduce'), + bindCallback = require('../internal/bindCallback'), + unzip = require('./unzip'); + +/** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ +function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); +} + +module.exports = unzipWith; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/without.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/without.js new file mode 100755 index 0000000..2ac3d11 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/without.js @@ -0,0 +1,27 @@ +var baseDifference = require('../internal/baseDifference'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ +var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/xor.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/xor.js new file mode 100755 index 0000000..04ef32a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/xor.js @@ -0,0 +1,35 @@ +var arrayPush = require('../internal/arrayPush'), + baseDifference = require('../internal/baseDifference'), + baseUniq = require('../internal/baseUniq'), + isArrayLike = require('../internal/isArrayLike'); + +/** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; +} + +module.exports = xor; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zip.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zip.js new file mode 100755 index 0000000..53a6f69 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zip.js @@ -0,0 +1,21 @@ +var restParam = require('../function/restParam'), + unzip = require('./unzip'); + +/** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ +var zip = restParam(unzip); + +module.exports = zip; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipObject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipObject.js new file mode 100755 index 0000000..dec7a21 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipObject.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); + +/** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ +function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; +} + +module.exports = zipObject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipWith.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipWith.js new file mode 100755 index 0000000..ad10374 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/array/zipWith.js @@ -0,0 +1,36 @@ +var restParam = require('../function/restParam'), + unzipWith = require('./unzipWith'); + +/** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ +var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); +}); + +module.exports = zipWith; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain.js new file mode 100755 index 0000000..6439627 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain.js @@ -0,0 +1,16 @@ +module.exports = { + 'chain': require('./chain/chain'), + 'commit': require('./chain/commit'), + 'concat': require('./chain/concat'), + 'lodash': require('./chain/lodash'), + 'plant': require('./chain/plant'), + 'reverse': require('./chain/reverse'), + 'run': require('./chain/run'), + 'tap': require('./chain/tap'), + 'thru': require('./chain/thru'), + 'toJSON': require('./chain/toJSON'), + 'toString': require('./chain/toString'), + 'value': require('./chain/value'), + 'valueOf': require('./chain/valueOf'), + 'wrapperChain': require('./chain/wrapperChain') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/chain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/chain.js new file mode 100755 index 0000000..453ba1e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/chain.js @@ -0,0 +1,35 @@ +var lodash = require('./lodash'); + +/** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/commit.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/commit.js new file mode 100755 index 0000000..c732d1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/commit.js @@ -0,0 +1 @@ +module.exports = require('./wrapperCommit'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/concat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/concat.js new file mode 100755 index 0000000..90607d1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/concat.js @@ -0,0 +1 @@ +module.exports = require('./wrapperConcat'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/lodash.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/lodash.js new file mode 100755 index 0000000..1c3467e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/lodash.js @@ -0,0 +1,125 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + baseLodash = require('../internal/baseLodash'), + isArray = require('../lang/isArray'), + isObjectLike = require('../internal/isObjectLike'), + wrapperClone = require('../internal/wrapperClone'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; + +module.exports = lodash; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/plant.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/plant.js new file mode 100755 index 0000000..04099f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/plant.js @@ -0,0 +1 @@ +module.exports = require('./wrapperPlant'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/reverse.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/reverse.js new file mode 100755 index 0000000..f72a64a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/reverse.js @@ -0,0 +1 @@ +module.exports = require('./wrapperReverse'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/run.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/run.js new file mode 100755 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/run.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/tap.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/tap.js new file mode 100755 index 0000000..3d0257e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/tap.js @@ -0,0 +1,29 @@ +/** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ +function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; +} + +module.exports = tap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/thru.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/thru.js new file mode 100755 index 0000000..a715780 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/thru.js @@ -0,0 +1,26 @@ +/** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ +function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); +} + +module.exports = thru; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toJSON.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toJSON.js new file mode 100755 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toJSON.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toString.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toString.js new file mode 100755 index 0000000..c7bcbf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/toString.js @@ -0,0 +1 @@ +module.exports = require('./wrapperToString'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/value.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/value.js new file mode 100755 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/value.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/valueOf.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/valueOf.js new file mode 100755 index 0000000..5e751a2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/valueOf.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperChain.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperChain.js new file mode 100755 index 0000000..3823481 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperChain.js @@ -0,0 +1,32 @@ +var chain = require('./chain'); + +/** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ +function wrapperChain() { + return chain(this); +} + +module.exports = wrapperChain; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperCommit.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperCommit.js new file mode 100755 index 0000000..c3d2898 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperCommit.js @@ -0,0 +1,32 @@ +var LodashWrapper = require('../internal/LodashWrapper'); + +/** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperConcat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperConcat.js new file mode 100755 index 0000000..799156c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperConcat.js @@ -0,0 +1,34 @@ +var arrayConcat = require('../internal/arrayConcat'), + baseFlatten = require('../internal/baseFlatten'), + isArray = require('../lang/isArray'), + restParam = require('../function/restParam'), + toObject = require('../internal/toObject'); + +/** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); +}); + +module.exports = wrapperConcat; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperPlant.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperPlant.js new file mode 100755 index 0000000..234fe41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperPlant.js @@ -0,0 +1,45 @@ +var baseLodash = require('../internal/baseLodash'), + wrapperClone = require('../internal/wrapperClone'); + +/** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ +function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; +} + +module.exports = wrapperPlant; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperReverse.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperReverse.js new file mode 100755 index 0000000..6ba546d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperReverse.js @@ -0,0 +1,43 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + thru = require('./thru'); + +/** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); +} + +module.exports = wrapperReverse; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperToString.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperToString.js new file mode 100755 index 0000000..db975a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperToString.js @@ -0,0 +1,17 @@ +/** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ +function wrapperToString() { + return (this.value() + ''); +} + +module.exports = wrapperToString; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperValue.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperValue.js new file mode 100755 index 0000000..2734e41 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/chain/wrapperValue.js @@ -0,0 +1,20 @@ +var baseWrapperValue = require('../internal/baseWrapperValue'); + +/** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ +function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); +} + +module.exports = wrapperValue; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection.js new file mode 100755 index 0000000..0338857 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection.js @@ -0,0 +1,44 @@ +module.exports = { + 'all': require('./collection/all'), + 'any': require('./collection/any'), + 'at': require('./collection/at'), + 'collect': require('./collection/collect'), + 'contains': require('./collection/contains'), + 'countBy': require('./collection/countBy'), + 'detect': require('./collection/detect'), + 'each': require('./collection/each'), + 'eachRight': require('./collection/eachRight'), + 'every': require('./collection/every'), + 'filter': require('./collection/filter'), + 'find': require('./collection/find'), + 'findLast': require('./collection/findLast'), + 'findWhere': require('./collection/findWhere'), + 'foldl': require('./collection/foldl'), + 'foldr': require('./collection/foldr'), + 'forEach': require('./collection/forEach'), + 'forEachRight': require('./collection/forEachRight'), + 'groupBy': require('./collection/groupBy'), + 'include': require('./collection/include'), + 'includes': require('./collection/includes'), + 'indexBy': require('./collection/indexBy'), + 'inject': require('./collection/inject'), + 'invoke': require('./collection/invoke'), + 'map': require('./collection/map'), + 'max': require('./math/max'), + 'min': require('./math/min'), + 'partition': require('./collection/partition'), + 'pluck': require('./collection/pluck'), + 'reduce': require('./collection/reduce'), + 'reduceRight': require('./collection/reduceRight'), + 'reject': require('./collection/reject'), + 'sample': require('./collection/sample'), + 'select': require('./collection/select'), + 'shuffle': require('./collection/shuffle'), + 'size': require('./collection/size'), + 'some': require('./collection/some'), + 'sortBy': require('./collection/sortBy'), + 'sortByAll': require('./collection/sortByAll'), + 'sortByOrder': require('./collection/sortByOrder'), + 'sum': require('./math/sum'), + 'where': require('./collection/where') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/all.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/all.js new file mode 100755 index 0000000..d0839f7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/any.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/any.js new file mode 100755 index 0000000..900ac25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/at.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/at.js new file mode 100755 index 0000000..29236e5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/at.js @@ -0,0 +1,29 @@ +var baseAt = require('../internal/baseAt'), + baseFlatten = require('../internal/baseFlatten'), + restParam = require('../function/restParam'); + +/** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ +var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); +}); + +module.exports = at; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/collect.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/collect.js new file mode 100755 index 0000000..0d1e1ab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/collect.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/contains.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/contains.js new file mode 100755 index 0000000..594722a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/countBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/countBy.js new file mode 100755 index 0000000..e97dbb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/countBy.js @@ -0,0 +1,54 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); +}); + +module.exports = countBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/detect.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/detect.js new file mode 100755 index 0000000..2fb6303 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/detect.js @@ -0,0 +1 @@ +module.exports = require('./find'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/each.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/each.js new file mode 100755 index 0000000..8800f42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/eachRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/eachRight.js new file mode 100755 index 0000000..3252b2a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/every.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/every.js new file mode 100755 index 0000000..5a2d0f5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/every.js @@ -0,0 +1,66 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/filter.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/filter.js new file mode 100755 index 0000000..7620aa7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/filter.js @@ -0,0 +1,61 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ +function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, predicate); +} + +module.exports = filter; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/find.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/find.js new file mode 100755 index 0000000..7358cfe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/find.js @@ -0,0 +1,56 @@ +var baseEach = require('../internal/baseEach'), + createFind = require('../internal/createFind'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ +var find = createFind(baseEach); + +module.exports = find; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findLast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findLast.js new file mode 100755 index 0000000..75dbadc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findLast.js @@ -0,0 +1,25 @@ +var baseEachRight = require('../internal/baseEachRight'), + createFind = require('../internal/createFind'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(baseEachRight, true); + +module.exports = findLast; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findWhere.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findWhere.js new file mode 100755 index 0000000..2d62065 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/findWhere.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + find = require('./find'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ +function findWhere(collection, source) { + return find(collection, baseMatches(source)); +} + +module.exports = findWhere; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldl.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldl.js new file mode 100755 index 0000000..26f53cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldl.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldr.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldr.js new file mode 100755 index 0000000..8fb199e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/foldr.js @@ -0,0 +1 @@ +module.exports = require('./reduceRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEach.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEach.js new file mode 100755 index 0000000..05a8e21 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEach.js @@ -0,0 +1,37 @@ +var arrayEach = require('../internal/arrayEach'), + baseEach = require('../internal/baseEach'), + createForEach = require('../internal/createForEach'); + +/** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ +var forEach = createForEach(arrayEach, baseEach); + +module.exports = forEach; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEachRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEachRight.js new file mode 100755 index 0000000..3499711 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/forEachRight.js @@ -0,0 +1,26 @@ +var arrayEachRight = require('../internal/arrayEachRight'), + baseEachRight = require('../internal/baseEachRight'), + createForEach = require('../internal/createForEach'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ +var forEachRight = createForEach(arrayEachRight, baseEachRight); + +module.exports = forEachRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/groupBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/groupBy.js new file mode 100755 index 0000000..a925c89 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/groupBy.js @@ -0,0 +1,59 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } +}); + +module.exports = groupBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/include.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/include.js new file mode 100755 index 0000000..594722a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/include.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/includes.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/includes.js new file mode 100755 index 0000000..329486a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/includes.js @@ -0,0 +1,57 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + getLength = require('../internal/getLength'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + isLength = require('../internal/isLength'), + isString = require('../lang/isString'), + values = require('../object/values'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `target` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ +function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && baseIndexOf(collection, target, fromIndex) > -1); +} + +module.exports = includes; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/indexBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/indexBy.js new file mode 100755 index 0000000..34a941e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/indexBy.js @@ -0,0 +1,53 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ +var indexBy = createAggregator(function(result, value, key) { + result[key] = value; +}); + +module.exports = indexBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/inject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/inject.js new file mode 100755 index 0000000..26f53cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/inject.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/invoke.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/invoke.js new file mode 100755 index 0000000..6e71721 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/invoke.js @@ -0,0 +1,42 @@ +var baseEach = require('../internal/baseEach'), + invokePath = require('../internal/invokePath'), + isArrayLike = require('../internal/isArrayLike'), + isKey = require('../internal/isKey'), + restParam = require('../function/restParam'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it's + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; +}); + +module.exports = invoke; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/map.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/map.js new file mode 100755 index 0000000..5381110 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/map.js @@ -0,0 +1,68 @@ +var arrayMap = require('../internal/arrayMap'), + baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + isArray = require('../lang/isArray'); + +/** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = baseCallback(iteratee, thisArg, 3); + return func(collection, iteratee); +} + +module.exports = map; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/max.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/max.js new file mode 100755 index 0000000..bb1d213 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/max.js @@ -0,0 +1 @@ +module.exports = require('../math/max'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/min.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/min.js new file mode 100755 index 0000000..eef13d0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/min.js @@ -0,0 +1 @@ +module.exports = require('../math/min'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/partition.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/partition.js new file mode 100755 index 0000000..ee35f27 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/partition.js @@ -0,0 +1,66 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ +var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); +}, function() { return [[], []]; }); + +module.exports = partition; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/pluck.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/pluck.js new file mode 100755 index 0000000..5ee1ec8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/pluck.js @@ -0,0 +1,31 @@ +var map = require('./map'), + property = require('../utility/property'); + +/** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ +function pluck(collection, path) { + return map(collection, property(path)); +} + +module.exports = pluck; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduce.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduce.js new file mode 100755 index 0000000..5d5e8c9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduce.js @@ -0,0 +1,44 @@ +var arrayReduce = require('../internal/arrayReduce'), + baseEach = require('../internal/baseEach'), + createReduce = require('../internal/createReduce'); + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ +var reduce = createReduce(arrayReduce, baseEach); + +module.exports = reduce; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduceRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduceRight.js new file mode 100755 index 0000000..5a5753b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reduceRight.js @@ -0,0 +1,29 @@ +var arrayReduceRight = require('../internal/arrayReduceRight'), + baseEachRight = require('../internal/baseEachRight'), + createReduce = require('../internal/createReduce'); + +/** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ +var reduceRight = createReduce(arrayReduceRight, baseEachRight); + +module.exports = reduceRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reject.js new file mode 100755 index 0000000..5592453 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/reject.js @@ -0,0 +1,50 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ +function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); +} + +module.exports = reject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sample.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sample.js new file mode 100755 index 0000000..8e01533 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sample.js @@ -0,0 +1,50 @@ +var baseRandom = require('../internal/baseRandom'), + isIterateeCall = require('../internal/isIterateeCall'), + toArray = require('../lang/toArray'), + toIterable = require('../internal/toIterable'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ +function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; +} + +module.exports = sample; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/select.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/select.js new file mode 100755 index 0000000..ade80f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/select.js @@ -0,0 +1 @@ +module.exports = require('./filter'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/shuffle.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/shuffle.js new file mode 100755 index 0000000..949689c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/shuffle.js @@ -0,0 +1,24 @@ +var sample = require('./sample'); + +/** Used as references for `-Infinity` and `Infinity`. */ +var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + +/** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ +function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); +} + +module.exports = shuffle; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/size.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/size.js new file mode 100755 index 0000000..78dcf4c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/size.js @@ -0,0 +1,30 @@ +var getLength = require('../internal/getLength'), + isLength = require('../internal/isLength'), + keys = require('../object/keys'); + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; +} + +module.exports = size; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/some.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/some.js new file mode 100755 index 0000000..d0b09a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/some.js @@ -0,0 +1,67 @@ +var arraySome = require('../internal/arraySome'), + baseCallback = require('../internal/baseCallback'), + baseSome = require('../internal/baseSome'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ +function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = some; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortBy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortBy.js new file mode 100755 index 0000000..4401c77 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortBy.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + baseSortBy = require('../internal/baseSortBy'), + compareAscending = require('../internal/compareAscending'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = baseCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); +} + +module.exports = sortBy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByAll.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByAll.js new file mode 100755 index 0000000..4766c20 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByAll.js @@ -0,0 +1,52 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseSortByOrder = require('../internal/baseSortByOrder'), + isIterateeCall = require('../internal/isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); +}); + +module.exports = sortByAll; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByOrder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByOrder.js new file mode 100755 index 0000000..8b4fc19 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sortByOrder.js @@ -0,0 +1,55 @@ +var baseSortByOrder = require('../internal/baseSortByOrder'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); +} + +module.exports = sortByOrder; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sum.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sum.js new file mode 100755 index 0000000..a2e9380 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/sum.js @@ -0,0 +1 @@ +module.exports = require('../math/sum'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/where.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/where.js new file mode 100755 index 0000000..f603bf8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/collection/where.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + filter = require('./filter'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ +function where(collection, source) { + return filter(collection, baseMatches(source)); +} + +module.exports = where; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date.js new file mode 100755 index 0000000..195366e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./date/now') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date/now.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date/now.js new file mode 100755 index 0000000..ffe3060 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/date/now.js @@ -0,0 +1,24 @@ +var getNative = require('../internal/getNative'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeNow = getNative(Date, 'now'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ +var now = nativeNow || function() { + return new Date().getTime(); +}; + +module.exports = now; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function.js new file mode 100755 index 0000000..71f8ebe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function.js @@ -0,0 +1,28 @@ +module.exports = { + 'after': require('./function/after'), + 'ary': require('./function/ary'), + 'backflow': require('./function/backflow'), + 'before': require('./function/before'), + 'bind': require('./function/bind'), + 'bindAll': require('./function/bindAll'), + 'bindKey': require('./function/bindKey'), + 'compose': require('./function/compose'), + 'curry': require('./function/curry'), + 'curryRight': require('./function/curryRight'), + 'debounce': require('./function/debounce'), + 'defer': require('./function/defer'), + 'delay': require('./function/delay'), + 'flow': require('./function/flow'), + 'flowRight': require('./function/flowRight'), + 'memoize': require('./function/memoize'), + 'modArgs': require('./function/modArgs'), + 'negate': require('./function/negate'), + 'once': require('./function/once'), + 'partial': require('./function/partial'), + 'partialRight': require('./function/partialRight'), + 'rearg': require('./function/rearg'), + 'restParam': require('./function/restParam'), + 'spread': require('./function/spread'), + 'throttle': require('./function/throttle'), + 'wrap': require('./function/wrap') +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/after.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/after.js new file mode 100755 index 0000000..96a51fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/after.js @@ -0,0 +1,48 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = global.isFinite; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ +function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/ary.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/ary.js new file mode 100755 index 0000000..53a6913 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/ary.js @@ -0,0 +1,34 @@ +var createWrapper = require('../internal/createWrapper'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** Used to compose bitmasks for wrapper metadata. */ +var ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/backflow.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/backflow.js new file mode 100755 index 0000000..1954e94 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/backflow.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/before.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/before.js new file mode 100755 index 0000000..3d94216 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/before.js @@ -0,0 +1,42 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bind.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bind.js new file mode 100755 index 0000000..0de126a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bind.js @@ -0,0 +1,56 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindAll.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindAll.js new file mode 100755 index 0000000..a09e948 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindAll.js @@ -0,0 +1,50 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + functions = require('../object/functions'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1; + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ +var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; +}); + +module.exports = bindAll; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindKey.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindKey.js new file mode 100755 index 0000000..b787fe7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/bindKey.js @@ -0,0 +1,66 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/compose.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/compose.js new file mode 100755 index 0000000..1954e94 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curry.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curry.js new file mode 100755 index 0000000..b7db3fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curry.js @@ -0,0 +1,51 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_FLAG = 8; + +/** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +var curry = createCurry(CURRY_FLAG); + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curryRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curryRight.js new file mode 100755 index 0000000..11c5403 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/curryRight.js @@ -0,0 +1,48 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +var curryRight = createCurry(CURRY_RIGHT_FLAG); + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/debounce.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/debounce.js new file mode 100755 index 0000000..163af90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/debounce.js @@ -0,0 +1,181 @@ +var isObject = require('../lang/isObject'), + now = require('../date/now'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it's invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; +} + +module.exports = debounce; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/defer.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/defer.js new file mode 100755 index 0000000..3accbf9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/defer.js @@ -0,0 +1,25 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ +var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/delay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/delay.js new file mode 100755 index 0000000..d5eef27 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/delay.js @@ -0,0 +1,26 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ +var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); +}); + +module.exports = delay; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flow.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flow.js new file mode 100755 index 0000000..a435a3d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flow.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flowRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flowRight.js new file mode 100755 index 0000000..23b9d76 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/flowRight.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/memoize.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/memoize.js new file mode 100755 index 0000000..f3b8d69 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/memoize.js @@ -0,0 +1,80 @@ +var MapCache = require('../internal/MapCache'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +module.exports = memoize; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/modArgs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/modArgs.js new file mode 100755 index 0000000..49b9b5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/modArgs.js @@ -0,0 +1,58 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseFlatten = require('../internal/baseFlatten'), + baseIsFunction = require('../internal/baseIsFunction'), + restParam = require('./restParam'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ +var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); +}); + +module.exports = modArgs; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/negate.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/negate.js new file mode 100755 index 0000000..8247939 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/negate.js @@ -0,0 +1,32 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; +} + +module.exports = negate; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/once.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/once.js new file mode 100755 index 0000000..0b5bd85 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/once.js @@ -0,0 +1,24 @@ +var before = require('./before'); + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ +function once(func) { + return before(2, func); +} + +module.exports = once; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partial.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partial.js new file mode 100755 index 0000000..fb1d04f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partial.js @@ -0,0 +1,43 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ +var partial = createPartial(PARTIAL_FLAG); + +// Assign default placeholders. +partial.placeholder = {}; + +module.exports = partial; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partialRight.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partialRight.js new file mode 100755 index 0000000..634e6a4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/partialRight.js @@ -0,0 +1,42 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_RIGHT_FLAG = 64; + +/** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ +var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + +// Assign default placeholders. +partialRight.placeholder = {}; + +module.exports = partialRight; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/rearg.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/rearg.js new file mode 100755 index 0000000..f2bd9c4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/rearg.js @@ -0,0 +1,40 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var REARG_FLAG = 256; + +/** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ +var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); +}); + +module.exports = rearg; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/restParam.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/restParam.js new file mode 100755 index 0000000..8852286 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/restParam.js @@ -0,0 +1,58 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/spread.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/spread.js new file mode 100755 index 0000000..780f504 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/spread.js @@ -0,0 +1,44 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ +function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; +} + +module.exports = spread; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/throttle.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/throttle.js new file mode 100755 index 0000000..1dd00ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/throttle.js @@ -0,0 +1,62 @@ +var debounce = require('./debounce'), + isObject = require('../lang/isObject'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); +} + +module.exports = throttle; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/wrap.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/wrap.js new file mode 100755 index 0000000..6a33c5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/function/wrap.js @@ -0,0 +1,33 @@ +var createWrapper = require('../internal/createWrapper'), + identity = require('../utility/identity'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ +function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); +} + +module.exports = wrap; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/index.js new file mode 100755 index 0000000..5f17319 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/lodash/index.js @@ -0,0 +1,12351 @@ +/** + * @license + * lodash 3.10.1 (Custom Build) + * Build: `lodash modern -d -o ./index.js` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '3.10.1'; + + /** Used to compose bitmasks for wrapper metadata. */ + var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256; + + /** Used as default options for `_.trunc`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect when a function becomes hot. */ + var HOT_COUNT = 150, + HOT_SPAN = 16; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, + reUnescapedHtml = /[&<>"'`]/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + + /** + * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns) + * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern). + */ + var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + reHasRegExpChars = RegExp(reRegExpChars.source); + + /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ + var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect hexadecimal string values. */ + var reHasHexPrefix = /^0[xX]/; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ + var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to match words to create compound words. */ + var reWords = (function() { + var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', + lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; + + return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); + }()); + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', + 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite', + 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = + cloneableTags[dateTag] = cloneableTags[float32Tag] = + cloneableTags[float64Tag] = cloneableTags[int8Tag] = + cloneableTags[int16Tag] = cloneableTags[int32Tag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[stringTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[mapTag] = cloneableTags[setTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map latin-1 supplementary letters to basic latin letters. */ + var deburredLetters = { + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + '`': '`' + }; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used to escape characters for inclusion in compiled regexes. */ + var regexpEscapes = { + '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34', + '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39', + 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46', + 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66', + 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78' + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Detect free variable `exports`. */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; + + /** Detect free variable `self`. */ + var freeSelf = objectTypes[typeof self] && self && self.Object && self; + + /** Detect free variable `window`. */ + var freeWindow = objectTypes[typeof window] && window && window.Object && window; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `compareAscending` which compares values and + * sorts them in ascending order without guaranteeing a stable sort. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function baseCompareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isFunction` without support for environments + * with incorrect `typeof` results. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + */ + function baseIsFunction(value) { + // Avoid a Chakra JIT bug in compatibility modes of IE 11. + // See https://github.com/jashkenas/underscore/issues/1621 for more details. + return typeof value == 'function' || false; + } + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + return value == null ? '' : (value + ''); + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the first character not found in `chars`. + */ + function charsLeftIndex(string, chars) { + var index = -1, + length = string.length; + + while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the last character not found in `chars`. + */ + function charsRightIndex(string, chars) { + var index = string.length; + + while (index-- && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.sortBy` to compare transformed elements of a collection and stable + * sort them in ascending order. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareAscending(object, other) { + return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); + } + + /** + * Used by `_.sortByOrder` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, + * a value is sorted in ascending order if its corresponding order is "asc", and + * descending if "desc". + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = baseCompareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * ((order === 'asc' || order === true) ? 1 : -1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + function deburrLetter(letter) { + return deburredLetters[letter]; + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeHtmlChar(chr) { + return htmlEscapes[chr]; + } + + /** + * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes. + * + * @private + * @param {string} chr The matched character to escape. + * @param {string} leadingChar The capture group for a leading character. + * @param {string} whitespaceChar The capture group for a whitespace character. + * @returns {string} Returns the escaped character. + */ + function escapeRegExpChar(chr, leadingChar, whitespaceChar) { + if (leadingChar) { + chr = regexpEscapes[chr]; + } else if (whitespaceChar) { + chr = stringEscapes[chr]; + } + return '\\' + chr; + } + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ + function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; + } + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a + * character code is whitespace. + * + * @private + * @param {number} charCode The character code to inspect. + * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. + */ + function isSpace(charCode) { + return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || + (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + if (array[index] === placeholder) { + array[index] = PLACEHOLDER; + result[++resIndex] = index; + } + } + return result; + } + + /** + * An implementation of `_.uniq` optimized for sorted arrays without support + * for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function sortedUniq(array, iteratee) { + var seen, + index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (!index || seen !== computed) { + seen = computed; + result[++resIndex] = value; + } + } + return result; + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the first non-whitespace character. + */ + function trimmedLeftIndex(string) { + var index = -1, + length = string.length; + + while (++index < length && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedRightIndex(string) { + var index = string.length; + + while (index-- && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(chr) { + return htmlUnescapes[chr]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the given `context` object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // using `context` to mock `Date#getTime` use in `_.now` + * var mock = _.runInContext({ + * 'Date': function() { + * return { 'getTime': getTimeMock }; + * } + * }); + * + * // or creating a suped-up `defer` in Node.js + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See https://es5.github.io/#x11.1.5 for more details. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for native method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Native method references. */ + var ArrayBuffer = context.ArrayBuffer, + clearTimeout = context.clearTimeout, + parseFloat = context.parseFloat, + pow = Math.pow, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + Set = getNative(context, 'Set'), + setTimeout = context.setTimeout, + splice = arrayProto.splice, + Uint8Array = context.Uint8Array, + WeakMap = getNative(context, 'WeakMap'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeCreate = getNative(Object, 'create'), + nativeFloor = Math.floor, + nativeIsArray = getNative(Array, 'isArray'), + nativeIsFinite = context.isFinite, + nativeKeys = getNative(Object, 'keys'), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = getNative(Date, 'now'), + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used as references for `-Infinity` and `Infinity`. */ + var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, + POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The function whose prototype all chaining wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable chaining for all wrapper methods. + * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. + */ + function LodashWrapper(value, chainAll, actions) { + this.__wrapped__ = value; + this.__actions__ = actions || []; + this.__chain__ = !!chainAll; + } + + /** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB). Change the following template settings to use + * alternative delimiters. + * + * @static + * @memberOf _ + * @type Object + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type string + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type Object + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type Function + */ + '_': lodash + } + }; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = POSITIVE_INFINITY; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = arrayCopy(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = arrayCopy(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = arrayCopy(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) { + return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a cache object to store key/value pairs. + * + * @private + * @static + * @name Cache + * @memberOf _.memoize + */ + function MapCache() { + this.__data__ = {}; + } + + /** + * Removes `key` and its value from the cache. + * + * @private + * @name delete + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. + */ + function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + + /** + * Gets the cached value for `key`. + * + * @private + * @name get + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to get. + * @returns {*} Returns the cached value. + */ + function mapGet(key) { + return key == '__proto__' ? undefined : this.__data__[key]; + } + + /** + * Checks if a cached value for `key` exists. + * + * @private + * @name has + * @memberOf _.memoize.Cache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + return key != '__proto__' && hasOwnProperty.call(this.__data__, key); + } + + /** + * Sets `value` to `key` of the cache. + * + * @private + * @name set + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to cache. + * @param {*} value The value to cache. + * @returns {Object} Returns the cache object. + */ + function mapSet(key, value) { + if (key != '__proto__') { + this.__data__[key] = value; + } + return this; + } + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } + } + + /** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; + } + + /** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ + function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a new array joining `array` with `other`. + * + * @private + * @param {Array} array The array to join. + * @param {Array} other The other array to join. + * @returns {Array} Returns the new concatenated array. + */ + function arrayConcat(array, other) { + var index = -1, + length = array.length, + othIndex = -1, + othLength = other.length, + result = Array(length + othLength); + + while (++index < length) { + result[index] = array[index]; + } + while (++othIndex < othLength) { + result[index++] = other[othIndex]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseExtremum` for arrays which invokes `iteratee` + * with one argument: (value). + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function arrayExtremum(array, iteratee, comparator, exValue) { + var index = -1, + length = array.length, + computed = exValue, + result = computed; + + while (++index < length) { + var value = array[index], + current = +iteratee(value); + + if (comparator(current, computed)) { + computed = current; + result = value; + } + } + return result; + } + + /** + * A specialized version of `_.filter` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * A specialized version of `_.map` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the first element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initFromArray) { + var index = -1, + length = array.length; + + if (initFromArray && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the last element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initFromArray) { + var length = array.length; + if (initFromArray && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.sum` for arrays without support for callback + * shorthands and `this` binding.. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function arraySum(array, iteratee) { + var length = array.length, + result = 0; + + while (length--) { + result += +iteratee(array[length]) || 0; + } + return result; + } + + /** + * Used by `_.defaults` to customize its `_.assign` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : objectValue; + } + + /** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; + } + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + /** + * The base implementation of `_.at` without support for string collections + * and individual key arguments. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {number[]|string[]} props The property names or indexes of elements to pick. + * @returns {Array} Returns the new array of picked elements. + */ + function baseAt(collection, props) { + var index = -1, + isNil = collection == null, + isArr = !isNil && isArrayLike(collection), + length = isArr ? collection.length : 0, + propsLength = props.length, + result = Array(propsLength); + + while(++index < propsLength) { + var key = props[index]; + if (isArr) { + result[index] = isIndex(key, length) ? collection[key] : undefined; + } else { + result[index] = isNil ? undefined : collection[key]; + } + } + return result; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + /** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); + } + + /** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + return result; + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; + }()); + + /** + * The base implementation of `_.delay` and `_.defer` which accepts an index + * of where to slice the arguments to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Object} args The arguments provide to `func`. + * @returns {number} Returns the timer id. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * Gets the extremum value of `collection` invoking `iteratee` for each value + * in `collection` to generate the criterion by which the value is ranked. + * The `iteratee` is invoked with three arguments: (value, index|key, collection). + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(collection, iteratee, comparator, exValue) { + var computed = exValue, + result = computed; + + baseEach(collection, function(value, index, collection) { + var current = +iteratee(value, index, collection); + if (comparator(current, computed) || (current === exValue && current === result)) { + computed = current; + result = value; + } + }); + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end >>> 0); + start >>>= 0; + + while (start < length) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, + * without support for callback shorthands and `this` binding, which iterates + * over `collection` using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element + * instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from those provided. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the new array of filtered property names. + */ + function baseFunctions(object, props) { + var index = -1, + length = props.length, + resIndex = -1, + result = []; + + while (++index < length) { + var key = props[index]; + if (isFunction(object[key])) { + result[++resIndex] = key; + } + } + return result; + } + + /** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; + } + + /** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; + } + + /** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ + function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * index arguments and capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0; + while (length--) { + var index = indexes[length]; + if (index != previous && isIndex(index)) { + var previous = index; + splice.call(array, index, 1); + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for argument juggling + * and returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns the random number. + */ + function baseRandom(min, max) { + return min + nativeFloor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight` without support + * for callback shorthands and `this` binding, which iterates over `collection` + * using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initFromCollection Specify using the first or last element + * of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initFromCollection + ? (initFromCollection = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `setData` without support for hot loop detection. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sortByOrder` without param guards. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseSortByOrder(collection, iteratees, orders) { + var callback = getCallback(), + index = -1; + + iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); + + var result = baseMap(collection, function(value) { + var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.sum` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(collection, iteratee) { + var result = 0; + baseEach(collection, function(value, index, collection) { + result += +iteratee(value, index, collection) || 0; + }); + return result; + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function baseUniq(array, iteratee) { + var index = -1, + indexOf = getIndexOf(), + length = array.length, + isCommon = indexOf == baseIndexOf, + isLarge = isCommon && length >= LARGE_ARRAY_SIZE, + seen = isLarge ? createCache() : null, + result = []; + + if (seen) { + indexOf = cacheIndexOf; + isCommon = false; + } else { + isLarge = false; + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (isCommon && value === value) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (indexOf(seen, computed, 0) < 0) { + if (iteratee || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; + } + + /** + * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, + * and `_.takeWhile` without support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to peform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + var index = -1, + length = actions.length; + + while (++index < length) { + var action = actions[index]; + result = action.func.apply(action.thisArg, arrayPush([result], action.args)); + } + return result; + } + + /** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); + } + + /** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; + } + + /** + * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function. + * + * @private + * @param {Function} setter The function to set keys and values of the accumulator object. + * @param {Function} [initializer] The function to initialize the accumulator object. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee, thisArg) { + var result = initializer ? initializer() : {}; + iteratee = getCallback(iteratee, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, iteratee(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, iteratee(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ + function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; + } + + /** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ + function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; + } + + /** + * Creates a function that produces compound words out of the words in a + * given string. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + var index = -1, + array = words(deburr(string)), + length = array.length, + result = ''; + + while (++index < length) { + result = callback(result, array[index], index); + } + return result; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.curry` or `_.curryRight` function. + * + * @private + * @param {boolean} flag The curry bit flag. + * @returns {Function} Returns the new curry function. + */ + function createCurry(flag) { + function curryFunc(func, arity, guard) { + if (guard && isIterateeCall(func, arity, guard)) { + arity = undefined; + } + var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryFunc.placeholder; + return result; + } + return curryFunc; + } + + /** + * Creates a `_.defaults` or `_.defaultsDeep` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @param {Function} customizer The function to customize assigned values. + * @returns {Function} Returns the new defaults function. + */ + function createDefaults(assigner, customizer) { + return restParam(function(args) { + var object = args[0]; + if (object == null) { + return object; + } + args.push(customizer); + return assigner.apply(undefined, args); + }); + } + + /** + * Creates a `_.max` or `_.min` function. + * + * @private + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {Function} Returns the new extremum function. + */ + function createExtremum(comparator, exValue) { + return function(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = getCallback(iteratee, thisArg, 3); + if (iteratee.length == 1) { + collection = isArray(collection) ? collection : toIterable(collection); + var result = arrayExtremum(collection, iteratee, comparator, exValue); + if (!(collection.length && result === exValue)) { + return result; + } + } + return baseExtremum(collection, iteratee, comparator, exValue); + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; + } + + /** + * Creates a `_.findIndex` or `_.findLastIndex` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFindIndex(fromRight) { + return function(array, predicate, thisArg) { + if (!(array && array.length)) { + return -1; + } + predicate = getCallback(predicate, thisArg, 3); + return baseFindIndex(array, predicate, fromRight); + }; + } + + /** + * Creates a `_.findKey` or `_.findLastKey` function. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new find function. + */ + function createFindKey(objectFunc) { + return function(object, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + return baseFind(object, predicate, objectFunc, true); + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return function() { + var wrapper, + length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { + wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? -1 : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; + } + + /** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; + } + + /** + * Creates a function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForIn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee, keysIn); + }; + } + + /** + * Creates a function for `_.forOwn` or `_.forOwnRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForOwn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee); + }; + } + + /** + * Creates a function for `_.mapKeys` or `_.mapValues`. + * + * @private + * @param {boolean} [isMapKeys] Specify mapping keys instead of values. + * @returns {Function} Returns the new map function. + */ + function createObjectMapper(isMapKeys) { + return function(object, iteratee, thisArg) { + var result = {}; + iteratee = getCallback(iteratee, thisArg, 3); + + baseForOwn(object, function(value, key, object) { + var mapped = iteratee(value, key, object); + key = isMapKeys ? mapped : key; + value = isMapKeys ? value : mapped; + result[key] = value; + }); + return result; + }; + } + + /** + * Creates a function for `_.padLeft` or `_.padRight`. + * + * @private + * @param {boolean} [fromRight] Specify padding from the right. + * @returns {Function} Returns the new pad function. + */ + function createPadDir(fromRight) { + return function(string, length, chars) { + string = baseToString(string); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); + }; + } + + /** + * Creates a `_.partial` or `_.partialRight` function. + * + * @private + * @param {boolean} flag The partial bit flag. + * @returns {Function} Returns the new partial function. + */ + function createPartial(flag) { + var partialFunc = restParam(function(func, partials) { + var holders = replaceHolders(partials, partialFunc.placeholder); + return createWrapper(func, flag, undefined, partials, holders); + }); + return partialFunc; + } + + /** + * Creates a function for `_.reduce` or `_.reduceRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createReduce(arrayFunc, eachFunc) { + return function(collection, iteratee, accumulator, thisArg) { + var initFromArray = arguments.length < 3; + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee, accumulator, initFromArray) + : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); + }; + } + + /** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ + function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); + } + + /** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ + function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.ceil`, `_.floor`, or `_.round` function. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + precision = precision === undefined ? 0 : (+precision || 0); + if (precision) { + precision = pow(10, precision); + return func(number * precision) / precision; + } + return func(number); + }; + } + + /** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ + function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + var callback = getCallback(iteratee); + return (iteratee == null && callback === baseCallback) + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; + } + + /** + * Gets the appropriate "callback" function. If the `_.callback` method is + * customized this function returns the custom method, otherwise it returns + * the `baseCallback` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function} Returns the chosen function or its result. + */ + function getCallback(func, thisArg, argCount) { + var result = lodash.callback || callback; + result = result === callback ? baseCallback : result; + return argCount ? result(func, thisArg, argCount) : result; + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name, + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized this function returns the custom method, otherwise it returns + * the `baseIndexOf` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function|number} Returns the chosen function or its result. + */ + function getIndexOf(collection, target, fromIndex) { + var result = lodash.indexOf || indexOf; + result = result === indexOf ? baseIndexOf : result; + return collection ? result(collection, target, fromIndex) : result; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; + } + + /** + * Invokes the method at `path` on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function invokePath(object, path, args) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + path = last(path); + } + var func = object == null ? object : object[path]; + return func == null ? undefined : func.apply(object, args); + } + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func); + if (!(funcName in LazyWrapper.prototype)) { + return false; + } + var other = lodash[funcName]; + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers required to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` + * augment function arguments, making the order in which they are executed important, + * preventing the merging of metadata. However, we make an exception for a safe + * common case where curried functions have `_.ary` and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < ARY_FLAG; + + var isCombo = + (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || + (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = arrayCopy(value); + } + // Use source `ary` if it's smaller. + if (srcBitmask & ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function mergeDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults); + } + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + /** + * A specialized version of `_.pick` which picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = arrayCopy(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity function + * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = (function() { + var count = 0, + lastCalled = 0; + + return function(key, value) { + var stamp = now(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return key; + } + } else { + count = 0; + } + return baseSetData(key, value); + }; + }()); + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to an array-like object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array|Object} Returns the array-like object. + */ + function toIterable(value) { + if (value == null) { + return []; + } + if (!isArrayLike(value)) { + return values(value); + } + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + return wrapper instanceof LazyWrapper + ? wrapper.clone() + : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ + var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ + function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ + var findIndex = createFindIndex(); + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ + var findLastIndex = createFindIndex(true); + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ + function first(array) { + return array ? array[0] : undefined; + } + + /** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it is only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ + function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; + } + + /** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ + function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + return dropRight(array, 1); + } + + /** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ + var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; + }); + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = getIndexOf(), + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ + var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ + function rest(array) { + return drop(array, 1); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it is invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ + var sortedIndex = createSortedIndex(); + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ + var sortedLastIndex = createSortedIndex(true); + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ + function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ + function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ + var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it is invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + var callback = getCallback(); + if (!(iteratee == null && callback === baseCallback)) { + iteratee = callback(iteratee, thisArg, 3); + } + return (isSorted && getIndexOf() == baseIndexOf) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; + } + + /** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); + } + + /** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ + var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + var zip = restParam(unzip); + + /** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ + var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); + } + + /** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); + }); + + /** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); + } + + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ + function wrapperToString() { + return (this.value() + ''); + } + + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ + var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ + function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ + var find = createFind(baseEach); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(baseEachRight, true); + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ + function findWhere(collection, source) { + return find(collection, baseMatches(source)); + } + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ + var forEach = createForEach(arrayEach, baseEach); + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ + var forEachRight = createForEach(arrayEachRight, baseEachRight); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + + /** + * Checks if `value` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ + function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && getIndexOf(collection, target, fromIndex) > -1); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it is + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; + }); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = getCallback(iteratee, thisArg, 3); + return func(collection, iteratee); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ + function pluck(collection, path) { + return map(collection, property(path)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ + var reduce = createReduce(arrayReduce, baseEach); + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + var reduceRight = createReduce(arrayReduceRight, baseEachRight); + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ + function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); + } + + /** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = getCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); + } + + /** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); + }); + + /** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); + } + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ + function where(collection, source) { + return filter(collection, baseMatches(source)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ + var now = nativeNow || function() { + return new Date().getTime(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it is called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ + function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it is called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ + var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; + }); + + /** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + var curry = createCurry(CURRY_FLAG); + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + var curryRight = createCurry(CURRY_RIGHT_FLAG); + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it is invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ + var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); + }); + + /** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; + } + + /** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ + var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = createPartial(PARTIAL_FLAG); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ + var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, + * otherwise they are assigned by reference. If `customizer` is provided it is + * invoked to produce the cloned values. If `customizer` returns `undefined` + * cloning is handled by the method instead. The `customizer` is bound to + * `thisArg` and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var shallow = _.clone(users); + * shallow[0] === users[0]; + * // => true + * + * var deep = _.clone(users, true); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.clone(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, customizer, thisArg) { + if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { + isDeep = false; + } + else if (typeof isDeep == 'function') { + thisArg = customizer; + customizer = isDeep; + isDeep = false; + } + return typeof customizer == 'function' + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + : baseClone(value, isDeep); + } + + /** + * Creates a deep clone of `value`. If `customizer` is provided it is invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ + function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) + : baseClone(value, true); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + function gt(value, other) { + return value > other; + } + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + function gte(value, other) { + return value >= other; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + function isDate(value) { + return isObjectLike(value) && objToString.call(value) == dateTag; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + } + + /** + * Checks if `value` is empty. A value is considered empty unless it is an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. If `customizer` is provided it is invoked to compare values. + * If `customizer` returns `undefined` comparisons are handled by the method + * instead. The `customizer` is bound to `thisArg` and invoked with three + * arguments: (value, other [, index|key]). + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. Functions and DOM nodes + * are **not** supported. Provide a customizer function to extend support + * for comparing other values. + * + * @static + * @memberOf _ + * @alias eq + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * object == other; + * // => false + * + * _.isEqual(object, other); + * // => true + * + * // using a customizer callback + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqual(array, other, function(value, other) { + * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { + * return true; + * } + * }); + * // => true + */ + function isEqual(value, other, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(10); + * // => true + * + * _.isFinite('10'); + * // => false + * + * _.isFinite(true); + * // => false + * + * _.isFinite(Object(10)); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. If `customizer` is provided + * it is invoked to compare values. If `customizer` returns `undefined` + * comparisons are handled by the method instead. The `customizer` is bound + * to `thisArg` and invoked with three arguments: (value, other, index|key). + * + * **Note:** This method supports comparing properties of arrays, booleans, + * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions + * and DOM nodes are **not** supported. Provide a customizer function to extend + * support for comparing other values. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + * + * // using a customizer callback + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatch(object, source, function(value, other) { + * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; + * }); + * // => true + */ + function isMatch(object, source, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + return baseIsMatch(object, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) + * which returns `true` for `undefined` and other non-numeric values. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some host objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified + * as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isNumber(8.4); + * // => true + * + * _.isNumber(NaN); + * // => true + * + * _.isNumber('8.4'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + function isRegExp(value) { + return isObject(value) && objToString.call(value) == regexpTag; + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + function lt(value, other) { + return value < other; + } + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + function lte(value, other) { + return value <= other; + } + + /** + * Converts `value` to an array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * (function() { + * return _.toArray(arguments).slice(1); + * }(1, 2, 3)); + * // => [2, 3] + */ + function toArray(value) { + var length = value ? getLength(value) : 0; + if (!isLength(length)) { + return values(value); + } + if (!length) { + return []; + } + return arrayCopy(value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return baseCopy(value, keysIn(value)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + var merge = createAssigner(baseMerge); + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var defaults = createDefaults(assign, assignDefaults); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ + var defaultsDeep = createDefaults(merge, mergeDefaults); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (iteration order is not guaranteed) + * + * // using the `_.matches` callback shorthand + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.findKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findKey(users, 'active'); + * // => 'barney' + */ + var findKey = createFindKey(baseForOwn); + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles` assuming `_.findKey` returns `barney` + * + * // using the `_.matches` callback shorthand + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + var findLastKey = createFindKey(baseForOwnRight); + + /** + * Iterates over own and inherited enumerable properties of an object invoking + * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) + */ + var forIn = createForIn(baseFor); + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' + */ + var forInRight = createForIn(baseForRight); + + /** + * Iterates over own enumerable properties of an object invoking `iteratee` + * for each property. The `iteratee` is bound to `thisArg` and invoked with + * three arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' and 'b' (iteration order is not guaranteed) + */ + var forOwn = createForOwn(baseForOwn); + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' + */ + var forOwnRight = createForOwn(baseForOwnRight); + + /** + * Creates an array of function property names from all enumerable properties, + * own and inherited, of `object`. + * + * @static + * @memberOf _ + * @alias methods + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * _.functions(_); + * // => ['after', 'ary', 'assign', ...] + */ + function functions(object) { + return baseFunctions(object, keysIn(object)); + } + + /** + * Gets the property value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + */ + function has(object, path) { + if (object == null) { + return false; + } + var result = hasOwnProperty.call(object, path); + if (!result && !isKey(path)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + path = last(path); + result = hasOwnProperty.call(object, path); + } + return result || (isLength(object.length) && isIndex(path, object.length) && + (isArray(object) || isArguments(object))); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite property + * assignments of previous values unless `multiValue` is `true`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {boolean} [multiValue] Allow multiple values per key. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + * + * // with `multiValue` + * _.invert(object, true); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function invert(object, multiValue, guard) { + if (guard && isIterateeCall(object, multiValue, guard)) { + multiValue = undefined; + } + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (multiValue) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + else { + result[value] = key; + } + } + return result; + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * property of `object` through `iteratee`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + var mapKeys = createObjectMapper(true); + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through `iteratee`. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { + * return n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * // using the `_.property` callback shorthand + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + var mapValues = createObjectMapper(); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ + var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); + }); + + /** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ + function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + /** + * This method is like `_.get` except that if the resolved value is a function + * it is invoked with the `this` binding of its parent object and its result + * is returned. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a.b.c', 'default'); + * // => 'default' + * + * _.result(object, 'a.b.c', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var result = object == null ? undefined : object[path]; + if (result === undefined) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + result = object == null ? undefined : object[last(path)]; + } + result = result === undefined ? defaultValue : result; + } + return isFunction(result) ? result.call(object) : result; + } + + /** + * Sets the property value of `path` on `object`. If a portion of `path` + * does not exist it is created. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to augment. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, 'x[0].y.z', 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + if (object == null) { + return object; + } + var pathKey = (path + ''); + path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = path[index]; + if (isObject(nested)) { + if (index == lastIndex) { + nested[key] = value; + } else if (nested[key] == null) { + nested[key] = isIndex(path[index + 1]) ? [] : {}; + } + } + nested = nested[key]; + } + return object; + } + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own enumerable + * properties through `iteratee`, with each invocation potentially mutating + * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Array|Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + */ + function transform(object, iteratee, accumulator, thisArg) { + var isArr = isArray(object) || isTypedArray(object); + iteratee = getCallback(iteratee, thisArg, 4); + + if (accumulator == null) { + if (isArr || isObject(object)) { + var Ctor = object.constructor; + if (isArr) { + accumulator = isArray(object) ? new Ctor : []; + } else { + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + } + } else { + accumulator = {}; + } + } + (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable property values + * of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `n` is between `start` and up to but not including, `end`. If + * `end` is not specified it is set to `start` with `start` then set to `0`. + * + * @static + * @memberOf _ + * @category Number + * @param {number} n The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `n` is in the range, else `false`. + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + */ + function inRange(value, start, end) { + start = +start || 0; + if (end === undefined) { + end = start; + start = 0; + } else { + end = +end || 0; + } + return value >= nativeMin(start, end) && value < nativeMax(start, end); + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number is returned. + * If `floating` is `true`, or either `min` or `max` are floats, a floating-point + * number is returned instead of an integer. + * + * @static + * @memberOf _ + * @category Number + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + if (floating && isIterateeCall(min, max, floating)) { + max = floating = undefined; + } + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (noMax && typeof min == 'boolean') { + floating = min; + min = 1; + } + else if (typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + noMax = false; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); + } + return baseRandom(min, max); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar'); + * // => 'fooBar' + * + * _.camelCase('__foo_bar__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); + }); + + /** + * Capitalizes the first character of `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('fred'); + * // => 'Fred' + */ + function capitalize(string) { + string = baseToString(string); + return string && (string.charAt(0).toUpperCase() + string.slice(1)); + } + + /** + * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = baseToString(string); + return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search from. + * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = baseToString(string); + target = (target + ''); + + var length = string.length; + position = position === undefined + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; + return position >= 0 && string.indexOf(target, position) == position; + } + + /** + * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional characters + * use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in Internet Explorer < 9, they can break out + * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + // Reset `lastIndex` because in IE < 9 `String#replace` does not. + string = baseToString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", + * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' + */ + function escapeRegExp(string) { + string = baseToString(string); + return (string && reHasRegExpChars.test(string)) + ? string.replace(reRegExpChars, escapeRegExpChar) + : (string || '(?:)'); + } + + /** + * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__foo_bar__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = baseToString(string); + length = +length; + + var strLength = string.length; + if (strLength >= length || !nativeIsFinite(length)) { + return string; + } + var mid = (length - strLength) / 2, + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); + + chars = createPadding('', rightLength, chars); + return chars.slice(0, leftLength) + string + chars; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padLeft('abc', 6); + * // => ' abc' + * + * _.padLeft('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padLeft('abc', 3); + * // => 'abc' + */ + var padLeft = createPadDir(); + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padRight('abc', 6); + * // => 'abc ' + * + * _.padRight('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padRight('abc', 3); + * // => 'abc' + */ + var padRight = createPadDir(true); + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, + * in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * of `parseInt`. + * + * @static + * @memberOf _ + * @category String + * @param {string} string The string to convert. + * @param {number} [radix] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. + // Chrome fails to trim leading whitespace characters. + // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + if (guard ? isIterateeCall(string, radix, guard) : radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + string = trim(string); + return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + /** + * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--foo-bar'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__foo_bar__'); + * // => 'Foo Bar' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = baseToString(string); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + + return string.lastIndexOf(target, position) == position; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' +``` + +Or in node.js: + +``` +npm install node-uuid +``` + +```javascript +var uuid = require('node-uuid'); +``` + +Then create some ids ... + +```javascript +// Generate a v1 (time-based) id +uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' + +// Generate a v4 (random) id +uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' +``` + +## API + +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // -> "710b962e-041c-11e1-9234-0123456789ab" +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +var arr = new Array(32); // -> [] +uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] + +// Optionally use uuid.unparse() to get stringify the ids +uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' +uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v4({ + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}); +// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" +``` + +Example: Generate two IDs in a single buffer + +```javascript +var buffer = new Array(32); // (or 'new Buffer' in node.js) +uuid.v4(null, buffer, 0); +uuid.v4(null, buffer, 16); +``` + +### uuid.parse(id[, buffer[, offset]]) +### uuid.unparse(buffer[, offset]) + +Parse and unparse UUIDs + + * `id` - (String) UUID(-like) string + * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used + * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 + +Example parsing and unparsing a UUID string + +```javascript +var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> +var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' +``` + +### uuid.noConflict() + +(Browsers only) Set `uuid` property back to it's previous value. + +Returns the node-uuid object. + +Example: + +```javascript +var myUuid = uuid.noConflict(); +myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' +``` + +## Deprecated APIs + +Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. + +### uuid([format [, buffer [, offset]]]) + +uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). + +### uuid.BufferClass + +The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. + +## Command Line Interface + +To use the executable, it's probably best to install this library globally. + +`npm install -g node-uuid` + +Usage: + +``` +USAGE: uuid [version] [options] + + +options: + +--help Display this message and exit +``` + +`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. + +### Examples + +``` +> uuid +3a91f950-dec8-4688-ba14-5b7bbfc7a563 +``` + +``` +> uuid v1 +9d0b43e0-7696-11e3-964b-250efa37a98e +``` + +``` +> uuid v4 +6790ac7c-24ac-4f98-8464-42f6d98a53ae +``` + +## Testing + +In node.js + +``` +npm test +``` + +In Browser + +``` +open test/test.html +``` + +### Benchmarking + +Requires node.js + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) + +For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). + +## Release notes + +### 1.4.6 + +* Properly detect node crypto and whatwg crypto +* Workaround phantomjs/browserify bug +* Explicit check for `window` rather implicit this-global +* Issue warning if Math.random() is being used +* "use strict"; +* A few jshint / stylistic updates (=== and such) + +### 1.4.0 + +* Improved module context detection +* Removed public RNG functions + +### 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + +### 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/README.md new file mode 100755 index 0000000..aaeb2ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/README.md @@ -0,0 +1,53 @@ +# node-uuid Benchmarks + +### Results + +To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark + +### Run them yourself + +node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. + +To prepare and run the benchmark issue; + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +You'll see an output like this one: + +``` +# v4 +nodeuuid.v4(): 854700 uuids/second +nodeuuid.v4('binary'): 788643 uuids/second +nodeuuid.v4('binary', buffer): 1336898 uuids/second +uuid(): 479386 uuids/second +uuid('binary'): 582072 uuids/second +uuidjs.create(4): 312304 uuids/second + +# v1 +nodeuuid.v1(): 938086 uuids/second +nodeuuid.v1('binary'): 683060 uuids/second +nodeuuid.v1('binary', buffer): 1644736 uuids/second +uuidjs.create(1): 190621 uuids/second +``` + +* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. +* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. + +If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: + +``` +for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; +``` + +If you're interested in how performance varies between different node versions, you can issue the above command multiple times. + +You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: + +``` +(cd benchmark/ && ./bench.sh) +``` + +This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.gnu b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.gnu new file mode 100755 index 0000000..a342fbb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.gnu @@ -0,0 +1,174 @@ +#!/opt/local/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.4 patchlevel 3 +# last modified March 2011 +# System: Darwin 10.8.0 +# +# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 +# Thomas Williams, Colin Kelley and many others +# +# gnuplot home: http://www.gnuplot.info +# faq, bugs, etc: type "help seeking-assistance" +# immediate help: type "help" +# plot window: hit 'h' +set terminal postscript eps noenhanced defaultplex \ + leveldefault color colortext \ + solid linewidth 1.2 butt noclip \ + palfuncparam 2000,0.003 \ + "Helvetica" 14 +set output 'bench.eps' +unset clip points +set clip one +unset clip two +set bar 1.000000 front +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set timefmt x "%d/%m/%y,%H:%M" +set timefmt y "%d/%m/%y,%H:%M" +set timefmt z "%d/%m/%y,%H:%M" +set timefmt x2 "%d/%m/%y,%H:%M" +set timefmt y2 "%d/%m/%y,%H:%M" +set timefmt cb "%d/%m/%y,%H:%M" +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 +set style circle radius graph 0.02, first 0, 0 +set dummy x,y +set format x "% g" +set format y "% g" +set format x2 "% g" +set format y2 "% g" +set format z "% g" +set format cb "% g" +set angles radians +unset grid +set key title "" +set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +set key maxcolumns 2 maxrows 0 +unset label +unset arrow +set style increment default +unset style line +set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets graph 0.05, 0.15, 0, 0 +set pointsize 1.5 +set pointintervalbox 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 0 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set xtics norangelimit +set xtics () +set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set ytics autofreq norangelimit +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 +set ztics autofreq norangelimit +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set cbtics autofreq norangelimit +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale rfixmin +set autoscale rfixmax +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set autoscale tfixmin +set autoscale tfixmax +set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale ufixmin +set autoscale ufixmax +set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale vfixmin +set autoscale vfixmax +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) +set autoscale xfixmin +set autoscale xfixmax +set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) +set autoscale x2fixmin +set autoscale x2fixmax +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) +set autoscale yfixmin +set autoscale yfixmax +set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) +set autoscale y2fixmin +set autoscale y2fixmax +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale zfixmin +set autoscale zfixmax +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale cbfixmin +set autoscale cbfixmax +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault +set loadpath +set fontpath +set fit noerrorvariables +GNUTERM = "aqua" +plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 +# EOF diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.sh b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.sh new file mode 100755 index 0000000..d870a0c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/bench.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# for a given node version run: +# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; + +PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') +FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) +INDICES=(2 3 2 3 2 2 2 2 2) +VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) +TMPJOIN="tmp_join" +OUTPUT="bench_results.txt" + +for I in ${!FILES[*]}; do + F=${FILES[$I]} + P=${PATTERNS[$I]} + INDEX=${INDICES[$I]} + echo "version $F" > $F + for V in $VERSIONS; do + (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F + done + if [ $I == 0 ]; then + cat $F > $TMPJOIN + else + join $TMPJOIN $F > $OUTPUT + cp $OUTPUT $TMPJOIN + fi + rm $F +done + +rm $TMPJOIN + +gnuplot bench.gnu +convert -density 200 -resize 800x560 -flatten bench.eps bench.png +rm bench.eps diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark-native.c b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark-native.c new file mode 100755 index 0000000..dbfc75f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark-native.c @@ -0,0 +1,34 @@ +/* +Test performance of native C UUID generation + +To Compile: cc -luuid benchmark-native.c -o benchmark-native +*/ + +#include +#include +#include +#include + +int main() { + uuid_t myid; + char buf[36+1]; + int i; + struct timeval t; + double start, finish; + + gettimeofday(&t, NULL); + start = t.tv_sec + t.tv_usec/1e6; + + int n = 2e5; + for (i = 0; i < n; i++) { + uuid_generate(myid); + uuid_unparse(myid, buf); + } + + gettimeofday(&t, NULL); + finish = t.tv_sec + t.tv_usec/1e6; + double dur = finish - start; + + printf("%d uuids/sec", (int)(n/dur)); + return 0; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark.js new file mode 100755 index 0000000..40e6efb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/benchmark/benchmark.js @@ -0,0 +1,84 @@ +try { + var nodeuuid = require('../uuid'); +} catch (e) { + console.error('node-uuid require failed - skipping tests'); +} + +try { + var uuid = require('uuid'); +} catch (e) { + console.error('uuid require failed - skipping tests'); +} + +try { + var uuidjs = require('uuid-js'); +} catch (e) { + console.error('uuid-js require failed - skipping tests'); +} + +var N = 5e5; + +function rate(msg, t) { + console.log(msg + ': ' + + (N / (Date.now() - t) * 1e3 | 0) + + ' uuids/second'); +} + +console.log('# v4'); + +// node-uuid - string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); + rate('nodeuuid.v4() - using node.js crypto RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); + rate('nodeuuid.v4() - using Math.random() RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); + rate('nodeuuid.v4(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); + rate('nodeuuid.v4(\'binary\', buffer)', t); +} + +// libuuid - string form +if (uuid) { + for (var i = 0, t = Date.now(); i < N; i++) uuid(); + rate('uuid()', t); + + for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); + rate('uuid(\'binary\')', t); +} + +// uuid-js - string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); + rate('uuidjs.create(4)', t); +} + +// 140byte.es +for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); +rate('140byte.es_v4', t); + +console.log(''); +console.log('# v1'); + +// node-uuid - v1 string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); + rate('nodeuuid.v1()', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); + rate('nodeuuid.v1(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); + rate('nodeuuid.v1(\'binary\', buffer)', t); +} + +// uuid-js - v1 string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); + rate('uuidjs.create(1)', t); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bin/uuid b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bin/uuid new file mode 100755 index 0000000..f732e99 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bin/uuid @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +var path = require('path'); +var uuid = require(path.join(__dirname, '..')); + +var arg = process.argv[2]; + +if ('--help' === arg) { + console.log('\n USAGE: uuid [version] [options]\n\n'); + console.log(' options:\n'); + console.log(' --help Display this message and exit\n'); + process.exit(0); +} + +if (null == arg) { + console.log(uuid()); + process.exit(0); +} + +if ('v1' !== arg && 'v4' !== arg) { + console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); + process.exit(1); +} + +console.log(uuid[arg]()); +process.exit(0); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bower.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bower.json new file mode 100755 index 0000000..c0925e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/bower.json @@ -0,0 +1,23 @@ +{ + "name": "node-uuid", + "version": "1.4.7", + "homepage": "https://github.com/broofa/node-uuid", + "authors": [ + "Robert Kieffer " + ], + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "main": "uuid.js", + "keywords": [ + "uuid", + "gid", + "rfc4122" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/component.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/component.json new file mode 100755 index 0000000..3ff4633 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/component.json @@ -0,0 +1,25 @@ +{ + "name": "node-uuid", + "repo": "broofa/node-uuid", + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "version": "1.4.7", + "author": "Robert Kieffer ", + "contributors": [ + { + "name": "Christoph Tavan ", + "github": "https://github.com/ctavan" + } + ], + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "dependencies": {}, + "development": {}, + "main": "uuid.js", + "scripts": [ + "uuid.js" + ], + "license": "MIT" +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/package.json new file mode 100755 index 0000000..6d448b7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "node-uuid@1.4.7", + "scope": null, + "escapedName": "node-uuid", + "name": "node-uuid", + "rawSpec": "1.4.7", + "spec": "1.4.7", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/xcode" + ] + ], + "_from": "node-uuid@1.4.7", + "_id": "node-uuid@1.4.7", + "_inCache": true, + "_location": "/node-uuid", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "coolaj86", + "email": "coolaj86@gmail.com" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "raw": "node-uuid@1.4.7", + "scope": null, + "escapedName": "node-uuid", + "name": "node-uuid", + "rawSpec": "1.4.7", + "spec": "1.4.7", + "type": "version" + }, + "_requiredBy": [ + "/xcode" + ], + "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "_shrinkwrap": null, + "_spec": "node-uuid@1.4.7", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/xcode", + "author": { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + "bin": { + "uuid": "./bin/uuid" + }, + "bugs": { + "url": "https://github.com/broofa/node-uuid/issues" + }, + "contributors": [ + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + } + ], + "dependencies": {}, + "deprecated": "use uuid module instead", + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "devDependencies": { + "nyc": "^2.2.0" + }, + "directories": {}, + "dist": { + "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "tarball": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" + }, + "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd", + "homepage": "https://github.com/broofa/node-uuid", + "installable": true, + "keywords": [ + "guid", + "rfc4122", + "uuid" + ], + "lib": ".", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" + } + ], + "main": "./uuid.js", + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + }, + { + "name": "coolaj86", + "email": "coolaj86@gmail.com" + } + ], + "name": "node-uuid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/broofa/node-uuid.git" + }, + "scripts": { + "coverage": "nyc npm test && nyc report", + "test": "node test/test.js" + }, + "url": "http://github.com/broofa/node-uuid", + "version": "1.4.7" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/compare_v1.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/compare_v1.js new file mode 100755 index 0000000..05af822 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/compare_v1.js @@ -0,0 +1,63 @@ +var assert = require('assert'), + nodeuuid = require('../uuid'), + uuidjs = require('uuid-js'), + libuuid = require('uuid').generate, + util = require('util'), + exec = require('child_process').exec, + os = require('os'); + +// On Mac Os X / macports there's only the ossp-uuid package that provides uuid +// On Linux there's uuid-runtime which provides uuidgen +var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; + +function compare(ids) { + console.log(ids); + for (var i = 0; i < ids.length; i++) { + var id = ids[i].split('-'); + id = [id[2], id[1], id[0]].join(''); + ids[i] = id; + } + var sorted = ([].concat(ids)).sort(); + + if (sorted.toString() !== ids.toString()) { + console.log('Warning: sorted !== ids'); + } else { + console.log('everything in order!'); + } +} + +// Test time order of v1 uuids +var ids = []; +while (ids.length < 10e3) ids.push(nodeuuid.v1()); + +var max = 10; +console.log('node-uuid:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); +compare(ids); + +console.log(''); +console.log('uuidjs:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); +compare(ids); + +console.log(''); +console.log('libuuid:'); +ids = []; +var count = 0; +var last = function() { + compare(ids); +} +var cb = function(err, stdout, stderr) { + ids.push(stdout.substring(0, stdout.length-1)); + count++; + if (count < max) { + return next(); + } + last(); +}; +var next = function() { + exec(uuidCmd, cb); +}; +next(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.html new file mode 100755 index 0000000..d80326e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.html @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.js new file mode 100755 index 0000000..5f1113d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/test/test.js @@ -0,0 +1,231 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); + if (!/_rb/.test(uuid._rng.toString())) { + throw new Error("should use crypto for node.js"); + } +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
    ' + msg.replace(/\n/g, '
    ') + '
    '); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/uuid.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/uuid.js new file mode 100755 index 0000000..89c5b8f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/node-uuid/uuid.js @@ -0,0 +1,272 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +/*global window, require, define */ +(function(_window) { + 'use strict'; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; + + function setupBrowser() { + // Allow for MSIE11 msCrypto + var _crypto = _window.crypto || _window.msCrypto; + + if (!_rng && _crypto && _crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + try { + var _rnds8 = new Uint8Array(16); + _whatwgRNG = _rng = function whatwgRNG() { + _crypto.getRandomValues(_rnds8); + return _rnds8; + }; + _rng(); + } catch(e) {} + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _mathRNG = _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + if ('undefined' !== typeof console && console.warn) { + console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); + } + } + } + + function setupNode() { + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if ('function' === typeof require) { + try { + var _rb = require('crypto').randomBytes; + _nodeRNG = _rng = _rb && function() {return _rb(16);}; + _rng(); + } catch(e) {} + } + } + + if (_window) { + setupBrowser(); + } else { + setupNode(); + } + + // Buffer class to use + var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) === 'string') { + buf = (options === 'binary') ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + uuid._rng = _rng; + uuid._mathRNG = _mathRNG; + uuid._nodeRNG = _nodeRNG; + uuid._whatwgRNG = _whatwgRNG; + + if (('undefined' !== typeof module) && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + + + } else { + // Publish as global (in browsers) + _previousRoot = _window.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _window.uuid = _previousRoot; + return uuid; + }; + + _window.uuid = uuid; + } +})('undefined' !== typeof window ? window : null); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.npmignore new file mode 100755 index 0000000..3c3629e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.travis.yml new file mode 100755 index 0000000..99f2bbf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/README.md new file mode 100755 index 0000000..f21a4b3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/bin/nopt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/bin/nopt.js new file mode 100755 index 0000000..3232d4c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/bin/nopt.js @@ -0,0 +1,54 @@ +#!/usr/bin/env node +var nopt = require("../lib/nopt") + , path = require("path") + , types = { num: Number + , bool: Boolean + , help: Boolean + , list: Array + , "num-list": [Number, Array] + , "str-list": [String, Array] + , "bool-list": [Boolean, Array] + , str: String + , clear: Boolean + , config: Boolean + , length: Number + , file: path + } + , shorthands = { s: [ "--str", "astring" ] + , b: [ "--bool" ] + , nb: [ "--no-bool" ] + , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] + , "?": ["--help"] + , h: ["--help"] + , H: ["--help"] + , n: [ "--num", "125" ] + , c: ["--config"] + , l: ["--length"] + , f: ["--file"] + } + , parsed = nopt( types + , shorthands + , process.argv + , 2 ) + +console.log("parsed", parsed) + +if (parsed.help) { + console.log("") + console.log("nopt cli tester") + console.log("") + console.log("types") + console.log(Object.keys(types).map(function M (t) { + var type = types[t] + if (Array.isArray(type)) { + return [t, type.map(function (type) { return type.name })] + } + return [t, type && type.name] + }).reduce(function (s, i) { + s[i[0]] = i[1] + return s + }, {})) + console.log("") + console.log("shorthands") + console.log(shorthands) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/examples/my-program.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/examples/my-program.js new file mode 100755 index 0000000..142447e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/examples/my-program.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +//process.env.DEBUG_NOPT = 1 + +// my-program.js +var nopt = require("../lib/nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag", "true"] + , "g" : ["--flag"] + , "s" : "--flag" + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + +console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/lib/nopt.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/lib/nopt.js new file mode 100755 index 0000000..97707e7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/lib/nopt.js @@ -0,0 +1,415 @@ +// info about each config option. + +var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG + ? function () { console.error.apply(console, arguments) } + : function () {} + +var url = require("url") + , path = require("path") + , Stream = require("stream").Stream + , abbrev = require("abbrev") + +module.exports = exports = nopt +exports.clean = clean + +exports.typeDefs = + { String : { type: String, validate: validateString } + , Boolean : { type: Boolean, validate: validateBoolean } + , url : { type: url, validate: validateUrl } + , Number : { type: Number, validate: validateNumber } + , path : { type: path, validate: validatePath } + , Stream : { type: Stream, validate: validateStream } + , Date : { type: Date, validate: validateDate } + } + +function nopt (types, shorthands, args, slice) { + args = args || process.argv + types = types || {} + shorthands = shorthands || {} + if (typeof slice !== "number") slice = 2 + + debug(types, shorthands, args, slice) + + args = args.slice(slice) + var data = {} + , key + , remain = [] + , cooked = args + , original = args.slice(0) + + parse(args, data, remain, types, shorthands) + // now data is full + clean(data, types, exports.typeDefs) + data.argv = {remain:remain,cooked:cooked,original:original} + Object.defineProperty(data.argv, 'toString', { value: function () { + return this.original.map(JSON.stringify).join(" ") + }, enumerable: false }) + return data +} + +function clean (data, types, typeDefs) { + typeDefs = typeDefs || exports.typeDefs + var remove = {} + , typeDefault = [false, true, null, String, Array] + + Object.keys(data).forEach(function (k) { + if (k === "argv") return + var val = data[k] + , isArray = Array.isArray(val) + , type = types[k] + if (!isArray) val = [val] + if (!type) type = typeDefault + if (type === Array) type = typeDefault.concat(Array) + if (!Array.isArray(type)) type = [type] + + debug("val=%j", val) + debug("types=", type) + val = val.map(function (val) { + // if it's an unknown value, then parse false/true/null/numbers/dates + if (typeof val === "string") { + debug("string %j", val) + val = val.trim() + if ((val === "null" && ~type.indexOf(null)) + || (val === "true" && + (~type.indexOf(true) || ~type.indexOf(Boolean))) + || (val === "false" && + (~type.indexOf(false) || ~type.indexOf(Boolean)))) { + val = JSON.parse(val) + debug("jsonable %j", val) + } else if (~type.indexOf(Number) && !isNaN(val)) { + debug("convert to number", val) + val = +val + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { + debug("convert to date", val) + val = new Date(val) + } + } + + if (!types.hasOwnProperty(k)) { + return val + } + + // allow `--no-blah` to set 'blah' to null if null is allowed + if (val === false && ~type.indexOf(null) && + !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val = null + } + + var d = {} + d[k] = val + debug("prevalidated val", d, val, types[k]) + if (!validate(d, k, val, types[k], typeDefs)) { + if (exports.invalidHandler) { + exports.invalidHandler(k, val, types[k], data) + } else if (exports.invalidHandler !== false) { + debug("invalid: "+k+"="+val, types[k]) + } + return remove + } + debug("validated val", d, val, types[k]) + return d[k] + }).filter(function (val) { return val !== remove }) + + if (!val.length) delete data[k] + else if (isArray) { + debug(isArray, data[k], val) + data[k] = val + } else data[k] = val[0] + + debug("k=%s val=%j", k, val, data[k]) + }) +} + +function validateString (data, k, val) { + data[k] = String(val) +} + +function validatePath (data, k, val) { + if (val === true) return false + if (val === null) return true + + val = String(val) + var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// + if (val.match(homePattern) && process.env.HOME) { + val = path.resolve(process.env.HOME, val.substr(2)) + } + data[k] = path.resolve(String(val)) + return true +} + +function validateNumber (data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)) + if (isNaN(val)) return false + data[k] = +val +} + +function validateDate (data, k, val) { + debug("validate Date %j %j %j", k, val, Date.parse(val)) + var s = Date.parse(val) + if (isNaN(s)) return false + data[k] = new Date(val) +} + +function validateBoolean (data, k, val) { + if (val instanceof Boolean) val = val.valueOf() + else if (typeof val === "string") { + if (!isNaN(val)) val = !!(+val) + else if (val === "null" || val === "false") val = false + else val = true + } else val = !!val + data[k] = val +} + +function validateUrl (data, k, val) { + val = url.parse(String(val)) + if (!val.host) return false + data[k] = val.href +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +function validate (data, k, val, type, typeDefs) { + // arrays are lists of types. + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i ++) { + if (type[i] === Array) continue + if (validate(data, k, val, type[i], typeDefs)) return true + } + delete data[k] + return false + } + + // an array of anything? + if (type === Array) return true + + // NaN is poisonous. Means that something is not allowed. + if (type !== type) { + debug("Poison NaN", k, val, type) + delete data[k] + return false + } + + // explicit list of values + if (val === type) { + debug("Explicitly allowed %j", val) + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + return true + } + + // now go through the list of typeDefs, validate against each one. + var ok = false + , types = Object.keys(typeDefs) + for (var i = 0, l = types.length; i < l; i ++) { + debug("test type %j %j %j", k, val, types[i]) + var t = typeDefs[types[i]] + if (t && + ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { + var d = {} + ok = false !== t.validate(d, k, val) + val = d[k] + if (ok) { + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + break + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]) + + if (!ok) delete data[k] + return ok +} + +function parse (args, data, remain, types, shorthands) { + debug("parse", args, data, remain) + + var key = null + , abbrevs = abbrev(Object.keys(types)) + , shortAbbr = abbrev(Object.keys(shorthands)) + + for (var i = 0; i < args.length; i ++) { + var arg = args[i] + debug("arg", arg) + + if (arg.match(/^-{2,}$/)) { + // done with keys. + // the rest are args. + remain.push.apply(remain, args.slice(i + 1)) + args[i] = "--" + break + } + var hadEq = false + if (arg.charAt(0) === "-" && arg.length > 1) { + if (arg.indexOf("=") !== -1) { + hadEq = true + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) + } + + // see if it's a shorthand + // if so, splice and back up to re-parse it. + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) + debug("arg=%j shRes=%j", arg, shRes) + if (shRes) { + debug(arg, shRes) + args.splice.apply(args, [i, 1].concat(shRes)) + if (arg !== shRes[0]) { + i -- + continue + } + } + arg = arg.replace(/^-+/, "") + var no = null + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no + arg = arg.substr(3) + } + + if (abbrevs[arg]) arg = abbrevs[arg] + + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + + // allow unknown things to be arrays if specified multiple times. + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]] + isArray = true + } + + var val + , la = args[i + 1] + + var isBool = typeof no === 'boolean' || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + (typeof types[arg] === 'undefined' && !hadEq) || + (la === "false" && + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + + if (isBool) { + // just set and move along + val = !no + // however, also support --bool true or --bool false + if (la === "true" || la === "false") { + val = JSON.parse(la) + la = null + if (no) val = !val + i ++ + } + + // also support "foo":[Boolean, "bar"] and "--foo bar" + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { + // an explicit type + val = la + i ++ + } else if ( la === "null" && ~types[arg].indexOf(null) ) { + // null allowed + val = null + i ++ + } else if ( !la.match(/^-{2,}[^-]/) && + !isNaN(la) && + ~types[arg].indexOf(Number) ) { + // number + val = +la + i ++ + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + // string + val = la + i ++ + } + } + + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + continue + } + + if (types[arg] === String && la === undefined) + la = "" + + if (la && la.match(/^-{2,}$/)) { + la = undefined + i -- + } + + val = la === undefined ? true : la + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + i ++ + continue + } + remain.push(arg) + } +} + +function resolveShort (arg, shorthands, shortAbbr, abbrevs) { + // handle single-char shorthands glommed together, like + // npm ls -glp, but only if there is one dash, and only if + // all of the chars are single-char shorthands, and it's + // not a match to some other abbrev. + arg = arg.replace(/^-+/, '') + + // if it's an exact known option, then don't go any further + if (abbrevs[arg] === arg) + return null + + // if it's an exact known shortopt, same deal + if (shorthands[arg]) { + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] + } + + // first check to see if this arg is a set of single-char shorthands + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { + l[r] = true + return l + }, {}) + shorthands.___singles = singles + debug('shorthand singles', singles) + } + + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) + + + // if it's an arg abbrev, and not a literal shorthand, then prefer the arg + if (abbrevs[arg] && !shorthands[arg]) + return null + + // if it's an abbr for a shorthand, then use that + if (shortAbbr[arg]) + arg = shortAbbr[arg] + + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/package.json new file mode 100755 index 0000000..727d271 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "nopt@^3.0.6", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "^3.0.6", + "spec": ">=3.0.6 <4.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "nopt@>=3.0.6 <4.0.0", + "_id": "nopt@3.0.6", + "_inCache": true, + "_location": "/nopt", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "_npmVersion": "2.14.10", + "_phantomChildren": {}, + "_requested": { + "raw": "nopt@^3.0.6", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "^3.0.6", + "spec": ">=3.0.6 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_shrinkwrap": null, + "_spec": "nopt@^3.0.6", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "dependencies": { + "abbrev": "1" + }, + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "tarball": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + }, + "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "homepage": "https://github.com/npm/nopt#readme", + "license": "ISC", + "main": "lib/nopt.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "nopt", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.0.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/test/basic.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/test/basic.js new file mode 100755 index 0000000..d399de9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/nopt/test/basic.js @@ -0,0 +1,273 @@ +var nopt = require("../") + , test = require('tap').test + + +test("passing a string results in a string", function (t) { + var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) + t.same(parsed.key, "myvalue") + t.end() +}) + +// https://github.com/npm/nopt/issues/31 +test("Empty String results in empty string, not true", function (t) { + var parsed = nopt({ empty: String }, {}, ["--empty"], 0) + t.same(parsed.empty, "") + t.end() +}) + +test("~ path is resolved to $HOME", function (t) { + var path = require("path") + if (!process.env.HOME) process.env.HOME = "/tmp" + var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) + t.same(parsed.key, path.resolve(process.env.HOME, "val")) + t.end() +}) + +// https://github.com/npm/nopt/issues/24 +test("Unknown options are not parsed as numbers", function (t) { + var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) + t.equal(parsed['leave-as-is'], '1.20') + t.equal(parsed['parse-me'], 1.2) + t.end() +}); + +// https://github.com/npm/nopt/issues/48 +test("Check types based on name of type", function (t) { + var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0) + t.equal(parsed['parse-me'], 1.2) + t.end() +}) + + +test("Missing types are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("Types passed without a name are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("other tests", function (t) { + + var util = require("util") + , Stream = require("stream") + , path = require("path") + , url = require("url") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } + + , types = + { aoa: Array + , nullstream: [null, Stream] + , date: Date + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + , path: path + } + + ; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know=the-rules --and=so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, '100']} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ,["--notadate=2011-01-25" + ,{notadate: "2011-01-25"} + ,[]] + ,["--date 2011-01-25" + ,{date: new Date("2011-01-25")} + ,[]] + ,["-cl 1" + ,{config: true, length: 1} + ,[] + ,{config: Boolean, length: Number, clear: Boolean} + ,{c: "--config", l: "--length"}] + ,["--acount bla" + ,{"acount":true} + ,["bla"] + ,{account: Boolean, credentials: Boolean, options: String} + ,{a:"--account", c:"--credentials",o:"--options"}] + ,["--clear" + ,{clear:true} + ,[] + ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} + ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] + ,["--file -" + ,{"file":"-"} + ,[] + ,{file:String} + ,{}] + ,["--file -" + ,{"file":true} + ,["-"] + ,{file:Boolean} + ,{}] + ,["--path" + ,{"path":null} + ,[]] + ,["--path ." + ,{"path":process.cwd()} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + if (e && typeof e === "object") { + t.deepEqual(e, a) + } else { + t.equal(e, a) + } + } + t.deepEqual(rem, parsed.remain) + }) + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/README.md new file mode 100755 index 0000000..1f1ffca --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/once.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/once.js new file mode 100755 index 0000000..2354067 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/package.json new file mode 100755 index 0000000..abcdad4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/once/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "once@^1.3.0", + "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob" + ] + ], + "_from": "once@>=1.3.0 <2.0.0", + "_id": "once@1.4.0", + "_inCache": true, + "_location": "/once", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "once@^1.3.0", + "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob", + "/inflight" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "_shrinkwrap": null, + "_spec": "once@^1.3.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "dependencies": { + "wrappy": "1" + }, + "description": "Run a function exactly one time", + "devDependencies": { + "tap": "^7.0.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "files": [ + "once.js" + ], + "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", + "homepage": "https://github.com/isaacs/once#readme", + "keywords": [ + "once", + "function", + "one", + "single" + ], + "license": "ISC", + "main": "once.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "once", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/index.js new file mode 100755 index 0000000..3306616 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/index.js @@ -0,0 +1,24 @@ +'use strict'; +var os = require('os'); + +function homedir() { + var env = process.env; + var home = env.HOME; + var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; + + if (process.platform === 'win32') { + return env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); + } + + return home || null; +} + +module.exports = typeof os.homedir === 'function' ? os.homedir : homedir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/license new file mode 100755 index 0000000..654d0bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/package.json new file mode 100755 index 0000000..b3cdd96 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/osenv" + ] + ], + "_from": "os-homedir@>=1.0.0 <2.0.0", + "_id": "os-homedir@1.0.2", + "_inCache": true, + "_location": "/os-homedir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/os-homedir-1.0.2.tgz_1475211519628_0.7873868853785098" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "_shrinkwrap": null, + "_spec": "os-homedir@^1.0.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/osenv", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-homedir/issues" + }, + "dependencies": {}, + "description": "Node.js 4 `os.homedir()` ponyfill", + "devDependencies": { + "ava": "*", + "path-exists": "^2.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "b1b0ae70a5965fef7005ff6509a5dd1a78c95e36", + "homepage": "https://github.com/sindresorhus/os-homedir#readme", + "keywords": [ + "builtin", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "homedir", + "home", + "dir", + "directory", + "folder", + "user", + "path" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-homedir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-homedir.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/readme.md new file mode 100755 index 0000000..856ae61 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-homedir/readme.md @@ -0,0 +1,31 @@ +# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir) + +> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save os-homedir +``` + + +## Usage + +```js +const osHomedir = require('os-homedir'); + +console.log(osHomedir()); +//=> '/Users/sindresorhus' +``` + + +## Related + +- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result +- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/index.js new file mode 100755 index 0000000..2077b1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +module.exports = function () { + var path; + + if (isWindows) { + path = process.env.TEMP || + process.env.TMP || + (process.env.SystemRoot || process.env.windir) + '\\temp'; + } else { + path = process.env.TMPDIR || + process.env.TMP || + process.env.TEMP || + '/tmp'; + } + + if (trailingSlashRe.test(path)) { + path = path.slice(0, -1); + } + + return path; +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/license new file mode 100755 index 0000000..654d0bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/package.json new file mode 100755 index 0000000..b6dbd22 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/osenv" + ] + ], + "_from": "os-tmpdir@>=1.0.0 <2.0.0", + "_id": "os-tmpdir@1.0.2", + "_inCache": true, + "_location": "/os-tmpdir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/os-tmpdir-1.0.2.tgz_1475211274587_0.14931037812493742" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "_shrinkwrap": null, + "_spec": "os-tmpdir@^1.0.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/osenv", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "dependencies": {}, + "description": "Node.js os.tmpdir() ponyfill", + "devDependencies": { + "ava": "*", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "tarball": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "1abf9cf5611b4be7377060ea67054b45cbf6813c", + "homepage": "https://github.com/sindresorhus/os-tmpdir#readme", + "keywords": [ + "built-in", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "tmpdir", + "tempdir", + "tmp", + "temp", + "dir", + "directory", + "env", + "environment" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-tmpdir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-tmpdir.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/readme.md new file mode 100755 index 0000000..c09f7ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/os-tmpdir/readme.md @@ -0,0 +1,32 @@ +# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) + +> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com) + +Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8). + + +## Install + +``` +$ npm install --save os-tmpdir +``` + + +## Usage + +```js +const osTmpdir = require('os-tmpdir'); + +osTmpdir(); +//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' +``` + + +## API + +See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir). + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.npmignore new file mode 100755 index 0000000..8c23dee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.travis.yml new file mode 100755 index 0000000..99f2bbf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/README.md new file mode 100755 index 0000000..08fd900 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/README.md @@ -0,0 +1,63 @@ +# osenv + +Look up environment settings specific to different operating systems. + +## Usage + +```javascript +var osenv = require('osenv') +var path = osenv.path() +var user = osenv.user() +// etc. + +// Some things are not reliably in the env, and have a fallback command: +var h = osenv.hostname(function (er, hostname) { + h = hostname +}) +// This will still cause it to be memoized, so calling osenv.hostname() +// is now an immediate operation. + +// You can always send a cb, which will get called in the nextTick +// if it's been memoized, or wait for the fallback data if it wasn't +// found in the environment. +osenv.hostname(function (er, hostname) { + if (er) console.error('error looking up hostname') + else console.log('this machine calls itself %s', hostname) +}) +``` + +## osenv.hostname() + +The machine name. Calls `hostname` if not found. + +## osenv.user() + +The currently logged-in user. Calls `whoami` if not found. + +## osenv.prompt() + +Either PS1 on unix, or PROMPT on Windows. + +## osenv.tmpdir() + +The place where temporary files should be created. + +## osenv.home() + +No place like it. + +## osenv.path() + +An array of the places that the operating system will search for +executables. + +## osenv.editor() + +Return the executable name of the editor program. This uses the EDITOR +and VISUAL environment variables, and falls back to `vi` on Unix, or +`notepad.exe` on Windows. + +## osenv.shell() + +The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' +or 'cmd'. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/osenv.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/osenv.js new file mode 100755 index 0000000..702a95b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/osenv.js @@ -0,0 +1,72 @@ +var isWindows = process.platform === 'win32' +var path = require('path') +var exec = require('child_process').exec +var osTmpdir = require('os-tmpdir') +var osHomedir = require('os-homedir') + +// looking up envs is a bit costly. +// Also, sometimes we want to have a fallback +// Pass in a callback to wait for the fallback on failures +// After the first lookup, always returns the same thing. +function memo (key, lookup, fallback) { + var fell = false + var falling = false + exports[key] = function (cb) { + var val = lookup() + if (!val && !fell && !falling && fallback) { + fell = true + falling = true + exec(fallback, function (er, output, stderr) { + falling = false + if (er) return // oh well, we tried + val = output.trim() + }) + } + exports[key] = function (cb) { + if (cb) process.nextTick(cb.bind(null, null, val)) + return val + } + if (cb && !falling) process.nextTick(cb.bind(null, null, val)) + return val + } +} + +memo('user', function () { + return ( isWindows + ? process.env.USERDOMAIN + '\\' + process.env.USERNAME + : process.env.USER + ) +}, 'whoami') + +memo('prompt', function () { + return isWindows ? process.env.PROMPT : process.env.PS1 +}) + +memo('hostname', function () { + return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME +}, 'hostname') + +memo('tmpdir', function () { + return osTmpdir() +}) + +memo('home', function () { + return osHomedir() +}) + +memo('path', function () { + return (process.env.PATH || + process.env.Path || + process.env.path).split(isWindows ? ';' : ':') +}) + +memo('editor', function () { + return process.env.EDITOR || + process.env.VISUAL || + (isWindows ? 'notepad.exe' : 'vi') +}) + +memo('shell', function () { + return isWindows ? process.env.ComSpec || 'cmd' + : process.env.SHELL || 'bash' +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/package.json new file mode 100755 index 0000000..74f8f88 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "osenv@^0.1.3", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "^0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "osenv@>=0.1.3 <0.2.0", + "_id": "osenv@0.1.3", + "_inCache": true, + "_location": "/osenv", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "3.0.0", + "_phantomChildren": {}, + "_requested": { + "raw": "osenv@^0.1.3", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "^0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "_shrinkwrap": null, + "_spec": "osenv@^0.1.3", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "description": "Look up environment settings specific to different operating systems", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "tarball": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" + }, + "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4", + "homepage": "https://github.com/npm/osenv#readme", + "keywords": [ + "environment", + "variable", + "home", + "tmpdir", + "path", + "prompt", + "ps1" + ], + "license": "ISC", + "main": "osenv.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "osenv", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/unix.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/unix.js new file mode 100755 index 0000000..f87cbfb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/unix.js @@ -0,0 +1,71 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +if (process.platform === 'win32') { + console.log('TAP Version 13\n' + + '1..0\n' + + '# Skip unix tests, this is not unix\n') + return +} +var tap = require('tap') + +// like unix, but funny +process.env.USER = 'sirUser' +process.env.HOME = '/home/sirUser' +process.env.HOSTNAME = 'my-machine' +process.env.TMPDIR = '/tmpdir' +process.env.TMP = '/tmp' +process.env.TEMP = '/temp' +process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin' +process.env.PS1 = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.SHELL = 'zsh' + +tap.test('basic unix sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), process.env.USER) + t.equal(osenv.home(), process.env.HOME) + t.equal(osenv.hostname(), process.env.HOSTNAME) + t.same(osenv.path(), process.env.PATH.split(':')) + t.equal(osenv.prompt(), process.env.PS1) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), '/tmp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'vi') + + t.equal(osenv.shell(), 'zsh') + process.env.SHELL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'bash') + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/windows.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/windows.js new file mode 100755 index 0000000..c9d837a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/test/windows.js @@ -0,0 +1,74 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +if (process.platform !== 'win32') { + console.log('TAP version 13\n' + + '1..0 # Skip windows tests, this is not windows\n') + return +} + +// load this before clubbing the platform name. +var tap = require('tap') + +process.env.windir = 'c:\\windows' +process.env.USERDOMAIN = 'some-domain' +process.env.USERNAME = 'sirUser' +process.env.USERPROFILE = 'C:\\Users\\sirUser' +process.env.COMPUTERNAME = 'my-machine' +process.env.TMPDIR = 'C:\\tmpdir' +process.env.TMP = 'C:\\tmp' +process.env.TEMP = 'C:\\temp' +process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin' +process.env.PROMPT = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.ComSpec = 'some-com' + +tap.test('basic windows sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), + process.env.USERDOMAIN + '\\' + process.env.USERNAME) + t.equal(osenv.home(), process.env.USERPROFILE) + t.equal(osenv.hostname(), process.env.COMPUTERNAME) + t.same(osenv.path(), process.env.Path.split(';')) + t.equal(osenv.prompt(), process.env.PROMPT) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), 'c:\\windows\\temp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'notepad.exe') + + t.equal(osenv.shell(), 'some-com') + process.env.ComSpec = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'cmd') + + t.end() +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/x.tap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/x.tap new file mode 100755 index 0000000..90d8472 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/osenv/x.tap @@ -0,0 +1,39 @@ +TAP version 13 + # Subtest: test/unix.js + TAP version 13 + # Subtest: basic unix sanity test + ok 1 - should be equal + ok 2 - should be equal + ok 3 - should be equal + ok 4 - should be equivalent + ok 5 - should be equal + ok 6 - should be equal + ok 7 - should be equal + ok 8 - should be equal + ok 9 - should be equal + ok 10 - should be equal + ok 11 - should be equal + ok 12 - should be equal + ok 13 - should be equal + ok 14 - should be equal + 1..14 + ok 1 - basic unix sanity test # time=10.712ms + + 1..1 + # time=18.422ms +ok 1 - test/unix.js # time=169.827ms + + # Subtest: test/windows.js + TAP version 13 + 1..0 # Skip windows tests, this is not windows + +ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows + + # Subtest: test/nada.js + TAP version 13 + 1..0 + +ok 2 - test/nada.js + +1..3 +# time=274.247ms diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/index.js new file mode 100755 index 0000000..22aa6c3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/license b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/license new file mode 100755 index 0000000..654d0bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/package.json new file mode 100755 index 0000000..c20949e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "path-is-absolute@^1.0.0", + "scope": null, + "escapedName": "path-is-absolute", + "name": "path-is-absolute", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob" + ] + ], + "_from": "path-is-absolute@>=1.0.0 <2.0.0", + "_id": "path-is-absolute@1.0.1", + "_inCache": true, + "_location": "/path-is-absolute", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/path-is-absolute-1.0.1.tgz_1475210523565_0.9876507974695414" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "path-is-absolute@^1.0.0", + "scope": null, + "escapedName": "path-is-absolute", + "name": "path-is-absolute", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "_shrinkwrap": null, + "_spec": "path-is-absolute@^1.0.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/glob", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "dependencies": {}, + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "devDependencies": { + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "edc91d348b21dac2ab65ea2fbec2868e2eff5eb6", + "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "path-is-absolute", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "scripts": { + "test": "xo && node test.js" + }, + "version": "1.0.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/readme.md new file mode 100755 index 0000000..8dbdf5f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/CHANGELOG.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/CHANGELOG.md new file mode 100755 index 0000000..2212735 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/CHANGELOG.md @@ -0,0 +1,508 @@ +Change Log +========== + +This file documents all notable changes to PEG.js. The releases follow [semantic +versioning](http://semver.org/). + +0.9.0 +----- + +Released: August 30, 2015 + +### Major Changes + + * **Tracing support.** Parsers can be compiled with support for tracing their + progress, which can help debugging complex grammars. This feature is + experimental and is expected to evolve over time as experience is gained. + [More details](https://github.com/pegjs/pegjs/commit/da57118a43a904f753d44d407994cf0b36358adc) + + * **Infinite loop detection.** Grammar constructs that could cause infinite + loops in generated parsers are detected during compilation and cause errors. + + * **Improved location information API.** The `line`, `column`, and `offset` + functions available in parser code were replaced by a single `location` + function which returns an object describing the current location. Similarly, + the `line`, `column`, and `offset` properties of exceptions were replaced by + a single `location` property. The location is no longer a single point but a + character range, which is meaningful mainly in actions where the range + covers action’s expression. + [More details](https://github.com/pegjs/pegjs/compare/e75f21dc8f0e66b3d87c4c19b3fcb8f89d9c3acd...eaca5f0acf97b66ef141fed84aa95d4e72e33757) + + * **Improved error reporting.** All exceptions thrown when generating a parser + have associated location information. And all exceptions thrown by generated + parser and PEG.js itself have a stack trace (the `stack` property) in + environments that support `Error.captureStackTrace`. + + * **Strict mode code**. All PEG.js and generated parser code is written using + [JavaScript strict mode](https://developer.mozilla.org/cs/docs/Web/JavaScript/Reference/Strict_mode). + +### Minor Changes + + * Labels behave like block-scoped variables. This means parser code can see + labels defined outside expressions containing code. + + * Empty sequences are no longer allowed. + + * Label names can’t be JavaScript reserved words. + + * Rule and label names can contain Unicode characters like in JavaScript. + + * Rules have to be separated either by `;` or a newline (until now, any + whitespace was enough). + + * The PEG.js grammar and all the example grammars were completely rewritten. + This rewrite included a number of cleanups, formatting changes, naming + changes, and bug fixes. + + * The parser object can now be accessed as `parser` in parser code. + + * Location information computation is faster. + + * Added support for Node.js >= 0.10.x, io.js, and Edge. Removed support for + Node.js < 0.10.x. + +### Bug Fixes + + * Fixed left recursion detector which missed many cases. + + * Fixed escaping of U+0100—U+107F and U+1000—U+107F in generated code and + error messages. + + * Renamed `parse` and `SyntaxError` to `peg$parse` and `peg$SyntaxError` to + mark them as internal identifiers. + +[Complete set of changes](https://github.com/pegjs/pegjs/compare/v0.8.0...v0.9.0) + +0.8.0 +----- + +Released: December 24, 2013 + +### Big Changes + + * Completely rewrote the code generator. Among other things, it allows + optimizing generated parsers for parsing speed or code size using the + `optimize` option of the `PEG.buildParser` method or the `--optimize`/`-o` + option on the command-line. All internal identifiers in generated code now + also have a `peg$` prefix to discourage their use and avoid conflicts. + [[#35](https://github.com/dmajda/pegjs/issues/35), + [#92](https://github.com/dmajda/pegjs/issues/92)] + + * Completely redesigned error handling. Instead of returning `null` inside + actions to indicate match failure, new `expected` and `error` functions can + be called to trigger an error. Also, expectation inside the `SyntaxError` + exceptions are now structured to allow easier machine processing. + [[#198](https://github.com/dmajda/pegjs/issues/198)] + + * Implemented a plugin API. The list of plugins to use can be specified using + the `plugins` option of the `PEG.buildParser` method or the `--plugin` + option on the command-line. Also implemented the `--extra-options` and + `--extra-options-file` command-line options, which are mainly useful to pass + additional options to plugins. + [[#106](https://github.com/dmajda/pegjs/issues/106)] + + * Made `offset`, `line` and `column` functions, not variables. They are now + available in all parsers and return lazily-computed position data. Removed + now useless `trackLineAndColumn` option of the `PEG.buildParser` method and + the `--track-line-and-column` option on the command-line. + + * Added a new `text` function. When called inside an action, it returns the + text matched by action's expression. + [[#131](https://github.com/dmajda/pegjs/issues/131)] + + * Added a new `$` operator. It extracts matched strings from expressions. + + * The `?` operator now returns `null` on unsuccessful match. + + * Predicates now always return `undefined`. + + * Replaced the `startRule` parameter of the `parse` method in generated + parsers with more generic `options` parameter. The start rule can now be + specified as the `startRule` option. The `options` parameter can be also + used to pass custom options to the parser because it is visible as the + `options` variable inside parser code. + [[#37](https://github.com/dmajda/pegjs/issues/37)] + + * The list of allowed start rules of a generated parser now has to be + specified explicitly using the `allowedStartRules` option of the + `PEG.buildParser` method or the `--allowed-start-rule` option on the + command-line. This will make certain optimizations like rule inlining easier + in the future. + + * Removed the `toSource` method of generated parsers and introduced a new + `output` option of the `PEG.buildParser` method. It allows callers to + specify whether they want to get back the parser object or its source code. + + * The source code is now a valid npm package. This makes using development + versions easier. + [[#32](https://github.com/dmajda/pegjs/issues/32)] + + * Generated parsers are now ~25% faster and ~62%/~3% smaller (when optimized + for size/speed) than those generated by 0.7.0. + + * Requires Node.js 0.8.0+. + +### Small Changes + + * `bin/pegjs` now outputs just the parser source if the value of the + `--export-var` option is empty. This makes embedding generated parsers into + other files easier. + [[#143](https://github.com/dmajda/pegjs/issues/143)] + + * Changed the value of the `name` property of `PEG.GrammarError` instances + from “PEG.GrammarError” to just “GrammarError”. This better reflects the + fact that PEG.js can get required with different variable name than `PEG`. + + * Setup prototype chain for `PEG.GrammarError` correctly. + + * Setup prototype chain for `SyntaxError` in generated parsers correctly. + + * Fixed error messages in certain cases with trailing input + [[#119](https://github.com/dmajda/pegjs/issues/119)] + + * Fixed code generated for classes starting with `\^`. + [[#125](https://github.com/dmajda/pegjs/issues/125)] + + * Fixed too eager proxy rules removal. + [[#137](https://github.com/dmajda/pegjs/issues/137)] + + * Added a license to all vendored libraries. + [[#207](https://github.com/dmajda/pegjs/issues/207)] + + * Converted the test suite from QUnit to Jasmine, cleaning it up on the way. + + * Travis CI integration. + + * Various internal code improvements and fixes. + + * Various generated code improvements and fixes. + + * Various example grammar improvements and fixes. + + * Improved `README.md`. + + * Converted `CHANGELOG` to Markdown. + +0.7.0 +----- + +Released: April 18, 2012 + +### Big Changes + + * Added ability to pass options to `PEG.buildParser`. + + * Implemented the `trackLineAndColumn` option for `PEG.buildParser` (together + with the `--track-line-and-column` command-line option). It makes the + generated parser track line and column during parsing. These are made + available inside actions and predicates as `line` and `column` variables. + + * Implemented the `cache` option for `PEG.buildParser` (together with the + `--cache` command-line option). This option enables/disables the results + cache in generated parsers, resulting in dramatic speedup when the cache is + disabled (the default now). The cost is breaking the linear parsing time + guarantee. + + * The current parse position is visible inside actions and predicates as the + `offset` variable. + + * Exceptions thrown by the parser have `offset`, `expected` and `found` + properties containing machine-readable information about the parse failure + (based on a patch by Marcin Stefaniuk). + + * Semantic predicates have access to preceding labels. + [[GH-69](https://github.com/dmajda/pegjs/issues/69)] + + * Implemented case-insensitive literal and class matching. + [[GH-34](https://github.com/dmajda/pegjs/issues/34)] + + * Rewrote the code generator — split some computations into separate passes + and based it on a proper templating system (Codie). + + * Rewrote variable handling in generated parsers in a stack-like fashion, + simplifying the code and making the parsers smaller and faster. + + * Adapted to Node.js 0.6.6+ (no longer supported in older versions). + + * Dropped support for IE < 8. + + * As a result of several optimizations, parsers generated by 0.7.0 are ~6.4 + times faster and ~19% smaller than those generated by 0.6.2 (as reported by + `/tools/impact`). + +### Small Changes + + * Fixed reported error position when part of the input is not consumed. + [[GH-48](https://github.com/dmajda/pegjs/issues/48)] + + * Fixed incorrect disjunction operator in `computeErrorPosition` (original + patch by Wolfgang Kluge). + + * Fixed regexp for detecting command-line options in `/bin/pegjs`. + [[GH-51](https://github.com/dmajda/pegjs/issues/51)] + + * Generate more efficient code for empty literals (original patch by Wolfgang + Kluge). + + * Fixed comment typos (patches by Wolfgang Kluge and Jason Davies). + [[GH-59](https://github.com/dmajda/pegjs/issues/59)] + + * Fixed a typo in JavaScript example grammar. + [[GH-62](https://github.com/dmajda/pegjs/issues/62)] + + * Made copy & paste inclusion of the PEG.js library into another code easier + by changing how the library is exported. + + * Improved the copyright comment and the “Generated by...” header. + + * Replaced `Jakefile` with `Makefile`. + + * Added `make hint` task that checks all JavaScript files using JSHint and + resolved all issues it reported. All JavaScript files and also generated + parsers are JSHint-clean now. + + * Fixed output printed during test failures (expected value was being printed + instead of the actual one). Original patch by Wolfgang Kluge. + + * Added a `/tools/impact` script to measure speed and size impact of commits. + + * Various generated code improvements and fixes. + + * Various internal code improvements and fixes. + + * Improved `README.md`. + +0.6.2 +----- + +Released: August 20, 2011 + +### Small Changes + + * Reset parser position when action returns `null`. + + * Fixed typo in JavaScript example grammar. + +0.6.1 +----- + +Released: April 14, 2011 + +### Small Changes + + * Use `--ascii` option when generating a minified version. + +0.6.0 +----- + +Released: April 14, 2011 + +### Big Changes + + * Rewrote the command-line mode to be based on Node.js instead of Rhino — no + more Java dependency. This also means that PEG.js is available as a Node.js + package and can be required as a module. + + * Version for the browser is built separately from the command-line one in two + flavors (normal and minified). + + * Parser variable name is no longer required argument of `bin/pegjs` — it is + `module.exports` by default and can be set using the `-e`/`--export-var` + option. This makes parsers generated by `/bin/pegjs` Node.js modules by + default. + + * Added ability to start parsing from any grammar rule. + + * Added several compiler optimizations — 0.6 is ~12% faster than 0.5.1 in the + benchmark on V8. + +### Small Changes + + * Split the source code into multiple files combined together using a build + system. + + * Jake is now used instead of Rake for build scripts — no more Ruby + dependency. + + * Test suite can be run from the command-line. + + * Benchmark suite can be run from the command-line. + + * Benchmark browser runner improvements (users can specify number of runs, + benchmarks are run using `setTimeout`, table is centered and fixed-width). + + * Added PEG.js version to “Generated by...” line in generated parsers. + + * Added PEG.js version information and homepage header to `peg.js`. + + * Generated code improvements and fixes. + + * Internal code improvements and fixes. + + * Rewrote `README.md`. + +0.5.1 +----- + +Released: November 28, 2010 + +### Small Changes + + * Fixed a problem where “SyntaxError: Invalid range in character class.” error + appeared when using command-line version on Widnows + ([GH-13](https://github.com/dmajda/pegjs/issues/13)). + + * Fixed wrong version reported by `bin/pegjs --version`. + + * Removed two unused variables in the code. + + * Fixed incorrect variable name on two places. + +0.5 +--- + +Released: June 10, 2010 + +### Big Changes + + * Syntax change: Use labeled expressions and variables instead of `$1`, `$2`, + etc. + + * Syntax change: Replaced `:` after a rule name with `=`. + + * Syntax change: Allow trailing semicolon (`;`) for rules + + * Semantic change: Start rule of the grammar is now implicitly its first rule. + + * Implemented semantic predicates. + + * Implemented initializers. + + * Removed ability to change the start rule when generating the parser. + + * Added several compiler optimizations — 0.5 is ~11% faster than 0.4 in the + benchmark on V8. + +### Small Changes + + * `PEG.buildParser` now accepts grammars only in string format. + + * Added “Generated by ...” message to the generated parsers. + + * Formatted all grammars more consistently and transparently. + + * Added notes about ECMA-262, 5th ed. compatibility to the JSON example + grammar. + + * Guarded against redefinition of `undefined`. + + * Made `bin/pegjs` work when called via a symlink + ([issue #1](https://github.com/dmajda/pegjs/issues/1)). + + * Fixed bug causing incorrect error messages + ([issue #2](https://github.com/dmajda/pegjs/issues/2)). + + * Fixed error message for invalid character range. + + * Fixed string literal parsing in the JavaScript grammar. + + * Generated code improvements and fixes. + + * Internal code improvements and fixes. + + * Improved `README.md`. + +0.4 +--- + +Released: April 17, 2010 + +### Big Changes + + * Improved IE compatibility — IE6+ is now fully supported. + + * Generated parsers are now standalone (no runtime is required). + + * Added example grammars for JavaScript, CSS and JSON. + + * Added a benchmark suite. + + * Implemented negative character classes (e.g. `[^a-z]`). + + * Project moved from BitBucket to GitHub. + +### Small Changes + + * Code generated for the character classes is now regexp-based (= simpler and + more scalable). + + * Added `\uFEFF` (BOM) to the definition of whitespace in the metagrammar. + + * When building a parser, left-recursive rules (both direct and indirect) are + reported as errors. + + * When building a parser, missing rules are reported as errors. + + * Expected items in the error messages do not contain duplicates and they are + sorted. + + * Fixed several bugs in the example arithmetics grammar. + + * Converted `README` to GitHub Flavored Markdown and improved it. + + * Added `CHANGELOG`. + + * Internal code improvements. + +0.3 +--- + +Released: March 14, 2010 + + * Wrote `README`. + + * Bootstrapped the grammar parser. + + * Metagrammar recognizes JavaScript-like comments. + + * Changed standard grammar extension from `.peg` to `.pegjs` (it is more + specific). + + * Simplified the example arithmetics grammar + added comment. + + * Fixed a bug with reporting of invalid ranges such as `[b-a]` in the + metagrammar. + + * Fixed `--start` vs. `--start-rule` inconsistency between help and actual + option processing code. + + * Avoided ugliness in QUnit output. + + * Fixed typo in help: `parserVar` → `parser_var`. + + * Internal code improvements. + +0.2.1 +----- + +Released: March 8, 2010 + + * Added `pegjs-` prefix to the name of the minified runtime file. + +0.2 +--- + +Released: March 8, 2010 + + * Added `Rakefile` that builds minified runtime using Google Closure Compiler + API. + + * Removed trailing commas in object initializers (Google Closure does not like + them). + +0.1 +--- + +Released: March 8, 2010 + + * Initial release. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/LICENSE new file mode 100755 index 0000000..89232b5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2010-2015 David Majda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/README.md new file mode 100755 index 0000000..52ca9f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/pegjs/README.md @@ -0,0 +1,479 @@ +PEG.js +====== + +PEG.js is a simple parser generator for JavaScript that produces fast parsers +with excellent error reporting. You can use it to process complex data or +computer languages and build transformers, interpreters, compilers and other +tools easily. + +Features +-------- + + * Simple and expressive grammar syntax + * Integrates both lexical and syntactical analysis + * Parsers have excellent error reporting out of the box + * Based on [parsing expression + grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar) formalism + — more powerful than traditional LL(*k*) and LR(*k*) parsers + * Usable [from your browser](http://pegjs.org/online), from the command line, + or via JavaScript API + +Getting Started +--------------- + +[Online version](http://pegjs.org/online) is the easiest way to generate a +parser. Just enter your grammar, try parsing few inputs, and download generated +parser code. + +Installation +------------ + +### Node.js + +To use the `pegjs` command, install PEG.js globally: + + $ npm install -g pegjs + +To use the JavaScript API, install PEG.js locally: + + $ npm install pegjs + +If you need both the `pegjs` command and the JavaScript API, install PEG.js both +ways. + +### Browser + +[Download](http://pegjs.org/#download) the PEG.js library (regular or minified +version) or install it using Bower: + + $ bower install pegjs + +Generating a Parser +------------------- + +PEG.js generates parser from a grammar that describes expected input and can +specify what the parser returns (using semantic actions on matched parts of the +input). Generated parser itself is a JavaScript object with a simple API. + +### Command Line + +To generate a parser from your grammar, use the `pegjs` command: + + $ pegjs arithmetics.pegjs + +This writes parser source code into a file with the same name as the grammar +file but with “.js” extension. You can also specify the output file explicitly: + + $ pegjs arithmetics.pegjs arithmetics-parser.js + +If you omit both input and output file, standard input and output are used. + +By default, the parser object is assigned to `module.exports`, which makes the +output a Node.js module. You can assign it to another variable by passing a +variable name using the `-e`/`--export-var` option. This may be helpful if you +want to use the parser in browser environment. + +You can tweak the generated parser with several options: + + * `--cache` — makes the parser cache results, avoiding exponential parsing + time in pathological cases but making the parser slower + * `--allowed-start-rules` — comma-separated list of rules the parser will be + allowed to start parsing from (default: the first rule in the grammar) + * `--plugin` — makes PEG.js use a specified plugin (can be specified multiple + times) + * `--extra-options` — additional options (in JSON format) to pass to + `PEG.buildParser` + * `--extra-options-file` — file with additional options (in JSON format) to + pass to `PEG.buildParser` + * `--trace` — makes the parser trace its progress + +### JavaScript API + +In Node.js, require the PEG.js parser generator module: + + var PEG = require("pegjs"); + +In browser, include the PEG.js library in your web page or application using the +` + +``` + + +## API + +### Parsing + +Parsing a plist from filename: + +``` javascript +var fs = require('fs'); +var plist = require('plist'); + +var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8')); +console.log(JSON.stringify(obj)); +``` + +Parsing a plist from string payload: + +``` javascript +var plist = require('plist'); + +var obj = plist.parse('Hello World!'); +console.log(obj); // Hello World! +``` + +### Building + +Given an existing JavaScript Object, you can turn it into an XML document +that complies with the plist DTD: + +``` javascript +var plist = require('plist'); + +console.log(plist.build({ foo: 'bar' })); +``` + + +## License + +(The MIT License) + +Copyright (c) 2010-2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/dist/plist-build.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/dist/plist-build.js new file mode 100755 index 0000000..4fcd378 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/dist/plist-build.js @@ -0,0 +1,3982 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],3:[function(require,module,exports){ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} + +},{}],4:[function(require,module,exports){ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + +},{}],5:[function(require,module,exports){ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; + +},{"../internal/arrayEvery":7,"../internal/baseCallback":11,"../internal/baseEvery":15,"../internal/isIterateeCall":40,"../lang/isArray":49}],6:[function(require,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],7:[function(require,module,exports){ +/** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; + +},{}],8:[function(require,module,exports){ +/** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + +},{}],9:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +module.exports = assignWith; + +},{"../object/keys":58}],10:[function(require,module,exports){ +var baseCopy = require('./baseCopy'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; + +},{"../object/keys":58,"./baseCopy":12}],11:[function(require,module,exports){ +var baseMatches = require('./baseMatches'), + baseMatchesProperty = require('./baseMatchesProperty'), + bindCallback = require('./bindCallback'), + identity = require('../utility/identity'), + property = require('../utility/property'); + +/** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); +} + +module.exports = baseCallback; + +},{"../utility/identity":61,"../utility/property":62,"./baseMatches":22,"./baseMatchesProperty":23,"./bindCallback":28}],12:[function(require,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],13:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; +}()); + +module.exports = baseCreate; + +},{"../lang/isObject":53}],14:[function(require,module,exports){ +var baseForOwn = require('./baseForOwn'), + createBaseEach = require('./createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + +},{"./baseForOwn":17,"./createBaseEach":30}],15:[function(require,module,exports){ +var baseEach = require('./baseEach'); + +/** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; + +},{"./baseEach":14}],16:[function(require,module,exports){ +var createBaseFor = require('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":31}],17:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + +},{"../object/keys":58,"./baseFor":16}],18:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + +},{"./toObject":46}],19:[function(require,module,exports){ +var baseIsEqualDeep = require('./baseIsEqualDeep'), + isObject = require('../lang/isObject'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); +} + +module.exports = baseIsEqual; + +},{"../lang/isObject":53,"./baseIsEqualDeep":20,"./isObjectLike":43}],20:[function(require,module,exports){ +var equalArrays = require('./equalArrays'), + equalByTag = require('./equalByTag'), + equalObjects = require('./equalObjects'), + isArray = require('../lang/isArray'), + isTypedArray = require('../lang/isTypedArray'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +module.exports = baseIsEqualDeep; + +},{"../lang/isArray":49,"../lang/isTypedArray":55,"./equalArrays":32,"./equalByTag":33,"./equalObjects":34}],21:[function(require,module,exports){ +var baseIsEqual = require('./baseIsEqual'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + +},{"./baseIsEqual":19,"./toObject":46}],22:[function(require,module,exports){ +var baseIsMatch = require('./baseIsMatch'), + getMatchData = require('./getMatchData'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; +} + +module.exports = baseMatches; + +},{"./baseIsMatch":21,"./getMatchData":36,"./toObject":46}],23:[function(require,module,exports){ +var baseGet = require('./baseGet'), + baseIsEqual = require('./baseIsEqual'), + baseSlice = require('./baseSlice'), + isArray = require('../lang/isArray'), + isKey = require('./isKey'), + isStrictComparable = require('./isStrictComparable'), + last = require('../array/last'), + toObject = require('./toObject'), + toPath = require('./toPath'); + +/** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ +function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; +} + +module.exports = baseMatchesProperty; + +},{"../array/last":4,"../lang/isArray":49,"./baseGet":18,"./baseIsEqual":19,"./baseSlice":26,"./isKey":41,"./isStrictComparable":44,"./toObject":46,"./toPath":47}],24:[function(require,module,exports){ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; + +},{}],25:[function(require,module,exports){ +var baseGet = require('./baseGet'), + toPath = require('./toPath'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ +function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; +} + +module.exports = basePropertyDeep; + +},{"./baseGet":18,"./toPath":47}],26:[function(require,module,exports){ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + +},{}],27:[function(require,module,exports){ +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; + +},{}],28:[function(require,module,exports){ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":61}],29:[function(require,module,exports){ +var bindCallback = require('./bindCallback'), + isIterateeCall = require('./isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"../function/restParam":6,"./bindCallback":28,"./isIterateeCall":40}],30:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + +},{"./getLength":35,"./isLength":42,"./toObject":46}],31:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":46}],32:[function(require,module,exports){ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; + +},{"./arraySome":8}],33:[function(require,module,exports){ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; + +},{}],34:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; + +},{"../object/keys":58}],35:[function(require,module,exports){ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":24}],36:[function(require,module,exports){ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; + +},{"../object/pairs":60,"./isStrictComparable":44}],37:[function(require,module,exports){ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":52}],38:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":35,"./isLength":42}],39:[function(require,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],40:[function(require,module,exports){ +var isArrayLike = require('./isArrayLike'), + isIndex = require('./isIndex'), + isObject = require('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":53,"./isArrayLike":38,"./isIndex":39}],41:[function(require,module,exports){ +var isArray = require('../lang/isArray'), + toObject = require('./toObject'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); +} + +module.exports = isKey; + +},{"../lang/isArray":49,"./toObject":46}],42:[function(require,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],43:[function(require,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],44:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +},{"../lang/isObject":53}],45:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('./isIndex'), + isLength = require('./isLength'), + keysIn = require('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":48,"../lang/isArray":49,"../object/keysIn":59,"./isIndex":39,"./isLength":42}],46:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":53}],47:[function(require,module,exports){ +var baseToString = require('./baseToString'), + isArray = require('../lang/isArray'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ +function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +} + +module.exports = toPath; + +},{"../lang/isArray":49,"./baseToString":27}],48:[function(require,module,exports){ +var isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":38,"../internal/isObjectLike":43}],49:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":37,"../internal/isLength":42,"../internal/isObjectLike":43}],50:[function(require,module,exports){ +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('../internal/isArrayLike'), + isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'), + isString = require('./isString'), + keys = require('../object/keys'); + +/** + * Checks if `value` is empty. A value is considered empty unless it's an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; +} + +module.exports = isEmpty; + +},{"../internal/isArrayLike":38,"../internal/isObjectLike":43,"../object/keys":58,"./isArguments":48,"./isArray":49,"./isFunction":51,"./isString":54}],51:[function(require,module,exports){ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":53}],52:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isNative; + +},{"../internal/isObjectLike":43,"./isFunction":51}],53:[function(require,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],54:[function(require,module,exports){ +var isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":43}],55:[function(require,module,exports){ +var isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":42,"../internal/isObjectLike":43}],56:[function(require,module,exports){ +var assignWith = require('../internal/assignWith'), + baseAssign = require('../internal/baseAssign'), + createAssigner = require('../internal/createAssigner'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); +}); + +module.exports = assign; + +},{"../internal/assignWith":9,"../internal/baseAssign":10,"../internal/createAssigner":29}],57:[function(require,module,exports){ +var baseAssign = require('../internal/baseAssign'), + baseCreate = require('../internal/baseCreate'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; +} + +module.exports = create; + +},{"../internal/baseAssign":10,"../internal/baseCreate":13,"../internal/isIterateeCall":40}],58:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":37,"../internal/isArrayLike":38,"../internal/shimKeys":45,"../lang/isObject":53}],59:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/isIndex":39,"../internal/isLength":42,"../lang/isArguments":48,"../lang/isArray":49,"../lang/isObject":53}],60:[function(require,module,exports){ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; + +},{"../internal/toObject":46,"./keys":58}],61:[function(require,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],62:[function(require,module,exports){ +var baseProperty = require('../internal/baseProperty'), + basePropertyDeep = require('../internal/basePropertyDeep'), + isKey = require('../internal/isKey'); + +/** + * Creates a function that returns the property value at `path` on a + * given object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +} + +module.exports = property; + +},{"../internal/baseProperty":24,"../internal/basePropertyDeep":25,"../internal/isKey":41}],63:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],64:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); + +},{"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLStringifier":77}],65:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],66:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],67:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],68:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],69:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); + +},{"lodash/lang/isObject":53,"lodash/object/create":57}],70:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],71:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/lang/isObject":53,"lodash/object/create":57}],72:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); + +},{"./XMLCData":65,"./XMLComment":66,"./XMLDTDAttList":67,"./XMLDTDElement":68,"./XMLDTDEntity":69,"./XMLDTDNotation":70,"./XMLProcessingInstruction":75,"lodash/lang/isObject":53,"lodash/object/create":57}],73:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); + +},{"./XMLAttribute":63,"./XMLNode":74,"./XMLProcessingInstruction":75,"lodash/collection/every":5,"lodash/lang/isFunction":51,"lodash/lang/isObject":53,"lodash/object/create":57}],74:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); + +},{"./XMLCData":65,"./XMLComment":66,"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLRaw":76,"./XMLText":78,"lodash/lang/isEmpty":50,"lodash/lang/isFunction":51,"lodash/lang/isObject":53}],75:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); + +},{"lodash/object/create":57}],76:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":74,"lodash/object/create":57}],77:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} + +}).call(this,require("buffer").Buffer) +},{"buffer":3,"util-deprecate":6,"xmldom":7}],2:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],3:[function(require,module,exports){ +(function (global){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +function typedArraySupport () { + function Bar () {} + try { + var arr = new Uint8Array(1) + arr.foo = function () { return 42 } + arr.constructor = Bar + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Bar && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined') { + if (object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + if (object instanceof ArrayBuffer) { + return fromArrayBuffer(that, object) + } + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + array.byteLength + that = Buffer._augment(new Uint8Array(array)) + } else { + // Fallback: Return an object instance of the Buffer class + that = fromTypedArray(that, new Uint8Array(array)) + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` is deprecated +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` is deprecated +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; i--) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"base64-js":2,"ieee754":4,"is-array":5}],4:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],5:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],6:[function(require,module,exports){ +(function (global){ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],7:[function(require,module,exports){ +function DOMParser(options){ + this.options = options ||{locator:{}}; + +} +DOMParser.prototype.parseFromString = function(source,mimeType){ + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns||{}; + var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid document source"); + } + return domBuilder.document; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn){ + if(isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + }else{ + var i=arguments.length; + while(--i){ + if(fn = errorImpl[arguments[i]]){ + break; + } + } + } + } + errorHandler[key] = fn && function(msg){ + fn(msg+_locator(locator)); + }||function(){}; + } + build('warning','warn'); + build('error','warn','warning'); + build('fatalError','warn','warning','error'); + return errorHandler; +} +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.document = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.document.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.document; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + if( attr.getOffset){ + position(attr.getOffset(1),attr) + } + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.document.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(this.currentElement && chars){ + if (this.cdata) { + var charNode = this.document.createCDATASection(chars); + this.currentElement.appendChild(charNode); + } else { + var charNode = this.document.createTextNode(chars); + this.currentElement.appendChild(charNode); + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.document.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.document.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.document.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn(error,_locator(this.locator)); + }, + error:function(error) { + console.error(error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error(error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.document.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +} + +},{"./dom":8,"./sax":9}],8:[function(require,module,exports){ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + } +}; +function LiveNodeList(node,refresh){ + this._node = node; + this._refresh = refresh + _updateLiveList(this); +} +function _updateLiveList(list){ + var inc = list._node._inc || list._node.ownerDocument._inc; + if(list._inc != inc){ + var ls = list._refresh(list._node); + //console.log(ls.length) + __set__(list,'length',ls.length); + copy(ls,list); + list._inc = inc; + } +} +LiveNodeList.prototype.item = function(i){ + _updateLiveList(this); + return this[i]; +} + +_extends(LiveNodeList,NodeList); +/** + * + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + */ +function NamedNodeMap() { +}; + +function _findNodeIndex(list,node){ + var i = list.length; + while(i--){ + if(list[i] === node){return i} + } +} + +function _addNamedNode(el,list,newAttr,oldAttr){ + if(oldAttr){ + list[_findNodeIndex(list,oldAttr)] = newAttr; + }else{ + list[list.length++] = newAttr; + } + if(el){ + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if(doc){ + oldAttr && _onRemoveAttribute(doc,el,oldAttr); + _onAddAttribute(doc,el,newAttr); + } + } +} +function _removeNamedNode(el,list,attr){ + var i = _findNodeIndex(list,attr); + if(i>=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + var i = this.length; + while(i--){ + var attr = this[i]; + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + doc.implementation = this; + doc.childNodes = new NodeList(); + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == 1){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == 1){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + //if(!(newChild instanceof CharacterData)){ + throw new Error(ExceptionMessage[3]) + //} + return Node.prototype.appendChild.apply(this,arguments) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node){ + var buf = []; + serializeToString(node,buf); + return buf.join(''); +} +Node.prototype.toString =function(){ + return XMLSerializer.prototype.serializeToString(this); +} +function serializeToString(node,buf){ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + var isHTML = htmlns === node.namespaceURI + buf.push('<',nodeName); + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + if(child){ + buf.push(child.data); + } + }else{ + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + function position(start,m){ + while(start>=endPos && (m = linePattern.exec(source))){ + startPos = m.index; + endPos = startPos + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = start-startPos+1; + } + var startPos = 0; + var endPos = 0; + var linePattern = /.+(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + var i = source.indexOf('<',start); + if(i<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.document; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(i>start){ + appendText(i); + } + switch(source.charAt(i+1)){ + case '/': + var end = source.indexOf('>',i+3); + var tagName = source.substring(i+2,end); + var config = parseStack.pop(); + var localNSMap = config.localNSMap; + + if(config.tagName != tagName){ + errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); + } + domBuilder.endElement(config.uri,config.localName,tagName); + if(localNSMap){ + for(var prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) ; + } + } + end++; + break; + // end elment + case '?':// + locator&&position(i); + end = parseInstruction(source,i,domBuilder); + break; + case '!':// 0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_E; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_V){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_E + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + s = S_C; + el.closed = true; + case S_V: + case S_ATTR: + case S_ATTR_S: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + break;//normal + case S_V://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_S: + if(s === S_ATTR_S){ + value = attrName; + } + if(s == S_V){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_S; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_S; + break; + case S_V: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_E: + s = S_S; + break; + //case S_S: + //case S_EQ: + //case S_ATTR_S: + // void();break; + //case S_C: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_V:void();break; + case S_ATTR_S: + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_E: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_S: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_V; + start = p; + break; + case S_C: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } +} +/** + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function appendElement(el,domBuilder,parseStack){ + var tagName = el.tagName; + var localNSMap = null; + var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + parseStack.push(el); + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = closeMap[tagName] = source.lastIndexOf('') + } + return pos',start+4); + //append comment source.substring(4,end)//, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} + +}).call(this,require("buffer").Buffer) +},{"buffer":7,"util-deprecate":70,"xmldom":88}],4:[function(require,module,exports){ + +var i; + +/** + * Parser functions. + */ + +var parserFunctions = require('./parse'); +for (i in parserFunctions) exports[i] = parserFunctions[i]; + +/** + * Builder functions. + */ + +var builderFunctions = require('./build'); +for (i in builderFunctions) exports[i] = builderFunctions[i]; + +/** + * Add Node.js-specific functions (they're deprecated…). + */ + +var nodeFunctions = require('./node'); +for (i in nodeFunctions) exports[i] = nodeFunctions[i]; + +},{"./build":1,"./node":2,"./parse":3}],5:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],6:[function(require,module,exports){ + +},{}],7:[function(require,module,exports){ +(function (global){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() + +function typedArraySupport () { + function Bar () {} + try { + var arr = new Uint8Array(1) + arr.foo = function () { return 42 } + arr.constructor = Bar + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Bar && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined') { + if (object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + if (object instanceof ArrayBuffer) { + return fromArrayBuffer(that, object) + } + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + array.byteLength + that = Buffer._augment(new Uint8Array(array)) + } else { + // Fallback: Return an object instance of the Buffer class + that = fromTypedArray(that, new Uint8Array(array)) + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` is deprecated +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` is deprecated +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; i--) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"base64-js":5,"ieee754":8,"is-array":9}],8:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],9:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],10:[function(require,module,exports){ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} + +},{}],11:[function(require,module,exports){ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + +},{}],12:[function(require,module,exports){ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; + +},{"../internal/arrayEvery":14,"../internal/baseCallback":18,"../internal/baseEvery":22,"../internal/isIterateeCall":47,"../lang/isArray":56}],13:[function(require,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],14:[function(require,module,exports){ +/** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; + +},{}],15:[function(require,module,exports){ +/** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + +},{}],16:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +module.exports = assignWith; + +},{"../object/keys":65}],17:[function(require,module,exports){ +var baseCopy = require('./baseCopy'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; + +},{"../object/keys":65,"./baseCopy":19}],18:[function(require,module,exports){ +var baseMatches = require('./baseMatches'), + baseMatchesProperty = require('./baseMatchesProperty'), + bindCallback = require('./bindCallback'), + identity = require('../utility/identity'), + property = require('../utility/property'); + +/** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); +} + +module.exports = baseCallback; + +},{"../utility/identity":68,"../utility/property":69,"./baseMatches":29,"./baseMatchesProperty":30,"./bindCallback":35}],19:[function(require,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],20:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; +}()); + +module.exports = baseCreate; + +},{"../lang/isObject":60}],21:[function(require,module,exports){ +var baseForOwn = require('./baseForOwn'), + createBaseEach = require('./createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + +},{"./baseForOwn":24,"./createBaseEach":37}],22:[function(require,module,exports){ +var baseEach = require('./baseEach'); + +/** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; + +},{"./baseEach":21}],23:[function(require,module,exports){ +var createBaseFor = require('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":38}],24:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + +},{"../object/keys":65,"./baseFor":23}],25:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + +},{"./toObject":53}],26:[function(require,module,exports){ +var baseIsEqualDeep = require('./baseIsEqualDeep'), + isObject = require('../lang/isObject'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); +} + +module.exports = baseIsEqual; + +},{"../lang/isObject":60,"./baseIsEqualDeep":27,"./isObjectLike":50}],27:[function(require,module,exports){ +var equalArrays = require('./equalArrays'), + equalByTag = require('./equalByTag'), + equalObjects = require('./equalObjects'), + isArray = require('../lang/isArray'), + isTypedArray = require('../lang/isTypedArray'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +module.exports = baseIsEqualDeep; + +},{"../lang/isArray":56,"../lang/isTypedArray":62,"./equalArrays":39,"./equalByTag":40,"./equalObjects":41}],28:[function(require,module,exports){ +var baseIsEqual = require('./baseIsEqual'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + +},{"./baseIsEqual":26,"./toObject":53}],29:[function(require,module,exports){ +var baseIsMatch = require('./baseIsMatch'), + getMatchData = require('./getMatchData'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; +} + +module.exports = baseMatches; + +},{"./baseIsMatch":28,"./getMatchData":43,"./toObject":53}],30:[function(require,module,exports){ +var baseGet = require('./baseGet'), + baseIsEqual = require('./baseIsEqual'), + baseSlice = require('./baseSlice'), + isArray = require('../lang/isArray'), + isKey = require('./isKey'), + isStrictComparable = require('./isStrictComparable'), + last = require('../array/last'), + toObject = require('./toObject'), + toPath = require('./toPath'); + +/** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ +function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; +} + +module.exports = baseMatchesProperty; + +},{"../array/last":11,"../lang/isArray":56,"./baseGet":25,"./baseIsEqual":26,"./baseSlice":33,"./isKey":48,"./isStrictComparable":51,"./toObject":53,"./toPath":54}],31:[function(require,module,exports){ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; + +},{}],32:[function(require,module,exports){ +var baseGet = require('./baseGet'), + toPath = require('./toPath'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ +function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; +} + +module.exports = basePropertyDeep; + +},{"./baseGet":25,"./toPath":54}],33:[function(require,module,exports){ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + +},{}],34:[function(require,module,exports){ +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; + +},{}],35:[function(require,module,exports){ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":68}],36:[function(require,module,exports){ +var bindCallback = require('./bindCallback'), + isIterateeCall = require('./isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"../function/restParam":13,"./bindCallback":35,"./isIterateeCall":47}],37:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + +},{"./getLength":42,"./isLength":49,"./toObject":53}],38:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":53}],39:[function(require,module,exports){ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; + +},{"./arraySome":15}],40:[function(require,module,exports){ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; + +},{}],41:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; + +},{"../object/keys":65}],42:[function(require,module,exports){ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":31}],43:[function(require,module,exports){ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; + +},{"../object/pairs":67,"./isStrictComparable":51}],44:[function(require,module,exports){ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":59}],45:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":42,"./isLength":49}],46:[function(require,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],47:[function(require,module,exports){ +var isArrayLike = require('./isArrayLike'), + isIndex = require('./isIndex'), + isObject = require('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":60,"./isArrayLike":45,"./isIndex":46}],48:[function(require,module,exports){ +var isArray = require('../lang/isArray'), + toObject = require('./toObject'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); +} + +module.exports = isKey; + +},{"../lang/isArray":56,"./toObject":53}],49:[function(require,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],50:[function(require,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],51:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +},{"../lang/isObject":60}],52:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('./isIndex'), + isLength = require('./isLength'), + keysIn = require('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":55,"../lang/isArray":56,"../object/keysIn":66,"./isIndex":46,"./isLength":49}],53:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":60}],54:[function(require,module,exports){ +var baseToString = require('./baseToString'), + isArray = require('../lang/isArray'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ +function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +} + +module.exports = toPath; + +},{"../lang/isArray":56,"./baseToString":34}],55:[function(require,module,exports){ +var isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":45,"../internal/isObjectLike":50}],56:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":44,"../internal/isLength":49,"../internal/isObjectLike":50}],57:[function(require,module,exports){ +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('../internal/isArrayLike'), + isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'), + isString = require('./isString'), + keys = require('../object/keys'); + +/** + * Checks if `value` is empty. A value is considered empty unless it's an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; +} + +module.exports = isEmpty; + +},{"../internal/isArrayLike":45,"../internal/isObjectLike":50,"../object/keys":65,"./isArguments":55,"./isArray":56,"./isFunction":58,"./isString":61}],58:[function(require,module,exports){ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":60}],59:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isNative; + +},{"../internal/isObjectLike":50,"./isFunction":58}],60:[function(require,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],61:[function(require,module,exports){ +var isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":50}],62:[function(require,module,exports){ +var isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":49,"../internal/isObjectLike":50}],63:[function(require,module,exports){ +var assignWith = require('../internal/assignWith'), + baseAssign = require('../internal/baseAssign'), + createAssigner = require('../internal/createAssigner'); + +/** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ +var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); +}); + +module.exports = assign; + +},{"../internal/assignWith":16,"../internal/baseAssign":17,"../internal/createAssigner":36}],64:[function(require,module,exports){ +var baseAssign = require('../internal/baseAssign'), + baseCreate = require('../internal/baseCreate'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; +} + +module.exports = create; + +},{"../internal/baseAssign":17,"../internal/baseCreate":20,"../internal/isIterateeCall":47}],65:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":44,"../internal/isArrayLike":45,"../internal/shimKeys":52,"../lang/isObject":60}],66:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/isIndex":46,"../internal/isLength":49,"../lang/isArguments":55,"../lang/isArray":56,"../lang/isObject":60}],67:[function(require,module,exports){ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; + +},{"../internal/toObject":53,"./keys":65}],68:[function(require,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],69:[function(require,module,exports){ +var baseProperty = require('../internal/baseProperty'), + basePropertyDeep = require('../internal/basePropertyDeep'), + isKey = require('../internal/isKey'); + +/** + * Creates a function that returns the property value at `path` on a + * given object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +} + +module.exports = property; + +},{"../internal/baseProperty":31,"../internal/basePropertyDeep":32,"../internal/isKey":48}],70:[function(require,module,exports){ +(function (global){ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],71:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],72:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); + +},{"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLStringifier":85}],73:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],74:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],75:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],76:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],77:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); + +},{"lodash/lang/isObject":60,"lodash/object/create":64}],78:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],79:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/lang/isObject":60,"lodash/object/create":64}],80:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); + +},{"./XMLCData":73,"./XMLComment":74,"./XMLDTDAttList":75,"./XMLDTDElement":76,"./XMLDTDEntity":77,"./XMLDTDNotation":78,"./XMLProcessingInstruction":83,"lodash/lang/isObject":60,"lodash/object/create":64}],81:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); + +},{"./XMLAttribute":71,"./XMLNode":82,"./XMLProcessingInstruction":83,"lodash/collection/every":12,"lodash/lang/isFunction":58,"lodash/lang/isObject":60,"lodash/object/create":64}],82:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); + +},{"./XMLCData":73,"./XMLComment":74,"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLRaw":84,"./XMLText":86,"lodash/lang/isEmpty":57,"lodash/lang/isFunction":58,"lodash/lang/isObject":60}],83:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); + +},{"lodash/object/create":64}],84:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); + +},{"./XMLNode":82,"lodash/object/create":64}],85:[function(require,module,exports){ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid document source"); + } + return domBuilder.document; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn){ + if(isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + }else{ + var i=arguments.length; + while(--i){ + if(fn = errorImpl[arguments[i]]){ + break; + } + } + } + } + errorHandler[key] = fn && function(msg){ + fn(msg+_locator(locator)); + }||function(){}; + } + build('warning','warn'); + build('error','warn','warning'); + build('fatalError','warn','warning','error'); + return errorHandler; +} +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.document = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.document.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.document; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + if( attr.getOffset){ + position(attr.getOffset(1),attr) + } + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.document.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(this.currentElement && chars){ + if (this.cdata) { + var charNode = this.document.createCDATASection(chars); + this.currentElement.appendChild(charNode); + } else { + var charNode = this.document.createTextNode(chars); + this.currentElement.appendChild(charNode); + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.document.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.document.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.document.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn(error,_locator(this.locator)); + }, + error:function(error) { + console.error(error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error(error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.document.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +} + +},{"./dom":89,"./sax":90}],89:[function(require,module,exports){ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + } +}; +function LiveNodeList(node,refresh){ + this._node = node; + this._refresh = refresh + _updateLiveList(this); +} +function _updateLiveList(list){ + var inc = list._node._inc || list._node.ownerDocument._inc; + if(list._inc != inc){ + var ls = list._refresh(list._node); + //console.log(ls.length) + __set__(list,'length',ls.length); + copy(ls,list); + list._inc = inc; + } +} +LiveNodeList.prototype.item = function(i){ + _updateLiveList(this); + return this[i]; +} + +_extends(LiveNodeList,NodeList); +/** + * + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + */ +function NamedNodeMap() { +}; + +function _findNodeIndex(list,node){ + var i = list.length; + while(i--){ + if(list[i] === node){return i} + } +} + +function _addNamedNode(el,list,newAttr,oldAttr){ + if(oldAttr){ + list[_findNodeIndex(list,oldAttr)] = newAttr; + }else{ + list[list.length++] = newAttr; + } + if(el){ + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if(doc){ + oldAttr && _onRemoveAttribute(doc,el,oldAttr); + _onAddAttribute(doc,el,newAttr); + } + } +} +function _removeNamedNode(el,list,attr){ + var i = _findNodeIndex(list,attr); + if(i>=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + var i = this.length; + while(i--){ + var attr = this[i]; + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + doc.implementation = this; + doc.childNodes = new NodeList(); + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == 2?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == 1){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == 1){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + //if(!(newChild instanceof CharacterData)){ + throw new Error(ExceptionMessage[3]) + //} + return Node.prototype.appendChild.apply(this,arguments) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node){ + var buf = []; + serializeToString(node,buf); + return buf.join(''); +} +Node.prototype.toString =function(){ + return XMLSerializer.prototype.serializeToString(this); +} +function serializeToString(node,buf){ + switch(node.nodeType){ + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + var isHTML = htmlns === node.namespaceURI + buf.push('<',nodeName); + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + if(child){ + buf.push(child.data); + } + }else{ + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + function position(start,m){ + while(start>=endPos && (m = linePattern.exec(source))){ + startPos = m.index; + endPos = startPos + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = start-startPos+1; + } + var startPos = 0; + var endPos = 0; + var linePattern = /.+(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + var i = source.indexOf('<',start); + if(i<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.document; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(i>start){ + appendText(i); + } + switch(source.charAt(i+1)){ + case '/': + var end = source.indexOf('>',i+3); + var tagName = source.substring(i+2,end); + var config = parseStack.pop(); + var localNSMap = config.localNSMap; + + if(config.tagName != tagName){ + errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); + } + domBuilder.endElement(config.uri,config.localName,tagName); + if(localNSMap){ + for(var prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) ; + } + } + end++; + break; + // end elment + case '?':// + locator&&position(i); + end = parseInstruction(source,i,domBuilder); + break; + case '!':// 0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_E; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_V){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_E + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + s = S_C; + el.closed = true; + case S_V: + case S_ATTR: + case S_ATTR_S: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_E: + case S_S: + case S_C: + break;//normal + case S_V://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_S: + if(s === S_ATTR_S){ + value = attrName; + } + if(s == S_V){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_S; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_S; + break; + case S_V: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_E: + s = S_S; + break; + //case S_S: + //case S_EQ: + //case S_ATTR_S: + // void();break; + //case S_C: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_V +//S_ATTR_S, S_E, S_S, S_C + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_V:void();break; + case S_ATTR_S: + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_E: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_S: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_V; + start = p; + break; + case S_C: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } +} +/** + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function appendElement(el,domBuilder,parseStack){ + var tagName = el.tagName; + var localNSMap = null; + var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + parseStack.push(el); + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = closeMap[tagName] = source.lastIndexOf('') + } + return pos',start+4); + //append comment source.substring(4,end)//, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode (node) { + return node.nodeType === 3 // text + || node.nodeType === 8 // comment + || node.nodeType === 4; // cdata +} + + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse (xml) { + var doc = new DOMParser().parseFromString(xml); + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Parses a Plist XML string. Returns an Object. Takes a `callback` function. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated not actually async. use parse() instead + */ + +function parseString (xml, callback) { + var doc, error, plist; + try { + doc = new DOMParser().parseFromString(xml); + plist = parsePlistXML(doc.documentElement); + } catch(e) { + error = e; + } + callback(error, plist); +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @param {Function} callback - callback function + * @returns {Mixed} the decoded value from the Plist XML + * @api public + * @deprecated use parse() instead + */ + +function parseStringSync (xml) { + var doc = new DOMParser().parseFromString(xml); + var plist; + if (doc.documentElement.nodeName !== 'plist') { + throw new Error('malformed document. First element should be '); + } + plist = parsePlistXML(doc.documentElement); + + // if the plist is an array with 1 element, pull it out of the array + if (plist.length == 1) { + plist = plist[0]; + } + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML (node) { + var i, new_obj, key, val, new_arr, res, d; + + if (!node) + return null; + + if (node.nodeName === 'plist') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push( parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + + } else if (node.nodeName === 'dict') { + new_obj = {}; + key = null; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + if (key === null) { + key = parsePlistXML(node.childNodes[i]); + } else { + new_obj[key] = parsePlistXML(node.childNodes[i]); + key = null; + } + } + } + return new_obj; + + } else if (node.nodeName === 'array') { + new_arr = []; + for (i=0; i < node.childNodes.length; i++) { + // ignore comment nodes (text) + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + + } else if (node.nodeName === '#text') { + // TODO: what should we do with text types? (CDATA sections) + + } else if (node.nodeName === 'key') { + return node.childNodes[0].nodeValue; + + } else if (node.nodeName === 'string') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + res += node.childNodes[d].nodeValue; + } + return res; + + } else if (node.nodeName === 'integer') { + // parse as base 10 integer + return parseInt(node.childNodes[0].nodeValue, 10); + + } else if (node.nodeName === 'real') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue; + } + } + return parseFloat(res); + + } else if (node.nodeName === 'data') { + res = ''; + for (d=0; d < node.childNodes.length; d++) { + if (node.childNodes[d].nodeType === 3) { + res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); + } + } + + // decode base64 data to a Buffer instance + return new Buffer(res, 'base64'); + + } else if (node.nodeName === 'date') { + return new Date(node.childNodes[0].nodeValue); + + } else if (node.nodeName === 'true') { + return true; + + } else if (node.nodeName === 'false') { + return false; + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/lib/plist.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/lib/plist.js new file mode 100755 index 0000000..00a4167 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/lib/plist.js @@ -0,0 +1,23 @@ + +var i; + +/** + * Parser functions. + */ + +var parserFunctions = require('./parse'); +for (i in parserFunctions) exports[i] = parserFunctions[i]; + +/** + * Builder functions. + */ + +var builderFunctions = require('./build'); +for (i in builderFunctions) exports[i] = builderFunctions[i]; + +/** + * Add Node.js-specific functions (they're deprecated…). + */ + +var nodeFunctions = require('./node'); +for (i in nodeFunctions) exports[i] = nodeFunctions[i]; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/package.json new file mode 100755 index 0000000..8c16d40 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/plist/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + { + "raw": "plist@^1.2.0", + "scope": null, + "escapedName": "plist", + "name": "plist", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "plist@>=1.2.0 <2.0.0", + "_id": "plist@1.2.0", + "_inCache": true, + "_location": "/plist", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "mreinstein", + "email": "reinstein.mike@gmail.com" + }, + "_npmVersion": "3.3.11", + "_phantomChildren": {}, + "_requested": { + "raw": "plist@^1.2.0", + "scope": null, + "escapedName": "plist", + "name": "plist", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/", + "/cordova-common", + "/ios-sim", + "/simple-plist" + ], + "_resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", + "_shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593", + "_shrinkwrap": null, + "_spec": "plist@^1.2.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-plist/issues" + }, + "contributors": [ + { + "name": "Hans Huebner", + "email": "hans.huebner@gmail.com" + }, + { + "name": "Pierre Metrailler" + }, + { + "name": "Mike Reinstein", + "email": "reinstein.mike@gmail.com" + }, + { + "name": "Vladimir Tsvang" + }, + { + "name": "Mathieu D'Amours" + } + ], + "dependencies": { + "base64-js": "0.0.8", + "util-deprecate": "1.0.2", + "xmlbuilder": "4.0.0", + "xmldom": "0.1.x" + }, + "description": "Mac OS X Plist parser/builder for Node.js and browsers", + "devDependencies": { + "browserify": "12.0.1", + "mocha": "2.3.3", + "multiline": "1.0.2", + "zuul": "3.7.2" + }, + "directories": {}, + "dist": { + "shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593", + "tarball": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz" + }, + "gitHead": "69520574f27864145192338b72e608fbe1bda6f7", + "homepage": "https://github.com/TooTallNate/node-plist#readme", + "keywords": [ + "apple", + "browser", + "mac", + "plist", + "parser", + "xml" + ], + "license": "MIT", + "main": "lib/plist.js", + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "mreinstein", + "email": "reinstein.mike@gmail.com" + } + ], + "name": "plist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-plist.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.2.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/q/CHANGES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/q/CHANGES.md new file mode 100755 index 0000000..cd351fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/q/CHANGES.md @@ -0,0 +1,786 @@ + +## 1.4.1 + + - Address an issue that prevented Q from being used as a ` + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/examples/test.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/examples/test.xml new file mode 100755 index 0000000..801292d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/examples/test.xml @@ -0,0 +1,1254 @@ + + +]> + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + + Some Text + + + + + + + are ok in here. ]]> + + Pre-Text & Inlined text Post-text. +  + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/lib/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/lib/sax.js new file mode 100755 index 0000000..17fb08e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/lib/sax.js @@ -0,0 +1,1006 @@ +// wrapper for non-node envs +;(function (sax) { + +sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } +sax.SAXParser = SAXParser +sax.SAXStream = SAXStream +sax.createStream = createStream + +// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. +// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), +// since that's the earliest that a buffer overrun could occur. This way, checks are +// as rare as required, but as often as necessary to ensure never crossing this bound. +// Furthermore, buffers are only tested at most once per write(), so passing a very +// large string into write() might have undesirable effects, but this is manageable by +// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme +// edge case, result in creating at most one complete copy of the string passed in. +// Set to Infinity to have unlimited buffers. +sax.MAX_BUFFER_LENGTH = 64 * 1024 + +var buffers = [ + "comment", "sgmlDecl", "textNode", "tagName", "doctype", + "procInstName", "procInstBody", "entity", "attribName", + "attribValue", "cdata", "script" +] + +sax.EVENTS = // for discoverability. + [ "text" + , "processinginstruction" + , "sgmldeclaration" + , "doctype" + , "comment" + , "attribute" + , "opentag" + , "closetag" + , "opencdata" + , "cdata" + , "closecdata" + , "error" + , "end" + , "ready" + , "script" + , "opennamespace" + , "closenamespace" + ] + +function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) return new SAXParser(strict, opt) + + var parser = this + clearBuffers(parser) + parser.q = parser.c = "" + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.tagCase = parser.opt.lowercasetags ? "toLowerCase" : "toUpperCase" + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.ENTITIES = Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) parser.ns = Object.create(rootNS) + + // mostly just for error reporting + parser.position = parser.line = parser.column = 0 + emit(parser, "onready") +} + +if (!Object.create) Object.create = function (o) { + function f () { this.__proto__ = o } + f.prototype = o + return new f +} + +if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) { + return o.__proto__ +} + +if (!Object.keys) Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a +} + +function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + , maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i ++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case "textNode": + closeText(parser) + break + + case "cdata": + emitNode(parser, "oncdata", parser.cdata) + parser.cdata = "" + break + + case "script": + emitNode(parser, "onscript", parser.script) + parser.script = "" + break + + default: + error(parser, "Max buffer length exceeded: "+buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual) + + parser.position +} + +function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i ++) { + parser[buffers[i]] = "" + } +} + +SAXParser.prototype = + { end: function () { end(this) } + , write: write + , resume: function () { this.error = null; return this } + , close: function () { return this.write(null) } + , end: function () { return this.write(null) } + } + +try { + var Stream = require("stream").Stream +} catch (ex) { + var Stream = function () {} +} + + +var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== "error" && ev !== "end" +}) + +function createStream (strict, opt) { + return new SAXStream(strict, opt) +} + +function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) return new SAXStream(strict, opt) + + Stream.apply(me) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + + var me = this + + this._parser.onend = function () { + me.emit("end") + } + + this._parser.onerror = function (er) { + me.emit("error", er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, "on" + ev, { + get: function () { return me._parser["on" + ev] }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + return me._parser["on"+ev] = h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) +} + +SAXStream.prototype = Object.create(Stream.prototype, + { constructor: { value: SAXStream } }) + +SAXStream.prototype.write = function (data) { + this._parser.write(data.toString()) + this.emit("data", data) + return true +} + +SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) this._parser.write(chunk.toString()) + this._parser.end() + return true +} + +SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) { + me._parser["on"+ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] + : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) +} + + + +// character classes and tokens +var whitespace = "\r\n\t " + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + , number = "0124356789" + , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + // (Letter | "_" | ":") + , nameStart = letter+"_:" + , nameBody = nameStart+number+"-." + , quote = "'\"" + , entity = number+letter+"#" + , attribEnd = whitespace + ">" + , CDATA = "[CDATA[" + , DOCTYPE = "DOCTYPE" + , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace" + , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/" + , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + +// turn all the string character sets into character class objects. +whitespace = charClass(whitespace) +number = charClass(number) +letter = charClass(letter) +nameStart = charClass(nameStart) +nameBody = charClass(nameBody) +quote = charClass(quote) +entity = charClass(entity) +attribEnd = charClass(attribEnd) + +function charClass (str) { + return str.split("").reduce(function (s, c) { + s[c] = true + return s + }, {}) +} + +function is (charclass, c) { + return charclass[c] +} + +function not (charclass, c) { + return !charclass[c] +} + +var S = 0 +sax.STATE = +{ BEGIN : S++ +, TEXT : S++ // general stuff +, TEXT_ENTITY : S++ // & and such. +, OPEN_WAKA : S++ // < +, SGML_DECL : S++ // +, SCRIPT : S++ // " + , expect : + [ [ "opentag", { name: "xml", attributes: {} } ] + , [ "opentag", { name: "script", attributes: {} } ] + , [ "text", "hello world" ] + , [ "closetag", "script" ] + , [ "closetag", "xml" ] + ] + , strict : false + , opt : { lowercasetags: true, noscript: true } + } + ) + +require(__dirname).test + ( { xml : "" + , expect : + [ [ "opentag", { name: "xml", attributes: {} } ] + , [ "opentag", { name: "script", attributes: {} } ] + , [ "opencdata", undefined ] + , [ "cdata", "hello world" ] + , [ "closecdata", undefined ] + , [ "closetag", "script" ] + , [ "closetag", "xml" ] + ] + , strict : false + , opt : { lowercasetags: true, noscript: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/parser-position.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/parser-position.js new file mode 100755 index 0000000..e4a68b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/parser-position.js @@ -0,0 +1,28 @@ +var sax = require("../lib/sax"), + assert = require("assert") + +function testPosition(chunks, expectedEvents) { + var parser = sax.parser(); + expectedEvents.forEach(function(expectation) { + parser['on' + expectation[0]] = function() { + for (var prop in expectation[1]) { + assert.equal(parser[prop], expectation[1][prop]); + } + } + }); + chunks.forEach(function(chunk) { + parser.write(chunk); + }); +}; + +testPosition(['
    abcdefgh
    '], + [ ['opentag', { position: 5, startTagPosition: 1 }] + , ['text', { position: 19, startTagPosition: 14 }] + , ['closetag', { position: 19, startTagPosition: 14 }] + ]); + +testPosition(['
    abcde','fgh
    '], + [ ['opentag', { position: 5, startTagPosition: 1 }] + , ['text', { position: 19, startTagPosition: 14 }] + , ['closetag', { position: 19, startTagPosition: 14 }] + ]); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/script.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/script.js new file mode 100755 index 0000000..464c051 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/script.js @@ -0,0 +1,12 @@ +require(__dirname).test({ + xml : "", + expect : [ + ["opentag", {"name": "HTML","attributes": {}}], + ["opentag", {"name": "HEAD","attributes": {}}], + ["opentag", {"name": "SCRIPT","attributes": {}}], + ["script", "if (1 < 0) { console.log('elo there'); }"], + ["closetag", "SCRIPT"], + ["closetag", "HEAD"], + ["closetag", "HTML"] + ] +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child-strict.js new file mode 100755 index 0000000..ce9c045 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child-strict.js @@ -0,0 +1,40 @@ + +require(__dirname).test({ + xml : + ""+ + "" + + "" + + "" + + "" + + "=(|)" + + "" + + "", + expect : [ + ["opentag", { + "name": "root", + "attributes": {} + }], + ["opentag", { + "name": "child", + "attributes": {} + }], + ["opentag", { + "name": "haha", + "attributes": {} + }], + ["closetag", "haha"], + ["closetag", "child"], + ["opentag", { + "name": "monkey", + "attributes": {} + }], + ["text", "=(|)"], + ["closetag", "monkey"], + ["closetag", "root"], + ["end"], + ["ready"] + ], + strict : true, + opt : {} +}); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child.js new file mode 100755 index 0000000..bc6b52b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-child.js @@ -0,0 +1,40 @@ + +require(__dirname).test({ + xml : + ""+ + "" + + "" + + "" + + "" + + "=(|)" + + "" + + "", + expect : [ + ["opentag", { + "name": "ROOT", + "attributes": {} + }], + ["opentag", { + "name": "CHILD", + "attributes": {} + }], + ["opentag", { + "name": "HAHA", + "attributes": {} + }], + ["closetag", "HAHA"], + ["closetag", "CHILD"], + ["opentag", { + "name": "MONKEY", + "attributes": {} + }], + ["text", "=(|)"], + ["closetag", "MONKEY"], + ["closetag", "ROOT"], + ["end"], + ["ready"] + ], + strict : false, + opt : {} +}); + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-tag.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-tag.js new file mode 100755 index 0000000..b2c5736 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/self-closing-tag.js @@ -0,0 +1,25 @@ + +require(__dirname).test({ + xml : + " "+ + " "+ + " "+ + " "+ + "=(|) "+ + ""+ + " ", + expect : [ + ["opentag", {name:"ROOT", attributes:{}}], + ["opentag", {name:"HAHA", attributes:{}}], + ["closetag", "HAHA"], + ["opentag", {name:"HAHA", attributes:{}}], + ["closetag", "HAHA"], + // ["opentag", {name:"HAHA", attributes:{}}], + // ["closetag", "HAHA"], + ["opentag", {name:"MONKEY", attributes:{}}], + ["text", "=(|)"], + ["closetag", "MONKEY"], + ["closetag", "ROOT"] + ], + opt : { trim : true } +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/stray-ending.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/stray-ending.js new file mode 100755 index 0000000..6b0aa7f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/stray-ending.js @@ -0,0 +1,17 @@ +// stray ending tags should just be ignored in non-strict mode. +// https://github.com/isaacs/sax-js/issues/32 +require(__dirname).test + ( { xml : + "" + , expect : + [ [ "opentag", { name: "A", attributes: {} } ] + , [ "opentag", { name: "B", attributes: {} } ] + , [ "text", "" ] + , [ "closetag", "B" ] + , [ "closetag", "A" ] + ] + , strict : false + , opt : {} + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/trailing-non-whitespace.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/trailing-non-whitespace.js new file mode 100755 index 0000000..3e1fb2e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/trailing-non-whitespace.js @@ -0,0 +1,17 @@ + +require(__dirname).test({ + xml : "Welcome, to monkey land", + expect : [ + ["opentag", { + "name": "SPAN", + "attributes": {} + }], + ["text", "Welcome,"], + ["closetag", "SPAN"], + ["text", " to monkey land"], + ["end"], + ["ready"] + ], + strict : false, + opt : {} +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/unquoted.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/unquoted.js new file mode 100755 index 0000000..79f1d0b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/unquoted.js @@ -0,0 +1,17 @@ +// unquoted attributes should be ok in non-strict mode +// https://github.com/isaacs/sax-js/issues/31 +require(__dirname).test + ( { xml : + "" + , expect : + [ [ "attribute", { name: "class", value: "test" } ] + , [ "attribute", { name: "hello", value: "world" } ] + , [ "opentag", { name: "SPAN", + attributes: { class: "test", hello: "world" } } ] + , [ "closetag", "SPAN" ] + ] + , strict : false + , opt : {} + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-issue-41.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-issue-41.js new file mode 100755 index 0000000..596d82b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-issue-41.js @@ -0,0 +1,67 @@ +var t = require(__dirname) + + , xmls = // should be the same both ways. + [ "" + , "" ] + + , ex1 = + [ [ "opennamespace" + , { prefix: "a" + , uri: "http://ATTRIBUTE" + } + ] + , [ "attribute" + , { name: "xmlns:a" + , value: "http://ATTRIBUTE" + , prefix: "xmlns" + , local: "a" + , uri: "http://www.w3.org/2000/xmlns/" + } + ] + , [ "attribute" + , { name: "a:attr" + , local: "attr" + , prefix: "a" + , uri: "http://ATTRIBUTE" + , value: "value" + } + ] + , [ "opentag" + , { name: "parent" + , uri: "" + , prefix: "" + , local: "parent" + , attributes: + { "a:attr": + { name: "a:attr" + , local: "attr" + , prefix: "a" + , uri: "http://ATTRIBUTE" + , value: "value" + } + , "xmlns:a": + { name: "xmlns:a" + , local: "a" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "http://ATTRIBUTE" + } + } + , ns: {"a": "http://ATTRIBUTE"} + } + ] + , ["closetag", "parent"] + , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] + ] + + // swap the order of elements 2 and 1 + , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) + , expected = [ex1, ex2] + +xmls.forEach(function (x, i) { + t.test({ xml: x + , expect: expected[i] + , strict: true + , opt: { xmlns: true } + }) +}) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-rebinding.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-rebinding.js new file mode 100755 index 0000000..f464876 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-rebinding.js @@ -0,0 +1,59 @@ + +require(__dirname).test + ( { xml : + ""+ + ""+ + ""+ + ""+ + ""+ + "" + + , expect : + [ [ "opennamespace", { prefix: "x", uri: "x1" } ] + , [ "opennamespace", { prefix: "y", uri: "y1" } ] + , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] + , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ] + , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", + attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } + , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } + , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x1', y: 'y1' } } ] + + , [ "opennamespace", { prefix: "x", uri: "x2" } ] + , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] + , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind", + attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } }, + ns: { x: 'x2' } } ] + + , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", + attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x2' } } ] + + , [ "closetag", "check" ] + + , [ "closetag", "rebind" ] + , [ "closenamespace", { prefix: "x", uri: "x2" } ] + + , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] + , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] + , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", + attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } + , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, + ns: { x: 'x1', y: 'y1' } } ] + , [ "closetag", "check" ] + + , [ "closetag", "root" ] + , [ "closenamespace", { prefix: "x", uri: "x1" } ] + , [ "closenamespace", { prefix: "y", uri: "y1" } ] + ] + , strict : true + , opt : { xmlns: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-strict.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-strict.js new file mode 100755 index 0000000..4ad615b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-strict.js @@ -0,0 +1,71 @@ + +require(__dirname).test + ( { xml : + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + "" + + , expect : + [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "", + attributes: {}, ns: {} } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", + attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } }, + ns: {} } ] + , [ "closetag", "plain" ] + + , [ "opennamespace", { prefix: "", uri: "uri:default" } ] + + , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ] + , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default", + attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } }, + ns: { "": "uri:default" } } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' }, + attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } } } ] + , [ "closetag", "plain" ] + + , [ "closetag", "ns1" ] + + , [ "closenamespace", { prefix: "", uri: "uri:default" } ] + + , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ] + + , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ] + + , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "", + attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } }, + ns: { a: "uri:nsa" } } ] + + , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] + , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", + attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, + ns: { a: 'uri:nsa' } } ] + , [ "closetag", "plain" ] + + , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ] + , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa", + attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } }, + ns: { a: 'uri:nsa' } } ] + , [ "closetag", "a:ns" ] + + , [ "closetag", "ns2" ] + + , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ] + + , [ "closetag", "root" ] + ] + , strict : true + , opt : { xmlns: true } + } + ) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-unbound.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-unbound.js new file mode 100755 index 0000000..2944b87 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-unbound.js @@ -0,0 +1,15 @@ + +require(__dirname).test( + { strict : true + , opt : { xmlns: true } + , expect : + [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] + + , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] + , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", + attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, + ns: {} } ] + , [ "closetag", "root" ] + ] + } +).write("") diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js new file mode 100755 index 0000000..16da771 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js @@ -0,0 +1,35 @@ +require(__dirname).test( + { xml : "" + , expect : + [ [ "attribute" + , { name: "xml:lang" + , local: "lang" + , prefix: "xml" + , uri: "http://www.w3.org/XML/1998/namespace" + , value: "en" + } + ] + , [ "opentag" + , { name: "root" + , uri: "" + , prefix: "" + , local: "root" + , attributes: + { "xml:lang": + { name: "xml:lang" + , local: "lang" + , prefix: "xml" + , uri: "http://www.w3.org/XML/1998/namespace" + , value: "en" + } + } + , ns: {} + } + ] + , ["closetag", "root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js new file mode 100755 index 0000000..9a1ce1b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-prefix.js @@ -0,0 +1,20 @@ +require(__dirname).test( + { xml : "" + , expect : + [ + [ "opentag" + , { name: "xml:root" + , uri: "http://www.w3.org/XML/1998/namespace" + , prefix: "xml" + , local: "root" + , attributes: {} + , ns: {} + } + ] + , ["closetag", "xml:root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js new file mode 100755 index 0000000..1eba9c7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/sax/test/xmlns-xml-default-redefine.js @@ -0,0 +1,40 @@ +require(__dirname).test( + { xml : "" + , expect : + [ ["error" + , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" + + "Actual: ERROR\n" + + "Line: 0\nColumn: 27\nChar: '" + ] + , [ "attribute" + , { name: "xmlns:xml" + , local: "xml" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "ERROR" + } + ] + , [ "opentag" + , { name: "xml:root" + , uri: "http://www.w3.org/XML/1998/namespace" + , prefix: "xml" + , local: "root" + , attributes: + { "xmlns:xml": + { name: "xmlns:xml" + , local: "xml" + , prefix: "xmlns" + , uri: "http://www.w3.org/2000/xmlns/" + , value: "ERROR" + } + } + , ns: {} + } + ] + , ["closetag", "xml:root"] + ] + , strict : true + , opt : { xmlns: true } + } +) + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/README.md new file mode 100755 index 0000000..cbd9565 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/README.md @@ -0,0 +1,350 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + $ node + var semver = require('semver') + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + semver.clean(' =v1.2.3 ') // '1.2.3' + semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true + semver.gt('1.2.3', '9.8.7') // false + semver.lt('1.2.3', '9.8.7') // true + +As a command-line utility: + + $ semver -h + + SemVer 5.1.0 + + A JavaScript implementation of the http://semver.org/ specification + Copyright Isaac Z. Schlueter + + Usage: semver [options] [ [...]] + Prints valid versions sorted by SemVer precedence + + Options: + -r --range + Print versions that match the specified range. + + -i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + + --preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + + -l --loose + Interpret versions and ranges loosely + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no satisfying versions are found, then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/bin/semver b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/bin/semver new file mode 100755 index 0000000..c5f2e85 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/package.json new file mode 100755 index 0000000..5110bae --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "raw": "semver@^5.0.1", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "^5.0.1", + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "semver@>=5.0.1 <6.0.0", + "_id": "semver@5.3.0", + "_inCache": true, + "_location": "/semver", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.6", + "_phantomChildren": {}, + "_requested": { + "raw": "semver@^5.0.1", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "^5.0.1", + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", + "_shrinkwrap": null, + "_spec": "semver@^5.0.1", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "dependencies": {}, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", + "tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "gitHead": "d21444a0658224b152ce54965d02dbe0856afb84", + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "semver", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "5.3.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/range.bnf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/range.bnf new file mode 100755 index 0000000..25ebd5c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/semver.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/semver.js new file mode 100755 index 0000000..5f1a3c5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/semver/semver.js @@ -0,0 +1,1203 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return compare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.documentup.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.documentup.json new file mode 100755 index 0000000..57fe301 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.documentup.json @@ -0,0 +1,6 @@ +{ + "name": "ShellJS", + "twitter": [ + "r2r" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.jshintrc new file mode 100755 index 0000000..a80c559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.jshintrc @@ -0,0 +1,7 @@ +{ + "loopfunc": true, + "sub": true, + "undef": true, + "unused": true, + "node": true +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.npmignore new file mode 100755 index 0000000..6b20c38 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.npmignore @@ -0,0 +1,2 @@ +test/ +tmp/ \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.travis.yml new file mode 100755 index 0000000..1b3280a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.10" + - "0.11" + - "0.12" + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/LICENSE new file mode 100755 index 0000000..1b35ee9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/README.md new file mode 100755 index 0000000..d08d13e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/README.md @@ -0,0 +1,579 @@ +# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) + +ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! + +The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: + ++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader ++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger ++ [JSHint](http://jshint.com) - Most popular JavaScript linter ++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers ++ [Yeoman](http://yeoman.io/) - Web application stack and development tool ++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation + +and [many more](https://npmjs.org/browse/depended/shelljs). + +Connect with [@r2r](http://twitter.com/r2r) on Twitter for questions, suggestions, etc. + +## Installing + +Via npm: + +```bash +$ npm install [-g] shelljs +``` + +If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to +run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: + +```bash +$ shjs my_script +``` + +You can also just copy `shell.js` into your project's directory, and `require()` accordingly. + + +## Examples + +### JavaScript + +```javascript +require('shelljs/global'); + +if (!which('git')) { + echo('Sorry, this script requires git'); + exit(1); +} + +// Copy files to release dir +mkdir('-p', 'out/Release'); +cp('-R', 'stuff/*', 'out/Release'); + +// Replace macros in each .js file +cd('lib'); +ls('*.js').forEach(function(file) { + sed('-i', 'BUILD_VERSION', 'v0.1.2', file); + sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); + sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); +}); +cd('..'); + +// Run external tool synchronously +if (exec('git commit -am "Auto-commit"').code !== 0) { + echo('Error: Git commit failed'); + exit(1); +} +``` + +### CoffeeScript + +```coffeescript +require 'shelljs/global' + +if not which 'git' + echo 'Sorry, this script requires git' + exit 1 + +# Copy files to release dir +mkdir '-p', 'out/Release' +cp '-R', 'stuff/*', 'out/Release' + +# Replace macros in each .js file +cd 'lib' +for file in ls '*.js' + sed '-i', 'BUILD_VERSION', 'v0.1.2', file + sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file + sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file +cd '..' + +# Run external tool synchronously +if (exec 'git commit -am "Auto-commit"').code != 0 + echo 'Error: Git commit failed' + exit 1 +``` + +## Global vs. Local + +The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. + +Example: + +```javascript +var shell = require('shelljs'); +shell.echo('hello world'); +``` + +## Make tool + +A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. + +Example (CoffeeScript): + +```coffeescript +require 'shelljs/make' + +target.all = -> + target.bundle() + target.docs() + +target.bundle = -> + cd __dirname + mkdir 'build' + cd 'lib' + (cat '*.js').to '../build/output.js' + +target.docs = -> + cd __dirname + mkdir 'docs' + cd 'lib' + for file in ls '*.js' + text = grep '//@', file # extract special comments + text.replace '//@', '' # remove comment tags + text.to 'docs/my_docs.md' +``` + +To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`. + +You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`: + +```javascript +require('shelljs/make'); + +target.bundle = function(argsArray) { + // argsArray = ['arg1', 'arg2'] + /* ... */ +} +``` + + + + + +## Command reference + + +All commands run synchronously, unless otherwise stated. + + +### cd('dir') +Changes to directory `dir` for the duration of the script + + +### pwd() +Returns the current directory. + + +### ls([options ,] path [,path ...]) +### ls([options ,] path_array) +Available options: + ++ `-R`: recursive ++ `-A`: all files (include files beginning with `.`, except for `.` and `..`) + +Examples: + +```javascript +ls('projs/*.js'); +ls('-R', '/users/me', '/tmp'); +ls('-R', ['/users/me', '/tmp']); // same as above +``` + +Returns array of files in the given path, or in current directory if no path provided. + + +### find(path [,path ...]) +### find(path_array) +Examples: + +```javascript +find('src', 'lib'); +find(['src', 'lib']); // same as above +find('.').filter(function(file) { return file.match(/\.js$/); }); +``` + +Returns array of all files (however deep) in the given paths. + +The main difference from `ls('-R', path)` is that the resulting file names +include the base directories, e.g. `lib/resources/file1` instead of just `file1`. + + +### cp([options ,] source [,source ...], dest) +### cp([options ,] source_array, dest) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +cp('file1', 'dir1'); +cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +``` + +Copies files. The wildcard `*` is accepted. + + +### rm([options ,] file [, file ...]) +### rm([options ,] file_array) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +rm('-rf', '/tmp/*'); +rm('some_file.txt', 'another_file.txt'); +rm(['some_file.txt', 'another_file.txt']); // same as above +``` + +Removes files. The wildcard `*` is accepted. + + +### mv(source [, source ...], dest') +### mv(source_array, dest') +Available options: + ++ `f`: force + +Examples: + +```javascript +mv('-f', 'file', 'dir/'); +mv('file1', 'file2', 'dir/'); +mv(['file1', 'file2'], 'dir/'); // same as above +``` + +Moves files. The wildcard `*` is accepted. + + +### mkdir([options ,] dir [, dir ...]) +### mkdir([options ,] dir_array) +Available options: + ++ `p`: full path (will create intermediate dirs if necessary) + +Examples: + +```javascript +mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +``` + +Creates directories. + + +### test(expression) +Available expression primaries: + ++ `'-b', 'path'`: true if path is a block device ++ `'-c', 'path'`: true if path is a character device ++ `'-d', 'path'`: true if path is a directory ++ `'-e', 'path'`: true if path exists ++ `'-f', 'path'`: true if path is a regular file ++ `'-L', 'path'`: true if path is a symbolic link ++ `'-p', 'path'`: true if path is a pipe (FIFO) ++ `'-S', 'path'`: true if path is a socket + +Examples: + +```javascript +if (test('-d', path)) { /* do something with dir */ }; +if (!test('-f', path)) continue; // skip if it's a regular file +``` + +Evaluates expression using the available primaries and returns corresponding value. + + +### cat(file [, file ...]) +### cat(file_array) + +Examples: + +```javascript +var str = cat('file*.txt'); +var str = cat('file1', 'file2'); +var str = cat(['file1', 'file2']); // same as above +``` + +Returns a string containing the given file, or a concatenated string +containing the files if more than one file is given (a new line character is +introduced between each file). Wildcard `*` accepted. + + +### 'string'.to(file) + +Examples: + +```javascript +cat('input.txt').to('output.txt'); +``` + +Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ + + +### 'string'.toEnd(file) + +Examples: + +```javascript +cat('input.txt').toEnd('output.txt'); +``` + +Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). + + +### sed([options ,] search_regex, replacement, file) +Available options: + ++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ + +Examples: + +```javascript +sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +``` + +Reads an input string from `file` and performs a JavaScript `replace()` on the input +using the given search regex and replacement string or function. Returns the new string after replacement. + + +### grep([options ,] regex_filter, file [, file ...]) +### grep([options ,] regex_filter, file_array) +Available options: + ++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. + +Examples: + +```javascript +grep('-v', 'GLOBAL_VARIABLE', '*.js'); +grep('GLOBAL_VARIABLE', '*.js'); +``` + +Reads input string from given files and returns a string containing all lines of the +file that match the given `regex_filter`. Wildcard `*` accepted. + + +### which(command) + +Examples: + +```javascript +var nodeExec = which('node'); +``` + +Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +Returns string containing the absolute path to the command. + + +### echo(string [,string ...]) + +Examples: + +```javascript +echo('hello world'); +var str = echo('hello world'); +``` + +Prints string to stdout, and returns string with additional utility methods +like `.to()`. + + +### pushd([options,] [dir | '-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. + +Arguments: + ++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. ++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. ++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + +Examples: + +```javascript +// process.cwd() === '/usr' +pushd('/etc'); // Returns /etc /usr +pushd('+1'); // Returns /usr /etc +``` + +Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + +### popd([options,] ['-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. + +Arguments: + ++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. ++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + +Examples: + +```javascript +echo(process.cwd()); // '/usr' +pushd('/etc'); // '/etc /usr' +echo(process.cwd()); // '/etc' +popd(); // '/usr' +echo(process.cwd()); // '/usr' +``` + +When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + +### dirs([options | '+N' | '-N']) + +Available options: + ++ `-c`: Clears the directory stack by deleting all of the elements. + +Arguments: + ++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. ++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. + +Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + +See also: pushd, popd + + +### ln(options, source, dest) +### ln(source, dest) +Available options: + ++ `s`: symlink ++ `f`: force + +Examples: + +```javascript +ln('file', 'newlink'); +ln('-sf', 'file', 'existing'); +``` + +Links source to dest. Use -f to force the link, should dest already exist. + + +### exit(code) +Exits the current process with the given exit code. + +### env['VAR_NAME'] +Object containing environment variables (both getter and setter). Shortcut to process.env. + +### exec(command [, options] [, callback]) +Available options (all `false` by default): + ++ `async`: Asynchronous execution. Defaults to true if a callback is provided. ++ `silent`: Do not echo program output to console. + +Examples: + +```javascript +var version = exec('node --version', {silent:true}).output; + +var child = exec('some_long_running_process', {async:true}); +child.stdout.on('data', function(data) { + /* ... do something with data ... */ +}); + +exec('some_long_running_process', function(code, output) { + console.log('Exit code:', code); + console.log('Program output:', output); +}); +``` + +Executes the given `command` _synchronously_, unless otherwise specified. +When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +the `callback` gets the arguments `(code, output)`. + +**Note:** For long-lived processes, it's best to run `exec()` asynchronously as +the current synchronous implementation uses a lot of CPU. This should be getting +fixed soon. + + +### chmod(octal_mode || octal_string, file) +### chmod(symbolic_mode, file) + +Available options: + ++ `-v`: output a diagnostic for every file processed ++ `-c`: like verbose but report only when a change is made ++ `-R`: change files and directories recursively + +Examples: + +```javascript +chmod(755, '/Users/brandon'); +chmod('755', '/Users/brandon'); // same as above +chmod('u+x', '/Users/brandon'); +``` + +Alters the permissions of a file or directory by either specifying the +absolute permissions in octal form or expressing the changes in symbols. +This command tries to mimic the POSIX behavior as much as possible. +Notable exceptions: + ++ In symbolic modes, 'a-r' and '-r' are identical. No consideration is + given to the umask. ++ There is no "quiet" option since default behavior is to run silent. + + +## Non-Unix commands + + +### tempdir() + +Examples: + +```javascript +var tmp = tempdir(); // "/tmp" for most *nix platforms +``` + +Searches and returns string containing a writeable, platform-dependent temporary directory. +Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). + + +### error() +Tests if error occurred in the last command. Returns `null` if no error occurred, +otherwise returns string explaining the error + + +## Configuration + + +### config.silent +Example: + +```javascript +var sh = require('shelljs'); +var silentState = sh.config.silent; // save old silent state +sh.config.silent = true; +/* ... */ +sh.config.silent = silentState; // restore old silent state +``` + +Suppresses all command output if `true`, except for `echo()` calls. +Default is `false`. + +### config.fatal +Example: + +```javascript +require('shelljs/global'); +config.fatal = true; +cp('this_file_does_not_exist', '/dev/null'); // dies here +/* more commands... */ +``` + +If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/RELEASE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/RELEASE.md new file mode 100755 index 0000000..69ef3fb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/RELEASE.md @@ -0,0 +1,9 @@ +# Release steps + +* Ensure master passes CI tests +* Bump version in package.json. Any breaking change or new feature should bump minor (or even major). Non-breaking changes or fixes can just bump patch. +* Update README manually if the changes are not documented in-code. If so, run `scripts/generate-docs.js` +* Commit +* `$ git tag ` (see `git tag -l` for latest) +* `$ git push origin master --tags` +* `$ npm publish .` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/bin/shjs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/bin/shjs new file mode 100755 index 0000000..d239a7a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/bin/shjs @@ -0,0 +1,51 @@ +#!/usr/bin/env node +require('../global'); + +if (process.argv.length < 3) { + console.log('ShellJS: missing argument (script name)'); + console.log(); + process.exit(1); +} + +var args, + scriptName = process.argv[2]; +env['NODE_PATH'] = __dirname + '/../..'; + +if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { + if (test('-f', scriptName + '.js')) + scriptName += '.js'; + if (test('-f', scriptName + '.coffee')) + scriptName += '.coffee'; +} + +if (!test('-f', scriptName)) { + console.log('ShellJS: script not found ('+scriptName+')'); + console.log(); + process.exit(1); +} + +args = process.argv.slice(3); + +for (var i = 0, l = args.length; i < l; i++) { + if (args[i][0] !== "-"){ + args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words + } +} + +if (scriptName.match(/\.coffee$/)) { + // + // CoffeeScript + // + if (which('coffee')) { + exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); + } else { + console.log('ShellJS: CoffeeScript interpreter not found'); + console.log(); + process.exit(1); + } +} else { + // + // JavaScript + // + exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/global.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/global.js new file mode 100755 index 0000000..97f0033 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/global.js @@ -0,0 +1,3 @@ +var shell = require('./shell.js'); +for (var cmd in shell) + global[cmd] = shell[cmd]; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/make.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/make.js new file mode 100755 index 0000000..f78b4cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/make.js @@ -0,0 +1,56 @@ +require('./global'); + +global.config.fatal = true; +global.target = {}; + +var args = process.argv.slice(2), + targetArgs, + dashesLoc = args.indexOf('--'); + +// split args, everything after -- if only for targets +if (dashesLoc > -1) { + targetArgs = args.slice(dashesLoc + 1, args.length); + args = args.slice(0, dashesLoc); +} + +// This ensures we only execute the script targets after the entire script has +// been evaluated +setTimeout(function() { + var t; + + if (args.length === 1 && args[0] === '--help') { + console.log('Available targets:'); + for (t in global.target) + console.log(' ' + t); + return; + } + + // Wrap targets to prevent duplicate execution + for (t in global.target) { + (function(t, oldTarget){ + + // Wrap it + global.target[t] = function() { + if (oldTarget.done) + return; + oldTarget.done = true; + return oldTarget.apply(oldTarget, arguments); + }; + + })(t, global.target[t]); + } + + // Execute desired targets + if (args.length > 0) { + args.forEach(function(arg) { + if (arg in global.target) + global.target[arg](targetArgs); + else { + console.log('no such target: ' + arg); + } + }); + } else if ('all' in global.target) { + global.target.all(targetArgs); + } + +}, 0); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/package.json new file mode 100755 index 0000000..fd830f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "shelljs@^0.5.3", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "shelljs@>=0.5.3 <0.6.0", + "_id": "shelljs@0.5.3", + "_inCache": true, + "_location": "/shelljs", + "_nodeVersion": "1.2.0", + "_npmUser": { + "name": "artur", + "email": "arturadib@gmail.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "shelljs@^0.5.3", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/", + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "_shrinkwrap": null, + "_spec": "shelljs@^0.5.3", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Artur Adib", + "email": "arturadib@gmail.com" + }, + "bin": { + "shjs": "./bin/shjs" + }, + "bugs": { + "url": "https://github.com/arturadib/shelljs/issues" + }, + "dependencies": {}, + "description": "Portable Unix shell commands for Node.js", + "devDependencies": { + "jshint": "~2.1.11" + }, + "directories": {}, + "dist": { + "shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", + "tarball": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "22d0975040b9b8234755dc6e692d6869436e8485", + "homepage": "http://github.com/arturadib/shelljs", + "keywords": [ + "unix", + "shell", + "makefile", + "make", + "jake", + "synchronous" + ], + "license": "BSD*", + "main": "./shell.js", + "maintainers": [ + { + "name": "artur", + "email": "arturadib@gmail.com" + } + ], + "name": "shelljs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/arturadib/shelljs.git" + }, + "scripts": { + "test": "node scripts/run-tests" + }, + "version": "0.5.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/generate-docs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/generate-docs.js new file mode 100755 index 0000000..532fed9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/generate-docs.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node +require('../global'); + +echo('Appending docs to README.md'); + +cd(__dirname + '/..'); + +// Extract docs from shell.js +var docs = grep('//@', 'shell.js'); + +docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { + var file = path.match('.js$') ? path : path+'.js'; + return grep('//@', file); +}); + +// Remove '//@' +docs = docs.replace(/\/\/\@ ?/g, ''); +// Append docs to README +sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); + +echo('All done.'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/run-tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/run-tests.js new file mode 100755 index 0000000..f9d31e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/scripts/run-tests.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node +require('../global'); + +var path = require('path'); + +var failed = false; + +// +// Lint +// +JSHINT_BIN = './node_modules/jshint/bin/jshint'; +cd(__dirname + '/..'); + +if (!test('-f', JSHINT_BIN)) { + echo('JSHint not found. Run `npm install` in the root dir first.'); + exit(1); +} + +if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { + failed = true; + echo('*** JSHINT FAILED! (return code != 0)'); + echo(); +} else { + echo('All JSHint tests passed'); + echo(); +} + +// +// Unit tests +// +cd(__dirname + '/../test'); +ls('*.js').forEach(function(file) { + echo('Running test:', file); + if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) + failed = true; + echo('*** TEST FAILED! (missing exit code "123")'); + echo(); + } +}); + +if (failed) { + echo(); + echo('*******************************************************'); + echo('WARNING: Some tests did not pass!'); + echo('*******************************************************'); + exit(1); +} else { + echo(); + echo('All tests passed.'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/shell.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/shell.js new file mode 100755 index 0000000..bdeb559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/shell.js @@ -0,0 +1,159 @@ +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/arturadib/shelljs +// + +var common = require('./src/common'); + + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ + +//@include ./src/cd +var _cd = require('./src/cd'); +exports.cd = common.wrap('cd', _cd); + +//@include ./src/pwd +var _pwd = require('./src/pwd'); +exports.pwd = common.wrap('pwd', _pwd); + +//@include ./src/ls +var _ls = require('./src/ls'); +exports.ls = common.wrap('ls', _ls); + +//@include ./src/find +var _find = require('./src/find'); +exports.find = common.wrap('find', _find); + +//@include ./src/cp +var _cp = require('./src/cp'); +exports.cp = common.wrap('cp', _cp); + +//@include ./src/rm +var _rm = require('./src/rm'); +exports.rm = common.wrap('rm', _rm); + +//@include ./src/mv +var _mv = require('./src/mv'); +exports.mv = common.wrap('mv', _mv); + +//@include ./src/mkdir +var _mkdir = require('./src/mkdir'); +exports.mkdir = common.wrap('mkdir', _mkdir); + +//@include ./src/test +var _test = require('./src/test'); +exports.test = common.wrap('test', _test); + +//@include ./src/cat +var _cat = require('./src/cat'); +exports.cat = common.wrap('cat', _cat); + +//@include ./src/to +var _to = require('./src/to'); +String.prototype.to = common.wrap('to', _to); + +//@include ./src/toEnd +var _toEnd = require('./src/toEnd'); +String.prototype.toEnd = common.wrap('toEnd', _toEnd); + +//@include ./src/sed +var _sed = require('./src/sed'); +exports.sed = common.wrap('sed', _sed); + +//@include ./src/grep +var _grep = require('./src/grep'); +exports.grep = common.wrap('grep', _grep); + +//@include ./src/which +var _which = require('./src/which'); +exports.which = common.wrap('which', _which); + +//@include ./src/echo +var _echo = require('./src/echo'); +exports.echo = _echo; // don't common.wrap() as it could parse '-options' + +//@include ./src/dirs +var _dirs = require('./src/dirs').dirs; +exports.dirs = common.wrap("dirs", _dirs); +var _pushd = require('./src/dirs').pushd; +exports.pushd = common.wrap('pushd', _pushd); +var _popd = require('./src/dirs').popd; +exports.popd = common.wrap("popd", _popd); + +//@include ./src/ln +var _ln = require('./src/ln'); +exports.ln = common.wrap('ln', _ln); + +//@ +//@ ### exit(code) +//@ Exits the current process with the given exit code. +exports.exit = process.exit; + +//@ +//@ ### env['VAR_NAME'] +//@ Object containing environment variables (both getter and setter). Shortcut to process.env. +exports.env = process.env; + +//@include ./src/exec +var _exec = require('./src/exec'); +exports.exec = common.wrap('exec', _exec, {notUnix:true}); + +//@include ./src/chmod +var _chmod = require('./src/chmod'); +exports.chmod = common.wrap('chmod', _chmod); + + + +//@ +//@ ## Non-Unix commands +//@ + +//@include ./src/tempdir +var _tempDir = require('./src/tempdir'); +exports.tempdir = common.wrap('tempdir', _tempDir); + + +//@include ./src/error +var _error = require('./src/error'); +exports.error = _error; + + + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ Example: +//@ +//@ ```javascript +//@ var sh = require('shelljs'); +//@ var silentState = sh.config.silent; // save old silent state +//@ sh.config.silent = true; +//@ /* ... */ +//@ sh.config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ Example: +//@ +//@ ```javascript +//@ require('shelljs/global'); +//@ config.fatal = true; +//@ cp('this_file_does_not_exist', '/dev/null'); // dies here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cat.js new file mode 100755 index 0000000..f6f4d25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cat.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### cat(file [, file ...]) +//@ ### cat(file_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). Wildcard `*` accepted. +function _cat(options, files) { + var cat = ''; + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + cat += fs.readFileSync(file, 'utf8') + '\n'; + }); + + if (cat[cat.length-1] === '\n') + cat = cat.substring(0, cat.length-1); + + return common.ShellString(cat); +} +module.exports = _cat; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cd.js new file mode 100755 index 0000000..230f432 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/cd.js @@ -0,0 +1,19 @@ +var fs = require('fs'); +var common = require('./common'); + +//@ +//@ ### cd('dir') +//@ Changes to directory `dir` for the duration of the script +function _cd(options, dir) { + if (!dir) + common.error('directory not specified'); + + if (!fs.existsSync(dir)) + common.error('no such file or directory: ' + dir); + + if (!fs.statSync(dir).isDirectory()) + common.error('not a directory: ' + dir); + + process.chdir(dir); +} +module.exports = _cd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/chmod.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/chmod.js new file mode 100755 index 0000000..f288893 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/chmod.js @@ -0,0 +1,208 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +var PERMS = (function (base) { + return { + OTHER_EXEC : base.EXEC, + OTHER_WRITE : base.WRITE, + OTHER_READ : base.READ, + + GROUP_EXEC : base.EXEC << 3, + GROUP_WRITE : base.WRITE << 3, + GROUP_READ : base.READ << 3, + + OWNER_EXEC : base.EXEC << 6, + OWNER_WRITE : base.WRITE << 6, + OWNER_READ : base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is + // the preferred way, else a jshint warning is thrown. + STICKY : parseInt('01000', 8), + SETGID : parseInt('02000', 8), + SETUID : parseInt('04000', 8), + + TYPE_MASK : parseInt('0770000', 8) + }; +})({ + EXEC : 1, + WRITE : 2, + READ : 4 +}); + +//@ +//@ ### chmod(octal_mode || octal_string, file) +//@ ### chmod(symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is +//@ given to the umask. +//@ + There is no "quiet" option since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + filePattern = mode; + mode = options; + options = ''; + } + else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose' + }); + + if (typeof filePattern === 'string') { + filePattern = [ filePattern ]; + } + + var files; + + if (options.recursive) { + files = []; + common.expand(filePattern).forEach(function addFile(expandedFile) { + var stat = fs.lstatSync(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } + else { + files = common.expand(filePattern); + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { + return; + } + + var perms = fs.statSync(file).mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + /*jshint regexdash:true */ + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') != -1; + var changeWrite = change.indexOf('w') != -1; + var changeExec = change.indexOf('x') != -1; + var changeSticky = change.indexOf('t') != -1; + var changeSetuid = change.indexOf('s') != -1; + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + } + + if (options.verbose) { + log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms != newPerms) { + if (!options.verbose && options.changes) { + log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + } + } + else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } + else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); +} +module.exports = _chmod; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/common.js new file mode 100755 index 0000000..d8c2312 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/common.js @@ -0,0 +1,203 @@ +var os = require('os'); +var fs = require('fs'); +var _ls = require('./ls'); + +// Module globals +var config = { + silent: false, + fatal: false +}; +exports.config = config; + +var state = { + error: null, + currentCmd: 'shell.js', + tempDir: null +}; +exports.state = state; + +var platform = os.type().match(/^Win/) ? 'win' : 'unix'; +exports.platform = platform; + +function log() { + if (!config.silent) + console.log.apply(this, arguments); +} +exports.log = log; + +// Shows error message. Throws unless _continue or config.fatal are true +function error(msg, _continue) { + if (state.error === null) + state.error = ''; + state.error += state.currentCmd + ': ' + msg + '\n'; + + if (msg.length > 0) + log(state.error); + + if (config.fatal) + process.exit(1); + + if (!_continue) + throw ''; +} +exports.error = error; + +// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. +// For now, this is a dummy function to bookmark places we need such strings +function ShellString(str) { + return str; +} +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +function parseOptions(str, map) { + if (!map) + error('parseOptions() internal error: no map given'); + + // All options are false by default + var options = {}; + for (var letter in map) + options[map[letter]] = false; + + if (!str) + return options; // defaults + + if (typeof str !== 'string') + error('parseOptions() internal error: wrong str'); + + // e.g. match[1] = 'Rf' for str = '-Rf' + var match = str.match(/^\-(.+)/); + if (!match) + return options; + + // e.g. chars = ['R', 'f'] + var chars = match[1].split(''); + + chars.forEach(function(c) { + if (c in map) + options[map[c]] = true; + else + error('option not recognized: '+c); + }); + + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + var expanded = []; + list.forEach(function(listEl) { + // Wildcard present on directory names ? + if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) { + var match = listEl.match(/^([^*]+\/|)(.*)/); + var root = match[1]; + var rest = match[2]; + var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*"); + restRegex = new RegExp(restRegex); + + _ls('-R', root).filter(function (e) { + return restRegex.test(e); + }).forEach(function(file) { + expanded.push(file); + }); + } + // Wildcard present on file names ? + else if (listEl.search(/\*/) > -1) { + _ls('', listEl).forEach(function(file) { + expanded.push(file); + }); + } else { + expanded.push(listEl); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch(e) { + // Try to override file permission + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) + return parseInt(16*Math.random(), 10).toString(16); + else { + var hash = ''; + for (var i=0; i and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + if (options.recursive) { + // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" + // (see Github issue #15) + sources.forEach(function(src, i) { + if (src[src.length - 1] === '/') + sources[i] += '*'; + }); + + // Create dest + try { + fs.mkdirSync(dest, parseInt('0777', 8)); + } catch (e) { + // like Unix's cp, keep going even if we can't create dest dir + } + } + + sources = common.expand(sources); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + if (fs.statSync(src).isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.log(src + ' is a directory (not copied)'); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = path.join(dest, path.basename(src)), + checkDir = fs.statSync(src); + try { + fs.mkdirSync(newDest, checkDir.mode); + } catch (e) { + //if the directory already exists, that's okay + if (e.code !== 'EEXIST') { + common.error('dest file no such file or directory: ' + newDest, true); + throw e; + } + } + + cpdirSyncRecursive(src, newDest, {force: options.force}); + } + return; // done with dir + } + + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + copyFileSync(src, thisDest); + }); // forEach(src) +} +module.exports = _cp; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/dirs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/dirs.js new file mode 100755 index 0000000..58fae8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/dirs.js @@ -0,0 +1,191 @@ +var common = require('./common'); +var _cd = require('./cd'); +var path = require('path'); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } else { + common.error(index + ': directory stack index out of range'); + } + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(''); +} +exports.pushd = _pushd; + +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(''); +} +exports.popd = _popd; + +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. +//@ +//@ See also: pushd, popd +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c' : 'clear' + }); + + if (options['clear']) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + common.log(stack[index]); + return stack[index]; + } + + common.log(stack.join(' ')); + + return stack; +} +exports.dirs = _dirs; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/echo.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/echo.js new file mode 100755 index 0000000..760ea84 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/echo.js @@ -0,0 +1,20 @@ +var common = require('./common'); + +//@ +//@ ### echo(string [,string ...]) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ ``` +//@ +//@ Prints string to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo() { + var messages = [].slice.call(arguments, 0); + console.log.apply(this, messages); + return common.ShellString(messages.join(' ')); +} +module.exports = _echo; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/error.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/error.js new file mode 100755 index 0000000..cca3efb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/error.js @@ -0,0 +1,10 @@ +var common = require('./common'); + +//@ +//@ ### error() +//@ Tests if error occurred in the last command. Returns `null` if no error occurred, +//@ otherwise returns string explaining the error +function error() { + return common.state.error; +}; +module.exports = error; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/exec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/exec.js new file mode 100755 index 0000000..d259a9f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/exec.js @@ -0,0 +1,216 @@ +var common = require('./common'); +var _tempDir = require('./tempdir'); +var _pwd = require('./pwd'); +var path = require('path'); +var fs = require('fs'); +var child = require('child_process'); + +// Hack to run child_process.exec() synchronously (sync avoids callback hell) +// Uses a custom wait loop that checks for a flag file, created when the child process is done. +// (Can't do a wait loop that checks for internal Node variables/messages as +// Node is single-threaded; callbacks and other internal state changes are done in the +// event loop). +function execSync(cmd, opts) { + var tempDir = _tempDir(); + var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), + codeFile = path.resolve(tempDir+'/'+common.randomFileName()), + scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), + sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var previousStdoutContent = ''; + // Echoes stdout changes from running process, if not silent + function updateStdout() { + if (options.silent || !fs.existsSync(stdoutFile)) + return; + + var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); + // No changes since last time? + if (stdoutContent.length <= previousStdoutContent.length) + return; + + process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); + previousStdoutContent = stdoutContent; + } + + function escape(str) { + return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); + } + + if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); + + var execCommand = '"'+process.execPath+'" '+scriptFile; + var execOptions = { + env: process.env, + cwd: _pwd(), + maxBuffer: 20*1024*1024 + }; + + if (typeof child.execSync === 'function') { + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});", + "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');", + "childProcess.stdout.pipe(stdoutStream, {end: false});", + "childProcess.stderr.pipe(stdoutStream, {end: false});", + "childProcess.stdout.pipe(process.stdout);", + "childProcess.stderr.pipe(process.stderr);", + "var stdoutEnded = false, stderrEnded = false;", + "function tryClosing(){ if(stdoutEnded && stderrEnded){ stdoutStream.end(); } }", + "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosing(); });", + "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosing(); });" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + if (options.silent) { + execOptions.stdio = 'ignore'; + } else { + execOptions.stdio = [0, 1, 2]; + } + + // Welcome to the future + child.execSync(execCommand, execOptions); + } else { + cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix + + var script = [ + "var child = require('child_process')", + " , fs = require('fs');", + "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", + "});" + ].join('\n'); + + fs.writeFileSync(scriptFile, script); + + child.exec(execCommand, execOptions); + + // The wait loop + // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage + // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing + // CPU usage, though apparently not so much on Windows) + while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + } + + // At this point codeFile exists, but it's not necessarily flushed yet. + // Keep reading it until it is. + var code = parseInt('', 10); + while (isNaN(code)) { + code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); + } + + var stdout = fs.readFileSync(stdoutFile, 'utf8'); + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + try { common.unlinkSync(scriptFile); } catch(e) {} + try { common.unlinkSync(stdoutFile); } catch(e) {} + try { common.unlinkSync(codeFile); } catch(e) {} + try { common.unlinkSync(sleepFile); } catch(e) {} + + // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html + if (code === 1 || code === 2 || code >= 126) { + common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes + } + // True if successful, false if not + var obj = { + code: code, + output: stdout + }; + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, callback) { + var output = ''; + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { + if (callback) + callback(err ? err.code : 0, output); + }); + + c.stdout.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + c.stderr.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ Available options (all `false` by default): +//@ +//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. +//@ + `silent`: Do not echo program output to console. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).output; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, output) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', output); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. +//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +//@ the `callback` gets the arguments `(code, output)`. +//@ +//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as +//@ the current synchronous implementation uses a lot of CPU. This should be getting +//@ fixed soon. +function _exec(command, options, callback) { + if (!command) + common.error('must specify command'); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false + }, options); + + if (options.async) + return execAsync(command, options, callback); + else + return execSync(command, options); +} +module.exports = _exec; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/find.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/find.js new file mode 100755 index 0000000..d9eeec2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/find.js @@ -0,0 +1,51 @@ +var fs = require('fs'); +var common = require('./common'); +var _ls = require('./ls'); + +//@ +//@ ### find(path [,path ...]) +//@ ### find(path_array) +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. +function _find(options, paths) { + if (!paths) + common.error('no path specified'); + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + function pushFile(file) { + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + list.push(file); + } + + // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory + + paths.forEach(function(file) { + pushFile(file); + + if (fs.statSync(file).isDirectory()) { + _ls('-RA', file+'/*').forEach(function(subfile) { + pushFile(subfile); + }); + } + }); + + return list; +} +module.exports = _find; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/grep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/grep.js new file mode 100755 index 0000000..00c7d6a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/grep.js @@ -0,0 +1,52 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### grep([options ,] regex_filter, file [, file ...]) +//@ ### grep([options ,] regex_filter, file_array) +//@ Available options: +//@ +//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. Wildcard `*` accepted. +function _grep(options, regex, files) { + options = common.parseOptions(options, { + 'v': 'inverse' + }); + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 2); + // if it's array leave it as it is + + files = common.expand(files); + + var grep = ''; + files.forEach(function(file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, true); + return; + } + + var contents = fs.readFileSync(file, 'utf8'), + lines = contents.split(/\r*\n/); + lines.forEach(function(line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) + grep += line + '\n'; + }); + }); + + return common.ShellString(grep); +} +module.exports = _grep; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ln.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ln.js new file mode 100755 index 0000000..a7b9701 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ln.js @@ -0,0 +1,53 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); +var os = require('os'); + +//@ +//@ ### ln(options, source, dest) +//@ ### ln(source, dest) +//@ Available options: +//@ +//@ + `s`: symlink +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ln('file', 'newlink'); +//@ ln('-sf', 'file', 'existing'); +//@ ``` +//@ +//@ Links source to dest. Use -f to force the link, should dest already exist. +function _ln(options, source, dest) { + options = common.parseOptions(options, { + 's': 'symlink', + 'f': 'force' + }); + + if (!source || !dest) { + common.error('Missing and/or '); + } + + source = path.resolve(process.cwd(), String(source)); + dest = path.resolve(process.cwd(), String(dest)); + + if (!fs.existsSync(source)) { + common.error('Source file does not exist', true); + } + + if (fs.existsSync(dest)) { + if (!options.force) { + common.error('Destination file exists', true); + } + + fs.unlinkSync(dest); + } + + if (options.symlink) { + fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } else { + fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null); + } +} +module.exports = _ln; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ls.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ls.js new file mode 100755 index 0000000..3345db4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/ls.js @@ -0,0 +1,126 @@ +var path = require('path'); +var fs = require('fs'); +var common = require('./common'); +var _cd = require('./cd'); +var _pwd = require('./pwd'); + +//@ +//@ ### ls([options ,] path [,path ...]) +//@ ### ls([options ,] path_array) +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ``` +//@ +//@ Returns array of files in the given path, or in current directory if no path provided. +function _ls(options, paths) { + options = common.parseOptions(options, { + 'R': 'recursive', + 'A': 'all', + 'a': 'all_deprecated' + }); + + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) + paths = ['.']; + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + // Conditionally pushes file to list - returns true if pushed, false otherwise + // (e.g. prevents hidden files to be included unless explicitly told so) + function pushFile(file, query) { + // hidden file? + if (path.basename(file)[0] === '.') { + // not explicitly asking for hidden files? + if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) + return false; + } + + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + + list.push(file); + return true; + } + + paths.forEach(function(p) { + if (fs.existsSync(p)) { + var stats = fs.statSync(p); + // Simple file? + if (stats.isFile()) { + pushFile(p, p); + return; // continue + } + + // Simple dir? + if (stats.isDirectory()) { + // Iterate over p contents + fs.readdirSync(p).forEach(function(file) { + if (!pushFile(file, p)) + return; + + // Recursive? + if (options.recursive) { + var oldDir = _pwd(); + _cd('', p); + if (fs.statSync(file).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); + _cd('', oldDir); + } + }); + return; // continue + } + } + + // p does not exist - possible wildcard present + + var basename = path.basename(p); + var dirname = path.dirname(p); + // Wildcard present on an existing dir? (e.g. '/tmp/*.js') + if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { + // Escape special regular expression chars + var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); + // Translates wildcard into regex + regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; + // Iterate over directory contents + fs.readdirSync(dirname).forEach(function(file) { + if (file.match(new RegExp(regexp))) { + if (!pushFile(path.normalize(dirname+'/'+file), basename)) + return; + + // Recursive? + if (options.recursive) { + var pp = dirname + '/' + file; + if (fs.lstatSync(pp).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); + } // recursive + } // if file matches + }); // forEach + return; + } + + common.error('no such file or directory: ' + p, true); + }); + + return list; +} +module.exports = _ls; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mkdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mkdir.js new file mode 100755 index 0000000..5a7088f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mkdir.js @@ -0,0 +1,68 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Recursively creates 'dir' +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options ,] dir [, dir ...]) +//@ ### mkdir([options ,] dir_array) +//@ Available options: +//@ +//@ + `p`: full path (will create intermediate dirs if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + options = common.parseOptions(options, { + 'p': 'fullpath' + }); + if (!dirs) + common.error('no paths given'); + + if (typeof dirs === 'string') + dirs = [].slice.call(arguments, 1); + // if it's array leave it as it is + + dirs.forEach(function(dir) { + if (fs.existsSync(dir)) { + if (!options.fullpath) + common.error('path already exists: ' + dir, true); + return; // skip dir + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, true); + return; // skip dir + } + + if (options.fullpath) + mkdirSyncRecursive(dir); + else + fs.mkdirSync(dir, parseInt('0777', 8)); + }); +} // mkdir +module.exports = _mkdir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mv.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mv.js new file mode 100755 index 0000000..11f9607 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/mv.js @@ -0,0 +1,80 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### mv(source [, source ...], dest') +//@ ### mv(source_array, dest') +//@ Available options: +//@ +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-f', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves files. The wildcard `*` is accepted. +function _mv(options, sources, dest) { + options = common.parseOptions(options, { + 'f': 'force' + }); + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + sources = common.expand(sources); + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: '+src, true); + return; // skip file + } + + fs.renameSync(src, thisDest); + }); // forEach(src) +} // mv +module.exports = _mv; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/popd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/popd.js new file mode 100755 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/popd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pushd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pushd.js new file mode 100755 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pushd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pwd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pwd.js new file mode 100755 index 0000000..41727bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/pwd.js @@ -0,0 +1,11 @@ +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### pwd() +//@ Returns the current directory. +function _pwd(options) { + var pwd = path.resolve(process.cwd()); + return common.ShellString(pwd); +} +module.exports = _pwd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/rm.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/rm.js new file mode 100755 index 0000000..bd608cb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/rm.js @@ -0,0 +1,163 @@ +var common = require('./common'); +var fs = require('fs'); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for(var i = 0; i < files.length; i++) { + var file = dir + "/" + files[i], + currFile = fs.lstatSync(file); + + if(currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } + + else if(currFile.isSymbolicLink()) { // Unlink symlinks + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + else // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + // Retry on windows, sometimes it takes a little time before all the files in the directory are gone + var start = Date.now(); + while (true) { + try { + result = fs.rmdirSync(dir); + if (fs.existsSync(dir)) throw { code: "EAGAIN" } + break; + } catch(er) { + // In addition to error codes, also check if the directory still exists and loop again if true + if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) { + if (Date.now() - start > 1000) throw er; + } else if (er.code === "ENOENT") { + // Directory did not exist, deletion was successful + break; + } else { + throw er; + } + } + } + } catch(e) { + common.error('could not remove directory (code '+e.code+'): ' + dir, true); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch(e) { + writePermission = false; + } + + return writePermission; +} + +//@ +//@ ### rm([options ,] file [, file ...]) +//@ ### rm([options ,] file_array) +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. The wildcard `*` is accepted. +function _rm(options, files) { + options = common.parseOptions(options, { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive' + }); + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) { + // Path does not exist, no force flag given + if (!options.force) + common.error('no such file or directory: '+file, true); + + return; // skip file + } + + // If here, path exists + + var stats = fs.lstatSync(file); + if (stats.isFile() || stats.isSymbolicLink()) { + + // Do not check for file writing permissions + if (options.force) { + common.unlinkSync(file); + return; + } + + if (isWriteable(file)) + common.unlinkSync(file); + else + common.error('permission denied: '+file, true); + + return; + } // simple file + + // Path is an existing directory, but no -r flag given + if (stats.isDirectory() && !options.recursive) { + common.error('path is a directory', true); + return; // skip path + } + + // Recursively remove existing directory + if (stats.isDirectory() && options.recursive) { + rmdirSyncRecursive(file, options.force); + } + }); // forEach(file) +} // rm +module.exports = _rm; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/sed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/sed.js new file mode 100755 index 0000000..65f7cb4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/sed.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### sed([options ,] search_regex, replacement, file) +//@ Available options: +//@ +//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input +//@ using the given search regex and replacement string or function. Returns the new string after replacement. +function _sed(options, regex, replacement, file) { + options = common.parseOptions(options, { + 'i': 'inplace' + }); + + if (typeof replacement === 'string' || typeof replacement === 'function') + replacement = replacement; // no-op + else if (typeof replacement === 'number') + replacement = replacement.toString(); // fallback + else + common.error('invalid replacement string'); + + if (!file) + common.error('no file given'); + + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); + if (options.inplace) + fs.writeFileSync(file, result, 'utf8'); + + return common.ShellString(result); +} +module.exports = _sed; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/tempdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/tempdir.js new file mode 100755 index 0000000..45953c2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/tempdir.js @@ -0,0 +1,56 @@ +var common = require('./common'); +var os = require('os'); +var fs = require('fs'); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) + return false; + + if (!fs.statSync(dir).isDirectory()) + return false; + + var testFile = dir+'/'+common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + return false; + } +} + + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + var state = common.state; + if (state.tempDir) + return state.tempDir; // from cache + + state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ + writeableDir(process.env['TMPDIR']) || + writeableDir(process.env['TEMP']) || + writeableDir(process.env['TMP']) || + writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return state.tempDir; +} +module.exports = _tempDir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/test.js new file mode 100755 index 0000000..8a4ac7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/test.js @@ -0,0 +1,85 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### test(expression) +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symboilc link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates expression using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) + common.error('no path given'); + + // hack - only works with unary primaries + options = common.parseOptions(options, { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket' + }); + + var canInterpret = false; + for (var key in options) + if (options[key] === true) { + canInterpret = true; + break; + } + + if (!canInterpret) + common.error('could not interpret expression'); + + if (options.link) { + try { + return fs.lstatSync(path).isSymbolicLink(); + } catch(e) { + return false; + } + } + + if (!fs.existsSync(path)) + return false; + + if (options.exists) + return true; + + var stats = fs.statSync(path); + + if (options.block) + return stats.isBlockDevice(); + + if (options.character) + return stats.isCharacterDevice(); + + if (options.directory) + return stats.isDirectory(); + + if (options.file) + return stats.isFile(); + + if (options.pipe) + return stats.isFIFO(); + + if (options.socket) + return stats.isSocket(); +} // test +module.exports = _test; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/to.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/to.js new file mode 100755 index 0000000..f029999 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/to.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.writeFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not write to file (code '+e.code+'): '+file, true); + } +} +module.exports = _to; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/toEnd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/toEnd.js new file mode 100755 index 0000000..f6d099d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/toEnd.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). +function _toEnd(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.appendFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not append to file (code '+e.code+'): '+file, true); + } +} +module.exports = _toEnd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/which.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/which.js new file mode 100755 index 0000000..2822ecf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/shelljs/src/which.js @@ -0,0 +1,83 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Cross-platform method for splitting environment PATH variables +function splitPath(p) { + for (i=1;i<2;i++) {} + + if (!p) + return []; + + if (common.platform === 'win') + return p.split(';'); + else + return p.split(':'); +} + +function checkPath(path) { + return fs.existsSync(path) && fs.statSync(path).isDirectory() == false; +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +//@ Returns string containing the absolute path to the command. +function _which(options, cmd) { + if (!cmd) + common.error('must specify command'); + + var pathEnv = process.env.path || process.env.Path || process.env.PATH, + pathArray = splitPath(pathEnv), + where = null; + + // No relative/absolute paths provided? + if (cmd.search(/\//) === -1) { + // Search for command in PATH + pathArray.forEach(function(dir) { + if (where) + return; // already found it + + var attempt = path.resolve(dir + '/' + cmd); + if (checkPath(attempt)) { + where = attempt; + return; + } + + if (common.platform === 'win') { + var baseAttempt = attempt; + attempt = baseAttempt + '.exe'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.cmd'; + if (checkPath(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.bat'; + if (checkPath(attempt)) { + where = attempt; + return; + } + } // if 'win' + }); + } + + // Command not found anywhere? + if (!checkPath(cmd) && !where) + return null; + + where = where || path.resolve(cmd); + + return common.ShellString(where); +} +module.exports = _which; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.jscsrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.jscsrc new file mode 100755 index 0000000..a0a41ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.jscsrc @@ -0,0 +1,40 @@ +{ + "disallowTabs": true, + "preset": "google", + "fileExtensions": [".js", "jscs"], + + "requireSemicolons": true, + "requireParenthesesAroundIIFE": true, + "maximumLineLength": 120, + "validateLineBreaks": "LF", + "validateIndentation": 4, + "disallowTrailingComma": true, + "disallowUnusedParams": true, + + "disallowSpacesInsideObjectBrackets": null, + "disallowImplicitTypeConversion": ["string"], + + "safeContextKeyword": "_this", + + "disallowMultipleVarDecl": { + allExcept: ['require'] + }, + + "requireCamelCaseOrUpperCaseIdentifiers" : false, + + "jsDoc": { + "checkAnnotations": "closurecompiler", + "checkParamNames": true, + "requireParamTypes": true, + "checkRedundantParams": true, + "checkReturnTypes": true, + "checkRedundantReturns": true, + "requireReturnTypes": true, + "checkTypes": "capitalizedNativeCase", + "checkRedundantAccess": true, + "requireNewlineAfterDescription": true + }, + + "excludeFiles": [ + ] +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.npmignore new file mode 100755 index 0000000..b512c09 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/.npmignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/LICENSE new file mode 100755 index 0000000..3fdbf44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/README.md new file mode 100755 index 0000000..b05a54b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/README.md @@ -0,0 +1,3 @@ +## library wrapper for Xcode's simctl utility on OS X + +Used by [ios-sim](https://www.npmjs.com/package/ios-sim) \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-extensions.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-extensions.js new file mode 100755 index 0000000..26eec67 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-extensions.js @@ -0,0 +1,63 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var shell = require('shelljs'), + path = require('path'), + fs = require('fs'), + util = require('util'), + Tail = require('tail').Tail; + +var extensions = { + start: function(deviceid) { + var command = util.format('xcrun instruments -w "%s"', deviceid); + return shell.exec(command, { silent: true }); + }, + + log: function(deviceid, filepath) { + var tail = new Tail( + path.join(process.env.HOME, 'Library/Logs/CoreSimulator', deviceid, 'system.log') + ); + + tail.on('line', function(data) { + if (filepath) { + fs.appendFile(filepath, data + '\n', function(error) { + if (error) { + console.error('ERROR: ', error); + throw error; + } + }); + } else { + console.log(data); + } + }); + + tail.on('error', function(error) { + console.error('ERROR: ', error); + }); + + return tail; + } +}; + +exports = module.exports = extensions; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-list-parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-list-parser.js new file mode 100755 index 0000000..c7ec5cb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/lib/simctl-list-parser.js @@ -0,0 +1,220 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var SimctlListParserMode = { + 'device': 0, + 'devicetype': 1, + 'runtime': 2 +}; + +function SimctlListParser() { + this._result = { + 'devices': [], + 'devicetypes': [], + 'runtimes': [] + }; + + this._mode = null; + this._deviceRuntime = null; +} + +SimctlListParser.prototype.parse = function(text) { + var _this = this; + clearResult.apply(this); + + text.split(/\r?\n/).forEach(function(line) { + parseLine.apply(_this, [line]); + }); + changeMode.apply(this); + + return this._result; +}; + +SimctlListParser.prototype._clear = function() { + clearResult.apply(this); +}; + +function clearResult() { + this._result = { + 'devices': [], + 'devicetypes': [], + 'runtimes': [] + }; +} + +function changeMode(line) { + endParse.apply(this); + + if (line && line.indexOf('Devices') !== -1) { + this._mode = SimctlListParserMode.device; + } else if (line && line.indexOf('Device Types') !== -1) { + this._mode = SimctlListParserMode.devicetype; + } else if (line && line.indexOf('Runtimes') !== -1) { + this._mode = SimctlListParserMode.runtime; + } else { + this._mode = null; + } +} + +function endParse() { + switch (this._mode) { + case SimctlListParserMode.device: + if (this._deviceRuntime) { + this._result.devices.push(this._deviceRuntime); + } + break; + } +} + +function parseLine(line) { + + if (line.indexOf('==') === 0) { + changeMode.apply(this, [line]); + return; + } + + switch (this._mode) { + case SimctlListParserMode.device: + parseDevice.apply(this, [line]); + break; + case SimctlListParserMode.devicetype: + parseDeviceType.apply(this, [line]); + break; + case SimctlListParserMode.runtime: + parseRuntime.apply(this, [line]); + break; + } +} + +function isUUID(text) { + var regExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; + return regExp.test(text); +} + +function parseDevice(line) { + if (line.indexOf('--') === 0) { + changeDeviceRuntime.apply(this, [line]); + return; + } + + // example: iPhone 4s (3717C817-6AD7-42B8-ACF3-405CB9E96375) (Shutdown) (unavailable) + // example: iPad Pro (9.7 inch) (1C5590C8-8AE7-4C27-AD06-84C801702945) (Shutdown) (unavailable) + // the last capture group might not be there if available + // the first parenthesized group might be part of the name + + var available = false; + + var regExp = /([^)]*)\s\(([^)]+)\)/g; + var items = []; + var matches; + + while ((matches = regExp.exec(line)) !== null) { + if (matches[1].length > 0) { + if (isUUID(matches[2])) { // next is uuid, so push both name and id + items.push(matches[1]); + items.push(matches[2]); + } else { // name is in the next paren. group (not UUID), use whole match + items.push(matches[0]); + } + } else { // no match for name, just push second match + items.push(matches[2]); + } + } + + if (items.length) { + var obj = { + 'name': items[0].trim(), + 'id': items[1].trim(), + 'state': items[2].trim(), + 'available': items[3] === undefined + }; + + this._deviceRuntime.devices.push(obj); + } +} + +function changeDeviceRuntime(line) { + if (this._deviceRuntime) { + this._result.devices.push(this._deviceRuntime); + } + + var runtime = line; + var regExp = /--\s(.*)\s--/; + var matches = regExp.exec(line); + + if (matches) { + runtime = matches[1]; + } + + var obj = { + 'runtime': runtime, + 'devices': [] + }; + + this._deviceRuntime = obj; +} + +function parseDeviceType(line) { + // Example: 'iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)' + var regExp = /(.*)\(([^)]+)\)/; + var matches = regExp.exec(line); + + if (matches) { + var obj = { + 'name': matches[1].trim(), + 'id': matches[2].trim() + }; + + this._result.devicetypes.push(obj); + } +} + +function parseRuntime(line) { + // Example: + // iOS 7.0 (7.0 - Unknown) + // (com.apple.CoreSimulator.SimRuntime.iOS-7-0) (unavailable, runtime path not found) + // the last capture group might not be there if available + var available = false; + + var regExp = /(.*)\(([^)]+)\)\s\(([^)]+)\)\s\(([^)]+)\)/; + var matches = regExp.exec(line); + if (!matches) { + regExp = /(.*)\(([^)]+)\)\s\(([^)]+)\)/; + matches = regExp.exec(line); + available = true; + } + + if (matches) { + var obj = { + 'name': matches[1].trim(), + 'build': matches[2].trim(), + 'id': matches[3].trim(), + 'available': available + }; + + this._result.runtimes.push(obj); + } +} + +exports = module.exports = SimctlListParser; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.documentup.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.documentup.json new file mode 100755 index 0000000..57fe301 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.documentup.json @@ -0,0 +1,6 @@ +{ + "name": "ShellJS", + "twitter": [ + "r2r" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.jshintrc b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.jshintrc new file mode 100755 index 0000000..a80c559 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.jshintrc @@ -0,0 +1,7 @@ +{ + "loopfunc": true, + "sub": true, + "undef": true, + "unused": true, + "node": true +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.npmignore new file mode 100755 index 0000000..6b20c38 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.npmignore @@ -0,0 +1,2 @@ +test/ +tmp/ \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.travis.yml new file mode 100755 index 0000000..99cdc74 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/LICENSE new file mode 100755 index 0000000..1b35ee9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/README.md new file mode 100755 index 0000000..9120623 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/README.md @@ -0,0 +1,552 @@ +# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) + +ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! + +The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: + ++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader ++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger ++ [JSHint](http://jshint.com) - Most popular JavaScript linter ++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers ++ [Yeoman](http://yeoman.io/) - Web application stack and development tool ++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation + +and [many more](https://npmjs.org/browse/depended/shelljs). + +## Installing + +Via npm: + +```bash +$ npm install [-g] shelljs +``` + +If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to +run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: + +```bash +$ shjs my_script +``` + +You can also just copy `shell.js` into your project's directory, and `require()` accordingly. + + +## Examples + +### JavaScript + +```javascript +require('shelljs/global'); + +if (!which('git')) { + echo('Sorry, this script requires git'); + exit(1); +} + +// Copy files to release dir +mkdir('-p', 'out/Release'); +cp('-R', 'stuff/*', 'out/Release'); + +// Replace macros in each .js file +cd('lib'); +ls('*.js').forEach(function(file) { + sed('-i', 'BUILD_VERSION', 'v0.1.2', file); + sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); + sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); +}); +cd('..'); + +// Run external tool synchronously +if (exec('git commit -am "Auto-commit"').code !== 0) { + echo('Error: Git commit failed'); + exit(1); +} +``` + +### CoffeeScript + +```coffeescript +require 'shelljs/global' + +if not which 'git' + echo 'Sorry, this script requires git' + exit 1 + +# Copy files to release dir +mkdir '-p', 'out/Release' +cp '-R', 'stuff/*', 'out/Release' + +# Replace macros in each .js file +cd 'lib' +for file in ls '*.js' + sed '-i', 'BUILD_VERSION', 'v0.1.2', file + sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file + sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file +cd '..' + +# Run external tool synchronously +if (exec 'git commit -am "Auto-commit"').code != 0 + echo 'Error: Git commit failed' + exit 1 +``` + +## Global vs. Local + +The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. + +Example: + +```javascript +var shell = require('shelljs'); +shell.echo('hello world'); +``` + +## Make tool + +A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. + +Example (CoffeeScript): + +```coffeescript +require 'shelljs/make' + +target.all = -> + target.bundle() + target.docs() + +target.bundle = -> + cd __dirname + mkdir 'build' + cd 'lib' + (cat '*.js').to '../build/output.js' + +target.docs = -> + cd __dirname + mkdir 'docs' + cd 'lib' + for file in ls '*.js' + text = grep '//@', file # extract special comments + text.replace '//@', '' # remove comment tags + text.to 'docs/my_docs.md' +``` + +To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on. + + + + + + +## Command reference + + +All commands run synchronously, unless otherwise stated. + + +### cd('dir') +Changes to directory `dir` for the duration of the script + + +### pwd() +Returns the current directory. + + +### ls([options ,] path [,path ...]) +### ls([options ,] path_array) +Available options: + ++ `-R`: recursive ++ `-A`: all files (include files beginning with `.`, except for `.` and `..`) + +Examples: + +```javascript +ls('projs/*.js'); +ls('-R', '/users/me', '/tmp'); +ls('-R', ['/users/me', '/tmp']); // same as above +``` + +Returns array of files in the given path, or in current directory if no path provided. + + +### find(path [,path ...]) +### find(path_array) +Examples: + +```javascript +find('src', 'lib'); +find(['src', 'lib']); // same as above +find('.').filter(function(file) { return file.match(/\.js$/); }); +``` + +Returns array of all files (however deep) in the given paths. + +The main difference from `ls('-R', path)` is that the resulting file names +include the base directories, e.g. `lib/resources/file1` instead of just `file1`. + + +### cp([options ,] source [,source ...], dest) +### cp([options ,] source_array, dest) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +cp('file1', 'dir1'); +cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +``` + +Copies files. The wildcard `*` is accepted. + + +### rm([options ,] file [, file ...]) +### rm([options ,] file_array) +Available options: + ++ `-f`: force ++ `-r, -R`: recursive + +Examples: + +```javascript +rm('-rf', '/tmp/*'); +rm('some_file.txt', 'another_file.txt'); +rm(['some_file.txt', 'another_file.txt']); // same as above +``` + +Removes files. The wildcard `*` is accepted. + + +### mv(source [, source ...], dest') +### mv(source_array, dest') +Available options: + ++ `f`: force + +Examples: + +```javascript +mv('-f', 'file', 'dir/'); +mv('file1', 'file2', 'dir/'); +mv(['file1', 'file2'], 'dir/'); // same as above +``` + +Moves files. The wildcard `*` is accepted. + + +### mkdir([options ,] dir [, dir ...]) +### mkdir([options ,] dir_array) +Available options: + ++ `p`: full path (will create intermediate dirs if necessary) + +Examples: + +```javascript +mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +``` + +Creates directories. + + +### test(expression) +Available expression primaries: + ++ `'-b', 'path'`: true if path is a block device ++ `'-c', 'path'`: true if path is a character device ++ `'-d', 'path'`: true if path is a directory ++ `'-e', 'path'`: true if path exists ++ `'-f', 'path'`: true if path is a regular file ++ `'-L', 'path'`: true if path is a symboilc link ++ `'-p', 'path'`: true if path is a pipe (FIFO) ++ `'-S', 'path'`: true if path is a socket + +Examples: + +```javascript +if (test('-d', path)) { /* do something with dir */ }; +if (!test('-f', path)) continue; // skip if it's a regular file +``` + +Evaluates expression using the available primaries and returns corresponding value. + + +### cat(file [, file ...]) +### cat(file_array) + +Examples: + +```javascript +var str = cat('file*.txt'); +var str = cat('file1', 'file2'); +var str = cat(['file1', 'file2']); // same as above +``` + +Returns a string containing the given file, or a concatenated string +containing the files if more than one file is given (a new line character is +introduced between each file). Wildcard `*` accepted. + + +### 'string'.to(file) + +Examples: + +```javascript +cat('input.txt').to('output.txt'); +``` + +Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ + + +### 'string'.toEnd(file) + +Examples: + +```javascript +cat('input.txt').toEnd('output.txt'); +``` + +Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +those returned by `cat`, `grep`, etc). + + +### sed([options ,] search_regex, replace_str, file) +Available options: + ++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ + +Examples: + +```javascript +sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +``` + +Reads an input string from `file` and performs a JavaScript `replace()` on the input +using the given search regex and replacement string. Returns the new string after replacement. + + +### grep([options ,] regex_filter, file [, file ...]) +### grep([options ,] regex_filter, file_array) +Available options: + ++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. + +Examples: + +```javascript +grep('-v', 'GLOBAL_VARIABLE', '*.js'); +grep('GLOBAL_VARIABLE', '*.js'); +``` + +Reads input string from given files and returns a string containing all lines of the +file that match the given `regex_filter`. Wildcard `*` accepted. + + +### which(command) + +Examples: + +```javascript +var nodeExec = which('node'); +``` + +Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +Returns string containing the absolute path to the command. + + +### echo(string [,string ...]) + +Examples: + +```javascript +echo('hello world'); +var str = echo('hello world'); +``` + +Prints string to stdout, and returns string with additional utility methods +like `.to()`. + + +### pushd([options,] [dir | '-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. + +Arguments: + ++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. ++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. ++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + +Examples: + +```javascript +// process.cwd() === '/usr' +pushd('/etc'); // Returns /etc /usr +pushd('+1'); // Returns /usr /etc +``` + +Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + +### popd([options,] ['-N' | '+N']) + +Available options: + ++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. + +Arguments: + ++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. ++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + +Examples: + +```javascript +echo(process.cwd()); // '/usr' +pushd('/etc'); // '/etc /usr' +echo(process.cwd()); // '/etc' +popd(); // '/usr' +echo(process.cwd()); // '/usr' +``` + +When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + +### dirs([options | '+N' | '-N']) + +Available options: + ++ `-c`: Clears the directory stack by deleting all of the elements. + +Arguments: + ++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. ++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. + +Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + +See also: pushd, popd + + +### exit(code) +Exits the current process with the given exit code. + +### env['VAR_NAME'] +Object containing environment variables (both getter and setter). Shortcut to process.env. + +### exec(command [, options] [, callback]) +Available options (all `false` by default): + ++ `async`: Asynchronous execution. Defaults to true if a callback is provided. ++ `silent`: Do not echo program output to console. + +Examples: + +```javascript +var version = exec('node --version', {silent:true}).output; + +var child = exec('some_long_running_process', {async:true}); +child.stdout.on('data', function(data) { + /* ... do something with data ... */ +}); + +exec('some_long_running_process', function(code, output) { + console.log('Exit code:', code); + console.log('Program output:', output); +}); +``` + +Executes the given `command` _synchronously_, unless otherwise specified. +When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +the `callback` gets the arguments `(code, output)`. + +**Note:** For long-lived processes, it's best to run `exec()` asynchronously as +the current synchronous implementation uses a lot of CPU. This should be getting +fixed soon. + + +### chmod(octal_mode || octal_string, file) +### chmod(symbolic_mode, file) + +Available options: + ++ `-v`: output a diagnostic for every file processed ++ `-c`: like verbose but report only when a change is made ++ `-R`: change files and directories recursively + +Examples: + +```javascript +chmod(755, '/Users/brandon'); +chmod('755', '/Users/brandon'); // same as above +chmod('u+x', '/Users/brandon'); +``` + +Alters the permissions of a file or directory by either specifying the +absolute permissions in octal form or expressing the changes in symbols. +This command tries to mimic the POSIX behavior as much as possible. +Notable exceptions: + ++ In symbolic modes, 'a-r' and '-r' are identical. No consideration is + given to the umask. ++ There is no "quiet" option since default behavior is to run silent. + + +## Non-Unix commands + + +### tempdir() + +Examples: + +```javascript +var tmp = tempdir(); // "/tmp" for most *nix platforms +``` + +Searches and returns string containing a writeable, platform-dependent temporary directory. +Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). + + +### error() +Tests if error occurred in the last command. Returns `null` if no error occurred, +otherwise returns string explaining the error + + +## Configuration + + +### config.silent +Example: + +```javascript +var silentState = config.silent; // save old silent state +config.silent = true; +/* ... */ +config.silent = silentState; // restore old silent state +``` + +Suppresses all command output if `true`, except for `echo()` calls. +Default is `false`. + +### config.fatal +Example: + +```javascript +config.fatal = true; +cp('this_file_does_not_exist', '/dev/null'); // dies here +/* more commands... */ +``` + +If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/bin/shjs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/bin/shjs new file mode 100755 index 0000000..d239a7a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/bin/shjs @@ -0,0 +1,51 @@ +#!/usr/bin/env node +require('../global'); + +if (process.argv.length < 3) { + console.log('ShellJS: missing argument (script name)'); + console.log(); + process.exit(1); +} + +var args, + scriptName = process.argv[2]; +env['NODE_PATH'] = __dirname + '/../..'; + +if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { + if (test('-f', scriptName + '.js')) + scriptName += '.js'; + if (test('-f', scriptName + '.coffee')) + scriptName += '.coffee'; +} + +if (!test('-f', scriptName)) { + console.log('ShellJS: script not found ('+scriptName+')'); + console.log(); + process.exit(1); +} + +args = process.argv.slice(3); + +for (var i = 0, l = args.length; i < l; i++) { + if (args[i][0] !== "-"){ + args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words + } +} + +if (scriptName.match(/\.coffee$/)) { + // + // CoffeeScript + // + if (which('coffee')) { + exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); + } else { + console.log('ShellJS: CoffeeScript interpreter not found'); + console.log(); + process.exit(1); + } +} else { + // + // JavaScript + // + exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/global.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/global.js new file mode 100755 index 0000000..97f0033 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/global.js @@ -0,0 +1,3 @@ +var shell = require('./shell.js'); +for (var cmd in shell) + global[cmd] = shell[cmd]; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/make.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/make.js new file mode 100755 index 0000000..53e5e81 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/make.js @@ -0,0 +1,47 @@ +require('./global'); + +global.config.fatal = true; +global.target = {}; + +// This ensures we only execute the script targets after the entire script has +// been evaluated +var args = process.argv.slice(2); +setTimeout(function() { + var t; + + if (args.length === 1 && args[0] === '--help') { + console.log('Available targets:'); + for (t in global.target) + console.log(' ' + t); + return; + } + + // Wrap targets to prevent duplicate execution + for (t in global.target) { + (function(t, oldTarget){ + + // Wrap it + global.target[t] = function(force) { + if (oldTarget.done && !force) + return; + oldTarget.done = true; + return oldTarget.apply(oldTarget, arguments); + }; + + })(t, global.target[t]); + } + + // Execute desired targets + if (args.length > 0) { + args.forEach(function(arg) { + if (arg in global.target) + global.target[arg](); + else { + console.log('no such target: ' + arg); + } + }); + } else if ('all' in global.target) { + global.target.all(); + } + +}, 0); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/package.json new file mode 100755 index 0000000..5f9c5a1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "shelljs@^0.2.6", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.2.6", + "spec": ">=0.2.6 <0.3.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simctl" + ] + ], + "_from": "shelljs@>=0.2.6 <0.3.0", + "_id": "shelljs@0.2.6", + "_inCache": true, + "_location": "/simctl/shelljs", + "_npmUser": { + "name": "artur", + "email": "arturadib@gmail.com" + }, + "_npmVersion": "1.3.8", + "_phantomChildren": {}, + "_requested": { + "raw": "shelljs@^0.2.6", + "scope": null, + "escapedName": "shelljs", + "name": "shelljs", + "rawSpec": "^0.2.6", + "spec": ">=0.2.6 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/simctl" + ], + "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", + "_shasum": "90492d72ffcc8159976baba62fb0f6884f0c3378", + "_shrinkwrap": null, + "_spec": "shelljs@^0.2.6", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simctl", + "author": { + "name": "Artur Adib", + "email": "aadib@mozilla.com" + }, + "bin": { + "shjs": "./bin/shjs" + }, + "bugs": { + "url": "https://github.com/arturadib/shelljs/issues" + }, + "dependencies": {}, + "description": "Portable Unix shell commands for Node.js", + "devDependencies": { + "jshint": "~2.1.11" + }, + "directories": {}, + "dist": { + "shasum": "90492d72ffcc8159976baba62fb0f6884f0c3378", + "tarball": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "homepage": "http://github.com/arturadib/shelljs", + "keywords": [ + "unix", + "shell", + "makefile", + "make", + "jake", + "synchronous" + ], + "main": "./shell.js", + "maintainers": [ + { + "name": "artur", + "email": "arturadib@gmail.com" + } + ], + "name": "shelljs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/arturadib/shelljs.git" + }, + "scripts": { + "test": "node scripts/run-tests" + }, + "version": "0.2.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/generate-docs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/generate-docs.js new file mode 100755 index 0000000..532fed9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/generate-docs.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node +require('../global'); + +echo('Appending docs to README.md'); + +cd(__dirname + '/..'); + +// Extract docs from shell.js +var docs = grep('//@', 'shell.js'); + +docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { + var file = path.match('.js$') ? path : path+'.js'; + return grep('//@', file); +}); + +// Remove '//@' +docs = docs.replace(/\/\/\@ ?/g, ''); +// Append docs to README +sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); + +echo('All done.'); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/run-tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/run-tests.js new file mode 100755 index 0000000..f9d31e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/scripts/run-tests.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node +require('../global'); + +var path = require('path'); + +var failed = false; + +// +// Lint +// +JSHINT_BIN = './node_modules/jshint/bin/jshint'; +cd(__dirname + '/..'); + +if (!test('-f', JSHINT_BIN)) { + echo('JSHint not found. Run `npm install` in the root dir first.'); + exit(1); +} + +if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { + failed = true; + echo('*** JSHINT FAILED! (return code != 0)'); + echo(); +} else { + echo('All JSHint tests passed'); + echo(); +} + +// +// Unit tests +// +cd(__dirname + '/../test'); +ls('*.js').forEach(function(file) { + echo('Running test:', file); + if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) + failed = true; + echo('*** TEST FAILED! (missing exit code "123")'); + echo(); + } +}); + +if (failed) { + echo(); + echo('*******************************************************'); + echo('WARNING: Some tests did not pass!'); + echo('*******************************************************'); + exit(1); +} else { + echo(); + echo('All tests passed.'); +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/shell.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/shell.js new file mode 100755 index 0000000..e56c5de --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/shell.js @@ -0,0 +1,153 @@ +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/arturadib/shelljs +// + +var common = require('./src/common'); + + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ + +//@include ./src/cd +var _cd = require('./src/cd'); +exports.cd = common.wrap('cd', _cd); + +//@include ./src/pwd +var _pwd = require('./src/pwd'); +exports.pwd = common.wrap('pwd', _pwd); + +//@include ./src/ls +var _ls = require('./src/ls'); +exports.ls = common.wrap('ls', _ls); + +//@include ./src/find +var _find = require('./src/find'); +exports.find = common.wrap('find', _find); + +//@include ./src/cp +var _cp = require('./src/cp'); +exports.cp = common.wrap('cp', _cp); + +//@include ./src/rm +var _rm = require('./src/rm'); +exports.rm = common.wrap('rm', _rm); + +//@include ./src/mv +var _mv = require('./src/mv'); +exports.mv = common.wrap('mv', _mv); + +//@include ./src/mkdir +var _mkdir = require('./src/mkdir'); +exports.mkdir = common.wrap('mkdir', _mkdir); + +//@include ./src/test +var _test = require('./src/test'); +exports.test = common.wrap('test', _test); + +//@include ./src/cat +var _cat = require('./src/cat'); +exports.cat = common.wrap('cat', _cat); + +//@include ./src/to +var _to = require('./src/to'); +String.prototype.to = common.wrap('to', _to); + +//@include ./src/toEnd +var _toEnd = require('./src/toEnd'); +String.prototype.toEnd = common.wrap('toEnd', _toEnd); + +//@include ./src/sed +var _sed = require('./src/sed'); +exports.sed = common.wrap('sed', _sed); + +//@include ./src/grep +var _grep = require('./src/grep'); +exports.grep = common.wrap('grep', _grep); + +//@include ./src/which +var _which = require('./src/which'); +exports.which = common.wrap('which', _which); + +//@include ./src/echo +var _echo = require('./src/echo'); +exports.echo = _echo; // don't common.wrap() as it could parse '-options' + +//@include ./src/dirs +var _dirs = require('./src/dirs').dirs; +exports.dirs = common.wrap("dirs", _dirs); +var _pushd = require('./src/dirs').pushd; +exports.pushd = common.wrap('pushd', _pushd); +var _popd = require('./src/dirs').popd; +exports.popd = common.wrap("popd", _popd); + +//@ +//@ ### exit(code) +//@ Exits the current process with the given exit code. +exports.exit = process.exit; + +//@ +//@ ### env['VAR_NAME'] +//@ Object containing environment variables (both getter and setter). Shortcut to process.env. +exports.env = process.env; + +//@include ./src/exec +var _exec = require('./src/exec'); +exports.exec = common.wrap('exec', _exec, {notUnix:true}); + +//@include ./src/chmod +var _chmod = require('./src/chmod'); +exports.chmod = common.wrap('chmod', _chmod); + + + +//@ +//@ ## Non-Unix commands +//@ + +//@include ./src/tempdir +var _tempDir = require('./src/tempdir'); +exports.tempdir = common.wrap('tempdir', _tempDir); + + +//@include ./src/error +var _error = require('./src/error'); +exports.error = _error; + + + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ Example: +//@ +//@ ```javascript +//@ var silentState = config.silent; // save old silent state +//@ config.silent = true; +//@ /* ... */ +//@ config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ Example: +//@ +//@ ```javascript +//@ config.fatal = true; +//@ cp('this_file_does_not_exist', '/dev/null'); // dies here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true` the script will die on errors. Default is `false`. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cat.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cat.js new file mode 100755 index 0000000..f6f4d25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cat.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### cat(file [, file ...]) +//@ ### cat(file_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). Wildcard `*` accepted. +function _cat(options, files) { + var cat = ''; + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + cat += fs.readFileSync(file, 'utf8') + '\n'; + }); + + if (cat[cat.length-1] === '\n') + cat = cat.substring(0, cat.length-1); + + return common.ShellString(cat); +} +module.exports = _cat; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cd.js new file mode 100755 index 0000000..230f432 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/cd.js @@ -0,0 +1,19 @@ +var fs = require('fs'); +var common = require('./common'); + +//@ +//@ ### cd('dir') +//@ Changes to directory `dir` for the duration of the script +function _cd(options, dir) { + if (!dir) + common.error('directory not specified'); + + if (!fs.existsSync(dir)) + common.error('no such file or directory: ' + dir); + + if (!fs.statSync(dir).isDirectory()) + common.error('not a directory: ' + dir); + + process.chdir(dir); +} +module.exports = _cd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/chmod.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/chmod.js new file mode 100755 index 0000000..f288893 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/chmod.js @@ -0,0 +1,208 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +var PERMS = (function (base) { + return { + OTHER_EXEC : base.EXEC, + OTHER_WRITE : base.WRITE, + OTHER_READ : base.READ, + + GROUP_EXEC : base.EXEC << 3, + GROUP_WRITE : base.WRITE << 3, + GROUP_READ : base.READ << 3, + + OWNER_EXEC : base.EXEC << 6, + OWNER_WRITE : base.WRITE << 6, + OWNER_READ : base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is + // the preferred way, else a jshint warning is thrown. + STICKY : parseInt('01000', 8), + SETGID : parseInt('02000', 8), + SETUID : parseInt('04000', 8), + + TYPE_MASK : parseInt('0770000', 8) + }; +})({ + EXEC : 1, + WRITE : 2, + READ : 4 +}); + +//@ +//@ ### chmod(octal_mode || octal_string, file) +//@ ### chmod(symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is +//@ given to the umask. +//@ + There is no "quiet" option since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + filePattern = mode; + mode = options; + options = ''; + } + else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose' + }); + + if (typeof filePattern === 'string') { + filePattern = [ filePattern ]; + } + + var files; + + if (options.recursive) { + files = []; + common.expand(filePattern).forEach(function addFile(expandedFile) { + var stat = fs.lstatSync(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } + else { + files = common.expand(filePattern); + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { + return; + } + + var perms = fs.statSync(file).mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + /*jshint regexdash:true */ + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') != -1; + var changeWrite = change.indexOf('w') != -1; + var changeExec = change.indexOf('x') != -1; + var changeSticky = change.indexOf('t') != -1; + var changeSetuid = change.indexOf('s') != -1; + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + } + + if (options.verbose) { + log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms != newPerms) { + if (!options.verbose && options.changes) { + log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + } + } + else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } + else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. + if (fs.statSync(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); +} +module.exports = _chmod; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/common.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/common.js new file mode 100755 index 0000000..fe20871 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/common.js @@ -0,0 +1,189 @@ +var os = require('os'); +var fs = require('fs'); +var _ls = require('./ls'); + +// Module globals +var config = { + silent: false, + fatal: false +}; +exports.config = config; + +var state = { + error: null, + currentCmd: 'shell.js', + tempDir: null +}; +exports.state = state; + +var platform = os.type().match(/^Win/) ? 'win' : 'unix'; +exports.platform = platform; + +function log() { + if (!config.silent) + console.log.apply(this, arguments); +} +exports.log = log; + +// Shows error message. Throws unless _continue or config.fatal are true +function error(msg, _continue) { + if (state.error === null) + state.error = ''; + state.error += state.currentCmd + ': ' + msg + '\n'; + + if (msg.length > 0) + log(state.error); + + if (config.fatal) + process.exit(1); + + if (!_continue) + throw ''; +} +exports.error = error; + +// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. +// For now, this is a dummy function to bookmark places we need such strings +function ShellString(str) { + return str; +} +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +function parseOptions(str, map) { + if (!map) + error('parseOptions() internal error: no map given'); + + // All options are false by default + var options = {}; + for (var letter in map) + options[map[letter]] = false; + + if (!str) + return options; // defaults + + if (typeof str !== 'string') + error('parseOptions() internal error: wrong str'); + + // e.g. match[1] = 'Rf' for str = '-Rf' + var match = str.match(/^\-(.+)/); + if (!match) + return options; + + // e.g. chars = ['R', 'f'] + var chars = match[1].split(''); + + chars.forEach(function(c) { + if (c in map) + options[map[c]] = true; + else + error('option not recognized: '+c); + }); + + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + var expanded = []; + list.forEach(function(listEl) { + // Wildcard present? + if (listEl.search(/\*/) > -1) { + _ls('', listEl).forEach(function(file) { + expanded.push(file); + }); + } else { + expanded.push(listEl); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch(e) { + // Try to override file permission + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) + return parseInt(16*Math.random(), 10).toString(16); + else { + var hash = ''; + for (var i=0; i and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + if (options.recursive) { + // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" + // (see Github issue #15) + sources.forEach(function(src, i) { + if (src[src.length - 1] === '/') + sources[i] += '*'; + }); + + // Create dest + try { + fs.mkdirSync(dest, parseInt('0777', 8)); + } catch (e) { + // like Unix's cp, keep going even if we can't create dest dir + } + } + + sources = common.expand(sources); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + if (fs.statSync(src).isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.log(src + ' is a directory (not copied)'); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = path.join(dest, path.basename(src)), + checkDir = fs.statSync(src); + try { + fs.mkdirSync(newDest, checkDir.mode); + } catch (e) { + //if the directory already exists, that's okay + if (e.code !== 'EEXIST') throw e; + } + + cpdirSyncRecursive(src, newDest, {force: options.force}); + } + return; // done with dir + } + + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + copyFileSync(src, thisDest); + }); // forEach(src) +} +module.exports = _cp; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/dirs.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/dirs.js new file mode 100755 index 0000000..58fae8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/dirs.js @@ -0,0 +1,191 @@ +var common = require('./common'); +var _cd = require('./cd'); +var path = require('path'); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } else { + common.error(index + ': directory stack index out of range'); + } + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(''); +} +exports.pushd = _pushd; + +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n' : 'no-cd' + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(''); +} +exports.popd = _popd; + +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. +//@ +//@ See also: pushd, popd +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c' : 'clear' + }); + + if (options['clear']) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + common.log(stack[index]); + return stack[index]; + } + + common.log(stack.join(' ')); + + return stack; +} +exports.dirs = _dirs; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/echo.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/echo.js new file mode 100755 index 0000000..760ea84 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/echo.js @@ -0,0 +1,20 @@ +var common = require('./common'); + +//@ +//@ ### echo(string [,string ...]) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ ``` +//@ +//@ Prints string to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo() { + var messages = [].slice.call(arguments, 0); + console.log.apply(this, messages); + return common.ShellString(messages.join(' ')); +} +module.exports = _echo; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/error.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/error.js new file mode 100755 index 0000000..cca3efb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/error.js @@ -0,0 +1,10 @@ +var common = require('./common'); + +//@ +//@ ### error() +//@ Tests if error occurred in the last command. Returns `null` if no error occurred, +//@ otherwise returns string explaining the error +function error() { + return common.state.error; +}; +module.exports = error; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/exec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/exec.js new file mode 100755 index 0000000..7ccdbc0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/exec.js @@ -0,0 +1,181 @@ +var common = require('./common'); +var _tempDir = require('./tempdir'); +var _pwd = require('./pwd'); +var path = require('path'); +var fs = require('fs'); +var child = require('child_process'); + +// Hack to run child_process.exec() synchronously (sync avoids callback hell) +// Uses a custom wait loop that checks for a flag file, created when the child process is done. +// (Can't do a wait loop that checks for internal Node variables/messages as +// Node is single-threaded; callbacks and other internal state changes are done in the +// event loop). +function execSync(cmd, opts) { + var tempDir = _tempDir(); + var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), + codeFile = path.resolve(tempDir+'/'+common.randomFileName()), + scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), + sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var previousStdoutContent = ''; + // Echoes stdout changes from running process, if not silent + function updateStdout() { + if (options.silent || !fs.existsSync(stdoutFile)) + return; + + var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); + // No changes since last time? + if (stdoutContent.length <= previousStdoutContent.length) + return; + + process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); + previousStdoutContent = stdoutContent; + } + + function escape(str) { + return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); + } + + cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix + + var script = + "var child = require('child_process')," + + " fs = require('fs');" + + "child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {" + + " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');" + + "});"; + + if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); + + fs.writeFileSync(scriptFile, script); + child.exec('"'+process.execPath+'" '+scriptFile, { + env: process.env, + cwd: _pwd(), + maxBuffer: 20*1024*1024 + }); + + // The wait loop + // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage + // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing + // CPU usage, though apparently not so much on Windows) + while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } + + // At this point codeFile exists, but it's not necessarily flushed yet. + // Keep reading it until it is. + var code = parseInt('', 10); + while (isNaN(code)) { + code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); + } + + var stdout = fs.readFileSync(stdoutFile, 'utf8'); + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + try { common.unlinkSync(scriptFile); } catch(e) {} + try { common.unlinkSync(stdoutFile); } catch(e) {} + try { common.unlinkSync(codeFile); } catch(e) {} + try { common.unlinkSync(sleepFile); } catch(e) {} + + // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html + if (code === 1 || code === 2 || code >= 126) { + common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes + } + // True if successful, false if not + var obj = { + code: code, + output: stdout + }; + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, callback) { + var output = ''; + + var options = common.extend({ + silent: common.config.silent + }, opts); + + var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { + if (callback) + callback(err ? err.code : 0, output); + }); + + c.stdout.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + c.stderr.on('data', function(data) { + output += data; + if (!options.silent) + process.stdout.write(data); + }); + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ Available options (all `false` by default): +//@ +//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. +//@ + `silent`: Do not echo program output to console. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).output; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, output) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', output); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. +//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's +//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and +//@ the `callback` gets the arguments `(code, output)`. +//@ +//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as +//@ the current synchronous implementation uses a lot of CPU. This should be getting +//@ fixed soon. +function _exec(command, options, callback) { + if (!command) + common.error('must specify command'); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false + }, options); + + if (options.async) + return execAsync(command, options, callback); + else + return execSync(command, options); +} +module.exports = _exec; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/find.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/find.js new file mode 100755 index 0000000..d9eeec2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/find.js @@ -0,0 +1,51 @@ +var fs = require('fs'); +var common = require('./common'); +var _ls = require('./ls'); + +//@ +//@ ### find(path [,path ...]) +//@ ### find(path_array) +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. +function _find(options, paths) { + if (!paths) + common.error('no path specified'); + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + function pushFile(file) { + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + list.push(file); + } + + // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory + + paths.forEach(function(file) { + pushFile(file); + + if (fs.statSync(file).isDirectory()) { + _ls('-RA', file+'/*').forEach(function(subfile) { + pushFile(subfile); + }); + } + }); + + return list; +} +module.exports = _find; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/grep.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/grep.js new file mode 100755 index 0000000..00c7d6a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/grep.js @@ -0,0 +1,52 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### grep([options ,] regex_filter, file [, file ...]) +//@ ### grep([options ,] regex_filter, file_array) +//@ Available options: +//@ +//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. Wildcard `*` accepted. +function _grep(options, regex, files) { + options = common.parseOptions(options, { + 'v': 'inverse' + }); + + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 2); + // if it's array leave it as it is + + files = common.expand(files); + + var grep = ''; + files.forEach(function(file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, true); + return; + } + + var contents = fs.readFileSync(file, 'utf8'), + lines = contents.split(/\r*\n/); + lines.forEach(function(line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) + grep += line + '\n'; + }); + }); + + return common.ShellString(grep); +} +module.exports = _grep; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/ls.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/ls.js new file mode 100755 index 0000000..3345db4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/ls.js @@ -0,0 +1,126 @@ +var path = require('path'); +var fs = require('fs'); +var common = require('./common'); +var _cd = require('./cd'); +var _pwd = require('./pwd'); + +//@ +//@ ### ls([options ,] path [,path ...]) +//@ ### ls([options ,] path_array) +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ``` +//@ +//@ Returns array of files in the given path, or in current directory if no path provided. +function _ls(options, paths) { + options = common.parseOptions(options, { + 'R': 'recursive', + 'A': 'all', + 'a': 'all_deprecated' + }); + + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) + paths = ['.']; + else if (typeof paths === 'object') + paths = paths; // assume array + else if (typeof paths === 'string') + paths = [].slice.call(arguments, 1); + + var list = []; + + // Conditionally pushes file to list - returns true if pushed, false otherwise + // (e.g. prevents hidden files to be included unless explicitly told so) + function pushFile(file, query) { + // hidden file? + if (path.basename(file)[0] === '.') { + // not explicitly asking for hidden files? + if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) + return false; + } + + if (common.platform === 'win') + file = file.replace(/\\/g, '/'); + + list.push(file); + return true; + } + + paths.forEach(function(p) { + if (fs.existsSync(p)) { + var stats = fs.statSync(p); + // Simple file? + if (stats.isFile()) { + pushFile(p, p); + return; // continue + } + + // Simple dir? + if (stats.isDirectory()) { + // Iterate over p contents + fs.readdirSync(p).forEach(function(file) { + if (!pushFile(file, p)) + return; + + // Recursive? + if (options.recursive) { + var oldDir = _pwd(); + _cd('', p); + if (fs.statSync(file).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); + _cd('', oldDir); + } + }); + return; // continue + } + } + + // p does not exist - possible wildcard present + + var basename = path.basename(p); + var dirname = path.dirname(p); + // Wildcard present on an existing dir? (e.g. '/tmp/*.js') + if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { + // Escape special regular expression chars + var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); + // Translates wildcard into regex + regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; + // Iterate over directory contents + fs.readdirSync(dirname).forEach(function(file) { + if (file.match(new RegExp(regexp))) { + if (!pushFile(path.normalize(dirname+'/'+file), basename)) + return; + + // Recursive? + if (options.recursive) { + var pp = dirname + '/' + file; + if (fs.lstatSync(pp).isDirectory()) + list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); + } // recursive + } // if file matches + }); // forEach + return; + } + + common.error('no such file or directory: ' + p, true); + }); + + return list; +} +module.exports = _ls; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mkdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mkdir.js new file mode 100755 index 0000000..5a7088f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mkdir.js @@ -0,0 +1,68 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Recursively creates 'dir' +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options ,] dir [, dir ...]) +//@ ### mkdir([options ,] dir_array) +//@ Available options: +//@ +//@ + `p`: full path (will create intermediate dirs if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + options = common.parseOptions(options, { + 'p': 'fullpath' + }); + if (!dirs) + common.error('no paths given'); + + if (typeof dirs === 'string') + dirs = [].slice.call(arguments, 1); + // if it's array leave it as it is + + dirs.forEach(function(dir) { + if (fs.existsSync(dir)) { + if (!options.fullpath) + common.error('path already exists: ' + dir, true); + return; // skip dir + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, true); + return; // skip dir + } + + if (options.fullpath) + mkdirSyncRecursive(dir); + else + fs.mkdirSync(dir, parseInt('0777', 8)); + }); +} // mkdir +module.exports = _mkdir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mv.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mv.js new file mode 100755 index 0000000..11f9607 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/mv.js @@ -0,0 +1,80 @@ +var fs = require('fs'); +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### mv(source [, source ...], dest') +//@ ### mv(source_array, dest') +//@ Available options: +//@ +//@ + `f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-f', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves files. The wildcard `*` is accepted. +function _mv(options, sources, dest) { + options = common.parseOptions(options, { + 'f': 'force' + }); + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else if ('length' in sources) { + sources = sources; // no-op for array + } else { + common.error('invalid arguments'); + } + + sources = common.expand(sources); + + var exists = fs.existsSync(dest), + stats = exists && fs.statSync(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) + common.error('dest is not a directory (too many sources)'); + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && !options.force) + common.error('dest file already exists: ' + dest); + + sources.forEach(function(src) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: '+src, true); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) + thisDest = path.normalize(dest + '/' + path.basename(src)); + + if (fs.existsSync(thisDest) && !options.force) { + common.error('dest file already exists: ' + thisDest, true); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: '+src, true); + return; // skip file + } + + fs.renameSync(src, thisDest); + }); // forEach(src) +} // mv +module.exports = _mv; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/popd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/popd.js new file mode 100755 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/popd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pushd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pushd.js new file mode 100755 index 0000000..11ea24f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pushd.js @@ -0,0 +1 @@ +// see dirs.js \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pwd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pwd.js new file mode 100755 index 0000000..41727bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/pwd.js @@ -0,0 +1,11 @@ +var path = require('path'); +var common = require('./common'); + +//@ +//@ ### pwd() +//@ Returns the current directory. +function _pwd(options) { + var pwd = path.resolve(process.cwd()); + return common.ShellString(pwd); +} +module.exports = _pwd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/rm.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/rm.js new file mode 100755 index 0000000..3abe6e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/rm.js @@ -0,0 +1,145 @@ +var common = require('./common'); +var fs = require('fs'); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for(var i = 0; i < files.length; i++) { + var file = dir + "/" + files[i], + currFile = fs.lstatSync(file); + + if(currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } + + else if(currFile.isSymbolicLink()) { // Unlink symlinks + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + else // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + common.error('could not remove file (code '+e.code+'): ' + file, true); + } + } + } + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + result = fs.rmdirSync(dir); + } catch(e) { + common.error('could not remove directory (code '+e.code+'): ' + dir, true); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch(e) { + writePermission = false; + } + + return writePermission; +} + +//@ +//@ ### rm([options ,] file [, file ...]) +//@ ### rm([options ,] file_array) +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. The wildcard `*` is accepted. +function _rm(options, files) { + options = common.parseOptions(options, { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive' + }); + if (!files) + common.error('no paths given'); + + if (typeof files === 'string') + files = [].slice.call(arguments, 1); + // if it's array leave it as it is + + files = common.expand(files); + + files.forEach(function(file) { + if (!fs.existsSync(file)) { + // Path does not exist, no force flag given + if (!options.force) + common.error('no such file or directory: '+file, true); + + return; // skip file + } + + // If here, path exists + + var stats = fs.lstatSync(file); + if (stats.isFile() || stats.isSymbolicLink()) { + + // Do not check for file writing permissions + if (options.force) { + common.unlinkSync(file); + return; + } + + if (isWriteable(file)) + common.unlinkSync(file); + else + common.error('permission denied: '+file, true); + + return; + } // simple file + + // Path is an existing directory, but no -r flag given + if (stats.isDirectory() && !options.recursive) { + common.error('path is a directory', true); + return; // skip path + } + + // Recursively remove existing directory + if (stats.isDirectory() && options.recursive) { + rmdirSyncRecursive(file, options.force); + } + }); // forEach(file) +} // rm +module.exports = _rm; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/sed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/sed.js new file mode 100755 index 0000000..9783252 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/sed.js @@ -0,0 +1,43 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### sed([options ,] search_regex, replace_str, file) +//@ Available options: +//@ +//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input +//@ using the given search regex and replacement string. Returns the new string after replacement. +function _sed(options, regex, replacement, file) { + options = common.parseOptions(options, { + 'i': 'inplace' + }); + + if (typeof replacement === 'string') + replacement = replacement; // no-op + else if (typeof replacement === 'number') + replacement = replacement.toString(); // fallback + else + common.error('invalid replacement string'); + + if (!file) + common.error('no file given'); + + if (!fs.existsSync(file)) + common.error('no such file or directory: ' + file); + + var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); + if (options.inplace) + fs.writeFileSync(file, result, 'utf8'); + + return common.ShellString(result); +} +module.exports = _sed; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/tempdir.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/tempdir.js new file mode 100755 index 0000000..45953c2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/tempdir.js @@ -0,0 +1,56 @@ +var common = require('./common'); +var os = require('os'); +var fs = require('fs'); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) + return false; + + if (!fs.statSync(dir).isDirectory()) + return false; + + var testFile = dir+'/'+common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + return false; + } +} + + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + var state = common.state; + if (state.tempDir) + return state.tempDir; // from cache + + state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ + writeableDir(process.env['TMPDIR']) || + writeableDir(process.env['TEMP']) || + writeableDir(process.env['TMP']) || + writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return state.tempDir; +} +module.exports = _tempDir; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/test.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/test.js new file mode 100755 index 0000000..8a4ac7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/test.js @@ -0,0 +1,85 @@ +var common = require('./common'); +var fs = require('fs'); + +//@ +//@ ### test(expression) +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symboilc link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates expression using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) + common.error('no path given'); + + // hack - only works with unary primaries + options = common.parseOptions(options, { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket' + }); + + var canInterpret = false; + for (var key in options) + if (options[key] === true) { + canInterpret = true; + break; + } + + if (!canInterpret) + common.error('could not interpret expression'); + + if (options.link) { + try { + return fs.lstatSync(path).isSymbolicLink(); + } catch(e) { + return false; + } + } + + if (!fs.existsSync(path)) + return false; + + if (options.exists) + return true; + + var stats = fs.statSync(path); + + if (options.block) + return stats.isBlockDevice(); + + if (options.character) + return stats.isCharacterDevice(); + + if (options.directory) + return stats.isDirectory(); + + if (options.file) + return stats.isFile(); + + if (options.pipe) + return stats.isFIFO(); + + if (options.socket) + return stats.isSocket(); +} // test +module.exports = _test; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/to.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/to.js new file mode 100755 index 0000000..f029999 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/to.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.writeFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not write to file (code '+e.code+'): '+file, true); + } +} +module.exports = _to; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/toEnd.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/toEnd.js new file mode 100755 index 0000000..f6d099d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/toEnd.js @@ -0,0 +1,29 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +//@ +//@ ### 'string'.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as +//@ those returned by `cat`, `grep`, etc). +function _toEnd(options, file) { + if (!file) + common.error('wrong arguments'); + + if (!fs.existsSync( path.dirname(file) )) + common.error('no such file or directory: ' + path.dirname(file)); + + try { + fs.appendFileSync(file, this.toString(), 'utf8'); + } catch(e) { + common.error('could not append to file (code '+e.code+'): '+file, true); + } +} +module.exports = _toEnd; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/which.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/which.js new file mode 100755 index 0000000..fadb96c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/node_modules/shelljs/src/which.js @@ -0,0 +1,79 @@ +var common = require('./common'); +var fs = require('fs'); +var path = require('path'); + +// Cross-platform method for splitting environment PATH variables +function splitPath(p) { + for (i=1;i<2;i++) {} + + if (!p) + return []; + + if (common.platform === 'win') + return p.split(';'); + else + return p.split(':'); +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. +//@ Returns string containing the absolute path to the command. +function _which(options, cmd) { + if (!cmd) + common.error('must specify command'); + + var pathEnv = process.env.path || process.env.Path || process.env.PATH, + pathArray = splitPath(pathEnv), + where = null; + + // No relative/absolute paths provided? + if (cmd.search(/\//) === -1) { + // Search for command in PATH + pathArray.forEach(function(dir) { + if (where) + return; // already found it + + var attempt = path.resolve(dir + '/' + cmd); + if (fs.existsSync(attempt)) { + where = attempt; + return; + } + + if (common.platform === 'win') { + var baseAttempt = attempt; + attempt = baseAttempt + '.exe'; + if (fs.existsSync(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.cmd'; + if (fs.existsSync(attempt)) { + where = attempt; + return; + } + attempt = baseAttempt + '.bat'; + if (fs.existsSync(attempt)) { + where = attempt; + return; + } + } // if 'win' + }); + } + + // Command not found anywhere? + if (!fs.existsSync(cmd) && !where) + return null; + + where = where || path.resolve(cmd); + + return common.ShellString(where); +} +module.exports = _which; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/package.json new file mode 100755 index 0000000..895b76d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + { + "raw": "simctl@^0.1.0", + "scope": null, + "escapedName": "simctl", + "name": "simctl", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim" + ] + ], + "_from": "simctl@>=0.1.0 <0.2.0", + "_id": "simctl@0.1.0", + "_inCache": true, + "_location": "/simctl", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/simctl-0.1.0.tgz_1476944722710_0.7685866917017847" + }, + "_npmUser": { + "name": "shazron", + "email": "shazron@gmail.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "simctl@^0.1.0", + "scope": null, + "escapedName": "simctl", + "name": "simctl", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/ios-sim" + ], + "_resolved": "https://registry.npmjs.org/simctl/-/simctl-0.1.0.tgz", + "_shasum": "ade133b616e277fea5cbc9ba438a80529baa696d", + "_shrinkwrap": null, + "_spec": "simctl@^0.1.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim", + "author": { + "name": "Shazron Abdullah" + }, + "bugs": { + "url": "https://github.com/phonegap/simctl/issues" + }, + "dependencies": { + "shelljs": "^0.2.6", + "tail": "^0.4.0" + }, + "description": "library for Xcode simctl utility on OS X", + "devDependencies": { + "jasmine-node": "^1.14.5", + "jscs": "^2.11.0", + "jshint": "^2.9.1" + }, + "directories": {}, + "dist": { + "shasum": "ade133b616e277fea5cbc9ba438a80529baa696d", + "tarball": "https://registry.npmjs.org/simctl/-/simctl-0.1.0.tgz" + }, + "gitHead": "4d567f52e0db7b8ccdfb5c2716a0eb6a37d776c1", + "homepage": "https://github.com/phonegap/simctl#readme", + "keywords": [ + "simctl", + "iOS Simulator" + ], + "license": "MIT", + "main": "simctl.js", + "maintainers": [ + { + "name": "shazron", + "email": "shazron@gmail.com" + } + ], + "name": "simctl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/phonegap/simctl.git" + }, + "scripts": { + "jasmine": "jasmine-node --captureExceptions --color spec", + "jscs": "jscs lib ./simctl.js", + "jshint": "jshint lib ./simctl.js", + "postjshint": "npm run jscs", + "posttest": "npm run jshint", + "test": "npm run jasmine" + }, + "version": "0.1.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/simctl.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/simctl.js new file mode 100755 index 0000000..346cd7e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/simctl.js @@ -0,0 +1,196 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var shell = require('shelljs'), + path = require('path'), + util = require('util'), + Tail = require('tail').Tail, + SimCtlExtensions = require('./lib/simctl-extensions'), + SimCtlListParser = require('./lib/simctl-list-parser'); + +exports = module.exports = { + + set noxpc(b) { + this._noxpc = b; + }, + + get noxpc() { + return this._noxpc; + }, + + extensions: SimCtlExtensions, + + check_prerequisites: function() { + var command = util.format('xcrun simctl help'); + var obj = shell.exec(command, {silent: true}); + + if (obj.code !== 0) { + obj.output = 'simctl was not found.\n'; + obj.output += 'Check that you have Xcode 7.x installed:\n'; + obj.output += '\txcodebuild --version'; + obj.output += 'Check that you have Xcode 7.x selected:\n'; + obj.output += '\txcode-select --print-path'; + } + + return obj; + }, + + create: function(name, device_type_id, runtime_id) { + var command = util.format('xcrun simctl create "%s" "%s" "%s"', name, device_type_id, runtime_id); + return shell.exec(command); + }, + + del: function(device) { + var command = util.format('xcrun simctl delete "%s"', device); + return shell.exec(command); + }, + + erase: function(device) { + var command = util.format('xcrun simctl erase "%s"', device); + return shell.exec(command); + }, + + boot: function(device) { + var command = util.format('xcrun simctl boot "%s"', device); + return shell.exec(command); + }, + + shutdown: function(device) { + var command = util.format('xcrun simctl shutdown "%s"', device); + return shell.exec(command); + }, + + rename: function(device, name) { + var command = util.format('xcrun simctl rename "%s" "%s"', device, name); + return shell.exec(command); + }, + + getenv: function(device, variable_name) { + var command = util.format('xcrun simctl getenv "%s" "%s"', device, variable_name); + return shell.exec(command); + }, + + openurl: function(device, url) { + var command = util.format('xcrun simctl openurl "%s" "%s"', device, url); + return shell.exec(command); + }, + + addphoto: function(device, path) { + var command = util.format('xcrun simctl addphoto "%s" "%s"', device, path); + return shell.exec(command); + }, + + install: function(device, path) { + var command = util.format('xcrun simctl install "%s" "%s"', device, path); + return shell.exec(command); + }, + + uninstall: function(device, app_identifier) { + var command = util.format('xcrun simctl uninstall "%s" "%s"', device, app_identifier); + return shell.exec(command); + }, + + launch: function(wait_for_debugger, device, app_identifier, argv) { + var wait_flag = ''; + if (wait_for_debugger) { + wait_flag = '--wait-for-debugger'; + } + + var argv_expanded = ''; + if (argv.length > 0) { + argv_expanded = argv.map(function(arg) { + return '\'' + arg + '\''; + }).join(' '); + } + + var command = util.format('xcrun simctl launch %s "%s" "%s" %s', + wait_flag, device, app_identifier, argv_expanded); + return shell.exec(command); + }, + + spawn: function(wait_for_debugger, arch, device, path_to_executable, argv) { + var wait_flag = ''; + if (wait_for_debugger) { + wait_flag = '--wait-for-debugger'; + } + + var arch_flag = ''; + if (arch) { + arch_flag = util.format('--arch="%s"', arch); + } + + var argv_expanded = ''; + if (argv.length > 0) { + argv_expanded = argv.map(function(arg) { + return '\'' + arg + '\''; + }).join(' '); + } + + var command = util.format('xcrun simctl spawn %s %s "%s" "%s" %s', + wait_flag, arch_flag, device, path_to_executable, argv_expanded); + return shell.exec(command); + }, + + list: function(options) { + var sublist = ''; + options = options || {}; + + if (options.devices) { + sublist = 'devices'; + } else if (options.devicetypes) { + sublist = 'devicetypes'; + } else if (options.runtimes) { + sublist = 'runtimes'; + } + + var command = util.format('xcrun simctl list %s', sublist); + var obj = shell.exec(command, { silent: options.silent }); + + if (obj.code === 0) { + try { + var parser = new SimCtlListParser(); + obj.json = parser.parse(obj.output); + } catch (err) { + console.error(err.stack); + } + } + + return obj; + }, + + notify_post: function(device, notification_name) { + var command = util.format('xcrun simctl notify_post "%s" "%s"', device, notification_name); + return shell.exec(command); + }, + + icloud_sync: function(device) { + var command = util.format('xcrun simctl icloud_sync "%s"', device); + return shell.exec(command); + }, + + help: function(subcommand) { + var command = util.format('xcrun simctl help "%s"', subcommand); + return shell.exec(command); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/spec/simctl-list-parser.spec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/spec/simctl-list-parser.spec.js new file mode 100755 index 0000000..c5974f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simctl/spec/simctl-list-parser.spec.js @@ -0,0 +1,357 @@ +/* +The MIT License (MIT) + +Copyright (c) 2014 Shazron Abdullah. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +var SimCtlListParser = require('../lib/simctl-list-parser'); + +describe('list-parser device type tests', function() { + + var parser = new SimCtlListParser(); + var header = '== Device Types =='; + + beforeEach(function() { + parser._clear(); + }); + + afterEach(function() { + }); + + it('test parse iPhones', function() { + var lines = [ + header, + 'iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)', + 'iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)', + 'iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)', + 'iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)', + 'iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)', + 'iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)', + 'iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)', + 'iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)', + 'iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)', + 'iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(10); + expect(result.devices.length).toEqual(0); + expect(result.runtimes.length).toEqual(0); + + expect(result.devicetypes[0].name).toEqual('iPhone 4s'); + expect(result.devicetypes[0].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-4s'); + expect(result.devicetypes[1].name).toEqual('iPhone 5'); + expect(result.devicetypes[1].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-5'); + expect(result.devicetypes[2].name).toEqual('iPhone 5s'); + expect(result.devicetypes[2].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-5s'); + expect(result.devicetypes[3].name).toEqual('iPhone 6'); + expect(result.devicetypes[3].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-6'); + expect(result.devicetypes[4].name).toEqual('iPhone 6 Plus'); + expect(result.devicetypes[4].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus'); + expect(result.devicetypes[5].name).toEqual('iPhone 6s'); + expect(result.devicetypes[5].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-6s'); + expect(result.devicetypes[6].name).toEqual('iPhone 6s Plus'); + expect(result.devicetypes[6].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus'); + expect(result.devicetypes[7].name).toEqual('iPhone 7'); + expect(result.devicetypes[7].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-7'); + expect(result.devicetypes[8].name).toEqual('iPhone 7 Plus'); + expect(result.devicetypes[8].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus'); + expect(result.devicetypes[9].name).toEqual('iPhone SE'); + expect(result.devicetypes[9].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-SE'); + }); + + it('test parse iPads', function() { + var lines = [ + header, + 'iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)', + 'iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)', + 'iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)', + 'iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)', + 'iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)', + 'iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(6); + expect(result.devices.length).toEqual(0); + expect(result.runtimes.length).toEqual(0); + + expect(result.devicetypes[0].name).toEqual('iPad 2'); + expect(result.devicetypes[0].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-2'); + expect(result.devicetypes[1].name).toEqual('iPad Retina'); + expect(result.devicetypes[1].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-Retina'); + expect(result.devicetypes[2].name).toEqual('iPad Air'); + expect(result.devicetypes[2].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-Air'); + expect(result.devicetypes[3].name).toEqual('iPad Air 2'); + expect(result.devicetypes[3].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-Air-2'); + expect(result.devicetypes[4].name).toEqual('iPad Pro (9.7-inch)'); + expect(result.devicetypes[4].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-'); + expect(result.devicetypes[5].name).toEqual('iPad Pro (12.9-inch)'); + expect(result.devicetypes[5].id).toEqual('com.apple.CoreSimulator.SimDeviceType.iPad-Pro'); + }); + + it('test parse Apple Watches', function() { + var lines = [ + header, + 'Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)', + 'Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)', + 'Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)', + 'Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(4); + expect(result.devices.length).toEqual(0); + expect(result.runtimes.length).toEqual(0); + + expect(result.devicetypes[0].name).toEqual('Apple Watch - 38mm'); + expect(result.devicetypes[0].id).toEqual('com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm'); + expect(result.devicetypes[1].name).toEqual('Apple Watch - 42mm'); + expect(result.devicetypes[1].id).toEqual('com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm'); + expect(result.devicetypes[2].name).toEqual('Apple Watch Series 2 - 38mm'); + expect(result.devicetypes[2].id).toEqual('com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm'); + expect(result.devicetypes[3].name).toEqual('Apple Watch Series 2 - 42mm'); + expect(result.devicetypes[3].id).toEqual('com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm'); + }); + + it('test parse Apple TVs', function() { + var lines = [ + header, + 'Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(1); + expect(result.devices.length).toEqual(0); + expect(result.runtimes.length).toEqual(0); + + expect(result.devicetypes[0].name).toEqual('Apple TV 1080p'); + expect(result.devicetypes[0].id).toEqual('com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p'); + }); +}); + +describe('list-parser runtimes test', function() { + + var parser = new SimCtlListParser(); + var header = '== Runtimes =='; + + beforeEach(function() { + parser._clear(); + }); + + afterEach(function() { + }); + + it('test parse runtimes', function() { + var lines = [ + header, + 'iOS 8.4 (8.4 - 12H141) (com.apple.CoreSimulator.SimRuntime.iOS-8-4)', + 'iOS 9.3 (9.3 - 13E233) (com.apple.CoreSimulator.SimRuntime.iOS-9-3)', + 'iOS 10.0 (10.0 - 14A345) (com.apple.CoreSimulator.SimRuntime.iOS-10-0)', + 'tvOS 10.0 (10.0 - 14A345) (com.apple.CoreSimulator.SimRuntime.tvOS-10-0)', + 'watchOS 3.0 (10.0 - 14A345) (com.apple.CoreSimulator.SimRuntime.watchOS-3-0)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(0); + expect(result.devices.length).toEqual(0); + expect(result.runtimes.length).toEqual(5); + + expect(result.runtimes[0].name).toEqual('iOS 8.4'); + expect(result.runtimes[0].build).toEqual('8.4 - 12H141'); + expect(result.runtimes[0].id).toEqual('com.apple.CoreSimulator.SimRuntime.iOS-8-4'); + expect(result.runtimes[0].available).toEqual(true); + expect(result.runtimes[1].name).toEqual('iOS 9.3'); + expect(result.runtimes[1].build).toEqual('9.3 - 13E233'); + expect(result.runtimes[1].id).toEqual('com.apple.CoreSimulator.SimRuntime.iOS-9-3'); + expect(result.runtimes[1].available).toEqual(true); + expect(result.runtimes[2].name).toEqual('iOS 10.0'); + expect(result.runtimes[2].build).toEqual('10.0 - 14A345'); + expect(result.runtimes[2].id).toEqual('com.apple.CoreSimulator.SimRuntime.iOS-10-0'); + expect(result.runtimes[2].available).toEqual(true); + expect(result.runtimes[3].name).toEqual('tvOS 10.0'); + expect(result.runtimes[3].build).toEqual('10.0 - 14A345'); + expect(result.runtimes[3].id).toEqual('com.apple.CoreSimulator.SimRuntime.tvOS-10-0'); + expect(result.runtimes[3].available).toEqual(true); + expect(result.runtimes[4].name).toEqual('watchOS 3.0'); + expect(result.runtimes[4].build).toEqual('10.0 - 14A345'); + expect(result.runtimes[4].id).toEqual('com.apple.CoreSimulator.SimRuntime.watchOS-3-0'); + expect(result.runtimes[4].available).toEqual(true); + }); +}); + +describe('list-parser test Devices', function() { + + var parser = new SimCtlListParser(); + var header = '== Devices =='; + + beforeEach(function() { + parser._clear(); + }); + + afterEach(function() { + }); + + it('test parse iPhone and iPad', function() { + var lines = [ + header, + '-- iOS 8.4 --', + ' Resizable iPad (E7348A97-6719-476F-B5A9-0C7F32336F0B) (Shutdown) (unavailable, device type profile not found)', + ' Resizable iPhone (6B3D08F5-6010-4934-8259-81F0F5F86E20) (Shutdown) (unavailable, device type profile not found)', + '-- iOS 9.3 --', + ' iPad Air 2 (9E3E156C-A96F-4D61-A2BB-D72F0BE2E7BB) (Shutdown)', + ' iPad Pro (5B0E98E8-517D-49A7-860A-B7F820DA9C23) (Shutdown)', + '-- iOS 10.0 --', + ' iPhone 6s (8C41DBA3-0F78-43FF-AE92-845D35DDD39D) (Shutdown)', + ' iPhone 6s Plus (1B4E1A98-2408-404A-BEFC-F723A6889A63) (Shutdown)', + ' iPhone 7 (87894360-0337-459E-816E-AE5EFD0A4570) (Shutdown)', + ' iPhone 7 Plus (8D85405B-96CA-4268-87D1-CE594567F5EF) (Shutdown)', + ' iPhone SE (175D9F25-0B08-4E4B-AD39-E3CBAC72CB4B) (Shutdown)', + ' iPad Pro (9.7 inch) (1C5590C8-8AE7-4C27-AD06-84C801702945) (Shutdown)', + ' iPad Pro (12.9 inch) (065BAEBF-1D7D-4B3B-B30D-79529356065B) (Shutdown)', + '-- tvOS 10.0 --', + ' Apple TV 1080p (1A360376-E68E-45C2-8DBB-48BF7C60B4FB) (Shutdown)', + '-- watchOS 3.0 --', + ' Apple Watch - 38mm (349DD23B-689C-43E4-A1F5-304C3E4DCFDD) (Shutdown)', + ' Apple Watch - 42mm (B932A73B-477F-47A7-AB29-1E98D3F9095C) (Shutdown)', + ' Apple Watch Series 2 - 38mm (B4BB8453-349F-4CBF-A5A9-87BE602DB13E) (Shutdown)', + ' Apple Watch Series 2 - 42mm (0C527828-EBF4-4FD0-A66B-200FE716EB37) (Shutdown)', + '-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-1 --', + ' iPhone 4s (A27C69F5-1AFF-48D2-92B0-951F7E037E9C) (Shutdown) (unavailable, runtime profile not found)' + ]; + + var result = parser.parse(lines.join('\n')); + expect(result.devicetypes.length).toEqual(0); + expect(result.devices.length).toEqual(6); + expect(result.runtimes.length).toEqual(0); + + var device = result.devices[0]; + expect(device.runtime).toEqual('iOS 8.4'); + expect(device.devices[0].name).toEqual('Resizable iPad'); + expect(device.devices[0].id).toEqual('E7348A97-6719-476F-B5A9-0C7F32336F0B'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(false); + expect(device.devices[1].name).toEqual('Resizable iPhone'); + expect(device.devices[1].id).toEqual('6B3D08F5-6010-4934-8259-81F0F5F86E20'); + expect(device.devices[1].state).toEqual('Shutdown'); + expect(device.devices[1].available).toEqual(false); + + device = result.devices[1]; + expect(device.runtime).toEqual('iOS 9.3'); + expect(device.devices[0].name).toEqual('iPad Air 2'); + expect(device.devices[0].id).toEqual('9E3E156C-A96F-4D61-A2BB-D72F0BE2E7BB'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(true); + expect(device.devices[1].name).toEqual('iPad Pro'); + expect(device.devices[1].id).toEqual('5B0E98E8-517D-49A7-860A-B7F820DA9C23'); + expect(device.devices[1].state).toEqual('Shutdown'); + expect(device.devices[1].available).toEqual(true); + + device = result.devices[2]; + expect(device.runtime).toEqual('iOS 10.0'); + expect(device.devices[0].name).toEqual('iPhone 6s'); + expect(device.devices[0].id).toEqual('8C41DBA3-0F78-43FF-AE92-845D35DDD39D'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(true); + expect(device.devices[1].name).toEqual('iPhone 6s Plus'); + expect(device.devices[1].id).toEqual('1B4E1A98-2408-404A-BEFC-F723A6889A63'); + expect(device.devices[1].state).toEqual('Shutdown'); + expect(device.devices[1].available).toEqual(true); + expect(device.devices[2].name).toEqual('iPhone 7'); + expect(device.devices[2].id).toEqual('87894360-0337-459E-816E-AE5EFD0A4570'); + expect(device.devices[2].state).toEqual('Shutdown'); + expect(device.devices[2].available).toEqual(true); + expect(device.devices[3].name).toEqual('iPhone 7 Plus'); + expect(device.devices[3].id).toEqual('8D85405B-96CA-4268-87D1-CE594567F5EF'); + expect(device.devices[3].state).toEqual('Shutdown'); + expect(device.devices[3].available).toEqual(true); + expect(device.devices[4].name).toEqual('iPhone SE'); + expect(device.devices[4].id).toEqual('175D9F25-0B08-4E4B-AD39-E3CBAC72CB4B'); + expect(device.devices[4].state).toEqual('Shutdown'); + expect(device.devices[4].available).toEqual(true); + expect(device.devices[5].name).toEqual('iPad Pro (9.7 inch)'); + expect(device.devices[5].id).toEqual('1C5590C8-8AE7-4C27-AD06-84C801702945'); + expect(device.devices[5].state).toEqual('Shutdown'); + expect(device.devices[5].available).toEqual(true); + expect(device.devices[6].name).toEqual('iPad Pro (12.9 inch)'); + expect(device.devices[6].id).toEqual('065BAEBF-1D7D-4B3B-B30D-79529356065B'); + expect(device.devices[6].state).toEqual('Shutdown'); + expect(device.devices[6].available).toEqual(true); + + // tvOS ////////// + + device = result.devices[3]; + expect(device.runtime).toEqual('tvOS 10.0'); + expect(device.devices[0].name).toEqual('Apple TV 1080p'); + expect(device.devices[0].id).toEqual('1A360376-E68E-45C2-8DBB-48BF7C60B4FB'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(true); + + // watchOS ////////// + + device = result.devices[4]; + expect(device.runtime).toEqual('watchOS 3.0'); + expect(device.devices[0].name).toEqual('Apple Watch - 38mm'); + expect(device.devices[0].id).toEqual('349DD23B-689C-43E4-A1F5-304C3E4DCFDD'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(true); + expect(device.devices[1].name).toEqual('Apple Watch - 42mm'); + expect(device.devices[1].id).toEqual('B932A73B-477F-47A7-AB29-1E98D3F9095C'); + expect(device.devices[1].state).toEqual('Shutdown'); + expect(device.devices[1].available).toEqual(true); + expect(device.devices[2].name).toEqual('Apple Watch Series 2 - 38mm'); + expect(device.devices[2].id).toEqual('B4BB8453-349F-4CBF-A5A9-87BE602DB13E'); + expect(device.devices[2].state).toEqual('Shutdown'); + expect(device.devices[2].available).toEqual(true); + expect(device.devices[3].name).toEqual('Apple Watch Series 2 - 42mm'); + expect(device.devices[3].id).toEqual('0C527828-EBF4-4FD0-A66B-200FE716EB37'); + expect(device.devices[3].state).toEqual('Shutdown'); + expect(device.devices[3].available).toEqual(true); + + // Unavailable ////////// + + device = result.devices[5]; + expect(device.runtime).toEqual('Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-1'); + expect(device.devices[0].name).toEqual('iPhone 4s'); + expect(device.devices[0].id).toEqual('A27C69F5-1AFF-48D2-92B0-951F7E037E9C'); + expect(device.devices[0].state).toEqual('Shutdown'); + expect(device.devices[0].available).toEqual(false); + }); +}); + +describe('list-parser test Device Pairs', function() { + + var parser = new SimCtlListParser(); + var header = '== Device Pairs =='; + + beforeEach(function() { + parser._clear(); + }); + + afterEach(function() { + }); + + it('test parse', function() { + // TODO: see https://github.com/phonegap/simctl/issues/3 + expect(true).toBe(true); + }); + +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/.npmignore new file mode 100755 index 0000000..f356293 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/.npmignore @@ -0,0 +1,14 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/LICENSE new file mode 100755 index 0000000..07c9772 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Joe Wollard + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/README.md new file mode 100755 index 0000000..0f11a95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/README.md @@ -0,0 +1,63 @@ +node-simple-plist +================= + +A simple API for interacting with binary and plain text plist data. + + +## Installation +```sh +$ npm install simple-plist +``` + + +## Reading Data +```js +var plist = require('simple-plist'); + +// Read data from a file (xml or binary) (asynchronous) +plist.readFile('/path/to/some.plist', function(err,data){ + if (err) {throw err;} + console.log( JSON.stringify(data) ); +}); + +// Read data from a file (xml or binary) (synchronous) +var data = plist.readFileSync('/path/to/some.plist'); +console.log( JSON.stringify(data) ); +``` + + +## Writing Data +```js +var plist = require('simple-plist'), + data = plist.readFileSync('/path/to/some.plist'); + +// Write data to a xml file (asynchronous) +plist.writeFile('/path/to/plaintext.plist', data, function(err){ + if (err) { throw err; } +}); + +// Write data to a xml file (synchronous) +plist.writeFileSync('/path/to/plaintext.plist', data); + +// Write data to a binary plist file (asynchronous) +plist.writeBinaryFile('/path/to/binary.plist', data, function(err){ + if (err) { throw err; } +}); + +// Write data to a binary plist file (synchronous) +plist.writeBinaryFileSync('/path/to/binary.plist', data); +``` + + +## Mutating Plists In Memory +```js +var plist = require('simple-plist'); + +// Convert a Javascript object to a plist xml string +var xml = plist.stringify( {name: "Joe", answer:42} ); +console.log(xml); // output is a valid plist xml string + +// Convert a plist xml string or a binary plist buffer to a Javascript object +var data = plist.parse("nameJoe"); +console.log( JSON.stringify(data) ); +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/.npmignore new file mode 100755 index 0000000..a9b46ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/README.md new file mode 100755 index 0000000..37e5e1c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/bplistParser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/bplistParser.js new file mode 100755 index 0000000..e818454 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,332 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java + +var fs = require('fs'); +var debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +var EPOCH = 978307200000; + +var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { + function tryParseBuffer(buffer) { + var err = null; + var result; + try { + result = parseBuffer(buffer); + } catch (ex) { + err = ex; + } + callback(err, result); + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } else { + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { return callback(err); } + tryParseBuffer(data); + }); + } +}; + +var parseBuffer = exports.parseBuffer = function (buffer) { + var result = {}; + + // check header + var header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + var trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + var offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + var objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + var numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + var topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + var offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + var offsetTable = []; + + for (var i = 0; i < numObjects; i++) { + var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + var offset = offsetTable[tableOffset]; + var type = buffer[offset]; + var objType = (type & 0xF0) >> 4; //First 4 bits + var objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function parseInteger() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseUID() { + var length = objInfo + 1; + if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseReal() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + var realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + else if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + var dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + var dataoffset = 1; + var length = objInfo; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + var enc = "utf8"; + var length = objInfo; + var stroffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + var stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + var plistString = buffer.slice(offset + stroffset, offset + stroffset + length); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseArray() { + var length = objInfo; + var arrayoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + var array = []; + for (var i = 0; i < length; i++) { + var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + var length = objInfo; + var dictoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + var dict = {}; + for (var i = 0; i < length; i++) { + var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + var key = parseObject(keyRef); + var val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + var l = 0; + for (var i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + var data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + var len = buffer.length; + for (var i = 0; i < len; i += 2) { + var a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/package.json new file mode 100755 index 0000000..29299da --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "bplist-parser@0.0.6", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "0.0.6", + "spec": "0.0.6", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simple-plist" + ] + ], + "_from": "bplist-parser@0.0.6", + "_id": "bplist-parser@0.0.6", + "_inCache": true, + "_location": "/simple-plist/bplist-parser", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "1.4.14", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-parser@0.0.6", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "0.0.6", + "spec": "0.0.6", + "type": "version" + }, + "_requiredBy": [ + "/simple-plist" + ], + "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "_shasum": "38da3471817df9d44ab3892e27707bbbd75a11b9", + "_shrinkwrap": null, + "_spec": "bplist-parser@0.0.6", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simple-plist", + "author": { + "name": "Joe Ferner", + "email": "joe.ferner@nearinfinity.com" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-parser/issues" + }, + "dependencies": {}, + "description": "Binary plist parser.", + "devDependencies": { + "nodeunit": "~0.7.4" + }, + "directories": {}, + "dist": { + "shasum": "38da3471817df9d44ab3892e27707bbbd75a11b9", + "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz" + }, + "gitHead": "a2230a5df3c7014ffbe5761bcb091ea2d061b47b", + "homepage": "https://github.com/nearinfinity/node-bplist-parser", + "keywords": [ + "bplist", + "plist", + "parser" + ], + "license": "MIT", + "main": "bplistParser.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.0.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/airplay.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/airplay.bplist new file mode 100755 index 0000000..931adea Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/airplay.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/iTunes-small.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/iTunes-small.bplist new file mode 100755 index 0000000..b7edb14 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/iTunes-small.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/parseTest.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/parseTest.js new file mode 100755 index 0000000..dcb6dd0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/parseTest.js @@ -0,0 +1,120 @@ +'use strict'; + +// tests are adapted from https://github.com/TooTallNate/node-plist + +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplist = require('../'); + +module.exports = { + 'iTunes Small': function (test) { + var file = path.join(__dirname, "iTunes-small.bplist"); + var startTime1 = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); + var dict = dicts[0]; + test.equal(dict['Application Version'], "9.0.3"); + test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); + test.done(); + }); + }, + + 'sample1': function (test) { + var file = path.join(__dirname, "sample1.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); + test.done(); + }); + }, + + 'sample2': function (test) { + var file = path.join(__dirname, "sample2.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); + test.done(); + }); + }, + + 'airplay': function (test) { + var file = path.join(__dirname, "airplay.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['duration'], 5555.0495000000001); + test.equal(dict['position'], 4.6269989039999997); + test.done(); + }); + }, + + 'utf16': function (test) { + var file = path.join(__dirname, "utf16.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], 'sellStuff'); + test.equal(dict['CFBundleShortVersionString'], '2.6.1'); + test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); + test.done(); + }); + }, + + 'uid': function (test) { + var file = path.join(__dirname, "uid.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.deepEqual(dict['$objects'][1]['NS.keys'], [2, 3, 4]); + test.deepEqual(dict['$objects'][1]['NS.objects'], [5, 6, 7]); + test.equal(dict['$top']['root'], 1); + test.done(); + }); + } +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample1.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample1.bplist new file mode 100755 index 0000000..5b808ff Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample1.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample2.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample2.bplist new file mode 100755 index 0000000..fc42979 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/sample2.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/uid.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/uid.bplist new file mode 100755 index 0000000..59f341e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/uid.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/utf16.bplist b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/utf16.bplist new file mode 100755 index 0000000..ba4bcfa Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/node_modules/bplist-parser/test/utf16.bplist differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/package.json new file mode 100755 index 0000000..2d5e8bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "simple-plist@0.1.4", + "scope": null, + "escapedName": "simple-plist", + "name": "simple-plist", + "rawSpec": "0.1.4", + "spec": "0.1.4", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/xcode" + ] + ], + "_from": "simple-plist@0.1.4", + "_id": "simple-plist@0.1.4", + "_inCache": true, + "_location": "/simple-plist", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/simple-plist-0.1.4.tgz_1462930930371_0.9155550985597074" + }, + "_npmUser": { + "name": "wollardj", + "email": "joe.wollard@gmail.com" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "raw": "simple-plist@0.1.4", + "scope": null, + "escapedName": "simple-plist", + "name": "simple-plist", + "rawSpec": "0.1.4", + "spec": "0.1.4", + "type": "version" + }, + "_requiredBy": [ + "/xcode" + ], + "_resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-0.1.4.tgz", + "_shasum": "10eb51b47e33c556eb8ec46d5ee64d64e717db5d", + "_shrinkwrap": null, + "_spec": "simple-plist@0.1.4", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/xcode", + "author": { + "name": "Joe Wollard" + }, + "bugs": { + "url": "https://github.com/wollardj/node-simple-plist/issues" + }, + "dependencies": { + "bplist-creator": "0.0.4", + "bplist-parser": "0.0.6", + "plist": "1.2.0" + }, + "description": "A wrapper utility for interacting with plist data.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "10eb51b47e33c556eb8ec46d5ee64d64e717db5d", + "tarball": "https://registry.npmjs.org/simple-plist/-/simple-plist-0.1.4.tgz" + }, + "gitHead": "a01406ab0d347b5a1a9a0f59395fe6d464b0f962", + "homepage": "https://github.com/wollardj/node-simple-plist.git", + "keywords": [ + "plist", + "binary", + "bplist", + "xml" + ], + "license": "MIT", + "main": "simple-plist.js", + "maintainers": [ + { + "name": "wollardj", + "email": "wollardj@denison.edu" + }, + { + "name": "appcelerator", + "email": "npmjs@appcelerator.com" + } + ], + "name": "simple-plist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/wollardj/node-simple-plist.git" + }, + "scripts": {}, + "version": "0.1.4" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/simple-plist.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/simple-plist.js new file mode 100755 index 0000000..850b3e8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/simple-plist/simple-plist.js @@ -0,0 +1,102 @@ +var bplistParser = require('bplist-parser'), + bplistCreator = require('bplist-creator'), + plist = require('plist'), + fs = require('fs'); + +// reveal the underlying modules +exports.plist = plist; +exports.bplistCreator = bplistCreator; +exports.bplistParser = bplistParser; + + +// Parses the given file and returns its contents as a native JavaScript +// object. +exports.readFileSync = function(aFile) { + var contents = fs.readFileSync(aFile); + + if (contents.length === 0) { + console.error("Unable to read file '%s'", aFile); + return {}; + } + return exports.parse(contents, aFile); +}; + +exports.readFile = function(aFile, callback) { + var results; + + fs.readFile(aFile, function(err, contents){ + if (err) { + callback(err); + } + else { + try { + results = exports.parse(contents, aFile); + callback(null,results); + } + catch(err) { + callback(err); + } + } + }); +} + +exports.writeFileSync = function(aFile, anObject, options) { + var data = plist.build(anObject); + fs.writeFileSync(aFile, data, options); +}; + +exports.writeFile = function(aFile, anObject, options, callback) { + if (arguments.length === 3 && typeof options === 'function') { + callback = options; + options = undefined; + } + var data = plist.build(anObject); + fs.writeFile(aFile, data, options, callback); +}; + +exports.writeBinaryFileSync = function(aFile, anObject, options) { + var data = bplistCreator(anObject); + fs.writeFileSync(aFile, data, options); +}; + +exports.writeBinaryFile = function(aFile, anObject, options, callback) { + if (arguments.length === 3 && typeof options === 'function') { + callback = options; + options = undefined; + } + + var data = bplistCreator(anObject); + fs.writeFile(aFile, data, options, callback); +}; + +exports.stringify = function(anObject) { + return plist.build(anObject); +}; + + + +exports.parse = function(aStringOrBuffer, aFile) { + var results, + firstByte = aStringOrBuffer[0]; + try { + if (firstByte === 60 || firstByte === '<') { + results = plist.parse(aStringOrBuffer.toString()); + } + else if (firstByte === 98) { + results = bplistParser.parseBuffer(aStringOrBuffer)[0]; + } + else { + if (aFile != undefined) { + console.error("Unable to determine format for '%s'", aFile); + } + else { + console.error("Unable to determine format for plist aStringOrBuffer: '%s'", aStringOrBuffer); + } + results = {}; + } + } + catch(e) { + throw Error("'%s' has errors", aFile); + } + return results; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/.mailmap b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/.mailmap new file mode 100755 index 0000000..e69de29 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/.travis.yml new file mode 100755 index 0000000..139d702 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +node_js: + - 0.10 + - 0.8 + - 0.6 + +deploy: + provider: npm + email: me@samcday.com.au + api_key: + secure: N1pXQfcwpMcOexiCDBRXYfQ3WbJP+9RNZZbayb1iNFuhEm50/HxJLdUcV8UInxKkUuS5lSIsWX1KbPKEEtbo6IR5wLTpVUzfYblVmYQI6yoI1XjhcBdYVdlS1uKZUD5ACEfV3Ut112G70XcWks3Drf7/zAuAdvlR3A1mT4E96jQ= + on: + tags: true + all_branches: true + node_js: 0.10 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/README.md new file mode 100755 index 0000000..3359b37 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/README.md @@ -0,0 +1,116 @@ +# Node Stream Buffers `v0.2.5` + +[![Build Status](https://travis-ci.org/samcday/node-stream-buffer.png)](https://travis-ci.org/samcday/node-stream-buffer) + +... For lack of a cooler (or less confusing) name. + +Simple Readable and Writable Streams that use a Buffer to store received data, or for data to send out. Pretty much to be used for automated test-cases or debugging. + +## Installation + +It's on NPM. + + npm install stream-buffers + +## Usage + +To use the stream buffers in your module, simply import it and away you go. + + var streamBuffers = require("stream-buffers"); + +### Writable StreamBuffer + +Writable Stream Buffers implement the standardized writable stream interface. All write()'s to this object will accumulate in an internal Buffer. If the Buffer overflows it will be resized larger automatically. The initial size of the Buffer and the amount in which it grows can be configured in the constructor. + + var myWritableStreamBuffer = new streamBuffers.WritableStreamBuffer({ + initialSize: (100 * 1024), // start as 100 kilobytes. + incrementAmount: (10 * 1024) // grow by 10 kilobytes each time buffer overflows. + }); + +The default initial size and increment amount are stored in the following constants: + + streamBuffers.DEFAULT_INITIAL_SIZE // (8 * 1024) + streamBuffers.DEFAULT_INCREMENT_AMOUNT // (8 * 1024) + +Writing is standard Stream stuff: + + myWritableStreamBuffer.write(myBuffer); + // - or - + myWritableStreamBuffer.write("\u00bd + \u00bc = \u00be", "utf8"); + +You can query the size of the data being held in the Buffer, and also how big the Buffer's max capacity currently is: + + myWritableStreamBuffer.write("ASDF"); + streamBuffers.size(); // 4. + streamBuffers.maxSize(); // Whatever was configured as initial size. In our example: (100 * 1024). + +Retrieving the contents of the Buffer is simple: + + myWritableStreamBuffer.getContents(); // Gets all held data as a Buffer. + myWritableStreamBuffer.getContentsAsString("utf8"); // Gets all held data as a utf8 string. + myWritableStreamBuffer.getContents(5); // Gets first 5 bytes as a Buffer. + myWritableStreamBuffer.getContentsAsString("utf8", 5); // Gets first 5 bytes as a utf8 string. + +Care should be taken when getting encoded strings from WritableStream, as it doesn't really care about the contents (multi-byte characters will not be respected). + +Destroying or ending the WritableStream will not delete the contents of Buffer, but will disallow any further writes: + + myWritableStreamBuffer.write("ASDF"); + myWritableStreamBuffer.destroy(); + + myWritableStreamBuffer.getContents(); // Returns ASDF in Buffer. + myWritableStreamBuffer.write("Yeah?"); // No effect. + + +### Readable StreamBuffer + +Readable Stream Buffers can have data inserted in them, which will then be pumped out via standard readable stream data events. The data to be sent out is held in a Buffer, which can grow in much the same way as a WritableStream Buffer does, if data is being put in Buffer faster than it's being pumped out. + +The frequency in which chunks are pumped out, and the size of the chunks themselves can be configured in the constructor. The initial size and increment amount of internal Buffer can be configured too. + + var myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({ + frequency: 10 // in milliseconds. + chunkSize: 2048 // in bytes. + }); + +Default frequency and chunk size: + + streamBuffers.DEFAULT_CHUNK_SIZE // (1024) + streamBuffers.DEFAULT_FREQUENCY // (1) + +Putting data in Buffer to be pumped out is easy: + + myReadableStreamBuffer.put(aBuffer); + myReadableStreamBuffer.put("A String", "utf8"); + +Chunks are pumped out via standard readable stream spec: + + myReadableStreamBuffer.on("data", function(data) { + // Yup. + assert.isTrue(data instanceof Buffer); + }); + +Chunks are pumped out by the interval that you specified in frequency. Setting the frequency to 0 will immediately stream the data (also in chunks). This is useful for unit testing. + +setEncoding() for streams is respected too: + + myReadableStreamBuffer.setEncoding("utf8"); + myReadableStreamBuffer.on("data", function(data) { + assert.isTrue(data instanceof String); + }); + +Pause and resume are also implemented. pause()'ing stream will allow buffer to continue accumulating, but will not pump any of that data out until it is resume()'d again. + +Destroying the stream will immediately purge the buffer, unless destroySoon() is called, in which case the rest of the buffer will be written out. Either way, any further attempts to put data in the Buffer will be silently ignored. + + myReadableStreamBuffer.destroySoon(); + myReadableStreamBuffer.put("A String!"); + myReadableStreamBuffer.size(); // will be 0. + +## Disclaimer + +Not supposed to be a speed demon, it's more for tests/debugging or weird edge cases. It works with an internal buffer that it copies contents to/from/around. + +## License + +node-stream-buffer is free and unencumbered public domain software. For more information, see the accompanying UNLICENSE file. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/UNLICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/UNLICENSE new file mode 100755 index 0000000..00d2e13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/constants.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/constants.js new file mode 100755 index 0000000..966d7fd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/constants.js @@ -0,0 +1,6 @@ +module.exports = { + DEFAULT_INITIAL_SIZE: (8 * 1024), + DEFAULT_INCREMENT_AMOUNT: (8 * 1024), + DEFAULT_FREQUENCY: 1, + DEFAULT_CHUNK_SIZE: 1024 +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/readable_streambuffer.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/readable_streambuffer.js new file mode 100755 index 0000000..eaa4178 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/readable_streambuffer.js @@ -0,0 +1,116 @@ +var stream = require("stream"), + constants = require("./constants"), + util = require("util"); + +var ReadableStreamBuffer = module.exports = function(opts) { + var that = this; + + stream.Stream.call(this); + + opts = opts || {}; + var frequency = opts.hasOwnProperty("frequency") ? opts.frequency : constants.DEFAULT_FREQUENCY; + var chunkSize = opts.chunkSize || constants.DEFAULT_CHUNK_SIZE; + var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; + var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; + + var size = 0; + var buffer = new Buffer(initialSize); + var encoding = null; + + this.readable = true; + this.writable = false; + + var sendData = function() { + if(!size) { + that.emit("end"); + return; + } + + var amount = Math.min(chunkSize, size); + var chunk = null; + if(encoding) { + chunk = buffer.toString(encoding, 0, amount); + } + else { + chunk = new Buffer(amount); + buffer.copy(chunk, 0, 0, amount); + } + + that.emit("data", chunk); + + if(amount < buffer.length) + buffer.copy(buffer, 0, amount, size); + size -= amount; + }; + + this.size = function() { + return size; + }; + + this.maxSize = function() { + return buffer.length; + }; + + var increaseBufferIfNecessary = function(incomingDataSize) { + if((buffer.length - size) < incomingDataSize) { + var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); + + var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); + buffer.copy(newBuffer, 0, 0, size); + buffer = newBuffer; + } + }; + + this.put = function(data, encoding) { + if(!that.readable) return; + + if(Buffer.isBuffer(data)) { + increaseBufferIfNecessary(data.length); + data.copy(buffer, size, 0); + size += data.length; + } + else { + data = data + ""; + var dataSizeInBytes = Buffer.byteLength(data); + increaseBufferIfNecessary(dataSizeInBytes); + buffer.write(data, size, encoding || "utf8"); + size += dataSizeInBytes; + } + + if (!this.isPaused && !frequency) { + while (size > 0) { + sendData(); + } + } + }; + + this.pause = function() { + this.isPaused = true; + if(sendData && sendData.interval) { + clearInterval(sendData.interval); + delete sendData.interval; + } + }; + + this.resume = function() { + this.isPaused = false; + if(sendData && !sendData.interval && frequency > 0) { + sendData.interval = setInterval(sendData, frequency); + } + }; + + this.destroy = function() { + that.emit("end"); + if(sendData.interval) clearTimeout(sendData.interval); + sendData = null; + that.readable = false; + that.emit("close"); + }; + + this.setEncoding = function(_encoding) { + encoding = _encoding; + }; + + this.resume(); +}; +util.inherits(ReadableStreamBuffer, stream.Stream); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/streambuffer.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/streambuffer.js new file mode 100755 index 0000000..4864480 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/streambuffer.js @@ -0,0 +1,3 @@ +module.exports = require("./constants"); +module.exports.ReadableStreamBuffer = require("./readable_streambuffer"); +module.exports.WritableStreamBuffer = require("./writable_streambuffer"); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/writable_streambuffer.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/writable_streambuffer.js new file mode 100755 index 0000000..5a998cc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/lib/writable_streambuffer.js @@ -0,0 +1,94 @@ +var util = require("util"), + stream = require("stream"), + constants = require("./constants"); + +// TODO: clear up specs on returning false from a write and emitting a drain event. +// Does this mean if I return false from a write, I should ignore any write requests between that false return and the drain event? +var WritableStreamBuffer = module.exports = function(opts) { + var that = this; + + stream.Stream.call(this); + + opts = opts || {}; + var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; + var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; + + var buffer = new Buffer(initialSize); + var size = 0; + + this.writable = true; + this.readable = false; + + this.size = function() { + return size; + }; + + this.maxSize = function() { + return buffer.length; + }; + + this.getContents = function(length) { + if(!size) return false; + + var data = new Buffer(Math.min(length || size, size)); + buffer.copy(data, 0, 0, data.length); + + if(data.length < size) + buffer.copy(buffer, 0, data.length); + + size -= data.length; + + return data; + }; + + this.getContentsAsString = function(encoding, length) { + if(!size) return false; + + var data = buffer.toString(encoding || "utf8", 0, Math.min(length || size, size)); + var dataLength = Buffer.byteLength(data); + + if(dataLength < size) + buffer.copy(buffer, 0, dataLength); + + size -= dataLength; + return data; + }; + + var increaseBufferIfNecessary = function(incomingDataSize) { + if((buffer.length - size) < incomingDataSize) { + var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); + + var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); + buffer.copy(newBuffer, 0, 0, size); + buffer = newBuffer; + } + }; + + this.write = function(data, encoding) { + if(!that.writable) return; + + if(Buffer.isBuffer(data)) { + increaseBufferIfNecessary(data.length); + data.copy(buffer, size, 0); + size += data.length; + } + else { + data = data + ""; + increaseBufferIfNecessary(data.length); + buffer.write(data, size, encoding || "utf8"); + size += Buffer.byteLength(data); + } + }; + + this.end = function() { + var args = Array.prototype.slice.apply(arguments); + if(args.length) that.write.apply(that, args); + that.destroy(); + }; + + this.destroySoon = this.destroy = function() { + that.writable = false; + that.emit("close"); + }; +}; +util.inherits(WritableStreamBuffer, stream.Stream); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/package.json new file mode 100755 index 0000000..bf8081c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/stream-buffers/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "stream-buffers@~0.2.3", + "scope": null, + "escapedName": "stream-buffers", + "name": "stream-buffers", + "rawSpec": "~0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/bplist-creator" + ] + ], + "_from": "stream-buffers@>=0.2.3 <0.3.0", + "_id": "stream-buffers@0.2.6", + "_inCache": true, + "_location": "/stream-buffers", + "_npmUser": { + "name": "samcday", + "email": "me@samcday.com.au" + }, + "_npmVersion": "2.0.0-alpha-5", + "_phantomChildren": {}, + "_requested": { + "raw": "stream-buffers@~0.2.3", + "scope": null, + "escapedName": "stream-buffers", + "name": "stream-buffers", + "rawSpec": "~0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/bplist-creator" + ], + "_resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-0.2.6.tgz", + "_shasum": "181c08d5bb3690045f69401b9ae6a7a0cf3313fc", + "_shrinkwrap": null, + "_spec": "stream-buffers@~0.2.3", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/bplist-creator", + "author": { + "name": "Sam Day", + "email": "me@samcday.com.au" + }, + "bugs": { + "url": "https://github.com/samcday/node-stream-buffer/issues" + }, + "dependencies": {}, + "description": "Buffer-backed Streams for reading and writing.", + "devDependencies": { + "vows": ">= 0.5.6" + }, + "directories": {}, + "dist": { + "shasum": "181c08d5bb3690045f69401b9ae6a7a0cf3313fc", + "tarball": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-0.2.6.tgz" + }, + "engines": { + "node": ">= 0.3.0" + }, + "gitHead": "b1dd62eb2e127d48ed7f1e814d5451d2b0dec144", + "homepage": "https://github.com/samcday/node-stream-buffer", + "keywords": [ + "memory streams", + "streams", + "buffer streams" + ], + "main": "./lib/streambuffer.js", + "maintainers": [ + { + "name": "samcday", + "email": "sam.c.day@gmail.com" + } + ], + "name": "stream-buffers", + "optionalDependencies": {}, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samcday/node-stream-buffer.git" + }, + "scripts": { + "test": "vows --spec" + }, + "version": "0.2.6" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/README.md new file mode 100755 index 0000000..eec282c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/README.md @@ -0,0 +1,72 @@ +#tail + +To install: + +```bash +npm install tail +``` + +#Use: +```javascript +Tail = require('tail').Tail; + +tail = new Tail("fileToTail"); + +tail.on("line", function(data) { + console.log(data); +}); + +tail.on("error", function(error) { + console.log('ERROR: ', error); +}); +```` + +Tail constructor accepts few parameters: + +```javascript + +var fileToTail = "/path/to/fileToTail.txt"; +var lineSeparator= "\n"; +var fromBeginning = false; +var watchOptions = {}; \\ as per node fs.watch documentations + +new Tail(fileToTail, lineSeparator, watchOptions,fromBeginning) +``` + +* `fileToTail` is the name (inclusive of the path) of the file to tail +* `lineSeparator` is the line separator token (default "\n") +* `watchOptions` is the full set of options that can be passed to `fs.watch` as per node documentation (default: {}) +* `fromBeginning` force the tail of the file from the very beginning of it instead of from the first new line that will be appended(default: "\n") + +The only mandatory one is the first, i.e. the the file you want to tail. + +Tail emits two type of events: + +* line +``` +function(data){} +``` +* error +``` +function(exception){} +``` + +If you simply want to stop the tail: + +```javascript +tail.unwatch() +``` + +And to start watching again: +```javascript +tail.watch() +``` + +#Want to fork ? + +Tail is written in [CoffeeScript](http://jashkenas.github.com/coffee-script/). + +The Cakefile generates the javascript that is then published to npm. + +#License +MIT. Please see License file for more details. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/package.json new file mode 100755 index 0000000..1d42ca9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "tail@^0.4.0", + "scope": null, + "escapedName": "tail", + "name": "tail", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simctl" + ] + ], + "_from": "tail@>=0.4.0 <0.5.0", + "_id": "tail@0.4.0", + "_inCache": true, + "_location": "/tail", + "_npmUser": { + "name": "lucagrulla", + "email": "luca.grulla@gmail.com" + }, + "_npmVersion": "1.4.15", + "_phantomChildren": {}, + "_requested": { + "raw": "tail@^0.4.0", + "scope": null, + "escapedName": "tail", + "name": "tail", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/simctl" + ], + "_resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "_shasum": "d29de72750cc99db1e053aff13c359ecfb713002", + "_shrinkwrap": null, + "_spec": "tail@^0.4.0", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/simctl", + "author": { + "name": "Luca Grulla" + }, + "bugs": { + "url": "https://github.com/lucagrulla/node-tail/issues" + }, + "contributors": [ + { + "name": "Luca Grulla" + }, + { + "name": "Tom Hall" + }, + { + "name": "Andy Kent" + } + ], + "dependencies": {}, + "description": "tail a file in node", + "devDependencies": { + "coffee-script": "1.7.1" + }, + "directories": {}, + "dist": { + "shasum": "d29de72750cc99db1e053aff13c359ecfb713002", + "tarball": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "homepage": "https://github.com/lucagrulla/node-tail", + "main": "tail", + "maintainers": [ + { + "name": "lucagrulla", + "email": "luca.grulla@gmail.com" + } + ], + "name": "tail", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/lucagrulla/node-tail.git" + }, + "scripts": {}, + "version": "0.4.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/tail.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/tail.js new file mode 100755 index 0000000..061ceab --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/tail/tail.js @@ -0,0 +1,147 @@ +// Generated by CoffeeScript 1.6.2 +var Tail, environment, events, fs, + __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + +events = require("events"); + +fs = require('fs'); + +environment = process.env['NODE_ENV'] || 'development'; + +Tail = (function(_super) { + __extends(Tail, _super); + + Tail.prototype.readBlock = function() { + var block, stream, + _this = this; + + if (this.queue.length >= 1) { + block = this.queue.shift(); + if (block.end > block.start) { + stream = fs.createReadStream(this.filename, { + start: block.start, + end: block.end - 1, + encoding: "utf-8" + }); + stream.on('error', function(error) { + console.log("Tail error:" + error); + return _this.emit('error', error); + }); + stream.on('end', function() { + if (_this.queue.length >= 1) { + return _this.internalDispatcher.emit("next"); + } + }); + return stream.on('data', function(data) { + var chunk, parts, _i, _len, _results; + + _this.buffer += data; + parts = _this.buffer.split(_this.separator); + _this.buffer = parts.pop(); + _results = []; + for (_i = 0, _len = parts.length; _i < _len; _i++) { + chunk = parts[_i]; + _results.push(_this.emit("line", chunk)); + } + return _results; + }); + } + } + }; + + function Tail(filename, separator, fsWatchOptions, frombeginning) { + var stats, + _this = this; + + this.filename = filename; + this.separator = separator != null ? separator : '\n'; + this.fsWatchOptions = fsWatchOptions != null ? fsWatchOptions : {}; + this.frombeginning = frombeginning != null ? frombeginning : false; + this.readBlock = __bind(this.readBlock, this); + this.buffer = ''; + this.internalDispatcher = new events.EventEmitter(); + this.queue = []; + this.isWatching = false; + stats = fs.statSync(this.filename); + this.internalDispatcher.on('next', function() { + return _this.readBlock(); + }); + this.pos = this.frombeginning ? 0 : stats.size; + this.watch(); + } + + Tail.prototype.watch = function() { + var _this = this; + + if (this.isWatching) { + return; + } + this.isWatching = true; + if (fs.watch) { + return this.watcher = fs.watch(this.filename, this.fsWatchOptions, function(e) { + return _this.watchEvent(e); + }); + } else { + return fs.watchFile(this.filename, this.fsWatchOptions, function(curr, prev) { + return _this.watchFileEvent(curr, prev); + }); + } + }; + + Tail.prototype.watchEvent = function(e) { + var stats, + _this = this; + + if (e === 'change') { + stats = fs.statSync(this.filename); + if (stats.size < this.pos) { + this.pos = stats.size; + } + if (stats.size > this.pos) { + this.queue.push({ + start: this.pos, + end: stats.size + }); + this.pos = stats.size; + if (this.queue.length === 1) { + return this.internalDispatcher.emit("next"); + } + } + } else if (e === 'rename') { + this.unwatch(); + return setTimeout((function() { + return _this.watch(); + }), 1000); + } + }; + + Tail.prototype.watchFileEvent = function(curr, prev) { + if (curr.size > prev.size) { + this.queue.push({ + start: prev.size, + end: curr.size + }); + if (this.queue.length === 1) { + return this.internalDispatcher.emit("next"); + } + } + }; + + Tail.prototype.unwatch = function() { + if (fs.watch && this.watcher) { + this.watcher.close(); + this.pos = 0; + } else { + fs.unwatchFile(this.filename); + } + this.isWatching = false; + return this.queue = []; + }; + + return Tail; + +})(events.EventEmitter); + +exports.Tail = Tail; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/LICENSE new file mode 100755 index 0000000..ad0e71b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative +Reporters & Editors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/README.md new file mode 100755 index 0000000..c2ba259 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/README.md @@ -0,0 +1,22 @@ + __ + /\ \ __ + __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ + /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ + \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ + \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ + \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ + \ \____/ + \/___/ + +Underscore.js is a utility-belt library for JavaScript that provides +support for the usual functional suspects (each, map, reduce, filter...) +without extending any core JavaScript objects. + +For Docs, License, Tests, and pre-packed downloads, see: +http://underscorejs.org + +Underscore is an open-sourced component of DocumentCloud: +https://github.com/documentcloud + +Many thanks to our contributors: +https://github.com/jashkenas/underscore/contributors diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/package.json new file mode 100755 index 0000000..490c525 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "underscore@^1.8.3", + "scope": null, + "escapedName": "underscore", + "name": "underscore", + "rawSpec": "^1.8.3", + "spec": ">=1.8.3 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "underscore@>=1.8.3 <2.0.0", + "_id": "underscore@1.8.3", + "_inCache": true, + "_location": "/underscore", + "_npmUser": { + "name": "jashkenas", + "email": "jashkenas@gmail.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "underscore@^1.8.3", + "scope": null, + "escapedName": "underscore", + "name": "underscore", + "rawSpec": "^1.8.3", + "spec": ">=1.8.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", + "_shrinkwrap": null, + "_spec": "underscore@^1.8.3", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Jeremy Ashkenas", + "email": "jeremy@documentcloud.org" + }, + "bugs": { + "url": "https://github.com/jashkenas/underscore/issues" + }, + "dependencies": {}, + "description": "JavaScript's functional programming helper library.", + "devDependencies": { + "docco": "*", + "eslint": "0.6.x", + "karma": "~0.12.31", + "karma-qunit": "~0.1.4", + "qunit-cli": "~0.2.0", + "uglify-js": "2.4.x" + }, + "directories": {}, + "dist": { + "shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", + "tarball": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz" + }, + "files": [ + "underscore.js", + "underscore-min.js", + "underscore-min.map", + "LICENSE" + ], + "gitHead": "e4743ab712b8ab42ad4ccb48b155034d02394e4d", + "homepage": "http://underscorejs.org", + "keywords": [ + "util", + "functional", + "server", + "client", + "browser" + ], + "license": "MIT", + "main": "underscore.js", + "maintainers": [ + { + "name": "jashkenas", + "email": "jashkenas@gmail.com" + } + ], + "name": "underscore", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jashkenas/underscore.git" + }, + "scripts": { + "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", + "doc": "docco underscore.js", + "lint": "eslint underscore.js test/*.js", + "test": "npm run test-node && npm run lint", + "test-browser": "npm i karma-phantomjs-launcher && ./node_modules/karma/bin/karma start", + "test-node": "qunit-cli test/*.js" + }, + "version": "1.8.3" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.js new file mode 100755 index 0000000..f01025b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.js @@ -0,0 +1,6 @@ +// Underscore.js 1.8.3 +// http://underscorejs.org +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. +(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); +//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.map b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.map new file mode 100755 index 0000000..cf356bf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore-min.map @@ -0,0 +1 @@ +{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createPredicateIndexFinder","array","predicate","cb","getLength","createIndexFinder","predicateFind","sortedIndex","item","idx","i","Math","max","min","slice","call","isNaN","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","key","baseCreate","result","MAX_ARRAY_INDEX","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","computed","lastComputed","shuffle","rand","set","shuffled","random","sample","n","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","findLastIndex","low","high","mid","floor","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WA4KC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+ZtD,QAASO,GAA2Bd,GAClC,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAASW,EAAUH,GACnBT,EAAQN,EAAM,EAAI,EAAIO,EAAS,EAC5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAsBZ,QAASa,GAAkBnB,EAAKoB,EAAeC,GAC7C,MAAO,UAASN,EAAOO,EAAMC,GAC3B,GAAIC,GAAI,EAAGjB,EAASW,EAAUH,EAC9B,IAAkB,gBAAPQ,GACLvB,EAAM,EACNwB,EAAID,GAAO,EAAIA,EAAME,KAAKC,IAAIH,EAAMhB,EAAQiB,GAE5CjB,EAASgB,GAAO,EAAIE,KAAKE,IAAIJ,EAAM,EAAGhB,GAAUgB,EAAMhB,EAAS,MAE9D,IAAIc,GAAeE,GAAOhB,EAE/B,MADAgB,GAAMF,EAAYN,EAAOO,GAClBP,EAAMQ,KAASD,EAAOC,GAAO,CAEtC,IAAID,IAASA,EAEX,MADAC,GAAMH,EAAcQ,EAAMC,KAAKd,EAAOS,EAAGjB,GAASK,EAAEkB,OAC7CP,GAAO,EAAIA,EAAMC,GAAK,CAE/B,KAAKD,EAAMvB,EAAM,EAAIwB,EAAIjB,EAAS,EAAGgB,GAAO,GAAWhB,EAANgB,EAAcA,GAAOvB,EACpE,GAAIe,EAAMQ,KAASD,EAAM,MAAOC,EAElC,QAAQ,GAqPZ,QAASQ,GAAoB7B,EAAKG,GAChC,GAAI2B,GAAaC,EAAmB1B,OAChC2B,EAAchC,EAAIgC,YAClBC,EAASvB,EAAEwB,WAAWF,IAAgBA,EAAYG,WAAcC,EAGhEC,EAAO,aAGX,KAFI3B,EAAE4B,IAAItC,EAAKqC,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAAOlC,EAAKqC,KAAKH,GAEpDP,KACLO,EAAON,EAAmBD,GACtBO,IAAQrC,IAAOA,EAAIqC,KAAUJ,EAAMI,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAChElC,EAAKqC,KAAKH,GA74BhB,GAAII,GAAOC,KAGPC,EAAqBF,EAAK/B,EAG1BkC,EAAaC,MAAMV,UAAWC,EAAWU,OAAOX,UAAWY,EAAYC,SAASb,UAIlFK,EAAmBI,EAAWJ,KAC9Bd,EAAmBkB,EAAWlB,MAC9BuB,EAAmBb,EAASa,SAC5BC,EAAmBd,EAASc,eAK5BC,EAAqBN,MAAMO,QAC3BC,EAAqBP,OAAO3C,KAC5BmD,EAAqBP,EAAUQ,KAC/BC,EAAqBV,OAAOW,OAG1BC,EAAO,aAGPhD,EAAI,SAASV,GACf,MAAIA,aAAeU,GAAUV,EACvB0C,eAAgBhC,QACtBgC,KAAKiB,SAAW3D,GADiB,GAAIU,GAAEV,GAOlB,oBAAZ4D,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUlD,GAE7BkD,QAAQlD,EAAIA,GAEZ+B,EAAK/B,EAAIA,EAIXA,EAAEoD,QAAU,OAKZ,IAAItD,GAAa,SAASuD,EAAMxD,EAASyD,GACvC,GAAIzD,QAAiB,GAAG,MAAOwD,EAC/B,QAAoB,MAAZC,EAAmB,EAAIA,GAC7B,IAAK,GAAG,MAAO,UAASC,GACtB,MAAOF,GAAKpC,KAAKpB,EAAS0D,GAE5B,KAAK,GAAG,MAAO,UAASA,EAAOC,GAC7B,MAAOH,GAAKpC,KAAKpB,EAAS0D,EAAOC,GAEnC,KAAK,GAAG,MAAO,UAASD,EAAO7D,EAAO+D,GACpC,MAAOJ,GAAKpC,KAAKpB,EAAS0D,EAAO7D,EAAO+D,GAE1C,KAAK,GAAG,MAAO,UAASC,EAAaH,EAAO7D,EAAO+D,GACjD,MAAOJ,GAAKpC,KAAKpB,EAAS6D,EAAaH,EAAO7D,EAAO+D,IAGzD,MAAO,YACL,MAAOJ,GAAKM,MAAM9D,EAASI,aAO3BI,EAAK,SAASkD,EAAO1D,EAASyD,GAChC,MAAa,OAATC,EAAsBvD,EAAE4D,SACxB5D,EAAEwB,WAAW+B,GAAezD,EAAWyD,EAAO1D,EAASyD,GACvDtD,EAAE6D,SAASN,GAAevD,EAAE8D,QAAQP,GACjCvD,EAAE+D,SAASR,GAEpBvD,GAAET,SAAW,SAASgE,EAAO1D,GAC3B,MAAOQ,GAAGkD,EAAO1D,EAASmE,KAI5B,IAAIC,GAAiB,SAASC,EAAUC,GACtC,MAAO,UAAS7E,GACd,GAAIK,GAASM,UAAUN,MACvB,IAAa,EAATA,GAAqB,MAAPL,EAAa,MAAOA,EACtC,KAAK,GAAII,GAAQ,EAAWC,EAARD,EAAgBA,IAIlC,IAAK,GAHD0E,GAASnE,UAAUP,GACnBD,EAAOyE,EAASE,GAChBC,EAAI5E,EAAKE,OACJiB,EAAI,EAAOyD,EAAJzD,EAAOA,IAAK,CAC1B,GAAI0D,GAAM7E,EAAKmB,EACVuD,IAAiB7E,EAAIgF,SAAc,KAAGhF,EAAIgF,GAAOF,EAAOE,IAGjE,MAAOhF,KAKPiF,EAAa,SAAS9C,GACxB,IAAKzB,EAAE6D,SAASpC,GAAY,QAC5B,IAAIqB,EAAc,MAAOA,GAAarB,EACtCuB,GAAKvB,UAAYA,CACjB,IAAI+C,GAAS,GAAIxB,EAEjB,OADAA,GAAKvB,UAAY,KACV+C,GAGLT,EAAW,SAASO,GACtB,MAAO,UAAShF,GACd,MAAc,OAAPA,MAAmB,GAAIA,EAAIgF,KAQlCG,EAAkB5D,KAAK6D,IAAI,EAAG,IAAM,EACpCpE,EAAYyD,EAAS,UACrBhE,EAAc,SAAS0D,GACzB,GAAI9D,GAASW,EAAUmD,EACvB,OAAwB,gBAAV9D,IAAsBA,GAAU,GAAe8E,GAAV9E,EASrDK,GAAE2E,KAAO3E,EAAE4E,QAAU,SAAStF,EAAKC,EAAUM,GAC3CN,EAAWO,EAAWP,EAAUM,EAChC,IAAIe,GAAGjB,CACP,IAAII,EAAYT,GACd,IAAKsB,EAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC3CrB,EAASD,EAAIsB,GAAIA,EAAGtB,OAEjB,CACL,GAAIG,GAAOO,EAAEP,KAAKH,EAClB,KAAKsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAC5CrB,EAASD,EAAIG,EAAKmB,IAAKnB,EAAKmB,GAAItB,GAGpC,MAAOA,IAITU,EAAE6E,IAAM7E,EAAE8E,QAAU,SAASxF,EAAKC,EAAUM,GAC1CN,EAAWc,EAAGd,EAAUM,EAIxB,KAAK,GAHDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBoF,EAAU5C,MAAMxC,GACXD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtCqF,GAAQrF,GAASH,EAASD,EAAIM,GAAaA,EAAYN,GAEzD,MAAOyF,IA+BT/E,EAAEgF,OAAShF,EAAEiF,MAAQjF,EAAEkF,OAAS/F,EAAa,GAG7Ca,EAAEmF,YAAcnF,EAAEoF,MAAQjG,GAAc,GAGxCa,EAAEqF,KAAOrF,EAAEsF,OAAS,SAAShG,EAAKc,EAAWP,GAC3C,GAAIyE,EAMJ,OAJEA,GADEvE,EAAYT,GACRU,EAAEuF,UAAUjG,EAAKc,EAAWP,GAE5BG,EAAEwF,QAAQlG,EAAKc,EAAWP,GAE9ByE,QAAa,IAAKA,KAAS,EAAUhF,EAAIgF,GAA7C,QAKFtE,EAAEyF,OAASzF,EAAE0F,OAAS,SAASpG,EAAKc,EAAWP,GAC7C,GAAIkF,KAKJ,OAJA3E,GAAYC,EAAGD,EAAWP,GAC1BG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC7BvF,EAAUmD,EAAO7D,EAAOiG,IAAOZ,EAAQjD,KAAKyB,KAE3CwB,GAIT/E,EAAE4F,OAAS,SAAStG,EAAKc,EAAWP,GAClC,MAAOG,GAAEyF,OAAOnG,EAAKU,EAAE6F,OAAOxF,EAAGD,IAAaP,IAKhDG,EAAE8F,MAAQ9F,EAAE+F,IAAM,SAASzG,EAAKc,EAAWP,GACzCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,KAAKU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE3D,OAAO,GAKTU,EAAEgG,KAAOhG,EAAEiG,IAAM,SAAS3G,EAAKc,EAAWP,GACxCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,IAAIU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE1D,OAAO,GAKTU,EAAE6B,SAAW7B,EAAEkG,SAAWlG,EAAEmG,QAAU,SAAS7G,EAAKoB,EAAM0F,EAAWC,GAGnE,MAFKtG,GAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,KACd,gBAAb8G,IAAyBC,KAAOD,EAAY,GAChDpG,EAAEuG,QAAQjH,EAAKoB,EAAM0F,IAAc,GAI5CpG,EAAEwG,OAAS,SAASlH,EAAKmH,GACvB,GAAIC,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7B0G,EAAS3G,EAAEwB,WAAWiF,EAC1B,OAAOzG,GAAE6E,IAAIvF,EAAK,SAASiE,GACzB,GAAIF,GAAOsD,EAASF,EAASlD,EAAMkD,EACnC,OAAe,OAARpD,EAAeA,EAAOA,EAAKM,MAAMJ,EAAOmD,MAKnD1G,EAAE4G,MAAQ,SAAStH,EAAKgF,GACtB,MAAOtE,GAAE6E,IAAIvF,EAAKU,EAAE+D,SAASO,KAK/BtE,EAAE6G,MAAQ,SAASvH,EAAKwH,GACtB,MAAO9G,GAAEyF,OAAOnG,EAAKU,EAAE8D,QAAQgD,KAKjC9G,EAAE+G,UAAY,SAASzH,EAAKwH,GAC1B,MAAO9G,GAAEqF,KAAK/F,EAAKU,EAAE8D,QAAQgD,KAI/B9G,EAAEc,IAAM,SAASxB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,GAAUR,IAAUiD,GAAgBjD,GAExC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACR2C,EAAQiB,IACVA,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IAC9BqB,EAAWC,GAAgBD,KAAchD,KAAYQ,KAAYR,OACnEQ,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAITxE,EAAEe,IAAM,SAASzB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,EAASR,IAAUiD,EAAejD,GAEtC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACA4D,EAARjB,IACFiB,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IACnBsB,EAAXD,GAAwChD,MAAbgD,GAAoChD,MAAXQ,KACtDA,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAKTxE,EAAEkH,QAAU,SAAS5H,GAInB,IAAK,GAAe6H,GAHhBC,EAAMrH,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,GACxCK,EAASyH,EAAIzH,OACb0H,EAAWlF,MAAMxC,GACZD,EAAQ,EAAiBC,EAARD,EAAgBA,IACxCyH,EAAOnH,EAAEsH,OAAO,EAAG5H,GACfyH,IAASzH,IAAO2H,EAAS3H,GAAS2H,EAASF,IAC/CE,EAASF,GAAQC,EAAI1H,EAEvB,OAAO2H,IAMTrH,EAAEuH,OAAS,SAASjI,EAAKkI,EAAGnB,GAC1B,MAAS,OAALmB,GAAanB,GACVtG,EAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,IAC/BA,EAAIU,EAAEsH,OAAOhI,EAAIK,OAAS,KAE5BK,EAAEkH,QAAQ5H,GAAK0B,MAAM,EAAGH,KAAKC,IAAI,EAAG0G,KAI7CxH,EAAEyH,OAAS,SAASnI,EAAKC,EAAUM,GAEjC,MADAN,GAAWc,EAAGd,EAAUM,GACjBG,EAAE4G,MAAM5G,EAAE6E,IAAIvF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC/C,OACEpC,MAAOA,EACP7D,MAAOA,EACPgI,SAAUnI,EAASgE,EAAO7D,EAAOiG,MAElCgC,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAKlI,MAAQmI,EAAMnI,QACxB,SAIN,IAAIsI,GAAQ,SAASC,GACnB,MAAO,UAAS3I,EAAKC,EAAUM,GAC7B,GAAI2E,KAMJ,OALAjF,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,GAC1B,GAAI4E,GAAM/E,EAASgE,EAAO7D,EAAOJ,EACjC2I,GAASzD,EAAQjB,EAAOe,KAEnBE,GAMXxE,GAAEkI,QAAUF,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,GAAKxC,KAAKyB,GAAaiB,EAAOF,IAAQf,KAKvEvD,EAAEmI,QAAUH,EAAM,SAASxD,EAAQjB,EAAOe,GACxCE,EAAOF,GAAOf,IAMhBvD,EAAEoI,QAAUJ,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,KAAaE,EAAOF,GAAO,IAI5DtE,EAAEqI,QAAU,SAAS/I,GACnB,MAAKA,GACDU,EAAE0C,QAAQpD,GAAa0B,EAAMC,KAAK3B,GAClCS,EAAYT,GAAaU,EAAE6E,IAAIvF,EAAKU,EAAE4D,UACnC5D,EAAEsG,OAAOhH,OAIlBU,EAAEsI,KAAO,SAAShJ,GAChB,MAAW,OAAPA,EAAoB,EACjBS,EAAYT,GAAOA,EAAIK,OAASK,EAAEP,KAAKH,GAAKK,QAKrDK,EAAEuI,UAAY,SAASjJ,EAAKc,EAAWP,GACrCO,EAAYC,EAAGD,EAAWP,EAC1B,IAAI2I,MAAWC,IAIf,OAHAzI,GAAE2E,KAAKrF,EAAK,SAASiE,EAAOe,EAAKhF,IAC9Bc,EAAUmD,EAAOe,EAAKhF,GAAOkJ,EAAOC,GAAM3G,KAAKyB,MAE1CiF,EAAMC,IAShBzI,EAAE0I,MAAQ1I,EAAE2I,KAAO3I,EAAE4I,KAAO,SAASzI,EAAOqH,EAAGnB,GAC7C,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAM,GAC9BH,EAAE6I,QAAQ1I,EAAOA,EAAMR,OAAS6H,IAMzCxH,EAAE6I,QAAU,SAAS1I,EAAOqH,EAAGnB,GAC7B,MAAOrF,GAAMC,KAAKd,EAAO,EAAGU,KAAKC,IAAI,EAAGX,EAAMR,QAAe,MAAL6H,GAAanB,EAAQ,EAAImB,MAKnFxH,EAAE8I,KAAO,SAAS3I,EAAOqH,EAAGnB,GAC1B,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAMA,EAAMR,OAAS,GAC7CK,EAAE+I,KAAK5I,EAAOU,KAAKC,IAAI,EAAGX,EAAMR,OAAS6H,KAMlDxH,EAAE+I,KAAO/I,EAAEgJ,KAAOhJ,EAAEiJ,KAAO,SAAS9I,EAAOqH,EAAGnB,GAC5C,MAAOrF,GAAMC,KAAKd,EAAY,MAALqH,GAAanB,EAAQ,EAAImB,IAIpDxH,EAAEkJ,QAAU,SAAS/I,GACnB,MAAOH,GAAEyF,OAAOtF,EAAOH,EAAE4D,UAI3B,IAAIuF,GAAU,SAASC,EAAOC,EAASC,EAAQC,GAE7C,IAAK,GADDC,MAAa7I,EAAM,EACdC,EAAI2I,GAAc,EAAG5J,EAASW,EAAU8I,GAAYzJ,EAAJiB,EAAYA,IAAK,CACxE,GAAI2C,GAAQ6F,EAAMxI,EAClB,IAAIb,EAAYwD,KAAWvD,EAAE0C,QAAQa,IAAUvD,EAAEyJ,YAAYlG,IAAS,CAE/D8F,IAAS9F,EAAQ4F,EAAQ5F,EAAO8F,EAASC,GAC9C,IAAII,GAAI,EAAGC,EAAMpG,EAAM5D,MAEvB,KADA6J,EAAO7J,QAAUgK,EACNA,EAAJD,GACLF,EAAO7I,KAAS4C,EAAMmG,SAEdJ,KACVE,EAAO7I,KAAS4C,GAGpB,MAAOiG,GAITxJ,GAAEmJ,QAAU,SAAShJ,EAAOkJ,GAC1B,MAAOF,GAAQhJ,EAAOkJ,GAAS,IAIjCrJ,EAAE4J,QAAU,SAASzJ,GACnB,MAAOH,GAAE6J,WAAW1J,EAAOa,EAAMC,KAAKhB,UAAW,KAMnDD,EAAE8J,KAAO9J,EAAE+J,OAAS,SAAS5J,EAAO6J,EAAUzK,EAAUM,GACjDG,EAAEiK,UAAUD,KACfnK,EAAUN,EACVA,EAAWyK,EACXA,GAAW,GAEG,MAAZzK,IAAkBA,EAAWc,EAAGd,EAAUM,GAG9C,KAAK,GAFD2E,MACA0F,KACKtJ,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAI2C,GAAQpD,EAAMS,GACdoG,EAAWzH,EAAWA,EAASgE,EAAO3C,EAAGT,GAASoD,CAClDyG,IACGpJ,GAAKsJ,IAASlD,GAAUxC,EAAO1C,KAAKyB,GACzC2G,EAAOlD,GACEzH,EACJS,EAAE6B,SAASqI,EAAMlD,KACpBkD,EAAKpI,KAAKkF,GACVxC,EAAO1C,KAAKyB,IAEJvD,EAAE6B,SAAS2C,EAAQjB,IAC7BiB,EAAO1C,KAAKyB,GAGhB,MAAOiB,IAKTxE,EAAEmK,MAAQ,WACR,MAAOnK,GAAE8J,KAAKX,EAAQlJ,WAAW,GAAM,KAKzCD,EAAEoK,aAAe,SAASjK,GAGxB,IAAK,GAFDqE,MACA6F,EAAapK,UAAUN,OAClBiB,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAIF,GAAOP,EAAMS,EACjB,KAAIZ,EAAE6B,SAAS2C,EAAQ9D,GAAvB,CACA,IAAK,GAAIgJ,GAAI,EAAOW,EAAJX,GACT1J,EAAE6B,SAAS5B,UAAUyJ,GAAIhJ,GADAgJ,KAG5BA,IAAMW,GAAY7F,EAAO1C,KAAKpB,IAEpC,MAAO8D,IAKTxE,EAAE6J,WAAa,SAAS1J,GACtB,GAAI4I,GAAOI,EAAQlJ,WAAW,GAAM,EAAM,EAC1C,OAAOD,GAAEyF,OAAOtF,EAAO,SAASoD,GAC9B,OAAQvD,EAAE6B,SAASkH,EAAMxF,MAM7BvD,EAAEsK,IAAM,WACN,MAAOtK,GAAEuK,MAAMtK,YAKjBD,EAAEuK,MAAQ,SAASpK,GAIjB,IAAK,GAHDR,GAASQ,GAASH,EAAEc,IAAIX,EAAOG,GAAWX,QAAU,EACpD6E,EAASrC,MAAMxC,GAEVD,EAAQ,EAAWC,EAARD,EAAgBA,IAClC8E,EAAO9E,GAASM,EAAE4G,MAAMzG,EAAOT,EAEjC,OAAO8E,IAMTxE,EAAEwK,OAAS,SAAS7E,EAAMW,GAExB,IAAK,GADD9B,MACK5D,EAAI,EAAGjB,EAASW,EAAUqF,GAAWhG,EAAJiB,EAAYA,IAChD0F,EACF9B,EAAOmB,EAAK/E,IAAM0F,EAAO1F,GAEzB4D,EAAOmB,EAAK/E,GAAG,IAAM+E,EAAK/E,GAAG,EAGjC,OAAO4D,IAiBTxE,EAAEuF,UAAYrF,EAA2B,GACzCF,EAAEyK,cAAgBvK,GAA4B,GAI9CF,EAAES,YAAc,SAASN,EAAOb,EAAKC,EAAUM,GAC7CN,EAAWc,EAAGd,EAAUM,EAAS,EAGjC,KAFA,GAAI0D,GAAQhE,EAASD,GACjBoL,EAAM,EAAGC,EAAOrK,EAAUH,GACjBwK,EAAND,GAAY,CACjB,GAAIE,GAAM/J,KAAKgK,OAAOH,EAAMC,GAAQ,EAChCpL,GAASY,EAAMyK,IAAQrH,EAAOmH,EAAME,EAAM,EAAQD,EAAOC,EAE/D,MAAOF,IAgCT1K,EAAEuG,QAAUhG,EAAkB,EAAGP,EAAEuF,UAAWvF,EAAES,aAChDT,EAAE8K,YAAcvK,GAAmB,EAAGP,EAAEyK,eAKxCzK,EAAE+K,MAAQ,SAASC,EAAOC,EAAMC,GAClB,MAARD,IACFA,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOA,GAAQ,CAKf,KAAK,GAHDvL,GAASkB,KAAKC,IAAID,KAAKsK,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQ5I,MAAMxC,GAETgB,EAAM,EAAShB,EAANgB,EAAcA,IAAOqK,GAASE,EAC9CH,EAAMpK,GAAOqK,CAGf,OAAOD,GAQT,IAAIK,GAAe,SAASC,EAAYC,EAAWzL,EAAS0L,EAAgB7E,GAC1E,KAAM6E,YAA0BD,IAAY,MAAOD,GAAW1H,MAAM9D,EAAS6G,EAC7E,IAAI8E,GAAOjH,EAAW8G,EAAW5J,WAC7B+C,EAAS6G,EAAW1H,MAAM6H,EAAM9E,EACpC,OAAI1G,GAAE6D,SAASW,GAAgBA,EACxBgH,EAMTxL,GAAE6C,KAAO,SAASQ,EAAMxD,GACtB,GAAI+C,GAAcS,EAAKR,OAASD,EAAY,MAAOA,GAAWe,MAAMN,EAAMrC,EAAMC,KAAKhB,UAAW,GAChG,KAAKD,EAAEwB,WAAW6B,GAAO,KAAM,IAAIoI,WAAU,oCAC7C,IAAI/E,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7ByL,EAAQ,WACV,MAAON,GAAa/H,EAAMqI,EAAO7L,EAASmC,KAAM0E,EAAKiF,OAAO3K,EAAMC,KAAKhB,aAEzE,OAAOyL,IAMT1L,EAAE4L,QAAU,SAASvI,GACnB,GAAIwI,GAAY7K,EAAMC,KAAKhB,UAAW,GAClCyL,EAAQ,WAGV,IAAK,GAFDI,GAAW,EAAGnM,EAASkM,EAAUlM,OACjC+G,EAAOvE,MAAMxC,GACRiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B8F,EAAK9F,GAAKiL,EAAUjL,KAAOZ,EAAIC,UAAU6L,KAAcD,EAAUjL,EAEnE,MAAOkL,EAAW7L,UAAUN,QAAQ+G,EAAK5E,KAAK7B,UAAU6L,KACxD,OAAOV,GAAa/H,EAAMqI,EAAO1J,KAAMA,KAAM0E,GAE/C,OAAOgF,IAMT1L,EAAE+L,QAAU,SAASzM,GACnB,GAAIsB,GAA8B0D,EAA3B3E,EAASM,UAAUN,MAC1B,IAAc,GAAVA,EAAa,KAAM,IAAIqM,OAAM,wCACjC,KAAKpL,EAAI,EAAOjB,EAAJiB,EAAYA,IACtB0D,EAAMrE,UAAUW,GAChBtB,EAAIgF,GAAOtE,EAAE6C,KAAKvD,EAAIgF,GAAMhF,EAE9B,OAAOA,IAITU,EAAEiM,QAAU,SAAS5I,EAAM6I,GACzB,GAAID,GAAU,SAAS3H,GACrB,GAAI6H,GAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAOvI,MAAM3B,KAAM/B,WAAaqE,EAE7D,OADKtE,GAAE4B,IAAIuK,EAAOC,KAAUD,EAAMC,GAAW/I,EAAKM,MAAM3B,KAAM/B,YACvDkM,EAAMC,GAGf,OADAH,GAAQE,SACDF,GAKTjM,EAAEqM,MAAQ,SAAShJ,EAAMiJ,GACvB,GAAI5F,GAAO1F,EAAMC,KAAKhB,UAAW,EACjC,OAAOsM,YAAW,WAChB,MAAOlJ,GAAKM,MAAM,KAAM+C,IACvB4F,IAKLtM,EAAEwM,MAAQxM,EAAE4L,QAAQ5L,EAAEqM,MAAOrM,EAAG,GAOhCA,EAAEyM,SAAW,SAASpJ,EAAMiJ,EAAMI,GAChC,GAAI7M,GAAS6G,EAAMlC,EACfmI,EAAU,KACVC,EAAW,CACVF,KAASA,KACd,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI9M,EAAE+M,MAC7CJ,EAAU,KACVnI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,MAEjC,OAAO,YACL,GAAIqG,GAAM/M,EAAE+M,KACPH,IAAYF,EAAQI,WAAY,IAAOF,EAAWG,EACvD,IAAIC,GAAYV,GAAQS,EAAMH,EAc9B,OAbA/M,GAAUmC,KACV0E,EAAOzG,UACU,GAAb+M,GAAkBA,EAAYV,GAC5BK,IACFM,aAAaN,GACbA,EAAU,MAEZC,EAAWG,EACXvI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,OACrBiG,GAAWD,EAAQQ,YAAa,IAC1CP,EAAUJ,WAAWM,EAAOG,IAEvBxI,IAQXxE,EAAEmN,SAAW,SAAS9J,EAAMiJ,EAAMc,GAChC,GAAIT,GAASjG,EAAM7G,EAASwN,EAAW7I,EAEnCqI,EAAQ,WACV,GAAI/D,GAAO9I,EAAE+M,MAAQM,CAEVf,GAAPxD,GAAeA,GAAQ,EACzB6D,EAAUJ,WAAWM,EAAOP,EAAOxD,IAEnC6D,EAAU,KACLS,IACH5I,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,QAKrC,OAAO,YACL7G,EAAUmC,KACV0E,EAAOzG,UACPoN,EAAYrN,EAAE+M,KACd,IAAIO,GAAUF,IAAcT,CAO5B,OANKA,KAASA,EAAUJ,WAAWM,EAAOP,IACtCgB,IACF9I,EAASnB,EAAKM,MAAM9D,EAAS6G,GAC7B7G,EAAU6G,EAAO,MAGZlC,IAOXxE,EAAEuN,KAAO,SAASlK,EAAMmK,GACtB,MAAOxN,GAAE4L,QAAQ4B,EAASnK,IAI5BrD,EAAE6F,OAAS,SAASzF,GAClB,MAAO,YACL,OAAQA,EAAUuD,MAAM3B,KAAM/B,aAMlCD,EAAEyN,QAAU,WACV,GAAI/G,GAAOzG,UACP+K,EAAQtE,EAAK/G,OAAS,CAC1B,OAAO,YAGL,IAFA,GAAIiB,GAAIoK,EACJxG,EAASkC,EAAKsE,GAAOrH,MAAM3B,KAAM/B,WAC9BW,KAAK4D,EAASkC,EAAK9F,GAAGK,KAAKe,KAAMwC,EACxC,OAAOA,KAKXxE,EAAE0N,MAAQ,SAASC,EAAOtK,GACxB,MAAO,YACL,QAAMsK,EAAQ,EACLtK,EAAKM,MAAM3B,KAAM/B,WAD1B,SAOJD,EAAE4N,OAAS,SAASD,EAAOtK,GACzB,GAAI7D,EACJ,OAAO,YAKL,QAJMmO,EAAQ,IACZnO,EAAO6D,EAAKM,MAAM3B,KAAM/B,YAEb,GAAT0N,IAAYtK,EAAO,MAChB7D,IAMXQ,EAAE6N,KAAO7N,EAAE4L,QAAQ5L,EAAE4N,OAAQ,EAM7B,IAAIE,KAAevL,SAAU,MAAMwL,qBAAqB,YACpD1M,GAAsB,UAAW,gBAAiB,WAClC,uBAAwB,iBAAkB,iBAqB9DrB,GAAEP,KAAO,SAASH,GAChB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIqD,EAAY,MAAOA,GAAWrD,EAClC,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAASU,EAAE4B,IAAItC,EAAKgF,IAAM7E,EAAKqC,KAAKwC,EAGpD,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEgO,QAAU,SAAS1O,GACnB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAAKG,EAAKqC,KAAKwC,EAG/B,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEsG,OAAS,SAAShH,GAIlB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACd2G,EAASnE,MAAMxC,GACViB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B0F,EAAO1F,GAAKtB,EAAIG,EAAKmB,GAEvB,OAAO0F,IAKTtG,EAAEiO,UAAY,SAAS3O,EAAKC,EAAUM,GACpCN,EAAWc,EAAGd,EAAUM,EAKtB,KAAK,GADDD,GAHFH,EAAQO,EAAEP,KAAKH,GACbK,EAASF,EAAKE,OACdoF,KAEKrF,EAAQ,EAAWC,EAARD,EAAgBA,IAClCE,EAAaH,EAAKC,GAClBqF,EAAQnF,GAAcL,EAASD,EAAIM,GAAaA,EAAYN,EAE9D,OAAOyF,IAIX/E,EAAEkO,MAAQ,SAAS5O,GAIjB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACduO,EAAQ/L,MAAMxC,GACTiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1BsN,EAAMtN,IAAMnB,EAAKmB,GAAItB,EAAIG,EAAKmB,IAEhC,OAAOsN,IAITlO,EAAEmO,OAAS,SAAS7O,GAGlB,IAAK,GAFDkF,MACA/E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAChD4D,EAAOlF,EAAIG,EAAKmB,KAAOnB,EAAKmB,EAE9B,OAAO4D,IAKTxE,EAAEoO,UAAYpO,EAAEqO,QAAU,SAAS/O,GACjC,GAAIgP,KACJ,KAAK,GAAIhK,KAAOhF,GACVU,EAAEwB,WAAWlC,EAAIgF,KAAOgK,EAAMxM,KAAKwC,EAEzC,OAAOgK,GAAM3G,QAIf3H,EAAEuO,OAAStK,EAAejE,EAAEgO,SAI5BhO,EAAEwO,UAAYxO,EAAEyO,OAASxK,EAAejE,EAAEP,MAG1CO,EAAEwF,QAAU,SAASlG,EAAKc,EAAWP,GACnCO,EAAYC,EAAGD,EAAWP,EAE1B,KAAK,GADmByE,GAApB7E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAEhD,GADA0D,EAAM7E,EAAKmB,GACPR,EAAUd,EAAIgF,GAAMA,EAAKhF,GAAM,MAAOgF,IAK9CtE,EAAE0O,KAAO,SAASlE,EAAQmE,EAAW9O,GACnC,GAA+BN,GAAUE,EAArC+E,KAAalF,EAAMkL,CACvB,IAAW,MAAPlL,EAAa,MAAOkF,EACpBxE,GAAEwB,WAAWmN,IACflP,EAAOO,EAAEgO,QAAQ1O,GACjBC,EAAWO,EAAW6O,EAAW9O,KAEjCJ,EAAO0J,EAAQlJ,WAAW,GAAO,EAAO,GACxCV,EAAW,SAASgE,EAAOe,EAAKhF,GAAO,MAAOgF,KAAOhF,IACrDA,EAAM8C,OAAO9C,GAEf,KAAK,GAAIsB,GAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAAK,CACrD,GAAI0D,GAAM7E,EAAKmB,GACX2C,EAAQjE,EAAIgF,EACZ/E,GAASgE,EAAOe,EAAKhF,KAAMkF,EAAOF,GAAOf,GAE/C,MAAOiB,IAITxE,EAAE4O,KAAO,SAAStP,EAAKC,EAAUM,GAC/B,GAAIG,EAAEwB,WAAWjC,GACfA,EAAWS,EAAE6F,OAAOtG,OACf,CACL,GAAIE,GAAOO,EAAE6E,IAAIsE,EAAQlJ,WAAW,GAAO,EAAO,GAAI4O,OACtDtP,GAAW,SAASgE,EAAOe,GACzB,OAAQtE,EAAE6B,SAASpC,EAAM6E,IAG7B,MAAOtE,GAAE0O,KAAKpP,EAAKC,EAAUM,IAI/BG,EAAE8O,SAAW7K,EAAejE,EAAEgO,SAAS,GAKvChO,EAAE+C,OAAS,SAAStB,EAAWsN,GAC7B,GAAIvK,GAASD,EAAW9C,EAExB,OADIsN,IAAO/O,EAAEwO,UAAUhK,EAAQuK,GACxBvK,GAITxE,EAAEgP,MAAQ,SAAS1P,GACjB,MAAKU,GAAE6D,SAASvE,GACTU,EAAE0C,QAAQpD,GAAOA,EAAI0B,QAAUhB,EAAEuO,UAAWjP,GADtBA,GAO/BU,EAAEiP,IAAM,SAAS3P,EAAK4P,GAEpB,MADAA,GAAY5P,GACLA,GAITU,EAAEmP,QAAU,SAAS3E,EAAQ1D,GAC3B,GAAIrH,GAAOO,EAAEP,KAAKqH,GAAQnH,EAASF,EAAKE,MACxC,IAAc,MAAV6K,EAAgB,OAAQ7K,CAE5B,KAAK,GADDL,GAAM8C,OAAOoI,GACR5J,EAAI,EAAOjB,EAAJiB,EAAYA,IAAK,CAC/B,GAAI0D,GAAM7E,EAAKmB,EACf,IAAIkG,EAAMxC,KAAShF,EAAIgF,MAAUA,IAAOhF,IAAM,OAAO,EAEvD,OAAO,EAKT,IAAI8P,GAAK,SAAStH,EAAGC,EAAGsH,EAAQC,GAG9B,GAAIxH,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,IAAM,EAAIC,CAE7C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAa9H,KAAG8H,EAAIA,EAAE7E,UACtB8E,YAAa/H,KAAG+H,EAAIA,EAAE9E,SAE1B,IAAIsM,GAAYhN,EAAStB,KAAK6G,EAC9B,IAAIyH,IAAchN,EAAStB,KAAK8G,GAAI,OAAO,CAC3C,QAAQwH,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAKzH,GAAM,GAAKC,CACzB,KAAK,kBAGH,OAAKD,KAAOA,GAAWC,KAAOA,EAEhB,KAAND,EAAU,GAAKA,IAAM,EAAIC,GAAKD,KAAOC,CAC/C,KAAK,gBACL,IAAK,mBAIH,OAAQD,KAAOC,EAGnB,GAAIyH,GAA0B,mBAAdD,CAChB,KAAKC,EAAW,CACd,GAAgB,gBAAL1H,IAA6B,gBAALC,GAAe,OAAO,CAIzD,IAAI0H,GAAQ3H,EAAExG,YAAaoO,EAAQ3H,EAAEzG,WACrC,IAAImO,IAAUC,KAAW1P,EAAEwB,WAAWiO,IAAUA,YAAiBA,IACxCzP,EAAEwB,WAAWkO,IAAUA,YAAiBA,KACzC,eAAiB5H,IAAK,eAAiBC,GAC7D,OAAO,EAQXsH,EAASA,MACTC,EAASA,KAET,KADA,GAAI3P,GAAS0P,EAAO1P,OACbA,KAGL,GAAI0P,EAAO1P,KAAYmI,EAAG,MAAOwH,GAAO3P,KAAYoI,CAQtD,IAJAsH,EAAOvN,KAAKgG,GACZwH,EAAOxN,KAAKiG,GAGRyH,EAAW,CAGb,GADA7P,EAASmI,EAAEnI,OACPA,IAAWoI,EAAEpI,OAAQ,OAAO,CAEhC,MAAOA,KACL,IAAKyP,EAAGtH,EAAEnI,GAASoI,EAAEpI,GAAS0P,EAAQC,GAAS,OAAO,MAEnD,CAEL,GAAsBhL,GAAlB7E,EAAOO,EAAEP,KAAKqI,EAGlB,IAFAnI,EAASF,EAAKE,OAEVK,EAAEP,KAAKsI,GAAGpI,SAAWA,EAAQ,OAAO,CACxC,MAAOA,KAGL,GADA2E,EAAM7E,EAAKE,IACLK,EAAE4B,IAAImG,EAAGzD,KAAQ8K,EAAGtH,EAAExD,GAAMyD,EAAEzD,GAAM+K,EAAQC,GAAU,OAAO,EAMvE,MAFAD,GAAOM,MACPL,EAAOK,OACA,EAIT3P,GAAE4P,QAAU,SAAS9H,EAAGC,GACtB,MAAOqH,GAAGtH,EAAGC,IAKf/H,EAAE6P,QAAU,SAASvQ,GACnB,MAAW,OAAPA,GAAoB,EACpBS,EAAYT,KAASU,EAAE0C,QAAQpD,IAAQU,EAAE8P,SAASxQ,IAAQU,EAAEyJ,YAAYnK,IAA6B,IAAfA,EAAIK,OAChE,IAAvBK,EAAEP,KAAKH,GAAKK,QAIrBK,EAAE+P,UAAY,SAASzQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAI0Q,WAKvBhQ,EAAE0C,QAAUD,GAAiB,SAASnD,GACpC,MAA8B,mBAAvBiD,EAAStB,KAAK3B,IAIvBU,EAAE6D,SAAW,SAASvE,GACpB,GAAI2Q,SAAc3Q,EAClB,OAAgB,aAAT2Q,GAAgC,WAATA,KAAuB3Q,GAIvDU,EAAE2E,MAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,SAAU,SAASuL,GACxFlQ,EAAE,KAAOkQ,GAAQ,SAAS5Q,GACxB,MAAOiD,GAAStB,KAAK3B,KAAS,WAAa4Q,EAAO,OAMjDlQ,EAAEyJ,YAAYxJ,aACjBD,EAAEyJ,YAAc,SAASnK,GACvB,MAAOU,GAAE4B,IAAItC,EAAK,YAMJ,kBAAP,KAAyC,gBAAb6Q,aACrCnQ,EAAEwB,WAAa,SAASlC,GACtB,MAAqB,kBAAPA,KAAqB,IAKvCU,EAAEoQ,SAAW,SAAS9Q,GACpB,MAAO8Q,UAAS9Q,KAAS4B,MAAMmP,WAAW/Q,KAI5CU,EAAEkB,MAAQ,SAAS5B,GACjB,MAAOU,GAAEsQ,SAAShR,IAAQA,KAASA,GAIrCU,EAAEiK,UAAY,SAAS3K,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAAgC,qBAAvBiD,EAAStB,KAAK3B,IAIxDU,EAAEuQ,OAAS,SAASjR,GAClB,MAAe,QAARA,GAITU,EAAEwQ,YAAc,SAASlR,GACvB,MAAOA,SAAa,IAKtBU,EAAE4B,IAAM,SAAStC,EAAKgF,GACpB,MAAc,OAAPhF,GAAekD,EAAevB,KAAK3B,EAAKgF,IAQjDtE,EAAEyQ,WAAa,WAEb,MADA1O,GAAK/B,EAAIiC,EACFD,MAIThC,EAAE4D,SAAW,SAASL,GACpB,MAAOA,IAITvD,EAAE0Q,SAAW,SAASnN,GACpB,MAAO,YACL,MAAOA,KAIXvD,EAAE2Q,KAAO,aAET3Q,EAAE+D,SAAWA,EAGb/D,EAAE4Q,WAAa,SAAStR,GACtB,MAAc,OAAPA,EAAc,aAAe,SAASgF,GAC3C,MAAOhF,GAAIgF,KAMftE,EAAE8D,QAAU9D,EAAE6Q,QAAU,SAAS/J,GAE/B,MADAA,GAAQ9G,EAAEwO,aAAc1H,GACjB,SAASxH,GACd,MAAOU,GAAEmP,QAAQ7P,EAAKwH,KAK1B9G,EAAE2N,MAAQ,SAASnG,EAAGjI,EAAUM,GAC9B,GAAIiR,GAAQ3O,MAAMtB,KAAKC,IAAI,EAAG0G,GAC9BjI,GAAWO,EAAWP,EAAUM,EAAS,EACzC,KAAK,GAAIe,GAAI,EAAO4G,EAAJ5G,EAAOA,IAAKkQ,EAAMlQ,GAAKrB,EAASqB,EAChD,OAAOkQ,IAIT9Q,EAAEsH,OAAS,SAASvG,EAAKD,GAKvB,MAJW,OAAPA,IACFA,EAAMC,EACNA,EAAM,GAEDA,EAAMF,KAAKgK,MAAMhK,KAAKyG,UAAYxG,EAAMC,EAAM,KAIvDf,EAAE+M,IAAMgE,KAAKhE,KAAO,WAClB,OAAO,GAAIgE,OAAOC,UAIpB,IAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAAcxR,EAAEmO,OAAO8C,GAGvBQ,EAAgB,SAAS5M,GAC3B,GAAI6M,GAAU,SAASC,GACrB,MAAO9M,GAAI8M,IAGTvN,EAAS,MAAQpE,EAAEP,KAAKoF,GAAK+M,KAAK,KAAO,IACzCC,EAAaC,OAAO1N,GACpB2N,EAAgBD,OAAO1N,EAAQ,IACnC,OAAO,UAAS4N,GAEd,MADAA,GAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeL,GAAWM,GAG9EhS,GAAEmS,OAASV,EAAcR,GACzBjR,EAAEoS,SAAWX,EAAcD,GAI3BxR,EAAEwE,OAAS,SAASgG,EAAQzG,EAAUsO,GACpC,GAAI9O,GAAkB,MAAViH,MAAsB,GAAIA,EAAOzG,EAI7C,OAHIR,SAAe,KACjBA,EAAQ8O,GAEHrS,EAAEwB,WAAW+B,GAASA,EAAMtC,KAAKuJ,GAAUjH,EAKpD,IAAI+O,GAAY,CAChBtS,GAAEuS,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhCzS,EAAE0S,kBACAC,SAAc,kBACdC,YAAc,mBACdT,OAAc,mBAMhB,IAAIU,GAAU,OAIVC,GACFxB,IAAU,IACVyB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,SAAU,QACVC,SAAU,SAGRzB,EAAU,4BAEV0B,EAAa,SAASzB,GACxB,MAAO,KAAOmB,EAAQnB,GAOxB3R,GAAEqT,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWvT,EAAE8O,YAAayE,EAAUvT,EAAE0S,iBAGtC,IAAI5O,GAAUgO,SACXyB,EAASpB,QAAUU,GAASzO,QAC5BmP,EAASX,aAAeC,GAASzO,QACjCmP,EAASZ,UAAYE,GAASzO,QAC/BwN,KAAK,KAAO,KAAM,KAGhBlS,EAAQ,EACR0E,EAAS,QACbkP,GAAKpB,QAAQpO,EAAS,SAAS6N,EAAOQ,EAAQS,EAAaD,EAAUc,GAanE,MAZArP,IAAUkP,EAAKtS,MAAMtB,EAAO+T,GAAQvB,QAAQR,EAAS0B,GACrD1T,EAAQ+T,EAAS9B,EAAMhS,OAEnBwS,EACF/N,GAAU,cAAgB+N,EAAS,iCAC1BS,EACTxO,GAAU,cAAgBwO,EAAc,uBAC/BD,IACTvO,GAAU,OAASuO,EAAW,YAIzBhB,IAETvN,GAAU,OAGLmP,EAASG,WAAUtP,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE,GAAIuP,GAAS,GAAIrR,UAASiR,EAASG,UAAY,MAAO,IAAKtP,GAC3D,MAAOwP,GAEP,KADAA,GAAExP,OAASA,EACLwP,EAGR,GAAIP,GAAW,SAASQ,GACtB,MAAOF,GAAO1S,KAAKe,KAAM6R,EAAM7T,IAI7B8T,EAAWP,EAASG,UAAY,KAGpC,OAFAL,GAASjP,OAAS,YAAc0P,EAAW,OAAS1P,EAAS,IAEtDiP,GAITrT,EAAE+T,MAAQ,SAASzU,GACjB,GAAI0U,GAAWhU,EAAEV,EAEjB,OADA0U,GAASC,QAAS,EACXD,EAUT,IAAIxP,GAAS,SAASwP,EAAU1U,GAC9B,MAAO0U,GAASC,OAASjU,EAAEV,GAAKyU,QAAUzU,EAI5CU,GAAEkU,MAAQ,SAAS5U,GACjBU,EAAE2E,KAAK3E,EAAEoO,UAAU9O,GAAM,SAAS4Q,GAChC,GAAI7M,GAAOrD,EAAEkQ,GAAQ5Q,EAAI4Q,EACzBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAIxJ,IAAQ1E,KAAKiB,SAEjB,OADAnB,GAAK6B,MAAM+C,EAAMzG,WACVuE,EAAOxC,KAAMqB,EAAKM,MAAM3D,EAAG0G,QAMxC1G,EAAEkU,MAAMlU,GAGRA,EAAE2E,MAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAASuL,GAChF,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAI5Q,GAAM0C,KAAKiB,QAGf,OAFAwD,GAAO9C,MAAMrE,EAAKW,WACJ,UAATiQ,GAA6B,WAATA,GAAqC,IAAf5Q,EAAIK,cAAqBL,GAAI,GACrEkF,EAAOxC,KAAM1C,MAKxBU,EAAE2E,MAAM,SAAU,OAAQ,SAAU,SAASuL,GAC3C,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,MAAO1L,GAAOxC,KAAMyE,EAAO9C,MAAM3B,KAAKiB,SAAUhD,eAKpDD,EAAEyB,UAAU8B,MAAQ,WAClB,MAAOvB,MAAKiB,UAKdjD,EAAEyB,UAAU0S,QAAUnU,EAAEyB,UAAU2S,OAASpU,EAAEyB,UAAU8B,MAEvDvD,EAAEyB,UAAUc,SAAW,WACrB,MAAO,GAAKP,KAAKiB,UAUG,kBAAXoR,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOrU,OAGXiB,KAAKe"} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore.js new file mode 100755 index 0000000..b29332f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/underscore/underscore.js @@ -0,0 +1,1548 @@ +// Underscore.js 1.8.3 +// http://underscorejs.org +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +(function() { + + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `exports` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var + push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind, + nativeCreate = Object.create; + + // Naked function reference for surrogate-prototype-swapping. + var Ctor = function(){}; + + // Create a safe reference to the Underscore object for use below. + var _ = function(obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + }; + + // Export the Underscore object for **Node.js**, with + // backwards-compatibility for the old `require()` API. If we're in + // the browser, add `_` as a global object. + if (typeof exports !== 'undefined') { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = _; + } + exports._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.8.3'; + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + var optimizeCb = function(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + case 2: return function(value, other) { + return func.call(context, value, other); + }; + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + }; + + // A mostly-internal function to generate callbacks that can be applied + // to each element in a collection, returning the desired result — either + // identity, an arbitrary callback, a property matcher, or a property accessor. + var cb = function(value, context, argCount) { + if (value == null) return _.identity; + if (_.isFunction(value)) return optimizeCb(value, context, argCount); + if (_.isObject(value)) return _.matcher(value); + return _.property(value); + }; + _.iteratee = function(value, context) { + return cb(value, context, Infinity); + }; + + // An internal function for creating assigner functions. + var createAssigner = function(keysFunc, undefinedOnly) { + return function(obj) { + var length = arguments.length; + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; + }; + + // An internal function for creating a new object that inherits from another. + var baseCreate = function(prototype) { + if (!_.isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; + }; + + var property = function(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + }; + + // Helper for collection methods to determine whether a collection + // should be iterated as an array or as an object + // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 + var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + var getLength = property('length'); + var isArrayLike = function(collection) { + var length = getLength(collection); + return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; + }; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + _.each = _.forEach = function(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var keys = _.keys(obj); + for (i = 0, length = keys.length; i < length; i++) { + iteratee(obj[keys[i]], keys[i], obj); + } + } + return obj; + }; + + // Return the results of applying the iteratee to each element. + _.map = _.collect = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Create a reducing function iterating left or right. + function createReduce(dir) { + // Optimized iterator function as using arguments.length + // in the main function will deoptimize the, see #1991. + function iterator(obj, iteratee, memo, keys, index, length) { + for (; index >= 0 && index < length; index += dir) { + var currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + } + + return function(obj, iteratee, memo, context) { + iteratee = optimizeCb(iteratee, context, 4); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + index = dir > 0 ? 0 : length - 1; + // Determine the initial value if none is provided. + if (arguments.length < 3) { + memo = obj[keys ? keys[index] : index]; + index += dir; + } + return iterator(obj, iteratee, memo, keys, index, length); + }; + } + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + _.reduce = _.foldl = _.inject = createReduce(1); + + // The right-associative version of reduce, also known as `foldr`. + _.reduceRight = _.foldr = createReduce(-1); + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, predicate, context) { + var key; + if (isArrayLike(obj)) { + key = _.findIndex(obj, predicate, context); + } else { + key = _.findKey(obj, predicate, context); + } + if (key !== void 0 && key !== -1) return obj[key]; + }; + + // Return all the elements that pass a truth test. + // Aliased as `select`. + _.filter = _.select = function(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + _.each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function(obj, predicate, context) { + return _.filter(obj, _.negate(cb(predicate)), context); + }; + + // Determine whether all of the elements match a truth test. + // Aliased as `all`. + _.every = _.all = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; + }; + + // Determine if at least one element in the object matches a truth test. + // Aliased as `any`. + _.some = _.any = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; + }; + + // Determine if the array or object contains a given item (using `===`). + // Aliased as `includes` and `include`. + _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return _.indexOf(obj, item, fromIndex) >= 0; + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function(obj, method) { + var args = slice.call(arguments, 2); + var isFunc = _.isFunction(method); + return _.map(obj, function(value) { + var func = isFunc ? method : value[method]; + return func == null ? func : func.apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function(obj, key) { + return _.map(obj, _.property(key)); + }; + + // Convenience version of a common use case of `filter`: selecting only objects + // containing specific `key:value` pairs. + _.where = function(obj, attrs) { + return _.filter(obj, _.matcher(attrs)); + }; + + // Convenience version of a common use case of `find`: getting the first object + // containing specific `key:value` pairs. + _.findWhere = function(obj, attrs) { + return _.find(obj, _.matcher(attrs)); + }; + + // Return the maximum element (or element-based computation). + _.max = function(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Return the minimum element (or element-based computation). + _.min = function(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Shuffle a collection, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + _.shuffle = function(obj) { + var set = isArrayLike(obj) ? obj : _.values(obj); + var length = set.length; + var shuffled = Array(length); + for (var index = 0, rand; index < length; index++) { + rand = _.random(0, index); + if (rand !== index) shuffled[index] = shuffled[rand]; + shuffled[rand] = set[index]; + } + return shuffled; + }; + + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + + // Sort the object's values by a criterion produced by an iteratee. + _.sortBy = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + return _.pluck(_.map(obj, function(value, index, list) { + return { + value: value, + index: index, + criteria: iteratee(value, index, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); + }; + + // An internal function used for aggregate "group by" operations. + var group = function(behavior) { + return function(obj, iteratee, context) { + var result = {}; + iteratee = cb(iteratee, context); + _.each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; + }; + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + _.groupBy = group(function(result, value, key) { + if (_.has(result, key)) result[key].push(value); else result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, value, key) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + _.countBy = group(function(result, value, key) { + if (_.has(result, key)) result[key]++; else result[key] = 1; + }); + + // Safely create a real, live array from anything iterable. + _.toArray = function(obj) { + if (!obj) return []; + if (_.isArray(obj)) return slice.call(obj); + if (isArrayLike(obj)) return _.map(obj, _.identity); + return _.values(obj); + }; + + // Return the number of elements in an object. + _.size = function(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : _.keys(obj).length; + }; + + // Split a collection into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(obj, predicate, context) { + predicate = cb(predicate, context); + var pass = [], fail = []; + _.each(obj, function(value, key, obj) { + (predicate(value, key, obj) ? pass : fail).push(value); + }); + return [pass, fail]; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head` and `take`. The **guard** check + // allows it to work with `_.map`. + _.first = _.head = _.take = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[0]; + return _.initial(array, array.length - n); + }; + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. + _.initial = function(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); + }; + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. + _.last = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[array.length - 1]; + return _.rest(array, Math.max(0, array.length - n)); + }; + + // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. + // Especially useful on the arguments object. Passing an **n** will return + // the rest N values in the array. + _.rest = _.tail = _.drop = function(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + }; + + // Trim out all falsy values from an array. + _.compact = function(array) { + return _.filter(array, _.identity); + }; + + // Internal implementation of a recursive `flatten` function. + var flatten = function(input, shallow, strict, startIndex) { + var output = [], idx = 0; + for (var i = startIndex || 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { + //flatten current level of array or arguments object + if (!shallow) value = flatten(value, shallow, strict); + var j = 0, len = value.length; + output.length += len; + while (j < len) { + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; + }; + + // Flatten out an array, either recursively (by default), or just one level. + _.flatten = function(array, shallow) { + return flatten(array, shallow, false); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function(array) { + return _.difference(array, slice.call(arguments, 1)); + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function(array, isSorted, iteratee, context) { + if (!_.isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!_.contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!_.contains(result, value)) { + result.push(value); + } + } + return result; + }; + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + _.union = function() { + return _.uniq(flatten(arguments, true, true)); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersection = function(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (_.contains(result, item)) continue; + for (var j = 1; j < argsLength; j++) { + if (!_.contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; + }; + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + _.difference = function(array) { + var rest = flatten(arguments, true, true, 1); + return _.filter(array, function(value){ + return !_.contains(rest, value); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function() { + return _.unzip(arguments); + }; + + // Complement of _.zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices + _.unzip = function(array) { + var length = array && _.max(array, getLength).length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = _.pluck(array, index); + } + return result; + }; + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. + _.object = function(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + }; + + // Generator function to create the findIndex and findLastIndex functions + function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; + } + + // Returns the first index on an array-like that passes a predicate test + _.findIndex = createPredicateIndexFinder(1); + _.findLastIndex = createPredicateIndexFinder(-1); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + }; + + // Generator function to create the indexOf and lastIndexOf functions + function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), _.isNaN); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; + } + + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); + _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + step = step || 1; + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Determines whether to execute a function as a constructor + // or a normal function with the provided arguments + var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (_.isObject(result)) return result; + return self; + }; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if + // available. + _.bind = function(func, context) { + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); + var args = slice.call(arguments, 2); + var bound = function() { + return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); + }; + return bound; + }; + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. + _.partial = function(func) { + var boundArgs = slice.call(arguments, 1); + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; + }; + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + _.bindAll = function(obj) { + var i, length = arguments.length, key; + if (length <= 1) throw new Error('bindAll must be passed function names'); + for (i = 1; i < length; i++) { + key = arguments[i]; + obj[key] = _.bind(obj[key], obj); + } + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ + return func.apply(null, args); + }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = _.partial(_.delay, _, 1); + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function() { + previous = options.leading === false ? 0 : _.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function() { + var now = _.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function(func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + + if (last < wait && last >= 0) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + if (!timeout) context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function(func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a negated version of the passed-in predicate. + _.negate = function(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; + }; + + // Returns a function that will only be executed on and after the Nth call. + _.after = function(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + }; + + // Returns a function that will only be executed up to (but not including) the Nth call. + _.before = function(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = _.partial(_.before, 2); + + // Object Functions + // ---------------- + + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); + var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + function collectNonEnumProps(obj, keys) { + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { + keys.push(prop); + } + } + } + + // Retrieve the names of an object's own properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve all the property names of an object. + _.allKeys = function(obj) { + if (!_.isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } + return values; + }; + + // Returns the results of applying the iteratee to each element of the object + // In contrast to _.map it returns an object + _.mapObject = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = _.keys(obj), + length = keys.length, + results = {}, + currentKey; + for (var index = 0; index < length; index++) { + currentKey = keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + // Convert an object into a list of `[key, value]` pairs. + _.pairs = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } + return pairs; + }; + + // Invert the keys and values of an object. The values must be serializable. + _.invert = function(obj) { + var result = {}; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } + return result; + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function(obj) { + var names = []; + for (var key in obj) { + if (_.isFunction(obj[key])) names.push(key); + } + return names.sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = createAssigner(_.allKeys); + + // Assigns a given object with all the own properties in the passed-in object(s) + // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + _.extendOwn = _.assign = createAssigner(_.keys); + + // Returns the first key on an object that passes a predicate test + _.findKey = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = _.keys(obj), key; + for (var i = 0, length = keys.length; i < length; i++) { + key = keys[i]; + if (predicate(obj[key], key, obj)) return key; + } + }; + + // Return a copy of the object only containing the whitelisted properties. + _.pick = function(object, oiteratee, context) { + var result = {}, obj = object, iteratee, keys; + if (obj == null) return result; + if (_.isFunction(oiteratee)) { + keys = _.allKeys(obj); + iteratee = optimizeCb(oiteratee, context); + } else { + keys = flatten(arguments, false, false, 1); + iteratee = function(value, key, obj) { return key in obj; }; + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; + }; + + // Return a copy of the object without the blacklisted properties. + _.omit = function(obj, iteratee, context) { + if (_.isFunction(iteratee)) { + iteratee = _.negate(iteratee); + } else { + var keys = _.map(flatten(arguments, false, false, 1), String); + iteratee = function(value, key) { + return !_.contains(keys, key); + }; + } + return _.pick(obj, iteratee, context); + }; + + // Fill in a given object with default properties. + _.defaults = createAssigner(_.allKeys, true); + + // Creates an object that inherits from the given prototype object. + // If additional properties are provided then they will be added to the + // created object. + _.create = function(prototype, props) { + var result = baseCreate(prototype); + if (props) _.extendOwn(result, props); + return result; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function(obj) { + if (!_.isObject(obj)) return obj; + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function(obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Returns whether an object has a given set of `key:value` pairs. + _.isMatch = function(object, attrs) { + var keys = _.keys(attrs), length = keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; + }; + + + // Internal recursive comparison function for `isEqual`. + var eq = function(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // A strict comparison is necessary because `null == undefined`. + if (a == null || b == null) return a === b; + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + switch (className) { + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + } + + var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && + _.isFunction(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var keys = _.keys(a), key; + length = keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (_.keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = keys[length]; + if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function(a, b) { + return eq(a, b); + }; + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + _.isEmpty = function(obj) { + if (obj == null) return true; + if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; + return _.keys(obj).length === 0; + }; + + // Is a given value a DOM element? + _.isElement = function(obj) { + return !!(obj && obj.nodeType === 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = nativeIsArray || function(obj) { + return toString.call(obj) === '[object Array]'; + }; + + // Is a given variable an object? + _.isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. + _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { + _['is' + name] = function(obj) { + return toString.call(obj) === '[object ' + name + ']'; + }; + }); + + // Define a fallback version of the method in browsers (ahem, IE < 9), where + // there isn't any inspectable "Arguments" type. + if (!_.isArguments(arguments)) { + _.isArguments = function(obj) { + return _.has(obj, 'callee'); + }; + } + + // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, + // IE 11 (#1621), and in Safari 8 (#1929). + if (typeof /./ != 'function' && typeof Int8Array != 'object') { + _.isFunction = function(obj) { + return typeof obj == 'function' || false; + }; + } + + // Is a given object a finite number? + _.isFinite = function(obj) { + return isFinite(obj) && !isNaN(parseFloat(obj)); + }; + + // Is the given value `NaN`? (NaN is the only number which does not equal itself). + _.isNaN = function(obj) { + return _.isNumber(obj) && obj !== +obj; + }; + + // Is a given value a boolean? + _.isBoolean = function(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; + }; + + // Is a given value equal to null? + _.isNull = function(obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function(obj) { + return obj === void 0; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function() { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iteratees. + _.identity = function(value) { + return value; + }; + + // Predicate-generating functions. Often useful outside of Underscore. + _.constant = function(value) { + return function() { + return value; + }; + }; + + _.noop = function(){}; + + _.property = property; + + // Generates a function for a given object that returns a given property. + _.propertyOf = function(obj) { + return obj == null ? function(){} : function(key) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of + // `key:value` pairs. + _.matcher = _.matches = function(attrs) { + attrs = _.extendOwn({}, attrs); + return function(obj) { + return _.isMatch(obj, attrs); + }; + }; + + // Run a function **n** times. + _.times = function(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; + }; + + // Return a random integer between min and max (inclusive). + _.random = function(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + }; + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { + return new Date().getTime(); + }; + + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + var unescapeMap = _.invert(escapeMap); + + // Functions for escaping and unescaping strings to/from HTML interpolation. + var createEscaper = function(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped + var source = '(?:' + _.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + _.escape = createEscaper(escapeMap); + _.unescape = createEscaper(unescapeMap); + + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. + _.result = function(object, property, fallback) { + var value = object == null ? void 0 : object[property]; + if (value === void 0) { + value = fallback; + } + return _.isFunction(value) ? value.call(object) : value; + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate : /<%([\s\S]+?)%>/g, + interpolate : /<%=([\s\S]+?)%>/g, + escape : /<%-([\s\S]+?)%>/g + }; + + // When customizing `templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + var escaper = /\\|'|\r|\n|\u2028|\u2029/g; + + var escapeChar = function(match) { + return '\\' + escapes[match]; + }; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + // NB: `oldSettings` only exists for backwards compatibility. + _.template = function(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = _.defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escaper, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offest. + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + try { + var render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _); + }; + + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; + }; + + // Add a "chain" function. Start chaining a wrapped Underscore object. + _.chain = function(obj) { + var instance = _(obj); + instance._chain = true; + return instance; + }; + + // OOP + // --------------- + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + + // Helper function to continue chaining intermediate results. + var result = function(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function(obj) { + _.each(_.functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return result(this, func.apply(_, args)); + }; + }); + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; + return result(this, obj); + }; + }); + + // Add all accessor Array functions to the wrapper. + _.each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + return result(this, method.apply(this._wrapped, arguments)); + }; + }); + + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; + + // Provide unwrapping proxy for some methods used in engine operations + // such as arithmetic and JSON stringification. + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + + _.prototype.toString = function() { + return '' + this._wrapped; + }; + + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } +}.call(this)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/LICENSE.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/LICENSE.md new file mode 100755 index 0000000..ed1d4f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/LICENSE.md @@ -0,0 +1,42 @@ +The software dual licensed under the MIT and GPL licenses. MIT license: + + Copyright (c) 2008-2013 Matsuza , Bjarke Walling + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +GPL notice (please read the [full GPL license] online): + + Copyright (C) 2008-2013 Matsuza , Bjarke Walling + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +[full GPL license]: http://www.gnu.org/licenses/gpl-2.0-standalone.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/README.md new file mode 100755 index 0000000..6ff6420 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/README.md @@ -0,0 +1,118 @@ +This is [Unicode Normalizer] in a Common JS module. I'm not affiliated with Matsuza, the original author of Unicode Normalizer. + +[![Build Status](https://travis-ci.org/walling/unorm.png?branch=master)](https://travis-ci.org/walling/unorm) + + +Installation +------------ + +```bash +npm install unorm +``` + +Polyfill +-------- + +You can use this module as a polyfill for [String.prototype.normalize], for example: + +```javascript +console.log('æøåäüö'.normalize('NFKD')); +``` + +The module uses some [EcmaScript 5](http://kangax.github.io/es5-compat-table/) features. Other browsers should use a compability shim, e.g. [es5-shim](https://github.com/kriskowal/es5-shim). + +Functions +--------- + +This module exports four functions: `nfc`, `nfd`, `nfkc`, and `nfkd`; one for each Unicode normalization. In the browser the functions are exported in the `unorm` global. In CommonJS environments you just require the module. Functions: + + * `unorm.nfd(str)` – Canonical Decomposition + * `unorm.nfc(str)` – Canonical Decomposition, followed by Canonical Composition + * `unorm.nfkd(str)` – Compatibility Decomposition + * `unorm.nfkc(str)` – Compatibility Decomposition, followed by Canonical Composition + + +Node.JS example +--------------- + +For a longer example, see `examples` directory. + +```javascript +var unorm = require('unorm'); + +var text = + 'The \u212B symbol invented by A. J. \u00C5ngstr\u00F6m ' + + '(1814, L\u00F6gd\u00F6, \u2013 1874) denotes the length ' + + '10\u207B\u00B9\u2070 m.'; + +var combining = /[\u0300-\u036F]/g; // Use XRegExp('\\p{M}', 'g'); see example.js. + +console.log('Regular: ' + text); +console.log('NFC: ' + unorm.nfc(text)); +console.log('NFD: ' + unorm.nfd(text)); +console.log('NFKC: ' + unorm.nfkc(text)); +console.log('NFKD: * ' + unorm.nfkd(text).replace(combining, '')); +console.log(' * = Combining characters removed from decomposed form.'); +``` + + +Road map +-------- + +As of November 2013. Longer term: + +- Look at possible optimizations (speed primarely, module size secondarily) +- Adding functions to quick check normalizations: `is_nfc`, `is_nfd`, etc. + + +Contributers +------------ + + - **Oleg Grenrus** is helping to maintain this library. He cleaned up the code base, fixed JSHint errors, created a test suite and updated the normalization data to Unicode 6.3. + + +Development notes +----------------- + +- [Unicode normalization forms report](http://www.unicode.org/reports/tr15/) +- Unicode data can be found from http://www.unicode.org/Public/UCD/latest/ucd + +To generate new unicode data, run: +```sh +cd src/data/src +javac UnormNormalizerBuilder.java +java UnormNormalizerBuilder +``` +produced `unormdata.js` contains needed table + +Execute `node benchmark/benchmark.js` to run simple benchmarks, if you do any changes which may affect performance. + +License +------- + +This project includes the software package **Unicode Normalizer 1.0.0**. The +software dual licensed under the MIT and GPL licenses. Here is the MIT license: + + Copyright (c) 2008-2013 Matsuza , Bjarke Walling + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + +[Unicode Normalizer]: http://coderepos.org/share/browser/lang/javascript/UnicodeNormalizer +[String.prototype.normalize]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.5.3.26 diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/lib/unorm.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/lib/unorm.js new file mode 100755 index 0000000..92d3699 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/lib/unorm.js @@ -0,0 +1,442 @@ +(function (root) { + "use strict"; + +/***** unorm.js *****/ + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ + */ + + var DEFAULT_FEATURE = [null, 0, {}]; + var CACHE_THRESHOLD = 10; + var SBase = 0xAC00, LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21, TCount = 28; + var NCount = VCount * TCount; // 588 + var SCount = LCount * NCount; // 11172 + + var UChar = function(cp, feature){ + this.codepoint = cp; + this.feature = feature; + }; + + // Strategies + var cache = {}; + var cacheCounter = []; + for (var i = 0; i <= 0xFF; ++i){ + cacheCounter[i] = 0; + } + + function fromCache(next, cp, needFeature){ + var ret = cache[cp]; + if(!ret){ + ret = next(cp, needFeature); + if(!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD){ + cache[cp] = ret; + } + } + return ret; + } + + function fromData(next, cp, needFeature){ + var hash = cp & 0xFF00; + var dunit = UChar.udata[hash] || {}; + var f = dunit[cp]; + return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE); + } + function fromCpOnly(next, cp, needFeature){ + return !!needFeature ? next(cp, needFeature) : new UChar(cp, null); + } + function fromRuleBasedJamo(next, cp, needFeature){ + var j; + if(cp < LBase || (LBase + LCount <= cp && cp < SBase) || (SBase + SCount < cp)){ + return next(cp, needFeature); + } + if(LBase <= cp && cp < LBase + LCount){ + var c = {}; + var base = (cp - LBase) * VCount; + for (j = 0; j < VCount; ++j){ + c[VBase + j] = SBase + TCount * (j + base); + } + return new UChar(cp, [,,c]); + } + + var SIndex = cp - SBase; + var TIndex = SIndex % TCount; + var feature = []; + if(TIndex !== 0){ + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } else { + feature[0] = [LBase + Math.floor(SIndex / NCount), VBase + Math.floor((SIndex % NCount) / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j){ + feature[2][TBase + j] = cp + j; + } + } + return new UChar(cp, feature); + } + function fromCpFilter(next, cp, needFeature){ + return cp < 60 || 13311 < cp && cp < 42607 ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature); + } + + var strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + + UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { + return strategy(next, cp, needFeature); + }; + }, null); + + UChar.isHighSurrogate = function(cp){ + return cp >= 0xD800 && cp <= 0xDBFF; + }; + UChar.isLowSurrogate = function(cp){ + return cp >= 0xDC00 && cp <= 0xDFFF; + }; + + UChar.prototype.prepFeature = function(){ + if(!this.feature){ + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } + }; + + UChar.prototype.toString = function(){ + if(this.codepoint < 0x10000){ + return String.fromCharCode(this.codepoint); + } else { + var x = this.codepoint - 0x10000; + return String.fromCharCode(Math.floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00); + } + }; + + UChar.prototype.getDecomp = function(){ + this.prepFeature(); + return this.feature[0] || null; + }; + + UChar.prototype.isCompatibility = function(){ + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 8)); + }; + UChar.prototype.isExclude = function(){ + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 9)); + }; + UChar.prototype.getCanonicalClass = function(){ + this.prepFeature(); + return !!this.feature[1] ? (this.feature[1] & 0xff) : 0; + }; + UChar.prototype.getComposite = function(following){ + this.prepFeature(); + if(!this.feature[2]){ + return null; + } + var cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; + }; + + var UCharIterator = function(str){ + this.str = str; + this.cursor = 0; + }; + UCharIterator.prototype.next = function(){ + if(!!this.str && this.cursor < this.str.length){ + var cp = this.str.charCodeAt(this.cursor++); + var d; + if(UChar.isHighSurrogate(cp) && this.cursor < this.str.length && UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))){ + cp = (cp - 0xD800) * 0x400 + (d -0xDC00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } else { + this.str = null; + return null; + } + }; + + var RecursDecompIterator = function(it, cano){ + this.it = it; + this.canonical = cano; + this.resBuf = []; + }; + + RecursDecompIterator.prototype.next = function(){ + function recursiveDecomp(cano, uchar){ + var decomp = uchar.getDecomp(); + if(!!decomp && !(cano && uchar.isCompatibility())){ + var ret = []; + for(var i = 0; i < decomp.length; ++i){ + var a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + ret = ret.concat(a); + } + return ret; + } else { + return [uchar]; + } + } + if(this.resBuf.length === 0){ + var uchar = this.it.next(); + if(!uchar){ + return null; + } + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); + }; + + var DecompIterator = function(it){ + this.it = it; + this.resBuf = []; + }; + + DecompIterator.prototype.next = function(){ + var cc; + if(this.resBuf.length === 0){ + do{ + var uchar = this.it.next(); + if(!uchar){ + break; + } + cc = uchar.getCanonicalClass(); + var inspt = this.resBuf.length; + if(cc !== 0){ + for(; inspt > 0; --inspt){ + var uchar2 = this.resBuf[inspt - 1]; + var cc2 = uchar2.getCanonicalClass(); + if(cc2 <= cc){ + break; + } + } + } + this.resBuf.splice(inspt, 0, uchar); + } while(cc !== 0); + } + return this.resBuf.shift(); + }; + + var CompIterator = function(it){ + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; + }; + + CompIterator.prototype.next = function(){ + while(this.resBuf.length === 0){ + var uchar = this.it.next(); + if(!uchar){ + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if(this.procBuf.length === 0){ + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + var starter = this.procBuf[0]; + var composite = starter.getComposite(uchar); + var cc = uchar.getCanonicalClass(); + if(!!composite && (this.lastClass < cc || this.lastClass === 0)){ + this.procBuf[0] = composite; + } else { + if(cc === 0){ + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); + }; + + var createIterator = function(mode, str){ + switch(mode){ + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true))); + case "NFKC": + return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false))); + } + throw mode + " is invalid"; + }; + var normalize = function(mode, str){ + var it = createIterator(mode, str); + var ret = ""; + var uchar; + while(!!(uchar = it.next())){ + ret += uchar.toString(); + } + return ret; + }; + + /* API functions */ + function nfd(str){ + return normalize("NFD", str); + } + + function nfkd(str){ + return normalize("NFKD", str); + } + + function nfc(str){ + return normalize("NFC", str); + } + + function nfkc(str){ + return normalize("NFKC", str); + } + +/* Unicode data */ +UChar.udata={ +0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]}, +256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]}, +512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]}, +768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]}, +1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]}, +1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]}, +1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]}, +1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]}, +2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]}, +2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]}, +2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]}, +2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]}, +3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]}, +3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]}, +3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]}, +3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]}, +4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]}, +4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]}, +4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]}, +4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]}, +5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]}, +5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]}, +5632:{71231:[,9],71350:[,9],71351:[,7]}, +5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]}, +6144:{6313:[,228]}, +6400:{6457:[,222],6458:[,230],6459:[,220]}, +6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]}, +6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]}, +7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]}, +7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]}, +7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]}, +7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]}, +8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]}, +8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]}, +8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]}, +8960:{9001:[[12296]],9002:[[12297]]}, +9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]}, +10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]}, +11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]}, +11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]}, +11776:{11935:[[27597],256],12019:[[40863],256]}, +12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]}, +12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]}, +12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]}, +12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]}, +13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]}, +27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]}, +27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]}, +42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]}, +42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]}, +43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]}, +43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]}, +43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]}, +43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]}, +48128:{113822:[,1]}, +53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]}, +53760:{119362:[,230],119363:[,230],119364:[,230]}, +54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]}, +54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]}, +54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]}, +55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]}, +59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]}, +60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]}, +61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]}, +61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]}, +63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]}, +63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]}, +64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]}, +64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]}, +64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]}, +64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]}, +65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]}, +65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]} + +}; + + /***** Module to export */ + var unorm = { + nfc: nfc, + nfd: nfd, + nfkc: nfkc, + nfkd: nfkd + }; + + /*globals module:true,define:true*/ + + // CommonJS + if (typeof module === "object") { + module.exports = unorm; + + // AMD + } else if (typeof define === "function" && define.amd) { + define("unorm", function () { + return unorm; + }); + + // Global + } else { + root.unorm = unorm; + } + + /***** Export as shim for String::normalize method *****/ + /* + http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#november_8_2013_draft_rev_21 + + 21.1.3.12 String.prototype.normalize(form="NFC") + When the normalize method is called with one argument form, the following steps are taken: + + 1. Let O be CheckObjectCoercible(this value). + 2. Let S be ToString(O). + 3. ReturnIfAbrupt(S). + 4. If form is not provided or undefined let form be "NFC". + 5. Let f be ToString(form). + 6. ReturnIfAbrupt(f). + 7. If f is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw a RangeError Exception. + 8. Let ns be the String value is the result of normalizing S into the normalization form named by f as specified in Unicode Standard Annex #15, UnicodeNormalizatoin Forms. + 9. Return ns. + + The length property of the normalize method is 0. + + *NOTE* The normalize function is intentionally generic; it does not require that its this value be a String object. Therefore it can be transferred to other kinds of objects for use as a method. + */ + unorm.shimApplied = false; + + if (!String.prototype.normalize) { + String.prototype.normalize = function(form) { + var str = "" + this; + form = form === undefined ? "NFC" : form; + + if (form === "NFC") { + return unorm.nfc(str); + } else if (form === "NFD") { + return unorm.nfd(str); + } else if (form === "NFKC") { + return unorm.nfkc(str); + } else if (form === "NFKD") { + return unorm.nfkd(str); + } else { + throw new RangeError("Invalid normalization form: " + form); + } + }; + + unorm.shimApplied = true; + } +}(this)); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/package.json new file mode 100755 index 0000000..5abd9b9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/unorm/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "unorm@^1.3.3", + "scope": null, + "escapedName": "unorm", + "name": "unorm", + "rawSpec": "^1.3.3", + "spec": ">=1.3.3 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common" + ] + ], + "_from": "unorm@>=1.3.3 <2.0.0", + "_id": "unorm@1.4.1", + "_inCache": true, + "_location": "/unorm", + "_npmUser": { + "name": "walling", + "email": "bwp@bwp.dk" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "unorm@^1.3.3", + "scope": null, + "escapedName": "unorm", + "name": "unorm", + "rawSpec": "^1.3.3", + "spec": ">=1.3.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", + "_shasum": "364200d5f13646ca8bcd44490271335614792300", + "_shrinkwrap": null, + "_spec": "unorm@^1.3.3", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/cordova-common", + "author": { + "name": "Bjarke Walling", + "email": "bwp@bwp.dk" + }, + "bugs": { + "url": "https://github.com/walling/unorm/issues" + }, + "contributors": [ + { + "name": "Bjarke Walling", + "email": "bwp@bwp.dk" + }, + { + "name": "Oleg Grenrus", + "email": "oleg.grenrus@iki.fi" + }, + { + "name": "Matsuza", + "email": "matsuza@gmail.com" + } + ], + "dependencies": {}, + "description": "JavaScript Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. Read UAX #15 Unicode Normalization Forms.", + "devDependencies": { + "benchmark": "~1.0.0", + "grunt": "~0.4.1", + "grunt-contrib-jshint": "~0.8.0", + "grunt-contrib-watch": "~0.5.0", + "grunt-simple-mocha": "~0.4.0", + "unorm": "1.4.1" + }, + "directories": {}, + "dist": { + "shasum": "364200d5f13646ca8bcd44490271335614792300", + "tarball": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz" + }, + "engines": { + "node": ">= 0.4.0" + }, + "gitHead": "e802d0d7844cf74b03742bce1147a82ace218396", + "homepage": "https://github.com/walling/unorm", + "license": "MIT or GPL-2.0", + "main": "./lib/unorm.js", + "maintainers": [ + { + "name": "walling", + "email": "bwp@bwp.dk" + } + ], + "name": "unorm", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/walling/unorm.git" + }, + "scripts": { + "test": "grunt test" + }, + "version": "1.4.1" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/History.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/History.md new file mode 100755 index 0000000..acc8675 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/LICENSE new file mode 100755 index 0000000..6a60e8c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/README.md new file mode 100755 index 0000000..75622fa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/browser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/browser.js new file mode 100755 index 0000000..549ae2f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/node.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/node.js new file mode 100755 index 0000000..5e6fcff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/package.json new file mode 100755 index 0000000..583fa25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/util-deprecate/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + { + "raw": "util-deprecate@1.0.2", + "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/plist" + ] + ], + "_from": "util-deprecate@1.0.2", + "_id": "util-deprecate@1.0.2", + "_inCache": true, + "_location": "/util-deprecate", + "_nodeVersion": "4.1.2", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "raw": "util-deprecate@1.0.2", + "scope": null, + "escapedName": "util-deprecate", + "name": "util-deprecate", + "rawSpec": "1.0.2", + "spec": "1.0.2", + "type": "version" + }, + "_requiredBy": [ + "/plist" + ], + "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_shrinkwrap": null, + "_spec": "util-deprecate@1.0.2", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/plist", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "dependencies": {}, + "description": "The Node.js `util.deprecate()` function with browser support", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "license": "MIT", + "main": "node.js", + "maintainers": [ + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "util-deprecate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/LICENSE new file mode 100755 index 0000000..19129e3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/README.md new file mode 100755 index 0000000..98eab25 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/package.json new file mode 100755 index 0000000..0db5ed9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "wrappy@1", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/inflight" + ] + ], + "_from": "wrappy@>=1.0.0 <2.0.0", + "_id": "wrappy@1.0.2", + "_inCache": true, + "_location": "/wrappy", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" + }, + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "wrappy@1", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_shrinkwrap": null, + "_spec": "wrappy@1", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/inflight", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "files": [ + "wrappy.js" + ], + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/wrappy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/wrappy.js new file mode 100755 index 0000000..bb7e7d6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/.npmignore new file mode 100755 index 0000000..65e3ba2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/.npmignore @@ -0,0 +1 @@ +test/ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/AUTHORS b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/AUTHORS new file mode 100755 index 0000000..dcef29f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/AUTHORS @@ -0,0 +1,6 @@ +Andrew Lunny (@alunny) +Anis Kadri (@imhotep) +Mike Reinstein (@mreinstein) +Filip Maj (@filmaj) +Brett Rudd (@goya) +Bob Easterday (@bobeast) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/LICENSE new file mode 100755 index 0000000..45f03a3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/LICENSE @@ -0,0 +1,14 @@ + Copyright 2012 Andrew Lunny, Adobe Systems + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/Makefile b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/Makefile new file mode 100755 index 0000000..f838310 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/Makefile @@ -0,0 +1,5 @@ +tests: + nodeunit test/* test/parser/* + +parser: + pegjs lib/parser/pbxproj.pegjs diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/README.md new file mode 100755 index 0000000..fe902ad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/README.md @@ -0,0 +1,42 @@ +# node-xcode + +> parser/toolkit for xcodeproj project files + +Allows you to edit xcodeproject files and write them back out. + +## Example + + // API is a bit wonky right now + var xcode = require('xcode'), + fs = require('fs'), + projectPath = 'myproject.xcodeproj/project.pbxproj', + myProj = xcode.project(projectPath); + + // parsing is async, in a different process + myProj.parse(function (err) { + myProj.addHeaderFile('foo.h'); + myProj.addSourceFile('foo.m'); + myProj.addFramework('FooKit.framework'); + + fs.writeFileSync(projectPath, myProj.writeSync()); + console.log('new project written'); + }); + +## Working on the parser + +If there's a problem parsing, you will want to edit the grammar under +`lib/parser/pbxproj.pegjs`. You can test it online with the PEGjs online thingy +at http://pegjs.majda.cz/online - I have had some mixed results though. + +Tests under the `test/parser` directory will compile the parser from the +grammar. Other tests will use the prebuilt parser (`lib/parser/pbxproj.js`). + +To rebuild the parser js file after editing the grammar, run: + + ./node_modules/.bin/pegjs lib/parser/pbxproj.pegjs + +(easier if `./node_modules/.bin` is in your path) + +## License + +MIT diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/index.js new file mode 100755 index 0000000..c593bb8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/index.js @@ -0,0 +1 @@ +exports.project = require('./lib/pbxProject') diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parseJob.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parseJob.js new file mode 100755 index 0000000..9d6bffa --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parseJob.js @@ -0,0 +1,15 @@ +// parsing is slow and blocking right now +// so we do it in a separate process +var fs = require('fs'), + parser = require('./parser/pbxproj'), + path = process.argv[2], + fileContents, obj; + +try { + fileContents = fs.readFileSync(path, 'utf-8'); + obj = parser.parse(fileContents); + process.send(obj); +} catch (e) { + process.send(e); + process.exitCode = 1; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.js new file mode 100755 index 0000000..f574479 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.js @@ -0,0 +1,1843 @@ +module.exports = (function() { + /* + * Generated by PEG.js 0.8.0. + * + * http://pegjs.majda.cz/ + */ + + function peg$subclass(child, parent) { + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function SyntaxError(message, expected, found, offset, line, column) { + this.message = message; + this.expected = expected; + this.found = found; + this.offset = offset; + this.line = line; + this.column = column; + + this.name = "SyntaxError"; + } + + peg$subclass(SyntaxError, Error); + + function parse(input) { + var options = arguments.length > 1 ? arguments[1] : {}, + + peg$FAILED = {}, + + peg$startRuleFunctions = { Project: peg$parseProject }, + peg$startRuleFunction = peg$parseProject, + + peg$c0 = peg$FAILED, + peg$c1 = null, + peg$c2 = function(headComment, obj) { + var proj = Object.create(null) + proj.project = obj + + if (headComment) { + proj.headComment = headComment + } + + return proj; + }, + peg$c3 = "{", + peg$c4 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c5 = "}", + peg$c6 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c7 = function(obj) { return obj }, + peg$c8 = function() { return Object.create(null) }, + peg$c9 = [], + peg$c10 = function(head, tail) { + if (tail) return merge(head,tail) + else return head + }, + peg$c11 = function(head, tail) { + if (tail) return merge(head,tail) + else return head + }, + peg$c12 = "=", + peg$c13 = { type: "literal", value: "=", description: "\"=\"" }, + peg$c14 = ";", + peg$c15 = { type: "literal", value: ";", description: "\";\"" }, + peg$c16 = function(id, val) { + var result = Object.create(null); + result[id] = val + return result + }, + peg$c17 = function(commentedId, val) { + var result = Object.create(null), + commentKey = commentedId.id + '_comment'; + + result[commentedId.id] = val; + result[commentKey] = commentedId[commentKey]; + return result; + + }, + peg$c18 = function(id, commentedVal) { + var result = Object.create(null); + result[id] = commentedVal.value; + result[id + "_comment"] = commentedVal.comment; + return result; + }, + peg$c19 = function(id, comment) { + var result = Object.create(null); + result.id = id; + result[id + "_comment"] = comment.trim(); + return result + }, + peg$c20 = function(literal, comment) { + var result = Object.create(null) + result.comment = comment.trim(); + result.value = literal.trim(); + return result; + }, + peg$c21 = /^[^*]/, + peg$c22 = { type: "class", value: "[^*]", description: "[^*]" }, + peg$c23 = function(body) { return body.join('') }, + peg$c24 = "/*", + peg$c25 = { type: "literal", value: "/*", description: "\"/*\"" }, + peg$c26 = "*/", + peg$c27 = { type: "literal", value: "*/", description: "\"*/\"" }, + peg$c28 = function(begin, fields) { + var section = Object.create(null); + section[begin.name] = fields + + return section + }, + peg$c29 = "/* Begin ", + peg$c30 = { type: "literal", value: "/* Begin ", description: "\"/* Begin \"" }, + peg$c31 = " section */", + peg$c32 = { type: "literal", value: " section */", description: "\" section */\"" }, + peg$c33 = function(sectionName) { return { name: sectionName } }, + peg$c34 = "/* End ", + peg$c35 = { type: "literal", value: "/* End ", description: "\"/* End \"" }, + peg$c36 = "(", + peg$c37 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c38 = ")", + peg$c39 = { type: "literal", value: ")", description: "\")\"" }, + peg$c40 = function(arr) { return arr }, + peg$c41 = function() { return [] }, + peg$c42 = function(head, tail) { + if (tail) { + tail.unshift(head); + return tail; + } else { + return [head]; + } + }, + peg$c43 = function(val) { return val }, + peg$c44 = function(val, comment) { + var result = Object.create(null); + result.value = val.trim(); + result.comment = comment.trim(); + return result; + }, + peg$c45 = ",", + peg$c46 = { type: "literal", value: ",", description: "\",\"" }, + peg$c47 = void 0, + peg$c48 = /^[A-Za-z0-9_.]/, + peg$c49 = { type: "class", value: "[A-Za-z0-9_.]", description: "[A-Za-z0-9_.]" }, + peg$c50 = function(id) { return id.join('') }, + peg$c51 = ".", + peg$c52 = { type: "literal", value: ".", description: "\".\"" }, + peg$c53 = function(decimal) { + // store decimals as strings + // as JS doesn't differentiate bw strings and numbers + return decimal.join('') + }, + peg$c54 = function(number) { return parseInt(number.join(''), 10) }, + peg$c55 = function(str) { return '"' + str + '"' }, + peg$c56 = function(str) { return str.join('') }, + peg$c57 = { type: "any", description: "any character" }, + peg$c58 = function(char) { return char }, + peg$c59 = "\\", + peg$c60 = { type: "literal", value: "\\", description: "\"\\\\\"" }, + peg$c61 = function() { return '\\"' }, + peg$c62 = function(literal) { return literal.join('') }, + peg$c63 = /^[^;,\n]/, + peg$c64 = { type: "class", value: "[^;,\\n]", description: "[^;,\\n]" }, + peg$c65 = "//", + peg$c66 = { type: "literal", value: "//", description: "\"//\"" }, + peg$c67 = function(contents) { return contents }, + peg$c68 = function(contents) { return contents.join('') }, + peg$c69 = /^[0-9]/, + peg$c70 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c71 = /^[A-Za-z]/, + peg$c72 = { type: "class", value: "[A-Za-z]", description: "[A-Za-z]" }, + peg$c73 = "\"", + peg$c74 = { type: "literal", value: "\"", description: "\"\\\"\"" }, + peg$c75 = { type: "other", description: "whitespace" }, + peg$c76 = /^[\t ]/, + peg$c77 = { type: "class", value: "[\\t ]", description: "[\\t ]" }, + peg$c78 = /^[\n\r]/, + peg$c79 = { type: "class", value: "[\\n\\r]", description: "[\\n\\r]" }, + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function expected(description) { + throw peg$buildException( + null, + [{ type: "other", description: description }], + peg$reportedPos + ); + } + + function error(message) { + throw peg$buildException(message, null, peg$reportedPos); + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === "\n") { + if (!details.seenCR) { details.line++; } + details.column = 1; + details.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } + } + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, pos) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function(a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + function buildMessage(expected, found) { + function stringEscape(s) { + function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } + + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); }) + .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) + .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, foundDesc, i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = expected.length > 1 + ? expectedDescs.slice(0, -1).join(", ") + + " or " + + expectedDescs[expected.length - 1] + : expectedDescs[0]; + + foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; + + return "Expected " + expectedDesc + " but " + foundDesc + " found."; + } + + var posDetails = peg$computePosDetails(pos), + found = pos < input.length ? input.charAt(pos) : null; + + if (expected !== null) { + cleanupExpected(expected); + } + + return new SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + pos, + posDetails.line, + posDetails.column + ); + } + + function peg$parseProject() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseSingleLineComment(); + if (s1 === peg$FAILED) { + s1 = peg$c1; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseInlineComment(); + if (s2 === peg$FAILED) { + s2 = peg$c1; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseObject(); + if (s4 !== peg$FAILED) { + s5 = peg$parseNewLine(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c2(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseObject() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c3; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c4); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseAssignmentList(); + if (s2 === peg$FAILED) { + s2 = peg$parseEmptyBody(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c5; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c7(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEmptyBody() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + + return s0; + } + + function peg$parseAssignmentList() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseAssignment(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseAssignmentList(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseAssignmentList(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c10(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDelimitedSection(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseAssignmentList(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseAssignmentList(); + } + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c11(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseAssignment() { + var s0; + + s0 = peg$parseSimpleAssignment(); + if (s0 === peg$FAILED) { + s0 = peg$parseCommentedAssignment(); + } + + return s0; + } + + function peg$parseSimpleAssignment() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } + } + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c16(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedAssignment() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseCommentedIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } + } + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c17(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCommentedValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } + } + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c18(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseCommentedIdentifier() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c19(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedValue() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c20(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseInlineComment() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseInlineCommentOpen(); + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c21.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c22); } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c21.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c22); } + } + } + } else { + s2 = peg$c0; + } + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineCommentClose(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c23(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseInlineCommentOpen() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c24) { + s0 = peg$c24; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c25); } + } + + return s0; + } + + function peg$parseInlineCommentClose() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c26) { + s0 = peg$c26; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c27); } + } + + return s0; + } + + function peg$parseDelimitedSection() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseDelimitedSectionBegin(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseAssignmentList(); + if (s3 === peg$FAILED) { + s3 = peg$parseEmptyBody(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseDelimitedSectionEnd(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c28(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseDelimitedSectionBegin() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c29) { + s1 = peg$c29; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c30); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c31) { + s3 = peg$c31; + peg$currPos += 11; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseDelimitedSectionEnd() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c34) { + s1 = peg$c34; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c35); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c31) { + s3 = peg$c31; + peg$currPos += 11; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseArray() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c36; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c37); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseArrayBody(); + if (s2 === peg$FAILED) { + s2 = peg$parseEmptyArray(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c38; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c39); } + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c40(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEmptyArray() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c41(); + } + s0 = s1; + + return s0; + } + + function peg$parseArrayBody() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseArrayEntry(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseArrayBody(); + if (s4 === peg$FAILED) { + s4 = peg$c1; + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c42(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseArrayEntry() { + var s0; + + s0 = peg$parseSimpleArrayEntry(); + if (s0 === peg$FAILED) { + s0 = peg$parseCommentedArrayEntry(); + } + + return s0; + } + + function peg$parseSimpleArrayEntry() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parseEndArrayEntry(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c43(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedArrayEntry() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEndArrayEntry(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c44(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEndArrayEntry() { + var s0, s1, s2, s3; + + if (input.charCodeAt(peg$currPos) === 44) { + s0 = peg$c45; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c46); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c38; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c39); } + } + peg$silentFails--; + if (s3 !== peg$FAILED) { + peg$currPos = s2; + s2 = peg$c47; + } else { + s2 = peg$c0; + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseIdentifier() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + if (peg$c48.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c48.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } + } + } + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parseQuotedString(); + } + + return s0; + } + + function peg$parseValue() { + var s0; + + s0 = peg$parseObject(); + if (s0 === peg$FAILED) { + s0 = peg$parseArray(); + if (s0 === peg$FAILED) { + s0 = peg$parseNumberValue(); + if (s0 === peg$FAILED) { + s0 = peg$parseStringValue(); + } + } + } + + return s0; + } + + function peg$parseNumberValue() { + var s0; + + s0 = peg$parseDecimalValue(); + if (s0 === peg$FAILED) { + s0 = peg$parseIntegerValue(); + } + + return s0; + } + + function peg$parseDecimalValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$parseIntegerValue(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c51; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c52); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseIntegerValue(); + if (s4 !== peg$FAILED) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c53(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseIntegerValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseAlpha(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDigit(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDigit(); + } + } else { + s2 = peg$c0; + } + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseNonTerminator(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = peg$c47; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c54(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseStringValue() { + var s0; + + s0 = peg$parseQuotedString(); + if (s0 === peg$FAILED) { + s0 = peg$parseLiteralString(); + } + + return s0; + } + + function peg$parseQuotedString() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseDoubleQuote(); + if (s1 !== peg$FAILED) { + s2 = peg$parseQuotedBody(); + if (s2 !== peg$FAILED) { + s3 = peg$parseDoubleQuote(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c55(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseQuotedBody() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNonQuote(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNonQuote(); + } + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c56(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseNonQuote() { + var s0, s1, s2; + + s0 = peg$parseEscapedQuote(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseDoubleQuote(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } + } + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseEscapedQuote() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c59; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseDoubleQuote(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c61(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseLiteralString() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseLiteralChar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseLiteralChar(); + } + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c62(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseLiteralChar() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseInlineCommentOpen(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseLineTerminator(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = peg$c47; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== peg$FAILED) { + s3 = peg$parseNonTerminator(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseNonTerminator() { + var s0; + + if (peg$c63.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c64); } + } + + return s0; + } + + function peg$parseSingleLineComment() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c65) { + s1 = peg$c65; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c66); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseOneLineString(); + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c67(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseOneLineString() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNonLine(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNonLine(); + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c68(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseDigit() { + var s0; + + if (peg$c69.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c70); } + } + + return s0; + } + + function peg$parseAlpha() { + var s0; + + if (peg$c71.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c72); } + } + + return s0; + } + + function peg$parseDoubleQuote() { + var s0; + + if (input.charCodeAt(peg$currPos) === 34) { + s0 = peg$c73; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c74); } + } + + return s0; + } + + function peg$parse_() { + var s0, s1; + + peg$silentFails++; + s0 = []; + s1 = peg$parsewhitespace(); + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsewhitespace(); + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c75); } + } + + return s0; + } + + function peg$parsewhitespace() { + var s0; + + s0 = peg$parseNewLine(); + if (s0 === peg$FAILED) { + if (peg$c76.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + } + + return s0; + } + + function peg$parseNonLine() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseNewLine(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseChar(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseLineTerminator() { + var s0; + + s0 = peg$parseNewLine(); + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s0 = peg$c14; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } + } + } + + return s0; + } + + function peg$parseNewLine() { + var s0; + + if (peg$c78.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c79); } + } + + return s0; + } + + function peg$parseChar() { + var s0; + + if (input.length > peg$currPos) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } + } + + return s0; + } + + + function merge(hash, secondHash) { + secondHash = secondHash[0] + for(var i in secondHash) { + hash[i] = merge_obj(hash[i], secondHash[i]); + } + + return hash; + } + + function merge_obj(obj, secondObj) { + if (!obj) + return secondObj; + + for(var i in secondObj) + obj[i] = merge_obj(obj[i], secondObj[i]); + + return obj; + } + + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: "end", description: "end of input" }); + } + + throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); + } + } + + return { + SyntaxError: SyntaxError, + parse: parse + }; +})(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.pegjs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.pegjs new file mode 100755 index 0000000..5140c05 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.pegjs @@ -0,0 +1,273 @@ +{ + function merge(hash, secondHash) { + secondHash = secondHash[0] + for(var i in secondHash) { + hash[i] = merge_obj(hash[i], secondHash[i]); + } + + return hash; + } + + function merge_obj(obj, secondObj) { + if (!obj) + return secondObj; + + for(var i in secondObj) + obj[i] = merge_obj(obj[i], secondObj[i]); + + return obj; + } +} + +/* + * Project: point of entry from pbxproj file + */ +Project + = headComment:SingleLineComment? InlineComment? _ obj:Object NewLine _ + { + var proj = Object.create(null) + proj.project = obj + + if (headComment) { + proj.headComment = headComment + } + + return proj; + } + +/* + * Object: basic hash data structure with Assignments + */ +Object + = "{" obj:(AssignmentList / EmptyBody) "}" + { return obj } + +EmptyBody + = _ + { return Object.create(null) } + +AssignmentList + = _ head:Assignment _ tail:AssignmentList* _ + { + if (tail) return merge(head,tail) + else return head + } + / _ head:DelimitedSection _ tail:AssignmentList* + { + if (tail) return merge(head,tail) + else return head + } + +/* + * Assignments + * can be simple "key = value" + * or commented "key /* real key * / = value" + */ +Assignment + = SimpleAssignment / CommentedAssignment + +SimpleAssignment + = id:Identifier _ "=" _ val:Value ";" + { + var result = Object.create(null); + result[id] = val + return result + } + +CommentedAssignment + = commentedId:CommentedIdentifier _ "=" _ val:Value ";" + { + var result = Object.create(null), + commentKey = commentedId.id + '_comment'; + + result[commentedId.id] = val; + result[commentKey] = commentedId[commentKey]; + return result; + + } + / + id:Identifier _ "=" _ commentedVal:CommentedValue ";" + { + var result = Object.create(null); + result[id] = commentedVal.value; + result[id + "_comment"] = commentedVal.comment; + return result; + } + +CommentedIdentifier + = id:Identifier _ comment:InlineComment + { + var result = Object.create(null); + result.id = id; + result[id + "_comment"] = comment.trim(); + return result + } + +CommentedValue + = literal:Value _ comment:InlineComment + { + var result = Object.create(null) + result.comment = comment.trim(); + result.value = literal.trim(); + return result; + } + +InlineComment + = InlineCommentOpen body:[^*]+ InlineCommentClose + { return body.join('') } + +InlineCommentOpen + = "/*" + +InlineCommentClose + = "*/" + +/* + * DelimitedSection - ad hoc project structure pbxproj files use + */ +DelimitedSection + = begin:DelimitedSectionBegin _ fields:(AssignmentList / EmptyBody) _ DelimitedSectionEnd + { + var section = Object.create(null); + section[begin.name] = fields + + return section + } + +DelimitedSectionBegin + = "/* Begin " sectionName:Identifier " section */" NewLine + { return { name: sectionName } } + +DelimitedSectionEnd + = "/* End " sectionName:Identifier " section */" NewLine + { return { name: sectionName } } + +/* + * Arrays: lists of values, possible wth comments + */ +Array + = "(" arr:(ArrayBody / EmptyArray ) ")" { return arr } + +EmptyArray + = _ { return [] } + +ArrayBody + = _ head:ArrayEntry _ tail:ArrayBody? _ + { + if (tail) { + tail.unshift(head); + return tail; + } else { + return [head]; + } + } + +ArrayEntry + = SimpleArrayEntry / CommentedArrayEntry + +SimpleArrayEntry + = val:Value EndArrayEntry { return val } + +CommentedArrayEntry + = val:Value _ comment:InlineComment EndArrayEntry + { + var result = Object.create(null); + result.value = val.trim(); + result.comment = comment.trim(); + return result; + } + +EndArrayEntry + = "," / _ &")" + +/* + * Identifiers and Values + */ +Identifier + = id:[A-Za-z0-9_.]+ { return id.join('') } + / QuotedString + +Value + = Object / Array / NumberValue / StringValue + +NumberValue + = DecimalValue / IntegerValue + +DecimalValue + = decimal:(IntegerValue "." IntegerValue) + { + // store decimals as strings + // as JS doesn't differentiate bw strings and numbers + return decimal.join('') + } + +IntegerValue + = !Alpha number:Digit+ !NonTerminator + { return parseInt(number.join(''), 10) } + +StringValue + = QuotedString / LiteralString + +QuotedString + = DoubleQuote str:QuotedBody DoubleQuote { return '"' + str + '"' } + +QuotedBody + = str:NonQuote+ { return str.join('') } + +NonQuote + = EscapedQuote / !DoubleQuote char:. { return char } + +EscapedQuote + = "\\" DoubleQuote { return '\\"' } + +LiteralString + = literal:LiteralChar+ { return literal.join('') } + +LiteralChar + = !InlineCommentOpen !LineTerminator char:NonTerminator + { return char } + +NonTerminator + = [^;,\n] + +/* + * SingleLineComment - used for the encoding comment + */ +SingleLineComment + = "//" _ contents:OneLineString NewLine + { return contents } + +OneLineString + = contents:NonLine* + { return contents.join('') } + +/* + * Simple character checking rules + */ +Digit + = [0-9] + +Alpha + = [A-Za-z] + +DoubleQuote + = '"' + +_ "whitespace" + = whitespace* + +whitespace + = NewLine / [\t ] + +NonLine + = !NewLine char:Char + { return char } + +LineTerminator + = NewLine / ";" + +NewLine + = [\n\r] + +Char + = . diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxFile.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxFile.js new file mode 100755 index 0000000..67cb6cf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxFile.js @@ -0,0 +1,213 @@ +var path = require('path'), + util = require('util'); + +var DEFAULT_SOURCETREE = '""', + DEFAULT_PRODUCT_SOURCETREE = 'BUILT_PRODUCTS_DIR', + DEFAULT_FILEENCODING = 4, + DEFAULT_GROUP = 'Resources', + DEFAULT_FILETYPE = 'unknown'; + +var FILETYPE_BY_EXTENSION = { + a: 'archive.ar', + app: 'wrapper.application', + appex: 'wrapper.app-extension', + bundle: 'wrapper.plug-in', + dylib: 'compiled.mach-o.dylib', + framework: 'wrapper.framework', + h: 'sourcecode.c.h', + m: 'sourcecode.c.objc', + markdown: 'text', + mdimporter: 'wrapper.cfbundle', + octest: 'wrapper.cfbundle', + pch: 'sourcecode.c.h', + plist: 'text.plist.xml', + sh: 'text.script.sh', + swift: 'sourcecode.swift', + tbd: 'sourcecode.text-based-dylib-definition', + xcassets: 'folder.assetcatalog', + xcconfig: 'text.xcconfig', + xcdatamodel: 'wrapper.xcdatamodel', + xcodeproj: 'wrapper.pb-project', + xctest: 'wrapper.cfbundle', + xib: 'file.xib' + }, + GROUP_BY_FILETYPE = { + 'archive.ar': 'Frameworks', + 'compiled.mach-o.dylib': 'Frameworks', + 'sourcecode.text-based-dylib-definition': 'Frameworks', + 'wrapper.framework': 'Frameworks', + 'embedded.framework': 'Embed Frameworks', + 'sourcecode.c.h': 'Resources', + 'sourcecode.c.objc': 'Sources', + 'sourcecode.swift': 'Sources' + }, + PATH_BY_FILETYPE = { + 'compiled.mach-o.dylib': 'usr/lib/', + 'sourcecode.text-based-dylib-definition': 'usr/lib/', + 'wrapper.framework': 'System/Library/Frameworks/' + }, + SOURCETREE_BY_FILETYPE = { + 'compiled.mach-o.dylib': 'SDKROOT', + 'sourcecode.text-based-dylib-definition': 'SDKROOT', + 'wrapper.framework': 'SDKROOT' + }, + ENCODING_BY_FILETYPE = { + 'sourcecode.c.h': 4, + 'sourcecode.c.h': 4, + 'sourcecode.c.objc': 4, + 'sourcecode.swift': 4, + 'text': 4, + 'text.plist.xml': 4, + 'text.script.sh': 4, + 'text.xcconfig': 4 + }; + + +function unquoted(text){ + return text.replace (/(^")|("$)/g, '') +} + +function detectType(filePath) { + var extension = path.extname(filePath).substring(1), + filetype = FILETYPE_BY_EXTENSION[unquoted(extension)]; + + if (!filetype) { + return DEFAULT_FILETYPE; + } + + return filetype; +} + +function defaultExtension(fileRef) { + var filetype = fileRef.lastKnownFileType || fileRef.explicitFileType; + + for(var extension in FILETYPE_BY_EXTENSION) { + if(FILETYPE_BY_EXTENSION.hasOwnProperty(unquoted(extension)) ) { + if(FILETYPE_BY_EXTENSION[unquoted(extension)] === filetype ) + return extension; + } + } +} + +function defaultEncoding(fileRef) { + var filetype = fileRef.lastKnownFileType || fileRef.explicitFileType, + encoding = ENCODING_BY_FILETYPE[unquoted(filetype)]; + + if (encoding) { + return encoding; + } +} + +function detectGroup(fileRef, opt) { + var extension = path.extname(fileRef.basename).substring(1), + filetype = fileRef.lastKnownFileType || fileRef.explicitFileType, + groupName = GROUP_BY_FILETYPE[unquoted(filetype)]; + + if (extension === 'xcdatamodeld') { + return 'Sources'; + } + + if (opt.customFramework && opt.embed) { + return GROUP_BY_FILETYPE['embedded.framework']; + } + + if (!groupName) { + return DEFAULT_GROUP; + } + + return groupName; +} + +function detectSourcetree(fileRef) { + + var filetype = fileRef.lastKnownFileType || fileRef.explicitFileType, + sourcetree = SOURCETREE_BY_FILETYPE[unquoted(filetype)]; + + if (fileRef.explicitFileType) { + return DEFAULT_PRODUCT_SOURCETREE; + } + + if (fileRef.customFramework) { + return DEFAULT_SOURCETREE; + } + + if (!sourcetree) { + return DEFAULT_SOURCETREE; + } + + return sourcetree; +} + +function defaultPath(fileRef, filePath) { + var filetype = fileRef.lastKnownFileType || fileRef.explicitFileType, + defaultPath = PATH_BY_FILETYPE[unquoted(filetype)]; + + if (fileRef.customFramework) { + return filePath; + } + + if (defaultPath) { + return path.join(defaultPath, path.basename(filePath)); + } + + return filePath; +} + +function defaultGroup(fileRef) { + var groupName = GROUP_BY_FILETYPE[fileRef.lastKnownFileType]; + + if (!groupName) { + return DEFAULT_GROUP; + } + + return defaultGroup; +} + +function pbxFile(filepath, opt) { + var opt = opt || {}; + + this.basename = path.basename(filepath); + this.lastKnownFileType = opt.lastKnownFileType || detectType(filepath); + this.group = detectGroup(this, opt); + + // for custom frameworks + if (opt.customFramework == true) { + this.customFramework = true; + this.dirname = path.dirname(filepath).replace(/\\/g, '/'); + } + + this.path = defaultPath(this, filepath).replace(/\\/g, '/'); + this.fileEncoding = this.defaultEncoding = opt.defaultEncoding || defaultEncoding(this); + + // When referencing products / build output files + if (opt.explicitFileType) { + this.explicitFileType = opt.explicitFileType; + this.basename = this.basename + '.' + defaultExtension(this); + delete this.path; + delete this.lastKnownFileType; + delete this.group; + delete this.defaultEncoding; + } + + this.sourceTree = opt.sourceTree || detectSourcetree(this); + this.includeInIndex = 0; + + if (opt.weak && opt.weak === true) + this.settings = { ATTRIBUTES: ['Weak'] }; + + if (opt.compilerFlags) { + if (!this.settings) + this.settings = {}; + this.settings.COMPILER_FLAGS = util.format('"%s"', opt.compilerFlags); + } + + if (opt.embed && opt.sign) { + if (!this.settings) + this.settings = {}; + if (!this.settings.ATTRIBUTES) + this.settings.ATTRIBUTES = []; + this.settings.ATTRIBUTES.push('CodeSignOnCopy'); + } +} + +module.exports = pbxFile; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxProject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxProject.js new file mode 100755 index 0000000..9a2f5ed --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxProject.js @@ -0,0 +1,1898 @@ +var util = require('util'), + f = util.format, + EventEmitter = require('events').EventEmitter, + path = require('path'), + uuid = require('node-uuid'), + fork = require('child_process').fork, + pbxWriter = require('./pbxWriter'), + pbxFile = require('./pbxFile'), + fs = require('fs'), + parser = require('./parser/pbxproj'), + plist = require('simple-plist'), + COMMENT_KEY = /_comment$/ + +function pbxProject(filename) { + if (!(this instanceof pbxProject)) + return new pbxProject(filename); + + this.filepath = path.resolve(filename) +} + +util.inherits(pbxProject, EventEmitter) + +pbxProject.prototype.parse = function(cb) { + var worker = fork(__dirname + '/parseJob.js', [this.filepath]) + + worker.on('message', function(msg) { + if (msg.name == 'SyntaxError' || msg.code) { + this.emit('error', msg); + } else { + this.hash = msg; + this.emit('end', null, msg) + } + }.bind(this)); + + if (cb) { + this.on('error', cb); + this.on('end', cb); + } + + return this; +} + +pbxProject.prototype.parseSync = function() { + var file_contents = fs.readFileSync(this.filepath, 'utf-8'); + + this.hash = parser.parse(file_contents); + return this; +} + +pbxProject.prototype.writeSync = function() { + this.writer = new pbxWriter(this.hash); + return this.writer.writeSync(); +} + +pbxProject.prototype.allUuids = function() { + var sections = this.hash.project.objects, + uuids = [], + section; + + for (key in sections) { + section = sections[key] + uuids = uuids.concat(Object.keys(section)) + } + + uuids = uuids.filter(function(str) { + return !COMMENT_KEY.test(str) && str.length == 24; + }); + + return uuids; +} + +pbxProject.prototype.generateUuid = function() { + var id = uuid.v4() + .replace(/-/g, '') + .substr(0, 24) + .toUpperCase() + + if (this.allUuids().indexOf(id) >= 0) { + return this.generateUuid(); + } else { + return id; + } +} + +pbxProject.prototype.addPluginFile = function(path, opt) { + var file = new pbxFile(path, opt); + + file.plugin = true; // durr + correctForPluginsPath(file, this); + + // null is better for early errors + if (this.hasFile(file.path)) return null; + + file.fileRef = this.generateUuid(); + + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPluginsPbxGroup(file); // PBXGroup + + return file; +} + +pbxProject.prototype.removePluginFile = function(path, opt) { + var file = new pbxFile(path, opt); + correctForPluginsPath(file, this); + + this.removeFromPbxFileReferenceSection(file); // PBXFileReference + this.removeFromPluginsPbxGroup(file); // PBXGroup + + return file; +} + +pbxProject.prototype.addProductFile = function(targetPath, opt) { + var file = new pbxFile(targetPath, opt); + + file.includeInIndex = 0; + file.fileRef = this.generateUuid(); + file.target = opt ? opt.target : undefined; + file.group = opt ? opt.group : undefined; + file.uuid = this.generateUuid(); + file.path = file.basename; + + this.addToPbxFileReferenceSection(file); + this.addToProductsPbxGroup(file); // PBXGroup + + return file; +} + +pbxProject.prototype.removeProductFile = function(path, opt) { + var file = new pbxFile(path, opt); + + this.removeFromProductsPbxGroup(file); // PBXGroup + + return file; +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.addSourceFile = function (path, opt, group) { + var file; + if (group) { + file = this.addFile(path, group, opt); + } + else { + file = this.addPluginFile(path, opt); + } + + if (!file) return false; + + file.target = opt ? opt.target : undefined; + file.uuid = this.generateUuid(); + + this.addToPbxBuildFileSection(file); // PBXBuildFile + this.addToPbxSourcesBuildPhase(file); // PBXSourcesBuildPhase + + return file; +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.removeSourceFile = function (path, opt, group) { + var file; + if (group) { + file = this.removeFile(path, group, opt); + } + else { + file = this.removePluginFile(path, opt); + } + file.target = opt ? opt.target : undefined; + this.removeFromPbxBuildFileSection(file); // PBXBuildFile + this.removeFromPbxSourcesBuildPhase(file); // PBXSourcesBuildPhase + + return file; +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.addHeaderFile = function (path, opt, group) { + if (group) { + return this.addFile(path, group, opt); + } + else { + return this.addPluginFile(path, opt); + } +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.removeHeaderFile = function (path, opt, group) { + if (group) { + return this.removeFile(path, group, opt); + } + else { + return this.removePluginFile(path, opt); + } +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.addResourceFile = function(path, opt, group) { + opt = opt || {}; + + var file; + + if (opt.plugin) { + file = this.addPluginFile(path, opt); + if (!file) return false; + } else { + file = new pbxFile(path, opt); + if (this.hasFile(file.path)) return false; + } + + file.uuid = this.generateUuid(); + file.target = opt ? opt.target : undefined; + + if (!opt.plugin) { + correctForResourcesPath(file, this); + file.fileRef = this.generateUuid(); + } + + this.addToPbxBuildFileSection(file); // PBXBuildFile + this.addToPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase + + if (!opt.plugin) { + this.addToPbxFileReferenceSection(file); // PBXFileReference + if (group) { + this.addToPbxGroup(file, group); //Group other than Resources (i.e. 'splash') + } + else { + this.addToResourcesPbxGroup(file); // PBXGroup + } + + } + + return file; +} + +/** + * + * @param path {String} + * @param opt {Object} see pbxFile for avail options + * @param group {String} group key + * @returns {Object} file; see pbxFile + */ +pbxProject.prototype.removeResourceFile = function(path, opt, group) { + var file = new pbxFile(path, opt); + file.target = opt ? opt.target : undefined; + + correctForResourcesPath(file, this); + + this.removeFromPbxBuildFileSection(file); // PBXBuildFile + this.removeFromPbxFileReferenceSection(file); // PBXFileReference + if (group) { + this.removeFromPbxGroup(file, group); //Group other than Resources (i.e. 'splash') + } + else { + this.removeFromResourcesPbxGroup(file); // PBXGroup + } + this.removeFromPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase + + return file; +} + +pbxProject.prototype.addFramework = function(fpath, opt) { + var customFramework = opt && opt.customFramework == true; + var link = !opt || (opt.link == undefined || opt.link); //defaults to true if not specified + var embed = opt && opt.embed; //defaults to false if not specified + + if (opt) { + delete opt.embed; + } + + var file = new pbxFile(fpath, opt); + + file.uuid = this.generateUuid(); + file.fileRef = this.generateUuid(); + file.target = opt ? opt.target : undefined; + + if (this.hasFile(file.path)) return false; + + this.addToPbxBuildFileSection(file); // PBXBuildFile + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToFrameworksPbxGroup(file); // PBXGroup + + if (link) { + this.addToPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase + } + + if (customFramework) { + this.addToFrameworkSearchPaths(file); + + if (embed) { + opt.embed = embed; + var embeddedFile = new pbxFile(fpath, opt); + + embeddedFile.uuid = this.generateUuid(); + embeddedFile.fileRef = file.fileRef; + + //keeping a separate PBXBuildFile entry for Embed Frameworks + this.addToPbxBuildFileSection(embeddedFile); // PBXBuildFile + + this.addToPbxEmbedFrameworksBuildPhase(embeddedFile); // PBXCopyFilesBuildPhase + + return embeddedFile; + } + } + + return file; +} + +pbxProject.prototype.removeFramework = function(fpath, opt) { + var embed = opt && opt.embed; + + if (opt) { + delete opt.embed; + } + + var file = new pbxFile(fpath, opt); + file.target = opt ? opt.target : undefined; + + this.removeFromPbxBuildFileSection(file); // PBXBuildFile + this.removeFromPbxFileReferenceSection(file); // PBXFileReference + this.removeFromFrameworksPbxGroup(file); // PBXGroup + this.removeFromPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase + + if (opt && opt.customFramework) { + this.removeFromFrameworkSearchPaths(file); + } + + opt = opt || {}; + opt.embed = true; + var embeddedFile = new pbxFile(fpath, opt); + + embeddedFile.fileRef = file.fileRef; + + this.removeFromPbxBuildFileSection(embeddedFile); // PBXBuildFile + this.removeFromPbxEmbedFrameworksBuildPhase(embeddedFile); // PBXCopyFilesBuildPhase + + return file; +} + + +pbxProject.prototype.addCopyfile = function(fpath, opt) { + var file = new pbxFile(fpath, opt); + + // catch duplicates + if (this.hasFile(file.path)) { + file = this.hasFile(file.path); + } + + file.fileRef = file.uuid = this.generateUuid(); + file.target = opt ? opt.target : undefined; + + this.addToPbxBuildFileSection(file); // PBXBuildFile + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxCopyfilesBuildPhase(file); // PBXCopyFilesBuildPhase + + return file; +} + +pbxProject.prototype.pbxCopyfilesBuildPhaseObj = function(target) { + return this.buildPhaseObject('PBXCopyFilesBuildPhase', 'Copy Files', target); +} + +pbxProject.prototype.addToPbxCopyfilesBuildPhase = function(file) { + var sources = this.buildPhaseObject('PBXCopyFilesBuildPhase', 'Copy Files', file.target); + sources.files.push(pbxBuildPhaseObj(file)); +} + +pbxProject.prototype.removeCopyfile = function(fpath, opt) { + var file = new pbxFile(fpath, opt); + file.target = opt ? opt.target : undefined; + + this.removeFromPbxBuildFileSection(file); // PBXBuildFile + this.removeFromPbxFileReferenceSection(file); // PBXFileReference + this.removeFromPbxCopyfilesBuildPhase(file); // PBXFrameworksBuildPhase + + return file; +} + +pbxProject.prototype.removeFromPbxCopyfilesBuildPhase = function(file) { + var sources = this.pbxCopyfilesBuildPhaseObj(file.target); + for (i in sources.files) { + if (sources.files[i].comment == longComment(file)) { + sources.files.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addStaticLibrary = function(path, opt) { + opt = opt || {}; + + var file; + + if (opt.plugin) { + file = this.addPluginFile(path, opt); + if (!file) return false; + } else { + file = new pbxFile(path, opt); + if (this.hasFile(file.path)) return false; + } + + file.uuid = this.generateUuid(); + file.target = opt ? opt.target : undefined; + + if (!opt.plugin) { + file.fileRef = this.generateUuid(); + this.addToPbxFileReferenceSection(file); // PBXFileReference + } + + this.addToPbxBuildFileSection(file); // PBXBuildFile + this.addToPbxFrameworksBuildPhase(file); // PBXFrameworksBuildPhase + this.addToLibrarySearchPaths(file); // make sure it gets built! + + return file; +} + +// helper addition functions +pbxProject.prototype.addToPbxBuildFileSection = function(file) { + var commentKey = f("%s_comment", file.uuid); + + this.pbxBuildFileSection()[file.uuid] = pbxBuildFileObj(file); + this.pbxBuildFileSection()[commentKey] = pbxBuildFileComment(file); +} + +pbxProject.prototype.removeFromPbxBuildFileSection = function(file) { + var uuid; + + for (uuid in this.pbxBuildFileSection()) { + if (this.pbxBuildFileSection()[uuid].fileRef_comment == file.basename) { + file.uuid = uuid; + delete this.pbxBuildFileSection()[uuid]; + } + } + var commentKey = f("%s_comment", file.uuid); + delete this.pbxBuildFileSection()[commentKey]; +} + +pbxProject.prototype.addPbxGroup = function(filePathsArray, name, path, sourceTree) { + var groups = this.hash.project.objects['PBXGroup'], + pbxGroupUuid = this.generateUuid(), + commentKey = f("%s_comment", pbxGroupUuid), + pbxGroup = { + isa: 'PBXGroup', + children: [], + name: name, + path: path, + sourceTree: sourceTree ? sourceTree : '""' + }, + fileReferenceSection = this.pbxFileReferenceSection(), + filePathToReference = {}; + + for (var key in fileReferenceSection) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + var fileReferenceKey = key.split(COMMENT_KEY)[0], + fileReference = fileReferenceSection[fileReferenceKey]; + + filePathToReference[fileReference.path] = { fileRef: fileReferenceKey, basename: fileReferenceSection[key] }; + } + + for (var index = 0; index < filePathsArray.length; index++) { + var filePath = filePathsArray[index], + filePathQuoted = "\"" + filePath + "\""; + if (filePathToReference[filePath]) { + pbxGroup.children.push(pbxGroupChild(filePathToReference[filePath])); + continue; + } else if (filePathToReference[filePathQuoted]) { + pbxGroup.children.push(pbxGroupChild(filePathToReference[filePathQuoted])); + continue; + } + + var file = new pbxFile(filePath); + file.uuid = this.generateUuid(); + file.fileRef = this.generateUuid(); + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxBuildFileSection(file); // PBXBuildFile + pbxGroup.children.push(pbxGroupChild(file)); + } + + if (groups) { + groups[pbxGroupUuid] = pbxGroup; + groups[commentKey] = name; + } + + return { uuid: pbxGroupUuid, pbxGroup: pbxGroup }; +} + +pbxProject.prototype.removePbxGroup = function (groupName) { + var section = this.hash.project.objects['PBXGroup'], + key, itemKey; + + for (key in section) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + if (section[key] == groupName) { + itemKey = key.split(COMMENT_KEY)[0]; + delete section[itemKey]; + } + } +} + +pbxProject.prototype.addToPbxProjectSection = function(target) { + + var newTarget = { + value: target.uuid, + comment: pbxNativeTargetComment(target.pbxNativeTarget) + }; + + this.pbxProjectSection()[this.getFirstProject()['uuid']]['targets'].push(newTarget); +} + +pbxProject.prototype.addToPbxNativeTargetSection = function(target) { + var commentKey = f("%s_comment", target.uuid); + + this.pbxNativeTargetSection()[target.uuid] = target.pbxNativeTarget; + this.pbxNativeTargetSection()[commentKey] = target.pbxNativeTarget.name; +} + +pbxProject.prototype.addToPbxFileReferenceSection = function(file) { + var commentKey = f("%s_comment", file.fileRef); + + this.pbxFileReferenceSection()[file.fileRef] = pbxFileReferenceObj(file); + this.pbxFileReferenceSection()[commentKey] = pbxFileReferenceComment(file); +} + +pbxProject.prototype.removeFromPbxFileReferenceSection = function(file) { + + var i; + var refObj = pbxFileReferenceObj(file); + for (i in this.pbxFileReferenceSection()) { + if (this.pbxFileReferenceSection()[i].name == refObj.name || + ('"' + this.pbxFileReferenceSection()[i].name + '"') == refObj.name || + this.pbxFileReferenceSection()[i].path == refObj.path || + ('"' + this.pbxFileReferenceSection()[i].path + '"') == refObj.path) { + file.fileRef = file.uuid = i; + delete this.pbxFileReferenceSection()[i]; + break; + } + } + var commentKey = f("%s_comment", file.fileRef); + if (this.pbxFileReferenceSection()[commentKey] != undefined) { + delete this.pbxFileReferenceSection()[commentKey]; + } + + return file; +} + +pbxProject.prototype.addToXcVersionGroupSection = function(file) { + if (!file.models || !file.currentModel) { + throw new Error("Cannot create a XCVersionGroup section from not a data model document file"); + } + + var commentKey = f("%s_comment", file.fileRef); + + if (!this.xcVersionGroupSection()[file.fileRef]) { + this.xcVersionGroupSection()[file.fileRef] = { + isa: 'XCVersionGroup', + children: file.models.map(function (el) { return el.fileRef; }), + currentVersion: file.currentModel.fileRef, + name: path.basename(file.path), + path: file.path, + sourceTree: '""', + versionGroupType: 'wrapper.xcdatamodel' + }; + this.xcVersionGroupSection()[commentKey] = path.basename(file.path); + } +} + +pbxProject.prototype.addToPluginsPbxGroup = function(file) { + var pluginsGroup = this.pbxGroupByName('Plugins'); + pluginsGroup.children.push(pbxGroupChild(file)); +} + +pbxProject.prototype.removeFromPluginsPbxGroup = function(file) { + var pluginsGroupChildren = this.pbxGroupByName('Plugins').children, i; + for (i in pluginsGroupChildren) { + if (pbxGroupChild(file).value == pluginsGroupChildren[i].value && + pbxGroupChild(file).comment == pluginsGroupChildren[i].comment) { + pluginsGroupChildren.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToResourcesPbxGroup = function(file) { + var pluginsGroup = this.pbxGroupByName('Resources'); + pluginsGroup.children.push(pbxGroupChild(file)); +} + +pbxProject.prototype.removeFromResourcesPbxGroup = function(file) { + var pluginsGroupChildren = this.pbxGroupByName('Resources').children, i; + for (i in pluginsGroupChildren) { + if (pbxGroupChild(file).value == pluginsGroupChildren[i].value && + pbxGroupChild(file).comment == pluginsGroupChildren[i].comment) { + pluginsGroupChildren.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToFrameworksPbxGroup = function(file) { + var pluginsGroup = this.pbxGroupByName('Frameworks'); + pluginsGroup.children.push(pbxGroupChild(file)); +} + +pbxProject.prototype.removeFromFrameworksPbxGroup = function(file) { + var pluginsGroupChildren = this.pbxGroupByName('Frameworks').children; + + for (i in pluginsGroupChildren) { + if (pbxGroupChild(file).value == pluginsGroupChildren[i].value && + pbxGroupChild(file).comment == pluginsGroupChildren[i].comment) { + pluginsGroupChildren.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToPbxEmbedFrameworksBuildPhase = function (file) { + var sources = this.pbxEmbedFrameworksBuildPhaseObj(file.target); + if (sources) { + sources.files.push(pbxBuildPhaseObj(file)); + } +} + +pbxProject.prototype.removeFromPbxEmbedFrameworksBuildPhase = function (file) { + var sources = this.pbxEmbedFrameworksBuildPhaseObj(file.target); + if (sources) { + var files = []; + for (i in sources.files) { + if (sources.files[i].comment != longComment(file)) { + files.push(sources.files[i]); + } + } + sources.files = files; + } +} + +pbxProject.prototype.addToProductsPbxGroup = function(file) { + var productsGroup = this.pbxGroupByName('Products'); + productsGroup.children.push(pbxGroupChild(file)); +} + +pbxProject.prototype.removeFromProductsPbxGroup = function(file) { + var productsGroupChildren = this.pbxGroupByName('Products').children, i; + for (i in productsGroupChildren) { + if (pbxGroupChild(file).value == productsGroupChildren[i].value && + pbxGroupChild(file).comment == productsGroupChildren[i].comment) { + productsGroupChildren.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToPbxSourcesBuildPhase = function(file) { + var sources = this.pbxSourcesBuildPhaseObj(file.target); + sources.files.push(pbxBuildPhaseObj(file)); +} + +pbxProject.prototype.removeFromPbxSourcesBuildPhase = function(file) { + + var sources = this.pbxSourcesBuildPhaseObj(file.target), i; + for (i in sources.files) { + if (sources.files[i].comment == longComment(file)) { + sources.files.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToPbxResourcesBuildPhase = function(file) { + var sources = this.pbxResourcesBuildPhaseObj(file.target); + sources.files.push(pbxBuildPhaseObj(file)); +} + +pbxProject.prototype.removeFromPbxResourcesBuildPhase = function(file) { + var sources = this.pbxResourcesBuildPhaseObj(file.target), i; + + for (i in sources.files) { + if (sources.files[i].comment == longComment(file)) { + sources.files.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addToPbxFrameworksBuildPhase = function(file) { + var sources = this.pbxFrameworksBuildPhaseObj(file.target); + sources.files.push(pbxBuildPhaseObj(file)); +} + +pbxProject.prototype.removeFromPbxFrameworksBuildPhase = function(file) { + var sources = this.pbxFrameworksBuildPhaseObj(file.target); + for (i in sources.files) { + if (sources.files[i].comment == longComment(file)) { + sources.files.splice(i, 1); + break; + } + } +} + +pbxProject.prototype.addXCConfigurationList = function(configurationObjectsArray, defaultConfigurationName, comment) { + var pbxBuildConfigurationSection = this.pbxXCBuildConfigurationSection(), + pbxXCConfigurationListSection = this.pbxXCConfigurationList(), + xcConfigurationListUuid = this.generateUuid(), + commentKey = f("%s_comment", xcConfigurationListUuid), + xcConfigurationList = { + isa: 'XCConfigurationList', + buildConfigurations: [], + defaultConfigurationIsVisible: 0, + defaultConfigurationName: defaultConfigurationName + }; + + for (var index = 0; index < configurationObjectsArray.length; index++) { + var configuration = configurationObjectsArray[index], + configurationUuid = this.generateUuid(), + configurationCommentKey = f("%s_comment", configurationUuid); + + pbxBuildConfigurationSection[configurationUuid] = configuration; + pbxBuildConfigurationSection[configurationCommentKey] = configuration.name; + xcConfigurationList.buildConfigurations.push({ value: configurationUuid, comment: configuration.name }); + } + + if (pbxXCConfigurationListSection) { + pbxXCConfigurationListSection[xcConfigurationListUuid] = xcConfigurationList; + pbxXCConfigurationListSection[commentKey] = comment; + } + + return { uuid: xcConfigurationListUuid, xcConfigurationList: xcConfigurationList }; +} + +pbxProject.prototype.addTargetDependency = function(target, dependencyTargets) { + if (!target) + return undefined; + + var nativeTargets = this.pbxNativeTargetSection(); + + if (typeof nativeTargets[target] == "undefined") + throw new Error("Invalid target: " + target); + + for (var index = 0; index < dependencyTargets.length; index++) { + var dependencyTarget = dependencyTargets[index]; + if (typeof nativeTargets[dependencyTarget] == "undefined") + throw new Error("Invalid target: " + dependencyTarget); + } + + var pbxTargetDependency = 'PBXTargetDependency', + pbxContainerItemProxy = 'PBXContainerItemProxy', + pbxTargetDependencySection = this.hash.project.objects[pbxTargetDependency], + pbxContainerItemProxySection = this.hash.project.objects[pbxContainerItemProxy]; + + for (var index = 0; index < dependencyTargets.length; index++) { + var dependencyTargetUuid = dependencyTargets[index], + dependencyTargetCommentKey = f("%s_comment", dependencyTargetUuid), + targetDependencyUuid = this.generateUuid(), + targetDependencyCommentKey = f("%s_comment", targetDependencyUuid), + itemProxyUuid = this.generateUuid(), + itemProxyCommentKey = f("%s_comment", itemProxyUuid), + itemProxy = { + isa: pbxContainerItemProxy, + containerPortal: this.hash.project['rootObject'], + containerPortal_comment: this.hash.project['rootObject_comment'], + proxyType: 1, + remoteGlobalIDString: dependencyTargetUuid, + remoteInfo: nativeTargets[dependencyTargetUuid].name + }, + targetDependency = { + isa: pbxTargetDependency, + target: dependencyTargetUuid, + target_comment: nativeTargets[dependencyTargetCommentKey], + targetProxy: itemProxyUuid, + targetProxy_comment: pbxContainerItemProxy + }; + + if (pbxContainerItemProxySection && pbxTargetDependencySection) { + pbxContainerItemProxySection[itemProxyUuid] = itemProxy; + pbxContainerItemProxySection[itemProxyCommentKey] = pbxContainerItemProxy; + pbxTargetDependencySection[targetDependencyUuid] = targetDependency; + pbxTargetDependencySection[targetDependencyCommentKey] = pbxTargetDependency; + nativeTargets[target].dependencies.push({ value: targetDependencyUuid, comment: pbxTargetDependency }) + } + } + + return { uuid: target, target: nativeTargets[target] }; +} + +pbxProject.prototype.addBuildPhase = function(filePathsArray, buildPhaseType, comment, target, folderType, subfolderPath) { + var buildPhaseSection, + fileReferenceSection = this.pbxFileReferenceSection(), + buildFileSection = this.pbxBuildFileSection(), + buildPhaseUuid = this.generateUuid(), + buildPhaseTargetUuid = target || this.getFirstTarget().uuid, + commentKey = f("%s_comment", buildPhaseUuid), + buildPhase = { + isa: buildPhaseType, + buildActionMask: 2147483647, + files: [], + runOnlyForDeploymentPostprocessing: 0 + }, + filePathToBuildFile = {}; + + if (buildPhaseType === 'PBXCopyFilesBuildPhase') { + buildPhase = pbxCopyFilesBuildPhaseObj(buildPhase, folderType, subfolderPath, comment); + } + + if (!this.hash.project.objects[buildPhaseType]) { + this.hash.project.objects[buildPhaseType] = new Object(); + } + + if (!this.hash.project.objects[buildPhaseType][buildPhaseUuid]) { + this.hash.project.objects[buildPhaseType][buildPhaseUuid] = buildPhase; + this.hash.project.objects[buildPhaseType][commentKey] = comment; + } + + if (this.hash.project.objects['PBXNativeTarget'][buildPhaseTargetUuid]['buildPhases']) { + this.hash.project.objects['PBXNativeTarget'][buildPhaseTargetUuid]['buildPhases'].push({ + value: buildPhaseUuid, + comment: comment + }) + + } + + + for (var key in buildFileSection) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + var buildFileKey = key.split(COMMENT_KEY)[0], + buildFile = buildFileSection[buildFileKey]; + fileReference = fileReferenceSection[buildFile.fileRef]; + + if (!fileReference) continue; + + var pbxFileObj = new pbxFile(fileReference.path); + + filePathToBuildFile[fileReference.path] = { uuid: buildFileKey, basename: pbxFileObj.basename, group: pbxFileObj.group }; + } + + for (var index = 0; index < filePathsArray.length; index++) { + var filePath = filePathsArray[index], + filePathQuoted = "\"" + filePath + "\"", + file = new pbxFile(filePath); + + if (filePathToBuildFile[filePath]) { + buildPhase.files.push(pbxBuildPhaseObj(filePathToBuildFile[filePath])); + continue; + } else if (filePathToBuildFile[filePathQuoted]) { + buildPhase.files.push(pbxBuildPhaseObj(filePathToBuildFile[filePathQuoted])); + continue; + } + + file.uuid = this.generateUuid(); + file.fileRef = this.generateUuid(); + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxBuildFileSection(file); // PBXBuildFile + buildPhase.files.push(pbxBuildPhaseObj(file)); + } + + if (buildPhaseSection) { + buildPhaseSection[buildPhaseUuid] = buildPhase; + buildPhaseSection[commentKey] = comment; + } + + return { uuid: buildPhaseUuid, buildPhase: buildPhase }; +} + +// helper access functions +pbxProject.prototype.pbxProjectSection = function() { + return this.hash.project.objects['PBXProject']; +} +pbxProject.prototype.pbxBuildFileSection = function() { + return this.hash.project.objects['PBXBuildFile']; +} + +pbxProject.prototype.pbxXCBuildConfigurationSection = function() { + return this.hash.project.objects['XCBuildConfiguration']; +} + +pbxProject.prototype.pbxFileReferenceSection = function() { + return this.hash.project.objects['PBXFileReference']; +} + +pbxProject.prototype.pbxNativeTargetSection = function() { + return this.hash.project.objects['PBXNativeTarget']; +} + +pbxProject.prototype.xcVersionGroupSection = function () { + if (typeof this.hash.project.objects['XCVersionGroup'] !== 'object') { + this.hash.project.objects['XCVersionGroup'] = {}; + } + + return this.hash.project.objects['XCVersionGroup']; +} + +pbxProject.prototype.pbxXCConfigurationList = function() { + return this.hash.project.objects['XCConfigurationList']; +} + +pbxProject.prototype.pbxGroupByName = function(name) { + var groups = this.hash.project.objects['PBXGroup'], + key, groupKey; + + for (key in groups) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + if (groups[key] == name) { + groupKey = key.split(COMMENT_KEY)[0]; + return groups[groupKey]; + } + } + + return null; +} + +pbxProject.prototype.pbxTargetByName = function(name) { + return this.pbxItemByComment(name, 'PBXNativeTarget'); +} + +pbxProject.prototype.findTargetKey = function(name) { + var targets = this.hash.project.objects['PBXNativeTarget']; + + for (var key in targets) { + // only look for comments + if (COMMENT_KEY.test(key)) continue; + + var target = targets[key]; + if (target.name === name) { + return key; + } + } + + return null; +} + +pbxProject.prototype.pbxItemByComment = function(name, pbxSectionName) { + var section = this.hash.project.objects[pbxSectionName], + key, itemKey; + + for (key in section) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + if (section[key] == name) { + itemKey = key.split(COMMENT_KEY)[0]; + return section[itemKey]; + } + } + + return null; +} + +pbxProject.prototype.pbxSourcesBuildPhaseObj = function(target) { + return this.buildPhaseObject('PBXSourcesBuildPhase', 'Sources', target); +} + +pbxProject.prototype.pbxResourcesBuildPhaseObj = function(target) { + return this.buildPhaseObject('PBXResourcesBuildPhase', 'Resources', target); +} + +pbxProject.prototype.pbxFrameworksBuildPhaseObj = function(target) { + return this.buildPhaseObject('PBXFrameworksBuildPhase', 'Frameworks', target); +} + +pbxProject.prototype.pbxEmbedFrameworksBuildPhaseObj = function (target) { + return this.buildPhaseObject('PBXCopyFilesBuildPhase', 'Embed Frameworks', target); +}; + +// Find Build Phase from group/target +pbxProject.prototype.buildPhase = function(group, target) { + + if (!target) + return undefined; + + var nativeTargets = this.pbxNativeTargetSection(); + if (typeof nativeTargets[target] == "undefined") + throw new Error("Invalid target: " + target); + + var nativeTarget = nativeTargets[target]; + var buildPhases = nativeTarget.buildPhases; + for(var i in buildPhases) + { + var buildPhase = buildPhases[i]; + if (buildPhase.comment==group) + return buildPhase.value + "_comment"; + } + } + +pbxProject.prototype.buildPhaseObject = function(name, group, target) { + var section = this.hash.project.objects[name], + obj, sectionKey, key; + var buildPhase = this.buildPhase(group, target); + + for (key in section) { + + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + // select the proper buildPhase + if (buildPhase && buildPhase!=key) + continue; + if (section[key] == group) { + sectionKey = key.split(COMMENT_KEY)[0]; + return section[sectionKey]; + } + } + return null; +} + +pbxProject.prototype.addBuildProperty = function(prop, value, build_name) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + key, configuration; + + for (key in configurations){ + configuration = configurations[key]; + if (!build_name || configuration.name === build_name){ + configuration.buildSettings[prop] = value; + } + } +} + +pbxProject.prototype.removeBuildProperty = function(prop, build_name) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + key, configuration; + + for (key in configurations){ + configuration = configurations[key]; + if (configuration.buildSettings[prop] && + !build_name || configuration.name === build_name){ + delete configuration.buildSettings[prop]; + } + } +} + +/** + * + * @param prop {String} + * @param value {String|Array|Object|Number|Boolean} + * @param build {String} Release or Debug + */ +pbxProject.prototype.updateBuildProperty = function(prop, value, build) { + var configs = this.pbxXCBuildConfigurationSection(); + for (var configName in configs) { + if (!COMMENT_KEY.test(configName)) { + var config = configs[configName]; + if ( (build && config.name === build) || (!build) ) { + config.buildSettings[prop] = value; + } + } + } +} + +pbxProject.prototype.updateProductName = function(name) { + this.updateBuildProperty('PRODUCT_NAME', '"' + name + '"'); +} + +pbxProject.prototype.removeFromFrameworkSearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + SEARCH_PATHS = 'FRAMEWORK_SEARCH_PATHS', + config, buildSettings, searchPaths; + var new_path = searchPathForFile(file, this); + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + searchPaths = buildSettings[SEARCH_PATHS]; + + if (searchPaths) { + var matches = searchPaths.filter(function(p) { + return p.indexOf(new_path) > -1; + }); + matches.forEach(function(m) { + var idx = searchPaths.indexOf(m); + searchPaths.splice(idx, 1); + }); + } + } +} + +pbxProject.prototype.addToFrameworkSearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + config, buildSettings, searchPaths; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + if (!buildSettings['FRAMEWORK_SEARCH_PATHS'] + || buildSettings['FRAMEWORK_SEARCH_PATHS'] === INHERITED) { + buildSettings['FRAMEWORK_SEARCH_PATHS'] = [INHERITED]; + } + + buildSettings['FRAMEWORK_SEARCH_PATHS'].push(searchPathForFile(file, this)); + } +} + +pbxProject.prototype.removeFromLibrarySearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + SEARCH_PATHS = 'LIBRARY_SEARCH_PATHS', + config, buildSettings, searchPaths; + var new_path = searchPathForFile(file, this); + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + searchPaths = buildSettings[SEARCH_PATHS]; + + if (searchPaths) { + var matches = searchPaths.filter(function(p) { + return p.indexOf(new_path) > -1; + }); + matches.forEach(function(m) { + var idx = searchPaths.indexOf(m); + searchPaths.splice(idx, 1); + }); + } + + } +} + +pbxProject.prototype.addToLibrarySearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + config, buildSettings, searchPaths; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + if (!buildSettings['LIBRARY_SEARCH_PATHS'] + || buildSettings['LIBRARY_SEARCH_PATHS'] === INHERITED) { + buildSettings['LIBRARY_SEARCH_PATHS'] = [INHERITED]; + } + + if (typeof file === 'string') { + buildSettings['LIBRARY_SEARCH_PATHS'].push(file); + } else { + buildSettings['LIBRARY_SEARCH_PATHS'].push(searchPathForFile(file, this)); + } + } +} + +pbxProject.prototype.removeFromHeaderSearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + SEARCH_PATHS = 'HEADER_SEARCH_PATHS', + config, buildSettings, searchPaths; + var new_path = searchPathForFile(file, this); + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + if (buildSettings[SEARCH_PATHS]) { + var matches = buildSettings[SEARCH_PATHS].filter(function(p) { + return p.indexOf(new_path) > -1; + }); + matches.forEach(function(m) { + var idx = buildSettings[SEARCH_PATHS].indexOf(m); + buildSettings[SEARCH_PATHS].splice(idx, 1); + }); + } + + } +} +pbxProject.prototype.addToHeaderSearchPaths = function(file) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + config, buildSettings, searchPaths; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + if (!buildSettings['HEADER_SEARCH_PATHS']) { + buildSettings['HEADER_SEARCH_PATHS'] = [INHERITED]; + } + + if (typeof file === 'string') { + buildSettings['HEADER_SEARCH_PATHS'].push(file); + } else { + buildSettings['HEADER_SEARCH_PATHS'].push(searchPathForFile(file, this)); + } + } +} + +pbxProject.prototype.addToOtherLinkerFlags = function (flag) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + INHERITED = '"$(inherited)"', + OTHER_LDFLAGS = 'OTHER_LDFLAGS', + config, buildSettings; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) + continue; + + if (!buildSettings[OTHER_LDFLAGS] + || buildSettings[OTHER_LDFLAGS] === INHERITED) { + buildSettings[OTHER_LDFLAGS] = [INHERITED]; + } + + buildSettings[OTHER_LDFLAGS].push(flag); + } +} + +pbxProject.prototype.removeFromOtherLinkerFlags = function (flag) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + OTHER_LDFLAGS = 'OTHER_LDFLAGS', + config, buildSettings; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) { + continue; + } + + if (buildSettings[OTHER_LDFLAGS]) { + var matches = buildSettings[OTHER_LDFLAGS].filter(function (p) { + return p.indexOf(flag) > -1; + }); + matches.forEach(function (m) { + var idx = buildSettings[OTHER_LDFLAGS].indexOf(m); + buildSettings[OTHER_LDFLAGS].splice(idx, 1); + }); + } + } +} + +pbxProject.prototype.addToBuildSettings = function (buildSetting, value) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + config, buildSettings; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + buildSettings[buildSetting] = value; + } +} + +pbxProject.prototype.removeFromBuildSettings = function (buildSetting) { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + config, buildSettings; + + for (config in configurations) { + buildSettings = configurations[config].buildSettings; + + if (buildSettings[buildSetting]) { + delete buildSettings[buildSetting]; + } + } +} + +// a JS getter. hmmm +pbxProject.prototype.__defineGetter__("productName", function() { + var configurations = nonComments(this.pbxXCBuildConfigurationSection()), + config, productName; + + for (config in configurations) { + productName = configurations[config].buildSettings['PRODUCT_NAME']; + + if (productName) { + return unquote(productName); + } + } +}); + +// check if file is present +pbxProject.prototype.hasFile = function(filePath) { + var files = nonComments(this.pbxFileReferenceSection()), + file, id; + for (id in files) { + file = files[id]; + if (file.path == filePath || file.path == ('"' + filePath + '"')) { + return file; + } + } + + return false; +} + +pbxProject.prototype.addTarget = function(name, type, subfolder) { + + // Setup uuid and name of new target + var targetUuid = this.generateUuid(), + targetType = type, + targetSubfolder = subfolder || name, + targetName = name.trim(); + + // Check type against list of allowed target types + if (!targetName) { + throw new Error("Target name missing."); + } + + // Check type against list of allowed target types + if (!targetType) { + throw new Error("Target type missing."); + } + + // Check type against list of allowed target types + if (!producttypeForTargettype(targetType)) { + throw new Error("Target type invalid: " + targetType); + } + + // Build Configuration: Create + var buildConfigurationsList = [ + { + name: 'Debug', + isa: 'XCBuildConfiguration', + buildSettings: { + GCC_PREPROCESSOR_DEFINITIONS: ['"DEBUG=1"', '"$(inherited)"'], + INFOPLIST_FILE: '"' + path.join(targetSubfolder, targetSubfolder + '-Info.plist' + '"'), + LD_RUNPATH_SEARCH_PATHS: '"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"', + PRODUCT_NAME: '"' + targetName + '"', + SKIP_INSTALL: 'YES' + } + }, + { + name: 'Release', + isa: 'XCBuildConfiguration', + buildSettings: { + INFOPLIST_FILE: '"' + path.join(targetSubfolder, targetSubfolder + '-Info.plist' + '"'), + LD_RUNPATH_SEARCH_PATHS: '"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"', + PRODUCT_NAME: '"' + targetName + '"', + SKIP_INSTALL: 'YES' + } + } + ]; + + // Build Configuration: Add + var buildConfigurations = this.addXCConfigurationList(buildConfigurationsList, 'Release', 'Build configuration list for PBXNativeTarget "' + targetName +'"'); + + // Product: Create + var productName = targetName, + productType = producttypeForTargettype(targetType), + productFileType = filetypeForProducttype(productType), + productFile = this.addProductFile(productName, { group: 'Copy Files', 'target': targetUuid, 'explicitFileType': productFileType}), + productFileName = productFile.basename; + + + // Product: Add to build file list + this.addToPbxBuildFileSection(productFile); + + // Target: Create + var target = { + uuid: targetUuid, + pbxNativeTarget: { + isa: 'PBXNativeTarget', + name: '"' + targetName + '"', + productName: '"' + targetName + '"', + productReference: productFile.fileRef, + productType: '"' + producttypeForTargettype(targetType) + '"', + buildConfigurationList: buildConfigurations.uuid, + buildPhases: [], + buildRules: [], + dependencies: [] + } + }; + + // Target: Add to PBXNativeTarget section + this.addToPbxNativeTargetSection(target) + + // Product: Embed (only for "extension"-type targets) + if (targetType === 'app_extension') { + + // Create CopyFiles phase in first target + this.addBuildPhase([], 'PBXCopyFilesBuildPhase', 'Copy Files', this.getFirstTarget().uuid, targetType) + + // Add product to CopyFiles phase + this.addToPbxCopyfilesBuildPhase(productFile) + + // this.addBuildPhaseToTarget(newPhase.buildPhase, this.getFirstTarget().uuid) + + }; + + // Target: Add uuid to root project + this.addToPbxProjectSection(target); + + // Target: Add dependency for this target to first (main) target + this.addTargetDependency(this.getFirstTarget().uuid, [target.uuid]); + + + // Return target on success + return target; + +}; + +// helper recursive prop search+replace +function propReplace(obj, prop, value) { + var o = {}; + for (var p in obj) { + if (o.hasOwnProperty.call(obj, p)) { + if (typeof obj[p] == 'object' && !Array.isArray(obj[p])) { + propReplace(obj[p], prop, value); + } else if (p == prop) { + obj[p] = value; + } + } + } +} + +// helper object creation functions +function pbxBuildFileObj(file) { + var obj = Object.create(null); + + obj.isa = 'PBXBuildFile'; + obj.fileRef = file.fileRef; + obj.fileRef_comment = file.basename; + if (file.settings) obj.settings = file.settings; + + return obj; +} + +function pbxFileReferenceObj(file) { + var fileObject = { + isa: "PBXFileReference", + name: "\"" + file.basename + "\"", + path: "\"" + file.path.replace(/\\/g, '/') + "\"", + sourceTree: file.sourceTree, + fileEncoding: file.fileEncoding, + lastKnownFileType: file.lastKnownFileType, + explicitFileType: file.explicitFileType, + includeInIndex: file.includeInIndex + }; + + return fileObject; +} + +function pbxGroupChild(file) { + var obj = Object.create(null); + + obj.value = file.fileRef; + obj.comment = file.basename; + + return obj; +} + +function pbxBuildPhaseObj(file) { + var obj = Object.create(null); + + obj.value = file.uuid; + obj.comment = longComment(file); + + return obj; +} + +function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName){ + + // Add additional properties for 'CopyFiles' build phase + var DESTINATION_BY_TARGETTYPE = { + application: 'wrapper', + app_extension: 'plugins', + bundle: 'wrapper', + command_line_tool: 'wrapper', + dynamic_library: 'products_directory', + framework: 'shared_frameworks', + frameworks: 'frameworks', + static_library: 'products_directory', + unit_test_bundle: 'wrapper', + watch_app: 'wrapper', + watch_extension: 'plugins' + } + var SUBFOLDERSPEC_BY_DESTINATION = { + absolute_path: 0, + executables: 6, + frameworks: 10, + java_resources: 15, + plugins: 13, + products_directory: 16, + resources: 7, + shared_frameworks: 11, + shared_support: 12, + wrapper: 1, + xpc_services: 0 + } + + obj.name = '"' + phaseName + '"'; + obj.dstPath = subfolderPath || '""'; + obj.dstSubfolderSpec = SUBFOLDERSPEC_BY_DESTINATION[DESTINATION_BY_TARGETTYPE[folderType]]; + + return obj; +} + +function pbxBuildFileComment(file) { + return longComment(file); +} + +function pbxFileReferenceComment(file) { + return file.basename || path.basename(file.path); +} + +function pbxNativeTargetComment(target) { + return target.name; +} + +function longComment(file) { + return f("%s in %s", file.basename, file.group); +} + +// respect path +function correctForPluginsPath(file, project) { + return correctForPath(file, project, 'Plugins'); +} + +function correctForResourcesPath(file, project) { + return correctForPath(file, project, 'Resources'); +} + +function correctForFrameworksPath(file, project) { + return correctForPath(file, project, 'Frameworks'); +} + +function correctForPath(file, project, group) { + var r_group_dir = new RegExp('^' + group + '[\\\\/]'); + + if (project.pbxGroupByName(group).path) + file.path = file.path.replace(r_group_dir, ''); + + return file; +} + +function searchPathForFile(file, proj) { + var plugins = proj.pbxGroupByName('Plugins'), + pluginsPath = plugins ? plugins.path : null, + fileDir = path.dirname(file.path); + + if (fileDir == '.') { + fileDir = ''; + } else { + fileDir = '/' + fileDir; + } + + if (file.plugin && pluginsPath) { + return '"\\"$(SRCROOT)/' + unquote(pluginsPath) + '\\""'; + } else if (file.customFramework && file.dirname) { + return '"\\"' + file.dirname + '\\""'; + } else { + return '"\\"$(SRCROOT)/' + proj.productName + fileDir + '\\""'; + } +} + +function nonComments(obj) { + var keys = Object.keys(obj), + newObj = {}, i = 0; + + for (i; i < keys.length; i++) { + if (!COMMENT_KEY.test(keys[i])) { + newObj[keys[i]] = obj[keys[i]]; + } + } + + return newObj; +} + +function unquote(str) { + if (str) return str.replace(/^"(.*)"$/, "$1"); +} + + +function buildPhaseNameForIsa (isa) { + + BUILDPHASENAME_BY_ISA = { + PBXCopyFilesBuildPhase: 'Copy Files', + PBXResourcesBuildPhase: 'Resources', + PBXSourcesBuildPhase: 'Sources', + PBXFrameworksBuildPhase: 'Frameworks' + } + + return BUILDPHASENAME_BY_ISA[isa] +} + +function producttypeForTargettype (targetType) { + + PRODUCTTYPE_BY_TARGETTYPE = { + application: 'com.apple.product-type.application', + app_extension: 'com.apple.product-type.app-extension', + bundle: 'com.apple.product-type.bundle', + command_line_tool: 'com.apple.product-type.tool', + dynamic_library: 'com.apple.product-type.library.dynamic', + framework: 'com.apple.product-type.framework', + static_library: 'com.apple.product-type.library.static', + unit_test_bundle: 'com.apple.product-type.bundle.unit-test', + watch_app: 'com.apple.product-type.application.watchapp', + watch_extension: 'com.apple.product-type.watchkit-extension' + }; + + return PRODUCTTYPE_BY_TARGETTYPE[targetType] +} + +function filetypeForProducttype (productType) { + + FILETYPE_BY_PRODUCTTYPE = { + 'com.apple.product-type.application': '"wrapper.application"', + 'com.apple.product-type.app-extension': '"wrapper.app-extension"', + 'com.apple.product-type.bundle': '"wrapper.plug-in"', + 'com.apple.product-type.tool': '"compiled.mach-o.dylib"', + 'com.apple.product-type.library.dynamic': '"compiled.mach-o.dylib"', + 'com.apple.product-type.framework': '"wrapper.framework"', + 'com.apple.product-type.library.static': '"archive.ar"', + 'com.apple.product-type.bundle.unit-test': '"wrapper.cfbundle"', + 'com.apple.product-type.application.watchapp': '"wrapper.application"', + 'com.apple.product-type.watchkit-extension': '"wrapper.app-extension"' + }; + + return FILETYPE_BY_PRODUCTTYPE[productType] +} + +pbxProject.prototype.getFirstProject = function() { + + // Get pbxProject container + var pbxProjectContainer = this.pbxProjectSection(); + + // Get first pbxProject UUID + var firstProjectUuid = Object.keys(pbxProjectContainer)[0]; + + // Get first pbxProject + var firstProject = pbxProjectContainer[firstProjectUuid]; + + return { + uuid: firstProjectUuid, + firstProject: firstProject + } +} + +pbxProject.prototype.getFirstTarget = function() { + + // Get first targets UUID + var firstTargetUuid = this.getFirstProject()['firstProject']['targets'][0].value; + + // Get first pbxNativeTarget + var firstTarget = this.pbxNativeTargetSection()[firstTargetUuid]; + + return { + uuid: firstTargetUuid, + firstTarget: firstTarget + } +} + +/*** NEW ***/ + +pbxProject.prototype.addToPbxGroup = function (file, groupKey) { + var group = this.getPBXGroupByKey(groupKey); + if (group && group.children !== undefined) { + if (typeof file === 'string') { + //Group Key + var childGroup = { + value:file, + comment: this.getPBXGroupByKey(file).name + }; + + group.children.push(childGroup); + } + else { + //File Object + group.children.push(pbxGroupChild(file)); + } + } +} + +pbxProject.prototype.removeFromPbxGroup = function (file, groupKey) { + var group = this.getPBXGroupByKey(groupKey); + if (group) { + var groupChildren = group.children, i; + for(i in groupChildren) { + if(pbxGroupChild(file).value == groupChildren[i].value && + pbxGroupChild(file).comment == groupChildren[i].comment) { + groupChildren.splice(i, 1); + break; + } + } + } +} + +pbxProject.prototype.getPBXGroupByKey = function(key) { + return this.hash.project.objects['PBXGroup'][key]; +}; + +pbxProject.prototype.findPBXGroupKey = function(criteria) { + var groups = this.hash.project.objects['PBXGroup']; + var target; + + for (var key in groups) { + // only look for comments + if (COMMENT_KEY.test(key)) continue; + + var group = groups[key]; + if (criteria && criteria.path && criteria.name) { + if (criteria.path === group.path && criteria.name === group.name) { + target = key; + break + } + } + else if (criteria && criteria.path) { + if (criteria.path === group.path) { + target = key; + break + } + } + else if (criteria && criteria.name) { + if (criteria.name === group.name) { + target = key; + break + } + } + } + + return target; +} + +pbxProject.prototype.pbxCreateGroup = function(name, pathName) { + + //Create object + var model = { + isa:"PBXGroup", + children: [], + name: name, + path: pathName, + sourceTree: '""' + }; + var key = this.generateUuid(); + + //Create comment + var commendId = key + '_comment'; + + //add obj and commentObj to groups; + var groups = this.hash.project.objects['PBXGroup']; + groups[commendId] = name; + groups[key] = model; + + return key; +} + + +pbxProject.prototype.getPBXObject = function(name) { + return this.hash.project.objects[name]; +} + + + +pbxProject.prototype.addFile = function (path, group, opt) { + var file = new pbxFile(path, opt); + + // null is better for early errors + if (this.hasFile(file.path)) return null; + + file.fileRef = this.generateUuid(); + + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxGroup(file, group); // PBXGroup + + return file; +} + +pbxProject.prototype.removeFile = function (path, group, opt) { + var file = new pbxFile(path, opt); + + this.removeFromPbxFileReferenceSection(file); // PBXFileReference + this.removeFromPbxGroup(file, group); // PBXGroup + + return file; +} + + + +pbxProject.prototype.getBuildProperty = function(prop, build) { + var target; + var configs = this.pbxXCBuildConfigurationSection(); + for (var configName in configs) { + if (!COMMENT_KEY.test(configName)) { + var config = configs[configName]; + if ( (build && config.name === build) || (build === undefined) ) { + if (config.buildSettings[prop] !== undefined) { + target = config.buildSettings[prop]; + } + } + } + } + return target; +} + +pbxProject.prototype.getBuildConfigByName = function(name) { + var target = {}; + var configs = this.pbxXCBuildConfigurationSection(); + for (var configName in configs) { + if (!COMMENT_KEY.test(configName)) { + var config = configs[configName]; + if (config.name === name) { + target[configName] = config; + } + } + } + return target; +} + +pbxProject.prototype.addDataModelDocument = function(filePath, group, opt) { + if (!group) { + group = 'Resources'; + } + if (!this.getPBXGroupByKey(group)) { + group = this.findPBXGroupKey({ name: group }); + } + + var file = new pbxFile(filePath, opt); + + if (!file || this.hasFile(file.path)) return null; + + file.fileRef = this.generateUuid(); + this.addToPbxGroup(file, group); + + if (!file) return false; + + file.target = opt ? opt.target : undefined; + file.uuid = this.generateUuid(); + + this.addToPbxBuildFileSection(file); + this.addToPbxSourcesBuildPhase(file); + + file.models = []; + var currentVersionName; + var modelFiles = fs.readdirSync(file.path); + for (var index in modelFiles) { + var modelFileName = modelFiles[index]; + var modelFilePath = path.join(filePath, modelFileName); + + if (modelFileName == '.xccurrentversion') { + currentVersionName = plist.readFileSync(modelFilePath)._XCCurrentVersionName; + continue; + } + + var modelFile = new pbxFile(modelFilePath); + modelFile.fileRef = this.generateUuid(); + + this.addToPbxFileReferenceSection(modelFile); + + file.models.push(modelFile); + + if (currentVersionName && currentVersionName === modelFileName) { + file.currentModel = modelFile; + } + } + + if (!file.currentModel) { + file.currentModel = file.models[0]; + } + + this.addToXcVersionGroupSection(file); + + return file; +} + + +module.exports = pbxProject; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxWriter.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxWriter.js new file mode 100755 index 0000000..a65bcf1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/lib/pbxWriter.js @@ -0,0 +1,282 @@ +var pbxProj = require('./pbxProject'), + util = require('util'), + f = util.format, + INDENT = '\t', + COMMENT_KEY = /_comment$/, + QUOTED = /^"(.*)"$/, + EventEmitter = require('events').EventEmitter + +// indentation +function i(x) { + if (x <=0) + return ''; + else + return INDENT + i(x-1); +} + +function comment(key, parent) { + var text = parent[key + '_comment']; + + if (text) + return text; + else + return null; +} + +// copied from underscore +function isObject(obj) { + return obj === Object(obj) +} + +function isArray(obj) { + return Array.isArray(obj) +} + +function pbxWriter(contents) { + this.contents = contents; + this.sync = false; + this.indentLevel = 0; +} + +util.inherits(pbxWriter, EventEmitter); + +pbxWriter.prototype.write = function (str) { + var fmt = f.apply(null, arguments); + + if (this.sync) { + this.buffer += f("%s%s", i(this.indentLevel), fmt); + } else { + // do stream write + } +} + +pbxWriter.prototype.writeFlush = function (str) { + var oldIndent = this.indentLevel; + + this.indentLevel = 0; + + this.write.apply(this, arguments) + + this.indentLevel = oldIndent; +} + +pbxWriter.prototype.writeSync = function () { + this.sync = true; + this.buffer = ""; + + this.writeHeadComment(); + this.writeProject(); + + return this.buffer; +} + +pbxWriter.prototype.writeHeadComment = function () { + if (this.contents.headComment) { + this.write("// %s\n", this.contents.headComment) + } +} + +pbxWriter.prototype.writeProject = function () { + var proj = this.contents.project, + key, cmt, obj; + + this.write("{\n") + + if (proj) { + this.indentLevel++; + + for (key in proj) { + // skip comments + if (COMMENT_KEY.test(key)) continue; + + cmt = comment(key, proj); + obj = proj[key]; + + if (isArray(obj)) { + this.writeArray(obj, key) + } else if (isObject(obj)) { + this.write("%s = {\n", key); + this.indentLevel++; + + if (key === 'objects') { + this.writeObjectsSections(obj) + } else { + this.writeObject(obj) + } + + this.indentLevel--; + this.write("};\n"); + } else if (cmt) { + this.write("%s = %s /* %s */;\n", key, obj, cmt) + } else { + this.write("%s = %s;\n", key, obj) + } + } + + this.indentLevel--; + } + + this.write("}\n") +} + +pbxWriter.prototype.writeObject = function (object) { + var key, obj, cmt; + + for (key in object) { + if (COMMENT_KEY.test(key)) continue; + + cmt = comment(key, object); + obj = object[key]; + + if (isArray(obj)) { + this.writeArray(obj, key) + } else if (isObject(obj)) { + this.write("%s = {\n", key); + this.indentLevel++; + + this.writeObject(obj) + + this.indentLevel--; + this.write("};\n"); + } else { + if (cmt) { + this.write("%s = %s /* %s */;\n", key, obj, cmt) + } else { + this.write("%s = %s;\n", key, obj) + } + } + } +} + +pbxWriter.prototype.writeObjectsSections = function (objects) { + var first = true, + key, obj; + + for (key in objects) { + if (!first) { + this.writeFlush("\n") + } else { + first = false; + } + + obj = objects[key]; + + if (isObject(obj)) { + this.writeSectionComment(key, true); + + this.writeSection(obj); + + this.writeSectionComment(key, false); + } + } +} + +pbxWriter.prototype.writeArray = function (arr, name) { + var i, entry; + + this.write("%s = (\n", name); + this.indentLevel++; + + for (i=0; i < arr.length; i++) { + entry = arr[i] + + if (entry.value && entry.comment) { + this.write('%s /* %s */,\n', entry.value, entry.comment); + } else if (isObject(entry)) { + this.write('{\n'); + this.indentLevel++; + + this.writeObject(entry); + + this.indentLevel--; + this.write('},\n'); + } else { + this.write('%s,\n', entry); + } + } + + this.indentLevel--; + this.write(");\n"); +} + +pbxWriter.prototype.writeSectionComment = function (name, begin) { + if (begin) { + this.writeFlush("/* Begin %s section */\n", name) + } else { // end + this.writeFlush("/* End %s section */\n", name) + } +} + +pbxWriter.prototype.writeSection = function (section) { + var key, obj, cmt; + + // section should only contain objects + for (key in section) { + if (COMMENT_KEY.test(key)) continue; + + cmt = comment(key, section); + obj = section[key] + + if (obj.isa == 'PBXBuildFile' || obj.isa == 'PBXFileReference') { + this.writeInlineObject(key, cmt, obj); + } else { + if (cmt) { + this.write("%s /* %s */ = {\n", key, cmt); + } else { + this.write("%s = {\n", key); + } + + this.indentLevel++ + + this.writeObject(obj) + + this.indentLevel-- + this.write("};\n"); + } + } +} + +pbxWriter.prototype.writeInlineObject = function (n, d, r) { + var output = []; + + var inlineObjectHelper = function (name, desc, ref) { + var key, cmt, obj; + + if (desc) { + output.push(f("%s /* %s */ = {", name, desc)); + } else { + output.push(f("%s = {", name)); + } + + for (key in ref) { + if (COMMENT_KEY.test(key)) continue; + + cmt = comment(key, ref); + obj = ref[key]; + + if (isArray(obj)) { + output.push(f("%s = (", key)); + + for (var i=0; i < obj.length; i++) { + output.push(f("%s, ", obj[i])) + } + + output.push("); "); + } else if (isObject(obj)) { + inlineObjectHelper(key, cmt, obj) + } else if (cmt) { + output.push(f("%s = %s /* %s */; ", key, obj, cmt)) + } else { + output.push(f("%s = %s; ", key, obj)) + } + } + + output.push("}; "); + } + + inlineObjectHelper(n, d, r); + + this.write("%s\n", output.join('').trim()); +} + +module.exports = pbxWriter; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/package.json new file mode 100755 index 0000000..2a5aff3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xcode/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "xcode@^0.8.5", + "scope": null, + "escapedName": "xcode", + "name": "xcode", + "rawSpec": "^0.8.5", + "spec": ">=0.8.5 <0.9.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios" + ] + ], + "_from": "xcode@>=0.8.5 <0.9.0", + "_id": "xcode@0.8.9", + "_inCache": true, + "_location": "/xcode", + "_nodeVersion": "4.2.6", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/xcode-0.8.9.tgz_1469137632459_0.21505266707390547" + }, + "_npmUser": { + "name": "anis", + "email": "anis.kadri@gmail.com" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "raw": "xcode@^0.8.5", + "scope": null, + "escapedName": "xcode", + "name": "xcode", + "rawSpec": "^0.8.5", + "spec": ">=0.8.5 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/xcode/-/xcode-0.8.9.tgz", + "_shasum": "ec6765f70e9dccccc9f6e9a5b9b4e7e814b4cf35", + "_shrinkwrap": null, + "_spec": "xcode@^0.8.5", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios", + "author": { + "name": "Andrew Lunny", + "email": "alunny@gmail.com" + }, + "bugs": { + "url": "https://github.com/alunny/node-xcode/issues" + }, + "contributors": [ + { + "name": "Andrew Lunny", + "url": "@alunny" + }, + { + "name": "Anis Kadri", + "url": "@imhotep" + }, + { + "name": "Mike Reinstein", + "url": "@mreinstein" + }, + { + "name": "Filip Maj", + "url": "@filmaj" + }, + { + "name": "Brett Rudd", + "url": "@goya" + }, + { + "name": "Bob Easterday", + "url": "@bobeast" + } + ], + "dependencies": { + "node-uuid": "1.4.7", + "pegjs": "0.9.0", + "simple-plist": "0.1.4" + }, + "description": "parser for xcodeproj/project.pbxproj files", + "devDependencies": { + "nodeunit": "0.9.1" + }, + "directories": {}, + "dist": { + "shasum": "ec6765f70e9dccccc9f6e9a5b9b4e7e814b4cf35", + "tarball": "https://registry.npmjs.org/xcode/-/xcode-0.8.9.tgz" + }, + "engines": { + "node": ">=0.6.7" + }, + "gitHead": "9f3726f6d766875500eebd85d9712925e3faa8b3", + "homepage": "https://github.com/alunny/node-xcode#readme", + "main": "index.js", + "maintainers": [ + { + "name": "alunny", + "email": "alunny@gmail.com" + }, + { + "name": "filmaj", + "email": "maj.fil@gmail.com" + }, + { + "name": "shepheb", + "email": "braden.shepherdson@gmail.com" + }, + { + "name": "anis", + "email": "anis.kadri@gmail.com" + } + ], + "name": "xcode", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "url": "git+https://github.com/alunny/node-xcode.git" + }, + "scripts": { + "test": "nodeunit test/parser test" + }, + "version": "0.8.9" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/.npmignore new file mode 100755 index 0000000..b6ad1f6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/.npmignore @@ -0,0 +1,5 @@ +.travis.yml +src +test +perf +coverage diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/LICENSE new file mode 100755 index 0000000..e7cbac9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/README.md new file mode 100755 index 0000000..13a5b12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/README.md @@ -0,0 +1,86 @@ +# xmlbuilder-js + +An XML builder for [node.js](https://nodejs.org/) similar to +[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). + +[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) +[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) +[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) + +[![Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) +[![Dependency Status](http://img.shields.io/david/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) + +### Installation: + +``` sh +npm install xmlbuilder +``` + +### Usage: + +``` js +var builder = require('xmlbuilder'); +var xml = builder.create('root') + .ele('xmlbuilder') + .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') + .end({ pretty: true}); + +console.log(xml); +``` + +will result in: + +``` xml + + + + git://github.com/oozcitak/xmlbuilder-js.git + + +``` + +It is also possible to convert objects into nodes: + +``` js +builder.create({ + root: { + xmlbuilder: { + repo: { + '@type': 'git', // attributes start with @ + '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node + } + } + } +}); +``` + +If you need to do some processing: + +``` js +var root = builder.create('squares'); +root.com('f(x) = x^2'); +for(var i = 1; i <= 5; i++) +{ + var item = root.ele('data'); + item.att('x', i); + item.att('y', i * i); +} +``` + +This will result in: + +``` xml + + + + + + + + + +``` + +See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js new file mode 100755 index 0000000..247c9d1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLAttribute.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, create; + + create = require('lodash/object/create'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing attribute name of element " + parent.name); + } + if (value == null) { + throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); + } + this.name = this.stringify.attName(name); + this.value = this.stringify.attValue(value); + } + + XMLAttribute.prototype.clone = function() { + return create(XMLAttribute.prototype, this); + }; + + XMLAttribute.prototype.toString = function(options, level) { + return ' ' + this.name + '="' + this.value + '"'; + }; + + return XMLAttribute; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js new file mode 100755 index 0000000..4282833 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLBuilder.js @@ -0,0 +1,69 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; + + XMLStringifier = require('./XMLStringifier'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLElement = require('./XMLElement'); + + module.exports = XMLBuilder = (function() { + function XMLBuilder(name, options) { + var root, temp; + if (name == null) { + throw new Error("Root element needs a name"); + } + if (options == null) { + options = {}; + } + this.options = options; + this.stringify = new XMLStringifier(options); + temp = new XMLElement(this, 'doc'); + root = temp.element(name); + root.isRoot = true; + root.documentObject = this; + this.rootObject = root; + if (!options.headless) { + root.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + root.doctype(options); + } + } + } + + XMLBuilder.prototype.root = function() { + return this.rootObject; + }; + + XMLBuilder.prototype.end = function(options) { + return this.toString(options); + }; + + XMLBuilder.prototype.toString = function(options) { + var indent, newline, offset, pretty, r, ref, ref1, ref2; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + r = ''; + if (this.xmldec != null) { + r += this.xmldec.toString(options); + } + if (this.doctype != null) { + r += this.doctype.toString(options); + } + r += this.rootObject.toString(options); + if (pretty && r.slice(-newline.length) === newline) { + r = r.slice(0, -newline.length); + } + return r; + }; + + return XMLBuilder; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLCData.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLCData.js new file mode 100755 index 0000000..00002f1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLCData.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text"); + } + this.text = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return create(XMLCData.prototype, this); + }; + + XMLCData.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLCData; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLComment.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLComment.js new file mode 100755 index 0000000..ca23e95 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLComment.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLComment, XMLNode, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text"); + } + this.text = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return create(XMLComment.prototype, this); + }; + + XMLComment.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLComment; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js new file mode 100755 index 0000000..62e6d8a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDAttList.js @@ -0,0 +1,68 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDAttList, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDAttList = (function() { + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + this.stringify = parent.stringify; + if (elementName == null) { + throw new Error("Missing DTD element name"); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name"); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type"); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default"); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT"); + } + this.elementName = this.stringify.eleName(elementName); + this.attributeName = this.stringify.attName(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDAttList; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js new file mode 100755 index 0000000..2d155e2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDElement.js @@ -0,0 +1,46 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDElement, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDElement = (function() { + function XMLDTDElement(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing DTD element name"); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.eleName(name); + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDElement; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js new file mode 100755 index 0000000..3201d19 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDEntity.js @@ -0,0 +1,84 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDEntity, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + module.exports = XMLDTDEntity = (function() { + function XMLDTDEntity(parent, pe, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing entity name"); + } + if (value == null) { + throw new Error("Missing entity value"); + } + this.pe = !!pe; + this.name = this.stringify.eleName(name); + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity"); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity"); + } + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity"); + } + } + } + + XMLDTDEntity.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDEntity; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js new file mode 100755 index 0000000..cfbccf4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDTDNotation.js @@ -0,0 +1,56 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDTDNotation, create; + + create = require('lodash/object/create'); + + module.exports = XMLDTDNotation = (function() { + function XMLDTDNotation(parent, name, value) { + this.stringify = parent.stringify; + if (name == null) { + throw new Error("Missing notation name"); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity"); + } + this.name = this.stringify.eleName(name); + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + XMLDTDNotation.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDTDNotation; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js new file mode 100755 index 0000000..b2d8435 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDeclaration.js @@ -0,0 +1,65 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLDeclaration, XMLNode, create, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDocType.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDocType.js new file mode 100755 index 0000000..eec6f36 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLDocType.js @@ -0,0 +1,188 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLDocType = (function() { + function XMLDocType(parent, pubID, sysID) { + var ref, ref1; + this.documentObject = parent; + this.stringify = this.documentObject.stringify; + this.children = []; + if (isObject(pubID)) { + ref = pubID, pubID = ref.pubID, sysID = ref.sysID; + } + if (sysID == null) { + ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.instruction = function(target, value) { + var child; + child = new XMLProcessingInstruction(this, target, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.root = function() { + return this.documentObject.root(); + }; + + XMLDocType.prototype.document = function() { + return this.documentObject; + }; + + XMLDocType.prototype.toString = function(options, level) { + var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ' 0) { + r += ' ['; + if (pretty) { + r += newline; + } + ref3 = this.children; + for (i = 0, len = ref3.length; i < len; i++) { + child = ref3[i]; + r += child.toString(options, level + 1); + } + r += ']'; + } + r += '>'; + if (pretty) { + r += newline; + } + return r; + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocType.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocType.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocType.prototype.up = function() { + return this.root(); + }; + + XMLDocType.prototype.doc = function() { + return this.document(); + }; + + return XMLDocType; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLElement.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLElement.js new file mode 100755 index 0000000..d5814c8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLElement.js @@ -0,0 +1,212 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + every = require('lodash/collection/every'); + + XMLNode = require('./XMLNode'); + + XMLAttribute = require('./XMLAttribute'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name"); + } + this.name = this.stringify.eleName(name); + this.children = []; + this.instructions = []; + this.attributes = {}; + if (attributes != null) { + this.attribute(attributes); + } + } + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, i, len, pi, ref, ref1; + clonedSelf = create(XMLElement.prototype, this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attributes = {}; + ref = this.attributes; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attributes[attName] = att.clone(); + } + clonedSelf.instructions = []; + ref1 = this.instructions; + for (i = 0, len = ref1.length; i < len; i++) { + pi = ref1[i]; + clonedSelf.instructions.push(pi.clone()); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = name.valueOf(); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (!this.options.skipNullAttributes || (value != null)) { + this.attributes[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, i, len; + if (name == null) { + throw new Error("Missing attribute name"); + } + name = name.valueOf(); + if (Array.isArray(name)) { + for (i = 0, len = name.length; i < len; i++) { + attName = name[i]; + delete this.attributes[attName]; + } + } else { + delete this.attributes[name]; + } + return this; + }; + + XMLElement.prototype.instruction = function(target, value) { + var i, insTarget, insValue, instruction, len; + if (target != null) { + target = target.valueOf(); + } + if (value != null) { + value = value.valueOf(); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.instructions.push(instruction); + } + return this; + }; + + XMLElement.prototype.toString = function(options, level) { + var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + ref3 = this.instructions; + for (i = 0, len = ref3.length; i < len; i++) { + instruction = ref3[i]; + r += instruction.toString(options, level); + } + if (pretty) { + r += space; + } + r += '<' + this.name; + ref4 = this.attributes; + for (name in ref4) { + if (!hasProp.call(ref4, name)) continue; + att = ref4[name]; + r += att.toString(options); + } + if (this.children.length === 0 || every(this.children, function(e) { + return e.value === ''; + })) { + r += '/>'; + if (pretty) { + r += newline; + } + } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { + r += '>'; + r += this.children[0].value; + r += ''; + r += newline; + } else { + r += '>'; + if (pretty) { + r += newline; + } + ref5 = this.children; + for (j = 0, len1 = ref5.length; j < len1; j++) { + child = ref5[j]; + r += child.toString(options, level + 1); + } + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + } + return r; + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLNode.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLNode.js new file mode 100755 index 0000000..592545a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLNode.js @@ -0,0 +1,331 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + isObject = require('lodash/lang/isObject'); + + isFunction = require('lodash/lang/isFunction'); + + isEmpty = require('lodash/lang/isEmpty'); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent) { + this.parent = parent; + this.options = this.parent.options; + this.stringify = this.parent.stringify; + if (XMLElement === null) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + } + } + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref, val; + lastChild = null; + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + if (name != null) { + name = name.valueOf(); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if ((isObject(val)) && (isEmpty(val))) { + val = null; + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); + } else if (Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + lastChild = this.element(key); + lastChild.element(val); + } else { + lastChild = this.element(key, val); + } + } + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level"); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref; + if (this.isRoot) { + throw new Error("Cannot remove the root element"); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref; + if (name != null) { + name = name.valueOf(); + } + if (attributes == null) { + attributes = {}; + } + attributes = attributes.valueOf(); + if (!isObject(attributes)) { + ref = [attributes, text], text = ref[0], attributes = ref[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + doc.xmldec = xmldec; + return doc.root(); + }; + + XMLNode.prototype.doctype = function(pubID, sysID) { + var doc, doctype; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + doc.doctype = doctype; + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var child; + if (this.isRoot) { + return this; + } + child = this.parent; + while (!child.isRoot) { + child = child.parent; + } + return child; + }; + + XMLNode.prototype.document = function() { + return this.root().documentObject; + }; + + XMLNode.prototype.end = function(options) { + return this.document().toString(options); + }; + + XMLNode.prototype.prev = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node"); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + if (this.isRoot) { + throw new Error("Root node has no siblings"); + } + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node"); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { + var clonedRoot; + clonedRoot = xmlbuilder.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + return this.doctype(pubID, sysID); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + return XMLNode; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js new file mode 100755 index 0000000..f5d8c6c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js @@ -0,0 +1,51 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLProcessingInstruction, create; + + create = require('lodash/object/create'); + + module.exports = XMLProcessingInstruction = (function() { + function XMLProcessingInstruction(parent, target, value) { + this.stringify = parent.stringify; + if (target == null) { + throw new Error("Missing instruction target"); + } + this.target = this.stringify.insTarget(target); + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return create(XMLProcessingInstruction.prototype, this); + }; + + XMLProcessingInstruction.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += ''; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLProcessingInstruction; + + })(); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLRaw.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLRaw.js new file mode 100755 index 0000000..499d0e2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLRaw.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLNode, XMLRaw, create, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + create = require('lodash/object/create'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text"); + } + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return create(XMLRaw.prototype, this); + }; + + XMLRaw.prototype.toString = function(options, level) { + var indent, newline, offset, pretty, r, ref, ref1, ref2, space; + pretty = (options != null ? options.pretty : void 0) || false; + indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; + offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; + newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; + level || (level = 0); + space = new Array(level + offset + 1).join(indent); + r = ''; + if (pretty) { + r += space; + } + r += this.value; + if (pretty) { + r += newline; + } + return r; + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100755 index 0000000..f0ab1fc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,165 @@ +// Generated by CoffeeScript 1.9.1 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; + ref = (options != null ? options.stringify : void 0) || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.eleName = function(val) { + val = '' + val || ''; + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.eleText = function(val) { + val = '' + val || ''; + return this.assertLegalChar(this.elEscape(val)); + }; + + XMLStringifier.prototype.cdata = function(val) { + val = '' + val || ''; + if (val.match(/]]>/)) { + throw new Error("Invalid CDATA text: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attName = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + val = '' + val || ''; + return this.attEscape(val); + }; + + XMLStringifier.prototype.insTarget = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.insValue = function(val) { + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { + throw new Error("Invalid encoding: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (val != null) { + return '' + val || ''; + } else { + return val; + } + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.dtdNData = function(val) { + return '' + val || ''; + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var chars, chr; + if (this.allowSurrogateChars) { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; + } else { + chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; + } + chr = str.match(chars); + if (chr) { + throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); + } + return str; + }; + + XMLStringifier.prototype.elEscape = function(str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + return str.replace(/&/g, '&').replace(/=0.8.0" + }, + "gitHead": "ec17840a6705ef666b7d04c771de11df6091fff5", + "homepage": "http://github.com/oozcitak/xmlbuilder-js", + "keywords": [ + "xml", + "xmlbuilder" + ], + "license": "MIT", + "main": "./lib/index", + "maintainers": [ + { + "name": "oozcitak", + "email": "oozcitak@gmail.com" + } + ], + "name": "xmlbuilder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/oozcitak/xmlbuilder-js.git" + }, + "scripts": { + "postpublish": "rm -rf lib", + "prepublish": "coffee -co lib src", + "test": "mocha && istanbul report text lcov" + }, + "version": "4.0.0" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.npmignore b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.npmignore new file mode 100755 index 0000000..b094a44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.npmignore @@ -0,0 +1,5 @@ +test +t +travis.yml +.project +changelog diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.travis.yml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.travis.yml new file mode 100755 index 0000000..b95408e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/.travis.yml @@ -0,0 +1,22 @@ +language: node_js + +node_js: + - '0.10' + +branches: + only: + - master + - proof + - travis-ci + +# Not using `npm install --dev` because it is recursive. It will pull in the all +# development dependencies for CoffeeScript. Way too much spew in the Travis CI +# build output. + +before_install: + - npm install + - npm install istanbul coveralls + +env: + global: + - secure: "BxUHTsa1WVANLQoimilbZwa1MCWSdM9hOmPWBE/rsYb7uT/iiqkRXXwnWhKtN5CLvTvIQbiAzq4iyPID0S8UHrnxClYQrOuA6QkrtwgIEuDAmijao/bgxobPOremvkwXcpMGIwzYKyYQQtSEaEIQbqf6gSSKW9dBh/GZ/vfTsqo=" diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/LICENSE new file mode 100755 index 0000000..68a9b5e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/LICENSE @@ -0,0 +1,8 @@ +You can choose any one of those: + +The MIT License (MIT): + +link:http://opensource.org/licenses/MIT + +LGPL: +http://www.gnu.org/licenses/lgpl.html diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/__package__.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/__package__.js new file mode 100755 index 0000000..93af349 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/__package__.js @@ -0,0 +1,4 @@ +this.addScript('dom.js',['DOMImplementation','XMLSerializer']); +this.addScript('dom-parser.js',['DOMHandler','DOMParser'], + ['DOMImplementation','XMLReader']); +this.addScript('sax.js','XMLReader'); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/changelog b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/changelog new file mode 100755 index 0000000..ab815bb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/changelog @@ -0,0 +1,14 @@ +### Version 0.1.16 + +Sat May 4 14:58:03 UTC 2013 + + * Correctly handle multibyte Unicode greater than two byts. #57. #56. + * Initial unit testing and test coverage. #53. #46. #19. + * Create Bower `component.json` #52. + +### Version 0.1.8 + + * Add: some test case from node-o3-xml(excludes xpath support) + * Fix: remove existed attribute before setting (bug introduced in v0.1.5) + * Fix: index direct access for childNodes and any NodeList collection(not w3c standard) + * Fix: remove last child bug diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/component.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/component.json new file mode 100755 index 0000000..93b4d57 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/component.json @@ -0,0 +1,10 @@ +{ + "name": "xmldom", + "version": "0.1.15", + "main": "dom-parser.js", + "ignore": [ + "**/.*", + "node_modules", + "components" + ] +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom-parser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom-parser.js new file mode 100755 index 0000000..41d5226 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom-parser.js @@ -0,0 +1,251 @@ +function DOMParser(options){ + this.options = options ||{locator:{}}; + +} +DOMParser.prototype.parseFromString = function(source,mimeType){ + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns||{}; + var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} + if(locator){ + domBuilder.setDocumentLocator(locator) + } + + sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); + sax.domBuilder = options.domBuilder || domBuilder; + if(/\/x?html?$/.test(mimeType)){ + entityMap.nbsp = '\xa0'; + entityMap.copy = '\xa9'; + defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; + } + defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace'; + if(source){ + sax.parse(source,defaultNSMap,entityMap); + }else{ + sax.errorHandler.error("invalid doc source"); + } + return domBuilder.doc; +} +function buildErrorHandler(errorImpl,domBuilder,locator){ + if(!errorImpl){ + if(domBuilder instanceof DOMHandler){ + return domBuilder; + } + errorImpl = domBuilder ; + } + var errorHandler = {} + var isCallback = errorImpl instanceof Function; + locator = locator||{} + function build(key){ + var fn = errorImpl[key]; + if(!fn && isCallback){ + fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; + } + errorHandler[key] = fn && function(msg){ + fn('[xmldom '+key+']\t'+msg+_locator(locator)); + }||function(){}; + } + build('warning'); + build('error'); + build('fatalError'); + return errorHandler; +} + +//console.log('#\n\n\n\n\n\n\n####') +/** + * +ContentHandler+ErrorHandler + * +LexicalHandler+EntityResolver2 + * -DeclHandler-DTDHandler + * + * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler + * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 + * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html + */ +function DOMHandler() { + this.cdata = false; +} +function position(locator,node){ + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} +/** + * @see org.xml.sax.ContentHandler#startDocument + * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ +DOMHandler.prototype = { + startDocument : function() { + this.doc = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.doc.documentURI = this.locator.systemId; + } + }, + startElement:function(namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName||localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator,el) + for (var i = 0 ; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator &&position(attrs.getLocator(i),attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr) + } + }, + endElement:function(namespaceURI, localName, qName) { + var current = this.currentElement + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping:function(prefix, uri) { + }, + endPrefixMapping:function(prefix) { + }, + processingInstruction:function(target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator,ins) + appendElement(this, ins); + }, + ignorableWhitespace:function(ch, start, length) { + }, + characters:function(chars, start, length) { + chars = _toString.apply(this,arguments) + //console.log(chars) + if(chars){ + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if(this.currentElement){ + this.currentElement.appendChild(charNode); + }else if(/^\s*$/.test(chars)){ + this.doc.appendChild(charNode); + //process xml + } + this.locator && position(this.locator,charNode) + } + }, + skippedEntity:function(name) { + }, + endDocument:function() { + this.doc.normalize(); + }, + setDocumentLocator:function (locator) { + if(this.locator = locator){// && !('lineNumber' in locator)){ + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment:function(chars, start, length) { + chars = _toString.apply(this,arguments) + var comm = this.doc.createComment(chars); + this.locator && position(this.locator,comm) + appendElement(this, comm); + }, + + startCDATA:function() { + //used in characters() methods + this.cdata = true; + }, + endCDATA:function() { + this.cdata = false; + }, + + startDTD:function(name, publicId, systemId) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator,dt) + appendElement(this, dt); + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning:function(error) { + console.warn('[xmldom warning]\t'+error,_locator(this.locator)); + }, + error:function(error) { + console.error('[xmldom error]\t'+error,_locator(this.locator)); + }, + fatalError:function(error) { + console.error('[xmldom fatalError]\t'+error,_locator(this.locator)); + throw error; + } +} +function _locator(l){ + if(l){ + return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' + } +} +function _toString(chars,start,length){ + if(typeof chars == 'string'){ + return chars.substr(start,length) + }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if(chars.length >= start+length || start){ + return new java.lang.String(chars,start,length)+''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ + DOMHandler.prototype[key] = function(){return null} +}) + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement (hander,node) { + if (!hander.currentElement) { + hander.doc.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } +}//appendChild and setAttributeNS are preformance key + +//if(typeof require == 'function'){ + var XMLReader = require('./sax').XMLReader; + var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; + exports.XMLSerializer = require('./dom').XMLSerializer ; + exports.DOMParser = DOMParser; +//} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom.js new file mode 100755 index 0000000..b290df0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/dom.js @@ -0,0 +1,1244 @@ +/* + * DOM Level 2 + * Object DOMException + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + */ + +function copy(src,dest){ + for(var p in src){ + dest[p] = src[p]; + } +} +/** +^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? +^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? + */ +function _extends(Class,Super){ + var pt = Class.prototype; + if(Object.create){ + var ppt = Object.create(Super.prototype) + pt.__proto__ = ppt; + } + if(!(pt instanceof Super)){ + function t(){}; + t.prototype = Super.prototype; + t = new t(); + copy(pt,t); + Class.prototype = pt = t; + } + if(pt.constructor != Class){ + if(typeof Class != 'function'){ + console.error("unknow Class:"+Class) + } + pt.constructor = Class + } +} +var htmlns = 'http://www.w3.org/1999/xhtml' ; +// Node Types +var NodeType = {} +var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; +var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; +var TEXT_NODE = NodeType.TEXT_NODE = 3; +var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; +var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; +var ENTITY_NODE = NodeType.ENTITY_NODE = 6; +var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; +var COMMENT_NODE = NodeType.COMMENT_NODE = 8; +var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; +var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; +var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; +var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + +// ExceptionCode +var ExceptionCode = {} +var ExceptionMessage = {}; +var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); +var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); +var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); +var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); +var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); +var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); +var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); +var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); +var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); +var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); +//level2 +var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); +var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); +var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); +var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); +var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); + + +function DOMException(code, message) { + if(message instanceof Error){ + var error = message; + }else{ + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if(message) this.message = this.message + ": " + message; + return error; +}; +DOMException.prototype = Error.prototype; +copy(ExceptionCode,DOMException) +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + */ +function NodeList() { +}; +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length:0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return this[index] || null; + }, + toString:function(isHTML,nodeFilter){ + for(var buf = [], i = 0;i=0){ + var lastIndex = list.length-1 + while(i0 || key == 'xmlns'){ +// return null; +// } + //console.log() + var i = this.length; + while(i--){ + var attr = this[i]; + //console.log(attr.nodeName,key) + if(attr.nodeName == key){ + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR + var el = attr.ownerElement, oldAttr; + if(el && el!=this._ownerElement){ + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); + _addNamedNode(this._ownerElement,this,attr,oldAttr); + return oldAttr; + }, + + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + + + },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + + //for level2 + removeNamedItemNS:function(namespaceURI,localName){ + var attr = this.getNamedItemNS(namespaceURI,localName); + _removeNamedNode(this._ownerElement,this,attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while(i--){ + var node = this[i]; + if(node.localName == localName && node.namespaceURI == namespaceURI){ + return node; + } + } + return null; + } +}; +/** + * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 + */ +function DOMImplementation(/* Object */ features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } +}; + +DOMImplementation.prototype = { + hasFeature: function(/* string */ feature, /* string */ version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + // Introduced in DOM Level 2: + createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype; + if(doctype){ + doc.appendChild(doctype); + } + if(qualifiedName){ + var root = doc.createElementNS(namespaceURI,qualifiedName); + doc.appendChild(root); + } + return doc; + }, + // Introduced in DOM Level 2: + createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + // Introduced in DOM Level 2: + //readonly attribute DOMString internalSubset; + + //TODO:.. + // readonly attribute NamedNodeMap entities; + // readonly attribute NamedNodeMap notations; + return node; + } +}; + + +/** + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + */ + +function Node() { +}; + +Node.prototype = { + firstChild : null, + lastChild : null, + previousSibling : null, + nextSibling : null, + attributes : null, + parentNode : null, + childNodes : null, + ownerDocument : null, + nodeValue : null, + namespaceURI : null, + prefix : null, + localName : null, + // Modified in DOM Level 2: + insertBefore:function(newChild, refChild){//raises + return _insertBefore(this,newChild,refChild); + }, + replaceChild:function(newChild, oldChild){//raises + this.insertBefore(newChild,oldChild); + if(oldChild){ + this.removeChild(oldChild); + } + }, + removeChild:function(oldChild){ + return _removeChild(this,oldChild); + }, + appendChild:function(newChild){ + return this.insertBefore(newChild,null); + }, + hasChildNodes:function(){ + return this.firstChild != null; + }, + cloneNode:function(deep){ + return cloneNode(this.ownerDocument||this,this,deep); + }, + // Modified in DOM Level 2: + normalize:function(){ + var child = this.firstChild; + while(child){ + var next = child.nextSibling; + if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ + this.removeChild(next); + child.appendData(next.data); + }else{ + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported:function(feature, version){ + return this.ownerDocument.implementation.hasFeature(feature,version); + }, + // Introduced in DOM Level 2: + hasAttributes:function(){ + return this.attributes.length>0; + }, + lookupPrefix:function(namespaceURI){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + for(var n in map){ + if(map[n] == namespaceURI){ + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI:function(prefix){ + var el = this; + while(el){ + var map = el._nsMap; + //console.dir(map) + if(map){ + if(prefix in map){ + return map[prefix] ; + } + } + el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace:function(namespaceURI){ + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } +}; + + +function _xmlEncoder(c){ + return c == '<' && '<' || + c == '>' && '>' || + c == '&' && '&' || + c == '"' && '"' || + '&#'+c.charCodeAt()+';' +} + + +copy(NodeType,Node); +copy(NodeType,Node.prototype); + +/** + * @param callback return true for continue,false for break + * @return boolean true: break visit; + */ +function _visitNode(node,callback){ + if(callback(node)){ + return true; + } + if(node = node.firstChild){ + do{ + if(_visitNode(node,callback)){return true} + }while(node=node.nextSibling) + } +} + + + +function Document(){ +} +function _onAddAttribute(doc,el,newAttr){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value + } +} +function _onRemoveAttribute(doc,el,newAttr,remove){ + doc && doc._inc++; + var ns = newAttr.namespaceURI ; + if(ns == 'http://www.w3.org/2000/xmlns/'){ + //update namespace + delete el._nsMap[newAttr.prefix?newAttr.localName:''] + } +} +function _onUpdateChild(doc,el,newChild){ + if(doc && doc._inc){ + doc._inc++; + //update childNodes + var cs = el.childNodes; + if(newChild){ + cs[cs.length++] = newChild; + }else{ + //console.log(1) + var child = el.firstChild; + var i = 0; + while(child){ + cs[i++] = child; + child =child.nextSibling; + } + cs.length = i; + } + } +} + +/** + * attributes; + * children; + * + * writeable properties: + * nodeValue,Attr:value,CharacterData:data + * prefix + */ +function _removeChild(parentNode,child){ + var previous = child.previousSibling; + var next = child.nextSibling; + if(previous){ + previous.nextSibling = next; + }else{ + parentNode.firstChild = next + } + if(next){ + next.previousSibling = previous; + }else{ + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument,parentNode); + return child; +} +/** + * preformance key(refChild == null) + */ +function _insertBefore(parentNode,newChild,nextChild){ + var cp = newChild.parentNode; + if(cp){ + cp.removeChild(newChild);//remove and update + } + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + }else{ + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + + + if(pre){ + pre.nextSibling = newFirst; + }else{ + parentNode.firstChild = newFirst; + } + if(nextChild == null){ + parentNode.lastChild = newLast; + }else{ + nextChild.previousSibling = newLast; + } + do{ + newFirst.parentNode = parentNode; + }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) + _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); + //console.log(parentNode.lastChild.nextSibling == null) + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; +} +function _appendSingleChild(parentNode,newChild){ + var cp = newChild.parentNode; + if(cp){ + var pre = parentNode.lastChild; + cp.removeChild(newChild);//remove and update + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if(pre){ + pre.nextSibling = newChild; + }else{ + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); + return newChild; + //console.log("__aa",parentNode.lastChild.nextSibling == null) +} +Document.prototype = { + //implementation : null, + nodeName : '#document', + nodeType : DOCUMENT_NODE, + doctype : null, + documentElement : null, + _inc : 1, + + insertBefore : function(newChild, refChild){//raises + if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ + var child = newChild.firstChild; + while(child){ + var next = child.nextSibling; + this.insertBefore(child,refChild); + child = next; + } + return newChild; + } + if(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){ + this.documentElement = newChild; + } + + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; + }, + removeChild : function(oldChild){ + if(this.documentElement == oldChild){ + this.documentElement = null; + } + return _removeChild(this,oldChild); + }, + // Introduced in DOM Level 2: + importNode : function(importedNode,deep){ + return importNode(this,importedNode,deep); + }, + // Introduced in DOM Level 2: + getElementById : function(id){ + var rtv = null; + _visitNode(this.documentElement,function(node){ + if(node.nodeType == ELEMENT_NODE){ + if(node.getAttribute('id') == id){ + rtv = node; + return true; + } + } + }) + return rtv; + }, + + //document factory method: + createElement : function(tagName){ + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment : function(){ + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode : function(data){ + var node = new Text(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createComment : function(data){ + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createCDATASection : function(data){ + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data) + return node; + }, + createProcessingInstruction : function(target,data){ + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue= node.data = data; + return node; + }, + createAttribute : function(name){ + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference : function(name){ + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + createElementNS : function(namespaceURI,qualifiedName){ + var node = new Element(); + var pl = qualifiedName.split(':'); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS : function(namespaceURI,qualifiedName){ + var node = new Attr(); + var pl = qualifiedName.split(':'); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if(pl.length == 2){ + node.prefix = pl[0]; + node.localName = pl[1]; + }else{ + //el.prefix = null; + node.localName = qualifiedName; + } + return node; + } +}; +_extends(Document,Node); + + +function Element() { + this._nsMap = {}; +}; +Element.prototype = { + nodeType : ELEMENT_NODE, + hasAttribute : function(name){ + return this.getAttributeNode(name)!=null; + }, + getAttribute : function(name){ + var attr = this.getAttributeNode(name); + return attr && attr.value || ''; + }, + getAttributeNode : function(name){ + return this.attributes.getNamedItem(name); + }, + setAttribute : function(name, value){ + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + removeAttribute : function(name){ + var attr = this.getAttributeNode(name) + attr && this.removeAttributeNode(attr); + }, + + //four real opeartion method + appendChild:function(newChild){ + if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ + return this.insertBefore(newChild,null); + }else{ + return _appendSingleChild(this,newChild); + } + }, + setAttributeNode : function(newAttr){ + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS : function(newAttr){ + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode : function(oldAttr){ + //console.log(this == oldAttr.ownerElement) + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS : function(namespaceURI, localName){ + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS : function(namespaceURI, localName){ + return this.getAttributeNodeNS(namespaceURI, localName)!=null; + }, + getAttributeNS : function(namespaceURI, localName){ + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ''; + }, + setAttributeNS : function(namespaceURI, qualifiedName, value){ + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr) + }, + getAttributeNodeNS : function(namespaceURI, localName){ + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + getElementsByTagName : function(tagName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS : function(namespaceURI, localName){ + return new LiveNodeList(this,function(base){ + var ls = []; + _visitNode(base,function(node){ + if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ + ls.push(node); + } + }); + return ls; + + }); + } +}; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + + +_extends(Element,Node); +function Attr() { +}; +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr,Node); + + +function CharacterData() { +}; +CharacterData.prototype = { + data : '', + substringData : function(offset, count) { + return this.data.substring(offset, offset+count); + }, + appendData: function(text) { + text = this.data+text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset,text) { + this.replaceData(offset,0,text); + + }, + appendChild:function(newChild){ + throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]) + }, + deleteData: function(offset, count) { + this.replaceData(offset,count,""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0,offset); + var end = this.data.substring(offset+count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } +} +_extends(CharacterData,Node); +function Text() { +}; +Text.prototype = { + nodeName : "#text", + nodeType : TEXT_NODE, + splitText : function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if(this.parentNode){ + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } +} +_extends(Text,CharacterData); +function Comment() { +}; +Comment.prototype = { + nodeName : "#comment", + nodeType : COMMENT_NODE +} +_extends(Comment,CharacterData); + +function CDATASection() { +}; +CDATASection.prototype = { + nodeName : "#cdata-section", + nodeType : CDATA_SECTION_NODE +} +_extends(CDATASection,CharacterData); + + +function DocumentType() { +}; +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType,Node); + +function Notation() { +}; +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation,Node); + +function Entity() { +}; +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity,Node); + +function EntityReference() { +}; +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference,Node); + +function DocumentFragment() { +}; +DocumentFragment.prototype.nodeName = "#document-fragment"; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment,Node); + + +function ProcessingInstruction() { +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction,Node); +function XMLSerializer(){} +XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){ + return nodeSerializeToString.call(node,isHtml,nodeFilter); +} +Node.prototype.toString = nodeSerializeToString; +function nodeSerializeToString(isHtml,nodeFilter){ + var buf = []; + var refNode = this.nodeType == 9?this.documentElement:this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + + if(uri && prefix == null){ + //console.log(prefix) + var prefix = refNode.lookupPrefix(uri); + if(prefix == null){ + //isHTML = true; + var visibleNamespaces=[ + {namespace:uri,prefix:null} + //{namespace:uri,prefix:''} + ] + } + } + serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces); + //console.log('###',this.nodeType,uri,prefix,buf.join('')) + return buf.join(''); +} +function needNamespaceDefine(node,isHTML, visibleNamespaces) { + var prefix = node.prefix||''; + var uri = node.namespaceURI; + if (!prefix && !uri){ + return false; + } + if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace" + || uri == 'http://www.w3.org/2000/xmlns/'){ + return false; + } + + var i = visibleNamespaces.length + //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces) + while (i--) { + var ns = visibleNamespaces[i]; + // get namespace prefix + //console.log(node.nodeType,node.tagName,ns.prefix,prefix) + if (ns.prefix == prefix){ + return ns.namespace != uri; + } + } + //console.log(isHTML,uri,prefix=='') + //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){ + // return false; + //} + //node.flag = '11111' + //console.error(3,true,node.flag,node.prefix,node.namespaceURI) + return true; +} +function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){ + if(nodeFilter){ + node = nodeFilter(node); + if(node){ + if(typeof node == 'string'){ + buf.push(node); + return; + } + }else{ + return; + } + //buf.sort.apply(attrs, attributeSorter); + } + switch(node.nodeType){ + case ELEMENT_NODE: + if (!visibleNamespaces) visibleNamespaces = []; + var startVisibleNamespaces = visibleNamespaces.length; + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + + isHTML = (htmlns === node.namespaceURI) ||isHTML + buf.push('<',nodeName); + + + + for(var i=0;i'); + //if is cdata child node + if(isHTML && /^script$/i.test(nodeName)){ + while(child){ + if(child.data){ + buf.push(child.data); + }else{ + serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); + } + child = child.nextSibling; + } + }else + { + while(child){ + serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); + child = child.nextSibling; + } + } + buf.push(''); + }else{ + buf.push('/>'); + } + // remove added visible namespaces + //visibleNamespaces.length = startVisibleNamespaces; + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while(child){ + serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push( ''); + case COMMENT_NODE: + return buf.push( ""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(''); + }else if(sysid && sysid!='.'){ + buf.push(' SYSTEM "',sysid,'">'); + }else{ + var sub = node.internalSubset; + if(sub){ + buf.push(" [",sub,"]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push( ""); + case ENTITY_REFERENCE_NODE: + return buf.push( '&',node.nodeName,';'); + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??',node.nodeName); + } +} +function importNode(doc,node,deep){ + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + //var attrs = node2.attributes; + //var len = attrs.length; + //for(var i=0;i=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/plist" + ] + ], + "_from": "xmldom@>=0.1.0 <0.2.0", + "_id": "xmldom@0.1.27", + "_inCache": true, + "_location": "/xmldom", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/xmldom-0.1.27.tgz_1480305406093_0.9070004557725042" + }, + "_npmUser": { + "name": "jindw", + "email": "jindw@xidea.org" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "xmldom@0.1.x", + "scope": null, + "escapedName": "xmldom", + "name": "xmldom", + "rawSpec": "0.1.x", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/plist" + ], + "_resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "_shasum": "d501f97b3bdb403af8ef9ecc20573187aadac0e9", + "_shrinkwrap": null, + "_spec": "xmldom@0.1.x", + "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/plist", + "author": { + "name": "jindw", + "email": "jindw@xidea.org", + "url": "http://www.xidea.org" + }, + "bugs": { + "url": "http://github.com/jindw/xmldom/issues", + "email": "jindw@xidea.org" + }, + "contributors": [ + { + "name": "Yaron Naveh", + "email": "yaronn01@gmail.com", + "url": "http://webservices20.blogspot.com/" + }, + { + "name": "Harutyun Amirjanyan", + "email": "amirjanyan@gmail.com", + "url": "https://github.com/nightwing" + }, + { + "name": "Alan Gutierrez", + "email": "alan@prettyrobots.com", + "url": "http://www.prettyrobots.com/" + } + ], + "dependencies": {}, + "description": "A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).", + "devDependencies": { + "proof": "0.0.28" + }, + "directories": {}, + "dist": { + "shasum": "d501f97b3bdb403af8ef9ecc20573187aadac0e9", + "tarball": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz" + }, + "engines": { + "node": ">=0.1" + }, + "gitHead": "b53aa82a36160d85faab394035dcd1784764537f", + "homepage": "https://github.com/jindw/xmldom", + "keywords": [ + "w3c", + "dom", + "xml", + "parser", + "javascript", + "DOMParser", + "XMLSerializer" + ], + "licenses": [ + { + "type": "LGPL", + "url": "http://www.gnu.org/licenses/lgpl.html", + "MIT": "http://opensource.org/licenses/MIT" + } + ], + "main": "./dom-parser.js", + "maintainers": [ + { + "name": "jindw", + "email": "jindw@xidea.org" + }, + { + "name": "yaron", + "email": "yaronn01@gmail.com" + }, + { + "name": "bigeasy", + "email": "alan@prettyrobots.com" + }, + { + "name": "kethinov", + "email": "kethinov@gmail.com" + }, + { + "name": "jinjinyun", + "email": "jinyun.jin@gmail.com" + } + ], + "name": "xmldom", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jindw/xmldom.git" + }, + "scripts": { + "test": "proof platform win32 && proof test */*/*.t.js || t/test" + }, + "version": "0.1.27" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/readme.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/readme.md new file mode 100755 index 0000000..f832c44 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/readme.md @@ -0,0 +1,219 @@ +# XMLDOM [![Build Status](https://secure.travis-ci.org/bigeasy/xmldom.png?branch=master)](http://travis-ci.org/bigeasy/xmldom) [![Coverage Status](https://coveralls.io/repos/bigeasy/xmldom/badge.png?branch=master)](https://coveralls.io/r/bigeasy/xmldom) [![NPM version](https://badge.fury.io/js/xmldom.png)](http://badge.fury.io/js/xmldom) + +A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully +compatible with `W3C DOM level2`; and some compatible with `level3`. Supports +`DOMParser` and `XMLSerializer` interface such as in browser. + +Install: +------- +>npm install xmldom + +Example: +==== +```javascript +var DOMParser = require('xmldom').DOMParser; +var doc = new DOMParser().parseFromString( + '\n'+ + '\ttest\n'+ + '\t\n'+ + '\t\n'+ + '' + ,'text/xml'); +doc.documentElement.setAttribute('x','y'); +doc.documentElement.setAttributeNS('./lite','c:x','y2'); +var nsAttr = doc.documentElement.getAttributeNS('./lite','x') +console.info(nsAttr) +console.info(doc) +``` +API Reference +===== + + * [DOMParser](https://developer.mozilla.org/en/DOMParser): + + ```javascript + parseFromString(xmlsource,mimeType) + ``` + * **options extension** _by xmldom_(not BOM standard!!) + + ```javascript + //added the options argument + new DOMParser(options) + + //errorHandler is supported + new DOMParser({ + /** + * locator is always need for error position info + */ + locator:{}, + /** + * you can override the errorHandler for xml parser + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + errorHandler:{warning:function(w){console.warn(w)},error:callback,fatalError:callback} + //only callback model + //errorHandler:function(level,msg){console.log(level,msg)} + }) + + ``` + + * [XMLSerializer](https://developer.mozilla.org/en/XMLSerializer) + + ```javascript + serializeToString(node) + ``` +DOM level2 method and attribute: +------ + + * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247) + + attribute: + nodeValue|prefix + readonly attribute: + nodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName + method: + insertBefore(newChild, refChild) + replaceChild(newChild, oldChild) + removeChild(oldChild) + appendChild(newChild) + hasChildNodes() + cloneNode(deep) + normalize() + isSupported(feature, version) + hasAttributes() + + * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490) + + method: + hasFeature(feature, version) + createDocumentType(qualifiedName, publicId, systemId) + createDocument(namespaceURI, qualifiedName, doctype) + + * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node + + readonly attribute: + doctype|implementation|documentElement + method: + createElement(tagName) + createDocumentFragment() + createTextNode(data) + createComment(data) + createCDATASection(data) + createProcessingInstruction(target, data) + createAttribute(name) + createEntityReference(name) + getElementsByTagName(tagname) + importNode(importedNode, deep) + createElementNS(namespaceURI, qualifiedName) + createAttributeNS(namespaceURI, qualifiedName) + getElementsByTagNameNS(namespaceURI, localName) + getElementById(elementId) + + * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node + * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node + + readonly attribute: + tagName + method: + getAttribute(name) + setAttribute(name, value) + removeAttribute(name) + getAttributeNode(name) + setAttributeNode(newAttr) + removeAttributeNode(oldAttr) + getElementsByTagName(name) + getAttributeNS(namespaceURI, localName) + setAttributeNS(namespaceURI, qualifiedName, value) + removeAttributeNS(namespaceURI, localName) + getAttributeNodeNS(namespaceURI, localName) + setAttributeNodeNS(newAttr) + getElementsByTagNameNS(namespaceURI, localName) + hasAttribute(name) + hasAttributeNS(namespaceURI, localName) + + * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node + + attribute: + value + readonly attribute: + name|specified|ownerElement + + * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177) + + readonly attribute: + length + method: + item(index) + + * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922) + + readonly attribute: + length + method: + getNamedItem(name) + setNamedItem(arg) + removeNamedItem(name) + item(index) + getNamedItemNS(namespaceURI, localName) + setNamedItemNS(arg) + removeNamedItemNS(namespaceURI, localName) + + * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node + + method: + substringData(offset, count) + appendData(arg) + insertData(offset, arg) + deleteData(offset, count) + replaceData(offset, count, arg) + + * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData + + method: + splitText(offset) + + * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212) + * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData + + * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927) + + readonly attribute: + name|entities|notations|publicId|systemId|internalSubset + + * Notation : Node + + readonly attribute: + publicId|systemId + + * Entity : Node + + readonly attribute: + publicId|systemId|notationName + + * EntityReference : Node + * ProcessingInstruction : Node + + attribute: + data + readonly attribute: + target + +DOM level 3 support: +----- + + * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent) + + attribute: + textContent + method: + isDefaultNamespace(namespaceURI){ + lookupNamespaceURI(prefix) + +DOM extension by xmldom +--- + * [Node] Source position extension; + + attribute: + //Numbered starting from '1' + lineNumber + //Numbered starting from '1' + columnNumber diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/sax.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/sax.js new file mode 100755 index 0000000..b33635f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/cordova/node_modules/xmldom/sax.js @@ -0,0 +1,633 @@ +//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] +//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] +//[5] Name ::= NameStartChar (NameChar)* +var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF +var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); +var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); +//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/ +//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') + +//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE +//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE +var S_TAG = 0;//tag name offerring +var S_ATTR = 1;//attr name offerring +var S_ATTR_SPACE=2;//attr name end and space offer +var S_EQ = 3;//=space? +var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only) +var S_ATTR_END = 5;//attr value end and no space(quot end) +var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer) +var S_TAG_CLOSE = 7;//closed el + +function XMLReader(){ + +} + +XMLReader.prototype = { + parse:function(source,defaultNSMap,entityMap){ + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap ,defaultNSMap = {}) + parse(source,defaultNSMap,entityMap, + domBuilder,this.errorHandler); + domBuilder.endDocument(); + } +} +function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10) + , surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a){ + var k = a.slice(1,-1); + if(k in entityMap){ + return entityMap[k]; + }else if(k.charAt(0) === '#'){ + return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) + }else{ + errorHandler.error('entity not found:'+a); + return a; + } + } + function appendText(end){//has some bugs + if(end>start){ + var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); + locator&&position(start); + domBuilder.characters(xt,0,end-start); + start = end + } + } + function position(p,m){ + while(p>=lineEnd && (m = linePattern.exec(source))){ + lineStart = m.index; + lineEnd = lineStart + m[0].length; + locator.lineNumber++; + //console.log('line++:',locator,startPos,endPos) + } + locator.columnNumber = p-lineStart+1; + } + var lineStart = 0; + var lineEnd = 0; + var linePattern = /.*(?:\r\n?|\n)|.*$/g + var locator = domBuilder.locator; + + var parseStack = [{currentNSMap:defaultNSMapCopy}] + var closeMap = {}; + var start = 0; + while(true){ + try{ + var tagStart = source.indexOf('<',start); + if(tagStart<0){ + if(!source.substr(start).match(/^\s*$/)){ + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if(tagStart>start){ + appendText(tagStart); + } + switch(source.charAt(tagStart+1)){ + case '/': + var end = source.indexOf('>',tagStart+3); + var tagName = source.substring(tagStart+2,end); + var config = parseStack.pop(); + if(end<0){ + + tagName = source.substring(tagStart+2).replace(/[\s<].*/,''); + //console.error('#@@@@@@'+tagName) + errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName); + end = tagStart+1+tagName.length; + }else if(tagName.match(/\s + locator&&position(tagStart); + end = parseInstruction(source,tagStart,domBuilder); + break; + case '!':// start){ + start = end; + }else{ + //TODO: 这里有可能sax回退,有位置错误风险 + appendText(Math.max(tagStart,start)+1); + } + } +} +function copyLocator(f,t){ + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; +} + +/** + * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack); + * @return end of the elementStartPart(end of elementEndPart for selfClosed el) + */ +function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){ + var attrName; + var value; + var p = ++start; + var s = S_TAG;//status + while(true){ + var c = source.charAt(p); + switch(c){ + case '=': + if(s === S_ATTR){//attrName + attrName = source.slice(start,p); + s = S_EQ; + }else if(s === S_ATTR_SPACE){ + s = S_EQ; + }else{ + //fatalError: equal must after attrName or space after attrName + throw new Error('attribute equal must after attrName'); + } + break; + case '\'': + case '"': + if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE + ){//equal + if(s === S_ATTR){ + errorHandler.warning('attribute value must after "="') + attrName = source.slice(start,p) + } + start = p+1; + p = source.indexOf(c,start) + if(p>0){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + el.add(attrName,value,start-1); + s = S_ATTR_END; + }else{ + //fatalError: no end quot match + throw new Error('attribute value no end \''+c+'\' match'); + } + }else if(s == S_ATTR_NOQUOT_VALUE){ + value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + //console.log(attrName,value,start,p) + el.add(attrName,value,start); + //console.dir(el) + errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); + start = p+1; + s = S_ATTR_END + }else{ + //fatalError: no equal before + throw new Error('attribute value must after "="'); + } + break; + case '/': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s =S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + case S_ATTR_SPACE: + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')") + } + break; + case ''://end document + //throw new Error('unexpected end of input') + errorHandler.error('unexpected end of input'); + if(s == S_TAG){ + el.setTagName(source.slice(start,p)); + } + return p; + case '>': + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break;//normal + case S_ATTR_NOQUOT_VALUE://Compatible state + case S_ATTR: + value = source.slice(start,p); + if(value.slice(-1) === '/'){ + el.closed = true; + value = value.slice(0,-1) + } + case S_ATTR_SPACE: + if(s === S_ATTR_SPACE){ + value = attrName; + } + if(s == S_ATTR_NOQUOT_VALUE){ + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) + }else{ + if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){ + errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') + } + el.add(value,value,start) + } + break; + case S_EQ: + throw new Error('attribute value missed!!'); + } +// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if(c<= ' '){//space + switch(s){ + case S_TAG: + el.setTagName(source.slice(start,p));//tagName + s = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start,p) + s = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); + errorHandler.warning('attribute "'+value+'" missed quot(")!!'); + el.add(attrName,value,start) + case S_ATTR_END: + s = S_TAG_SPACE; + break; + //case S_TAG_SPACE: + //case S_EQ: + //case S_ATTR_SPACE: + // void();break; + //case S_TAG_CLOSE: + //ignore warning + } + }else{//not space +//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE +//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE + switch(s){ + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_ATTR_NOQUOT_VALUE:void();break; + case S_ATTR_SPACE: + var tagName = el.tagName; + if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){ + errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!') + } + el.add(attrName,attrName,start); + start = p; + s = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"'+attrName+'"!!') + case S_TAG_SPACE: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_ATTR_NOQUOT_VALUE; + start = p; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + }//end outer switch + //console.log('p++',p) + p++; + } +} +/** + * @return true if has new namespace define + */ +function appendElement(el,domBuilder,currentNSMap){ + var tagName = el.tagName; + var localNSMap = null; + //var currentNSMap = parseStack[parseStack.length-1].currentNSMap; + var i = el.length; + while(i--){ + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if(nsp>0){ + var prefix = a.prefix = qName.slice(0,nsp); + var localName = qName.slice(nsp+1); + var nsPrefix = prefix === 'xmlns' && localName + }else{ + localName = qName; + prefix = null + nsPrefix = qName === 'xmlns' && '' + } + //can not set prefix,because prefix !== '' + a.localName = localName ; + //prefix == null for no ns prefix attribute + if(nsPrefix !== false){//hack!! + if(localNSMap == null){ + localNSMap = {} + //console.log(currentNSMap,0) + _copy(currentNSMap,currentNSMap={}) + //console.log(currentNSMap,1) + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = 'http://www.w3.org/2000/xmlns/' + domBuilder.startPrefixMapping(nsPrefix, value) + } + } + var i = el.length; + while(i--){ + a = el[i]; + var prefix = a.prefix; + if(prefix){//no prefix attribute has no namespace + if(prefix === 'xml'){ + a.uri = 'http://www.w3.org/XML/1998/namespace'; + }if(prefix !== 'xmlns'){ + a.uri = currentNSMap[prefix || ''] + + //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} + } + } + } + var nsp = tagName.indexOf(':'); + if(nsp>0){ + prefix = el.prefix = tagName.slice(0,nsp); + localName = el.localName = tagName.slice(nsp+1); + }else{ + prefix = null;//important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = el.uri = currentNSMap[prefix || '']; + domBuilder.startElement(ns,localName,tagName,el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if(el.closed){ + domBuilder.endElement(ns,localName,tagName); + if(localNSMap){ + for(prefix in localNSMap){ + domBuilder.endPrefixMapping(prefix) + } + } + }else{ + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + //parseStack.push(el); + return true; + } +} +function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ + if(/^(?:script|textarea)$/i.test(tagName)){ + var elEndStart = source.indexOf('',elStartEnd); + var text = source.substring(elStartEnd+1,elEndStart); + if(/[&<]/.test(text)){ + if(/^script$/i.test(tagName)){ + //if(!/\]\]>/.test(text)){ + //lexHandler.startCDATA(); + domBuilder.characters(text,0,text.length); + //lexHandler.endCDATA(); + return elEndStart; + //} + }//}else{//text area + text = text.replace(/&#?\w+;/g,entityReplacer); + domBuilder.characters(text,0,text.length); + return elEndStart; + //} + + } + } + return elStartEnd+1; +} +function fixSelfClosed(source,elStartEnd,tagName,closeMap){ + //if(tagName in closeMap){ + var pos = closeMap[tagName]; + if(pos == null){ + //console.log(tagName) + pos = source.lastIndexOf('') + if(pos',start+4); + //append comment source.substring(4,end)//

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js similarity index 100% rename from MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/scripts.03193944.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js new file mode 100644 index 0000000..684c2dc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js @@ -0,0 +1,19 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a){"use strict";function b(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function d(a,b,e){var f,g;if(a)if(y(a))for(f in a)"prototype"==f||"length"==f||"name"==f||a.hasOwnProperty&&!a.hasOwnProperty(f)||b.call(e,a[f],f,a);else if(Wd(a)||c(a)){var h="object"!=typeof a;for(f=0,g=a.length;g>f;f++)(h||f in a)&&b.call(e,a[f],f,a)}else if(a.forEach&&a.forEach!==d)a.forEach(b,e,a);else if(u(a))for(f in a)b.call(e,a[f],f,a);else if("function"==typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&b.call(e,a[f],f,a);else for(f in a)Fd.call(a,f)&&b.call(e,a[f],f,a);return a}function e(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(t(g)||y(g))for(var j=Object.keys(g),k=0,l=j.length;l>k;k++){var m=j[k],n=g[m];c&&t(n)?x(n)?a[m]=new Date(n.valueOf()):z(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):J(n)?a[m]=n.clone():(t(a[m])||(a[m]=Wd(n)?[]:{}),i(a[m],[n],!0)):a[m]=n}}return h(a,d),a}function j(a){return i(a,Od.call(arguments,1),!1)}function k(a){return i(a,Od.call(arguments,1),!0)}function l(a){return parseInt(a,10)}function m(a,b){return j(Object.create(a),b)}function n(){}function o(a){return a}function p(a){return function(){return a}}function q(a){return y(a.toString)&&a.toString!==Rd}function r(a){return"undefined"==typeof a}function s(a){return"undefined"!=typeof a}function t(a){return null!==a&&"object"==typeof a}function u(a){return null!==a&&"object"==typeof a&&!Sd(a)}function v(a){return"string"==typeof a}function w(a){return"number"==typeof a}function x(a){return"[object Date]"===Rd.call(a)}function y(a){return"function"==typeof a}function z(a){return"[object RegExp]"===Rd.call(a)}function A(a){return a&&a.window===a}function B(a){return a&&a.$evalAsync&&a.$watch}function C(a){return"[object File]"===Rd.call(a)}function D(a){return"[object FormData]"===Rd.call(a)}function E(a){return"[object Blob]"===Rd.call(a)}function F(a){return"boolean"==typeof a}function G(a){return a&&y(a.then)}function H(a){return a&&w(a.length)&&Xd.test(Rd.call(a))}function I(a){return"[object ArrayBuffer]"===Rd.call(a)}function J(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function K(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function N(a,b){function c(a,b){var c,d=b.$$hashKey;if(Wd(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(u(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Fd.call(a,c)&&(b[c]=e(a[c]));return h(b,d),b}function e(a){if(!t(a))return a;var b=g.indexOf(a);if(-1!==b)return i[b];if(A(a)||B(a))throw Td("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d=!1,e=f(a);return void 0===e&&(e=Wd(a)?[]:Object.create(Sd(a)),d=!0),g.push(a),i.push(e),d?c(a,e):e}function f(a){switch(Rd.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c;case"[object Blob]":return new a.constructor([a],{type:a.type})}return y(a.cloneNode)?a.cloneNode(!0):void 0}var g=[],i=[];if(b){if(H(b)||I(b))throw Td("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Td("cpi","Can't copy! Source and destination are identical.");return Wd(b)?b.length=0:d(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),g.push(a),i.push(b),c(a,b)}return e(a)}function O(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Wd(a)){if(x(a))return x(b)?O(a.getTime(),b.getTime()):!1;if(z(a))return z(b)?a.toString()==b.toString():!1;if(B(a)||B(b)||A(a)||A(b)||Wd(b)||x(b)||z(b))return!1;e=oa();for(d in a)if("$"!==d.charAt(0)&&!y(a[d])){if(!O(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&s(b[d])&&!y(b[d]))return!1;return!0}if(!Wd(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!O(a[d],b[d]))return!1;return!0}}return!1}function P(a,b,c){return a.concat(Od.call(b,c))}function Q(a,b){return Od.call(a,b||0)}function R(a,b){var c=arguments.length>2?Q(arguments,2):[];return!y(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,P(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function S(b,c){var d=c;return"string"==typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?d=void 0:A(c)?d="$WINDOW":c&&a.document===c?d="$DOCUMENT":B(c)&&(d="$SCOPE"),d}function T(a,b){return r(a)?void 0:(w(b)||(b=b?2:null),JSON.stringify(a,S,b))}function U(a){return v(a)?JSON.parse(a):a}function V(a,b){a=a.replace(ae,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function W(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function X(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=V(b,d);return W(a,c*(e-d))}function Y(a){a=Ld(a).clone();try{a.empty()}catch(b){}var c=Ld("
    ").append(a).html();try{return a[0].nodeType===ge?Gd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Gd(b)})}catch(b){return Gd(c)}}function Z(a){try{return decodeURIComponent(a)}catch(b){}}function $(a){var b={};return d((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=Z(d),s(d)&&(e=s(e)?Z(e):!0,Fd.call(b,d)?Wd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function _(a){var b=[];return d(a,function(a,c){Wd(a)?d(a,function(a){b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}),b.length?b.join("&"):""}function aa(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ca(a,b){var c,d,e=be.length;for(d=0;e>d;++d)if(c=be[d]+b,v(c=a.getAttribute(c)))return c;return null}function da(a,b){var c,e,f={};d(be,function(b){var d=b+"app";!c&&a.hasAttribute&&a.hasAttribute(d)&&(c=a,e=a.getAttribute(d))}),d(be,function(b){var d,f=b+"app";!c&&(d=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=d,e=d.getAttribute(f))}),c&&(f.strictDi=null!==ca(c,"strict-di"),b(c,e?[e]:[],f))}function ea(b,c,e){t(e)||(e={});var f={strictDi:!1};e=j(f,e);var g=function(){if(b=Ld(b),b.injector()){var d=b[0]===a.document?"document":Y(b);throw Td("btstrpd","App already bootstrapped with this element '{0}'",d.replace(//,">"))}c=c||[],c.unshift(["$provide",function(a){a.value("$rootElement",b)}]),e.debugInfoEnabled&&c.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),c.unshift("ng");var f=db(c,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),Ud.resumeBootstrap=function(a){return d(a,function(a){c.push(a)}),g()},void(y(Ud.resumeDeferredBootstrap)&&Ud.resumeDeferredBootstrap()))}function fa(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ga(a){var b=Ud.element(a).injector();if(!b)throw Td("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ha(a,b){return b=b||"_",a.replace(ce,function(a,c){return(c?b:"")+a.toLowerCase()})}function ia(){var b;if(!de){var c=_d();Md=r(c)?a.jQuery:c?a[c]:void 0,Md&&Md.fn.on?(Ld=Md,j(Md.fn,{scope:ze.scope,isolateScope:ze.isolateScope,controller:ze.controller,injector:ze.injector,inheritedData:ze.inheritedData}),b=Md.cleanData,Md.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Md._data(d,"events"),c&&c.$destroy&&Md(d).triggerHandler("$destroy");b(a)}):Ld=Da,Ud.element=Ld,de=!0}}function ja(a,b,c){if(!a)throw Td("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function ka(a,b,c){return c&&Wd(a)&&(a=a[a.length-1]),ja(y(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function la(a,b){if("hasOwnProperty"===a)throw Td("badname","hasOwnProperty is not a valid {0} name",b)}function ma(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&y(a)?R(f,a):a}function na(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Ld(Od.call(a,0,e))),b.push(c));return b||a}function oa(){return Object.create(null)}function pa(a){function c(a,b,c){return a[b]||(a[b]=c())}var d=b("$injector"),e=b("ng"),f=c(a,"angular",Object);return f.$$minErr=f.$$minErr||b,c(f,"module",function(){var a={};return function(b,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(b,"module"),f&&a.hasOwnProperty(b)&&(a[b]=null),c(a,b,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function c(a,c){return function(d,f){return f&&y(f)&&(f.$$moduleName=b),e.push([a,c,arguments]),k}}if(!f)throw d("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",b);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:b,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:c("$provide","decorator"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),component:c("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function qa(a,b){if(Wd(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(t(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function ra(a){var b=[];return JSON.stringify(a,function(a,c){if(c=S(a,c),t(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function sa(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):r(a)?"undefined":"string"!=typeof a?ra(a):a}function ta(c){j(c,{bootstrap:ea,copy:N,extend:j,merge:k,equals:O,element:Ld,forEach:d,injector:db,noop:n,bind:R,toJson:T,fromJson:U,identity:o,isUndefined:r,isDefined:s,isString:v,isFunction:y,isObject:t,isNumber:w,isElement:J,isArray:Wd,version:ke,isDate:x,lowercase:Gd,uppercase:Hd,callbacks:{counter:0},getTestability:ga,$$minErr:b,$$csp:$d,reloadWithDebugInfo:fa}),(Nd=pa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:yc}),a.provider("$compile",ob).directive({a:Hf,input:$f,textarea:$f,form:Mf,script:Vg,select:Yg,style:$g,option:Zg,ngBind:bg,ngBindHtml:dg,ngBindTemplate:cg,ngClass:fg,ngClassEven:hg,ngClassOdd:gg,ngCloak:ig,ngController:jg,ngForm:Nf,ngHide:Og,ngIf:mg,ngInclude:ng,ngInit:pg,ngNonBindable:Fg,ngPluralize:Jg,ngRepeat:Kg,ngShow:Ng,ngStyle:Pg,ngSwitch:Qg,ngSwitchWhen:Rg,ngSwitchDefault:Sg,ngOptions:Ig,ngTransclude:Ug,ngModel:Cg,ngList:qg,ngChange:eg,pattern:ah,ngPattern:ah,required:_g,ngRequired:_g,minlength:ch,ngMinlength:ch,maxlength:bh,ngMaxlength:bh,ngValue:ag,ngModelOptions:Eg}).directive({ngInclude:og}).directive(If).directive(kg),a.provider({$anchorScroll:eb,$animate:Pe,$animateCss:Se,$$animateJs:Ne,$$animateQueue:Oe,$$AnimateRunner:Re,$$animateAsyncRun:Qe,$browser:kb,$cacheFactory:lb,$controller:ub,$document:vb,$exceptionHandler:wb,$filter:Mc,$$forceReflow:Ye,$interpolate:Kb,$interval:Lb,$http:Gb,$httpParamSerializer:yb,$httpParamSerializerJQLike:zb,$httpBackend:Ib,$xhrFactory:Hb,$location:$b,$log:_b,$parse:sc,$rootScope:xc,$q:tc,$$q:uc,$sce:Cc,$sceDelegate:Bc,$sniffer:Dc,$templateCache:mb,$templateRequest:Ec,$$testability:Fc,$timeout:Gc,$window:Jc,$$rAF:wc,$$jqLite:Ya,$$HashMap:De,$$cookieReader:Lc})}])}function ua(){return++me}function va(a){return a.replace(pe,function(a,b,c,d){return d?c.toUpperCase():c}).replace(qe,"Moz$1")}function wa(a){return!ue.test(a)}function xa(a){var b=a.nodeType;return b===ee||!b||b===ie}function ya(a){for(var b in le[a.ng339])return!0;return!1}function za(a){for(var b=0,c=a.length;c>b;b++)Ha(a[b])}function Aa(a,b){var c,e,f,g,h=b.createDocumentFragment(),i=[];if(wa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),e=(ve.exec(a)||["",""])[1].toLowerCase(),f=xe[e]||xe._default,c.innerHTML=f[1]+a.replace(we,"<$1>")+f[2],g=f[0];g--;)c=c.lastChild;i=P(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",d(i,function(a){h.appendChild(a)}),h}function Ba(b,c){c=c||a.document;var d;return(d=te.exec(b))?[c.createElement(d[1])]:(d=Aa(b,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(v(a)&&(a=Yd(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw se("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ha(c[d])}function Ga(a,b,c,e){if(s(e))throw se("offargs","jqLite#off() does not support the `selector` argument");var f=Ia(a),g=f&&f.events,h=f&&f.handle;if(h)if(b){var i=function(b){var d=g[b];s(c)&&M(d||[],c),s(c)&&d&&d.length>0||(oe(a,b,h),delete g[b])};d(b.split(" "),function(a){i(a),re[a]&&i(re[a])})}else for(b in g)"$destroy"!==b&&oe(a,b,h),delete g[b]}function Ha(a,b){var c=a.ng339,d=c&&le[c];if(d){if(b)return void delete d.data[b];d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Ga(a)),delete le[c],a.ng339=void 0}}function Ia(a,b){var c=a.ng339,d=c&&le[c];return b&&!d&&(a.ng339=c=ua(),d=le[c]={events:{},data:{},handle:void 0}),d}function Ja(a,b,c){if(xa(a)){var d=s(c),e=!d&&b&&!t(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];j(h,b)}}}function Ka(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function La(a,b){b&&a.setAttribute&&d(b.split(" "),function(b){a.setAttribute("class",Yd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Yd(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");d(b.split(" "),function(a){a=Yd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Yd(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==ie&&(a=a.documentElement);for(var d=Wd(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(s(c=Ld.data(a,d[e])))return c;a=a.parentNode||a.nodeType===je&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Ld(c).on("load",b)}function Ta(a,b){var c=Ae[b.toLowerCase()];return c&&Be[L(a)]&&c}function Ua(a){return Ce[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(r(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Wa;f>1&&(e=qa(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ye.call(a,d))&&c.call(a,b)}function Ya(){this.$get=function(){return j(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||g)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}d(a,this.put,this)}function _a(a){return Function.prototype.toString.call(a)+" "}function ab(a){var b=_a(a).replace(Ie,""),c=b.match(Ee)||b.match(Fe);return c}function bb(a){var b=ab(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b,c){var e,f,g;if("function"==typeof a){if(!(e=a.$inject)){if(e=[],a.length){if(b)throw v(c)&&c||(c=a.name||bb(a)),Je("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);f=ab(a),d(f[1].split(Ge),function(a){a.replace(He,function(a,b,c){e.push(c)})})}a.$inject=e}}else Wd(a)?(g=a.length-1,ka(a[g],"fn"),e=a.slice(0,g)):ka(a,"fn",!0);return e}function db(a,b){function c(a){return function(b,c){return t(b)?void d(b,f(a)):a(b,c)}}function e(a,b){if(la(a,"service"),(y(b)||Wd(b))&&(b=x.instantiate(b)),!b.$get)throw Je("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(r(c))throw Je("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function h(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function i(a,b){return h(a,["$injector",function(a){return a.instantiate(b)}])}function j(a,b){return h(a,p(b),!1)}function k(a,b){la(a,"constant"),w[a]=b,z[a]=b}function l(a,b){var c=x.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function m(a){ja(r(a)||Wd(a),"modulesToLoad","not an array");var b,c=[];return d(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=x.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{v(a)?(b=Nd(a),c=c.concat(m(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):y(a)?c.push(x.invoke(a)):Wd(a)?c.push(x.invoke(a)):ka(a,"module")}catch(e){throw Wd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Je("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function n(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===o)throw Je("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=o,a[b]=c(b,d)}catch(e){throw a[b]===o&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=db.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Je("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Kd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(_a(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Wd(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Wd(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:db.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var o={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:c(e),factory:c(h),service:c(i),value:c(j),constant:c(k),decorator:l}},x=w.$injector=n(w,function(a,b){throw Ud.isString(b)&&s.push(b),Je("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},A=n(z,function(a,b){var c=x.get(a+q,b);return B.invoke(c.$get,c,void 0,a)}),B=A;w["$injector"+q]={$get:p(A)};var C=m(a);return B=A.get("$injector"),B.strictDi=b,d(C,function(a){a&&B.invoke(a)}),B}function eb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===L(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(y(a))a=a();else if(J(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else w(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=v(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Sa(function(){d.$evalAsync(h)})}),h}]}function fb(a,b){return a||b?a?b?(Wd(a)&&(a=a.join(" ")),Wd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function gb(a){for(var b=0;bk&&this.remove(n.key),b}},get:function(a){if(kb;++b)try{sa[b]()}catch(d){a.push(d)}if(sa=void 0,a.length)throw a})}finally{va++}}function I(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a}function J(a,b,c){ua.innerHTML="";var d=ua.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function K(a,b){try{a.addClass(b)}catch(c){}}function N(b,c,d,e,f){b instanceof Ld||(b=Ld(b));for(var g=/\S+/,h=0,i=b.length;i>h;h++){var j=b[h];j.nodeType===ge&&j.nodeValue.match(g)&&Ca(j,b[h]=a.document.createElement("span"))}var k=S(b,c,b,d,e,f);N.$$addScopeClass(b);var l=null;return function(a,c,d){ja(a,"scope"),f&&f.needsNewScope&&(a=a.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=P(h));var i;if(i="html"!==l?Ld(ka(l,Ld("
    ").append(b).html())):c?ze.clone.call(b):b,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return N.$$addScopeInfo(i,a),c&&c(i,a),k&&k(a,i,i,e),i}}function P(a){var b=a&&a[0];return b&&"foreignobject"!==L(b)&&Rd.call(b).match(/SVG/)?"svg":"html"}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,g,h,i,j,k,l,m,p;if(n){var q=c.length;for(p=new Array(q),j=0;jj;)h=p[o[j++]],f=o[j++],g=o[j++],f?(f.scope?(i=a.$new(),N.$$addScopeInfo(Ld(h),i)):i=a,m=f.transcludeOnThisElement?T(a,f.transclude,e):!f.templateOnThisElement&&e?e:!e&&b?T(a,b):null,f(g,i,h,d,m)):g&&g(a,h.childNodes,void 0,e)}for(var h,i,j,k,l,m,n,o=[],p=0;pr;r++){var w=!1,x=!1;j=p[r],k=j.name,n=Yd(j.value),m=qb(k),(o=Aa.test(m))&&(k=k.replace(Ve,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=m.match(Ba);y&&ca(y[1])&&(w=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=qb(k.toLowerCase()),i[l]=k,(o||!c.hasOwnProperty(l))&&(c[l]=n,Ta(a,l)&&(c[l]=!0)),ma(a,b,n,l,o),ba(b,l,"A",d,e,w,x)}if(g=a.className,t(g)&&(g=g.animVal),v(g)&&""!==g)for(;f=u.exec(g);)l=qb(f[2]),ba(b,l,"C",d,e)&&(c[l]=Yd(f[3])),g=g.substr(f.index+f[0].length);break;case ge:if(11===Kd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===ge;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ia(b,a.nodeValue);break;case he:try{f=q.exec(a.nodeValue),f&&(l=qb(f[1]),ba(b,l,"M",d,e)&&(c[l]=Yd(f[2])))}catch(z){}}return b.sort(fa),b}function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Te("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==ee&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Ld(d)}function W(a,b,c){return function(d,e,f,g,h){return e=V(e[0],b,c),a(d,e,f,g,h)}}function X(a,b,c,d,e,f){var g;return a?N(b,c,d,e,f):function(){return g||(g=N(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function Z(a,b,c,f,g,h,i,k,l){function m(a,b,c,d){a&&(c&&(a=W(a,c,d)),a.require=o.require,a.directiveName=p,(z===o||o.$$isolateScope)&&(a=pa(a,{isolateScope:!0})),i.push(a)),b&&(c&&(b=W(b,c,d)),b.require=o.require,b.directiveName=p,(z===o||o.$$isolateScope)&&(b=pa(b,{isolateScope:!0})),k.push(b))}function n(a,f,g,h,l){function m(a,b,c,d){var e;if(B(a)||(d=c,c=b,b=a,a=void 0),F&&(e=u),c||(c=F?C.parent():C),!d)return l(a,b,e,c,M);var f=l.$$slots[d];if(f)return f(a,b,e,c,M);if(r(f))throw Te("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',d,Y(C))}var n,o,p,q,s,u,v,C,D,E;b===g?(D=c,C=c.$$element):(C=Ld(g),D=new I(C,c)),s=f,z?q=f.$new(!0):w&&(s=f.$parent),l&&(v=m,v.$$boundTransclude=l,v.isSlotFilled=function(a){return!!l.$$slots[a]}),x&&(u=_(C,D,v,x,q,f,z)),z&&(N.$$addScopeInfo(C,q,!0,!(A&&(A===z||A===z.$$originalDirective))),N.$$addScopeClass(C,!0),q.$$isolateBindings=z.$$isolateBindings,E=ra(f,D,q,q.$$isolateBindings,z),E.removeWatches&&q.$on("$destroy",E.removeWatches));for(var G in u){var H=x[G],J=u[G],K=H.$$bindings.bindToController;J.identifier&&K?J.bindingInfo=ra(s,D,J.instance,K,H):J.bindingInfo={};var L=J();L!==J.instance&&(J.instance=L,C.data("$"+H.name+"Controller",L),J.bindingInfo.removeWatches&&J.bindingInfo.removeWatches(),J.bindingInfo=ra(s,D,J.instance,K,H))}for(d(x,function(a,b){var c=a.require;a.bindToController&&!Wd(c)&&t(c)&&j(u[b].instance,$(b,c,C,u))}),d(u,function(a){var b=a.instance;if(y(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(c){e(c)}if(y(b.$onInit))try{b.$onInit()}catch(c){e(c)}y(b.$onDestroy)&&s.$on("$destroy",function(){b.$onDestroy()})}),n=0,o=i.length;o>n;n++)p=i[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);var M=f;for(z&&(z.template||null===z.templateUrl)&&(M=q),a&&a(M,g.childNodes,void 0,l),n=k.length-1;n>=0;n--)p=k[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);d(u,function(a){var b=a.instance;y(b.$postLink)&&b.$postLink()})}l=l||{};for(var o,p,q,s,u,v=-Number.MAX_VALUE,w=l.newScopeDirective,x=l.controllerDirectives,z=l.newIsolateScopeDirective,A=l.templateDirective,C=l.nonTlbTranscludeDirective,D=!1,E=!1,F=l.hasElementTranscludeDirective,G=c.$$element=Ld(b),H=h,J=f,K=!1,M=!1,O=0,P=a.length;P>O;O++){o=a[O];var S=o.$$start,T=o.$$end;if(S&&(G=V(b,S,T)),q=void 0,v>o.priority)break;if((u=o.scope)&&(o.templateUrl||(t(u)?(ga("new/isolated scope",z||w,o,G),z=o):ga("new/isolated scope",z,o,G)),w=w||o),p=o.name,!K&&(o.replace&&(o.templateUrl||o.template)||o.transclude&&!o.$$tlb)){for(var Z,ba=O+1;Z=a[ba++];)if(Z.transclude&&!Z.$$tlb||Z.replace&&(Z.templateUrl||Z.template)){M=!0;break}K=!0}if(!o.templateUrl&&o.controller&&(u=o.controller,x=x||oa(),ga("'"+p+"' controller",x[p],o,G),x[p]=o),u=o.transclude)if(D=!0,o.$$tlb||(ga("transclusion",C,o,G),C=o),"element"==u)F=!0,v=o.priority,q=G,G=c.$$element=Ld(N.$$createComment(p,c[p])),b=G[0],na(g,Q(q),b),q[0].$$parentNode=q[0].parentNode,J=X(M,q,f,v,H&&H.name,{nonTlbTranscludeDirective:C});else{var ca=oa();if(q=Ld(Ea(b)).contents(),t(u)){q=[];var fa=oa(),ha=oa();d(u,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,fa[a]=b,ca[b]=null,ha[b]=c}),d(G.contents(),function(a){var b=fa[qb(L(a))];b?(ha[b]=!0,ca[b]=ca[b]||[],ca[b].push(a)):q.push(a)}),d(ha,function(a,b){if(!a)throw Te("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ia in ca)ca[ia]&&(ca[ia]=X(M,ca[ia],f))}G.empty(),J=X(M,q,f,void 0,void 0,{needsNewScope:o.$$isolateScope||o.$$newScope}),J.$$slots=ca}if(o.template)if(E=!0,ga("template",A,o,G),A=o,u=y(o.template)?o.template(G,c):o.template,u=za(u),o.replace){if(H=o,q=wa(u)?[]:sb(ka(o.templateNamespace,Yd(u))),b=q[0],1!=q.length||b.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p,"");na(g,G,b);var ja={$attr:{}},la=U(b,[],ja),ma=a.splice(O+1,a.length-(O+1));(z||w)&&aa(la,z,w),a=a.concat(la).concat(ma),da(c,ja),P=a.length}else G.html(u);if(o.templateUrl)E=!0,ga("template",A,o,G),A=o,o.replace&&(H=o),n=ea(a.splice(O,a.length-O),G,c,g,D&&J,i,k,{controllerDirectives:x,newScopeDirective:w!==o&&w,newIsolateScopeDirective:z,templateDirective:A,nonTlbTranscludeDirective:C}),P=a.length;else if(o.compile)try{s=o.compile(G,c,J);var sa=o.$$originalDirective||o;y(s)?m(null,R(sa,s),S,T):s&&m(R(sa,s.pre),R(sa,s.post),S,T)}catch(ta){e(ta,Y(G))}o.terminal&&(n.terminal=!0,v=Math.max(v,o.priority))}return n.scope=w&&w.scope===!0,n.transcludeOnThisElement=D,n.templateOnThisElement=E,n.transclude=J,l.hasElementTranscludeDirective=F,n}function $(a,b,c,e){var f;if(v(b)){var g=b.match(x),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(f=e&&e[h],f=f&&f.instance),!f){var k="$"+h+"Controller";f=i?c.inheritedData(k):c.data(k)}if(!f&&!j)throw Te("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Wd(b)){f=[];for(var l=0,m=b.length;m>l;l++)f[l]=$(a,b[l],c,e)}else t(b)&&(f={},d(b,function(b,d){f[d]=$(a,b,c,e)}));return f||null}function _(a,b,c,d,e,f,g){var h=oa();for(var j in d){var k=d[j],l={$scope:k===g||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);var n=i(m,l,!0,k.controllerAs);h[k.name]=n,a.data("$"+k.name+"Controller",n.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=m(a[d],{$$isolateScope:b,$$newScope:c})}function ba(a,c,d,f,h,i,j){if(c===h)return null;var n=null;if(k.hasOwnProperty(c))for(var o,p=b.get(c+l),q=0,s=p.length;s>q;q++)try{if(o=p[q],(r(f)||f>o.priority)&&-1!=o.restrict.indexOf(d)){if(i&&(o=m(o,{$$start:i,$$end:j})),!o.$$bindings){var u=o.$$bindings=g(o,o.name);t(u.isolateScope)&&(o.$$isolateBindings=u.isolateScope)}a.push(o),n=o}}catch(v){e(v)}return n}function ca(a){if(k.hasOwnProperty(a))for(var c,d=b.get(a+l),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function da(a,b){var c=b.$attr,e=a.$attr;a.$$element;d(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),d(b,function(b,d){a.hasOwnProperty(d)||"$"===d.charAt(0)||(a[d]=b,"class"!==d&&"style"!==d&&(e[d]=c[d]))})}function ea(a,b,c,e,g,h,i,j){var k,l,n=[],o=b[0],p=a.shift(),q=m(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=y(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),f(r).then(function(f){var m,u,v,w;if(f=za(f),p.replace){if(v=wa(f)?[]:sb(ka(s,Yd(f))),m=v[0],1!=v.length||m.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);u={$attr:{}},na(e,b,m);var x=U(m,[],u);t(p.scope)&&aa(x,!0),a=x.concat(a),da(c,u)}else m=o,b.html(f);for(a.unshift(q),k=Z(a,m,c,g,b,p,h,i,j),d(e,function(a,c){a==m&&(e[c]=b[0])}),l=S(b[0].childNodes,g);n.length;){var y=n.shift(),z=n.shift(),A=n.shift(),B=n.shift(),C=b[0];if(!y.$$destroyed){if(z!==o){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(m)),na(A,Ld(z),C),K(Ld(C),D)}w=k.transcludeOnThisElement?T(y,k.transclude,B):B,k(l,y,C,e,w)}}n=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(n?n.push(b,c,d,f):(k.transcludeOnThisElement&&(f=T(b,k.transclude,e)),k(l,b,c,d,f)))}}function fa(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function la(a,b){if("srcdoc"==b)return A.HTML;var c=L(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?A.RESOURCE_URL:void 0}function ma(a,b,d,e,f){var g=la(a,e);f=w[e]||f;var h=c(d,!0,g,f);if(h){if("multiple"===e&&"select"===L(a))throw Te("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=oa());if(z.test(e))throw Te("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==d&&(h=k&&c(k,!0,g,f),d=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function na(b,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(b)for(e=0,f=b.length;f>e;e++)if(b[e]==g){b[e++]=d;for(var j=e,k=j+h-1,l=b.length;l>j;j++,k++)l>k?b[j]=b[k]:delete b[j];b.length-=h-1,b.context===g&&(b.context=d);break}i&&i.replaceChild(d,g);var m=a.document.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Ld.hasData(g)&&(Ld.data(d,Ld.data(g)),Ld(g).off("$destroy")),Ld.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function pa(a,b){return j(function(){return a.apply(null,arguments)},a,b)}function qa(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,Y(c))}}function ra(a,b,e,f,g){function i(b,c,d){y(e.$onChanges)&&c!==d&&(sa||(a.$$postDigest(H),sa=[]),k||(k={},sa.push(j)),k[b]&&(d=k[b].previousValue),k[b]=new pb(d,c))}function j(){e.$onChanges(k),k=void 0}var k,l=[],m={};return d(f,function(d,f){var j,k,o,p,q,r=d.attrName,s=d.optional,t=d.mode;switch(t){case"@":s||Fd.call(b,r)||(e[f]=b[r]=void 0),b.$observe(r,function(a){if(v(a)||F(a)){var b=e[f];i(f,a,b),e[f]=a}}),b.$$observers[r].$$scope=a,j=b[r],v(j)?e[f]=c(j)(a):F(j)&&(e[f]=j),m[f]=new pb(Ue,e[f]);break;case"=":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]),p=k.literal?O:function(a,b){return a===b||a!==a&&b!==b},o=k.assign||function(){throw j=e[f]=k(a),Te("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[r],r,g.name)},j=e[f]=k(a);var u=function(b){return p(b,e[f])||(p(b,j)?o(a,b=e[f]):e[f]=b),j=b};u.$stateful=!0,q=d.collection?a.$watchCollection(b[r],u):a.$watch(h(b[r],u),null,k.literal),l.push(q);break;case"<":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]);var w=e[f]=k(a);m[f]=new pb(Ue,e[f]),q=a.$watch(k,function(a,b){if(b===a){if(b===w)return;b=w}i(f,a,b),e[f]=a},k.literal),l.push(q);break;case"&":if(k=b.hasOwnProperty(r)?h(b[r]):n,k===n&&s)break;e[f]=function(b){return k(a,b)}}}),{initialChanges:m,removeWatches:l.length&&function(){for(var a=0,b=l.length;b>a;++a)l[a]()}}}var sa,ta=/^\w/,ua=a.document.createElement("div"),va=D;I.prototype={$normalize:qb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=rb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=rb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,f){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),f=i):j&&(this[j]=b,k=j),this[a]=b,f?this.$attr[a]=f:(f=this.$attr[a],f||(this.$attr[a]=f=ha(a,"-"))),g=L(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=G(b,"src"===a);else if("img"===g&&"srcset"===a&&s(b)){for(var l="",m=Yd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),t=0;q>t;t++){var u=2*t;l+=G(Yd(p[u]),!0),l+=" "+Yd(p[u+1])}var v=Yd(p[2*t]).split(/\s/);l+=G(Yd(v[0]),!0),2===v.length&&(l+=" "+Yd(v[1])),this[a]=b=l}c!==!1&&(null===b||r(b)?this.$$element.removeAttr(f):ta.test(f)?this.$$element.attr(f,b):J(this.$$element[0],f,b));var w=this.$$observers;w&&d(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=oa()),e=d[a]||(d[a]=[]);return e.push(b),p.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||r(c[a])||b(c[a])}),function(){M(e,b)}}};var xa=c.startSymbol(),ya=c.endSymbol(),za="{{"==xa&&"}}"==ya?o:function(a){return a.replace(/\{\{/g,xa).replace(/}}/g,ya)},Aa=/^ngAttr[A-Z]/,Ba=/^(.+)Start$/;return N.$$addBindingInfo=C?function(a,b){var c=a.data("$binding")||[];Wd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:n,N.$$addBindingClass=C?function(a){K(a,"ng-binding")}:n,N.$$addScopeInfo=C?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:n,N.$$addScopeClass=C?function(a,b){K(a,b?"ng-isolate-scope":"ng-scope")}:n,N.$$createComment=function(b,c){var d="";return C&&(d=" "+(b||"")+": ",c&&(d+=c+" ")),a.document.createComment(d)},N}]}function pb(a,b){this.previousValue=a,this.currentValue=b}function qb(a){return va(a.replace(Ve,""))}function rb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function sb(a){a=Ld(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===he&&Pd.call(a,b,1)}return a}function tb(a,b){if(b&&v(b))return b;if(v(a)){var c=Xe.exec(a);if(c)return c[3]}}function ub(){var a={},c=!1;this.has=function(b){return a.hasOwnProperty(b)},this.register=function(b,c){la(b,"controller"),t(b)?j(a,b):a[b]=c},this.allowGlobals=function(){c=!0},this.$get=["$injector","$window",function(d,e){function f(a,c,d,e){if(!a||!t(a.$scope))throw b("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,c);a.$scope[c]=d}return function(b,g,h,i){var k,l,m,n;if(h=h===!0,i&&v(i)&&(n=i),v(b)){if(l=b.match(Xe),!l)throw We("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",b);m=l[1],n=n||l[3],b=a.hasOwnProperty(m)?a[m]:ma(g.$scope,m,!0)||(c?ma(e,m,!0):void 0),ka(b,m,!0)}if(h){var o=(Wd(b)?b[b.length-1]:b).prototype;k=Object.create(o||null),n&&f(g,n,k,m||b.name);var p;return p=j(function(){var a=d.invoke(b,k,g,m);return a!==k&&(t(a)||y(a))&&(k=a,n&&f(g,n,k,m||b.name)),k},{instance:k,identifier:n})}return k=d.instantiate(b,g,m),n&&f(g,n,k,m||b.name),k}}]}function vb(){this.$get=["$window",function(a){return Ld(a.document)}]}function wb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function xb(a){return t(a)?x(a)?a.toISOString():T(a):a}function yb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return e(a,function(a,c){null===a||r(a)||(Wd(a)?d(a,function(a){b.push(ba(c)+"="+ba(xb(a)))}):b.push(ba(c)+"="+ba(xb(a))))}),b.join("&")}}}function zb(){this.$get=function(){return function(a){function b(a,f,g){null===a||r(a)||(Wd(a)?d(a,function(a,c){b(a,f+"["+(t(a)?c:"")+"]")}):t(a)&&!x(a)?e(a,function(a,c){b(a,f+(g?"":"[")+c+(g?"":"]"))}):c.push(ba(f)+"="+ba(xb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function Ab(a,b){if(v(a)){var c=a.replace(bf,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ze)||Bb(c))&&(a=U(c))}}return a}function Bb(a){var b=a.match(_e);return b&&af[b[0]].test(a)}function Cb(a){function b(a,b){a&&(e[a]=e[a]?e[a]+", "+b:b)}var c,e=oa();return v(a)?d(a.split("\n"),function(a){c=a.indexOf(":"),b(Gd(Yd(a.substr(0,c))),Yd(a.substr(c+1)))}):t(a)&&d(a,function(a,c){b(Gd(c),Yd(a))}),e}function Db(a){var b;return function(c){if(b||(b=Cb(a)),c){var d=b[Gd(c)];return void 0===d&&(d=null),d}return b}}function Eb(a,b,c,e){return y(e)?e(a,b,c):(d(e,function(d){a=d(a,b,c)}),a)}function Fb(a){return a>=200&&300>a}function Gb(){var a=this.defaults={transformResponse:[Ab],transformRequest:[function(a){return!t(a)||C(a)||E(a)||D(a)?a:T(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:qa($e),put:qa($e),patch:qa($e)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},c=!1;this.useApplyAsync=function(a){return s(a)?(c=!!a,this):c};var e=!0;this.useLegacyPromiseExtensions=function(a){return s(a)?(e=!!a,this):e};var f=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(g,h,i,k,l,m){function n(c){function f(a){var b=j({},a);return b.data=Eb(a.data,a.headers,a.status,i.transformResponse),Fb(a.status)?b:l.reject(b)}function g(a,b){var c,e={};return d(a,function(a,d){y(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a}),e}function h(b){var c,d,e,f=a.headers,h=j({},b.headers);f=j({},f.common,f[Gd(b.method)]);a:for(c in f){d=Gd(c);for(e in h)if(Gd(e)===d)continue a;h[c]=f[c]}return g(h,qa(b))}if(!t(c))throw b("$http")("badreq","Http request configuration must be an object. Received: {0}",c);if(!v(c.url))throw b("$http")("badreq","Http request configuration url must be a string. Received: {0}",c.url);var i=j({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},c);i.headers=h(c),i.method=Hd(i.method),i.paramSerializer=v(i.paramSerializer)?m.get(i.paramSerializer):i.paramSerializer;var k=function(b){var c=b.headers,e=Eb(b.data,Db(c),void 0,b.transformRequest);return r(e)&&d(c,function(a,b){"content-type"===Gd(b)&&delete c[b]}),r(b.withCredentials)&&!r(a.withCredentials)&&(b.withCredentials=a.withCredentials),q(b,e).then(f,f)},n=[k,void 0],o=l.when(i);for(d(x,function(a){(a.request||a.requestError)&&n.unshift(a.request,a.requestError),(a.response||a.responseError)&&n.push(a.response,a.responseError)});n.length;){var p=n.shift(),s=n.shift();o=o.then(p,s)}return e?(o.success=function(a){return ka(a,"fn"),o.then(function(b){a(b.data,b.status,b.headers,i)}),o},o.error=function(a){return ka(a,"fn"),o.then(null,function(b){a(b.data,b.status,b.headers,i)}),o}):(o.success=df("success"),o.error=df("error")),o}function o(a){d(arguments,function(a){n[a]=function(b,c){return n(j({},c||{},{method:a,url:b}))}})}function p(a){d(arguments,function(a){n[a]=function(b,c,d){return n(j({},d||{},{method:a,url:b,data:c}))}})}function q(b,e){function f(a){if(a){var b={};return d(a,function(a,d){b[d]=function(b){function d(){a(b)}c?k.$applyAsync(d):k.$$phase?d():k.$apply(d)}}),b}}function i(a,b,d,e){function f(){j(b,a,d,e)}p&&(Fb(a)?p.put(z,[a,b,Cb(d),e]):p.remove(z)),c?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function j(a,c,d,e){c=c>=-1?c:0,(Fb(c)?v.resolve:v.reject)({data:a,status:c,headers:Db(d),config:b,statusText:e})}function m(a){j(a.data,a.status,qa(a.headers()),a.statusText)}function o(){var a=n.pendingRequests.indexOf(b);-1!==a&&n.pendingRequests.splice(a,1)}var p,q,v=l.defer(),x=v.promise,y=b.headers,z=u(b.url,b.paramSerializer(b.params));if(n.pendingRequests.push(b),x.then(o,o),!b.cache&&!a.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(p=t(b.cache)?b.cache:t(a.cache)?a.cache:w),p&&(q=p.get(z),s(q)?G(q)?q.then(m,m):Wd(q)?j(q[1],q[0],qa(q[2]),q[3]):j(q,200,{},"OK"):p.put(z,x)),r(q)){var A=Ic(b.url)?h()[b.xsrfCookieName||a.xsrfCookieName]:void 0;A&&(y[b.xsrfHeaderName||a.xsrfHeaderName]=A),g(b.method,z,e,i,y,b.timeout,b.withCredentials,b.responseType,f(b.eventHandlers),f(b.uploadEventHandlers))}return x}function u(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=i("$http");a.paramSerializer=v(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var x=[];return d(f,function(a){x.unshift(v(a)?m.get(a):m.invoke(a))}),n.pendingRequests=[],o("get","delete","head","jsonp"),p("post","put","patch"),n.defaults=a,n}]}function Hb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Ib(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Jb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Jb(a,b,c,e,f){function g(a,b,c){var d=f.createElement("script"),g=null;return d.type="text/javascript",d.src=a,d.async=!0,g=function(a){oe(d,"load",g),oe(d,"error",g),f.body.removeChild(d),d=null;var h=-1,i="unknown";a&&("load"!==a.type||e[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ne(d,"load",g),ne(d,"error",g),f.body.appendChild(d),g}return function(f,h,i,j,k,l,m,o,p,q){function t(){w&&w(),x&&x.abort()}function u(b,d,e,f,g){s(A)&&c.cancel(A),w=x=null,b(d,e,f,g),a.$$completeOutstandingRequest(n)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Gd(f)){var v="_"+(e.counter++).toString(36);e[v]=function(a){e[v].data=a,e[v].called=!0};var w=g(h.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(a,b){u(j,a,e[v].data,"",b),e[v]=n})}else{var x=b(f,h);x.open(f,h,!0),d(k,function(a,b){s(a)&&x.setRequestHeader(b,a)}),x.onload=function(){var a=x.statusText||"",b="response"in x?x.response:x.responseText,c=1223===x.status?204:x.status;0===c&&(c=b?200:"file"==Hc(h).protocol?404:0),u(j,c,b,x.getAllResponseHeaders(),a)};var y=function(){u(j,-1,null,null,"")};if(x.onerror=y,x.onabort=y,d(p,function(a,b){x.addEventListener(b,a)}),d(q,function(a,b){x.upload.addEventListener(b,a)}),m&&(x.withCredentials=!0),o)try{x.responseType=o}catch(z){if("json"!==o)throw z}x.send(r(i)?null:i)}if(l>0)var A=c(t,l);else G(l)&&l.then(t)}}function Kb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=T(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function k(f,k,n,o){function q(a){try{return a=G(a),o&&!s(a)?a:h(a)}catch(b){d(ef.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var t;if(!k){var u=g(f);t=p(u),t.exp=f,t.expressions=[],t.$$watchDelegate=i}return t}o=!!o;for(var v,w,x,z=0,A=[],B=[],C=f.length,D=[],E=[];C>z;){if(-1==(v=f.indexOf(a,z))||-1==(w=f.indexOf(b,v+l))){z!==C&&D.push(g(f.substring(z)));break}z!==v&&D.push(g(f.substring(z,v))),x=f.substring(v+l,w),A.push(x),B.push(c(x,q)),z=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&ef.throwNoconcat(f),!k||A.length){var F=function(a){for(var b=0,c=A.length;c>b;b++){if(o&&r(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return j(function(a){var b=0,c=A.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(ef.interr(f,g))}},{exp:f,expressions:A,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);y(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return k.startSymbol=function(){return a},k.endSymbol=function(){return b},k}]}function Lb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?Q(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=s(j)&&!j,r=(q?d:c).defer(),t=r.promise;return i=s(i)?i:0,t.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(t.$$intervalId),delete g[t.$$intervalId]),q||a.$apply()},h),g[t.$$intervalId]=r,t}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Mb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=aa(b[c]);return b.join("/")}function Nb(a,b){var c=Hc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=l(c.port)||gf[c.protocol]||null}function Ob(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Hc(a); +b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=$(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Pb(a,b){return 0===a.lastIndexOf(b,0)}function Qb(a,b){return Pb(b,a)?b.substr(a.length):void 0}function Rb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Sb(a){return a.replace(/(#.+)|#$/,"$1")}function Tb(a){return a.substr(0,Rb(a).lastIndexOf("/")+1)}function Ub(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Vb(a,b,c){this.$$html5=!0,c=c||"",Nb(a,this),this.$$parse=function(a){var c=Qb(b,a);if(!v(c))throw hf("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Ob(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=_(this.$$search),c=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return s(f=Qb(a,d))?(g=f,h=s(f=Qb(c,f))?b+(Qb("/",f)||f):a+g):s(f=Qb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Wb(a,b,c){Nb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return Pb(b,c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Qb(a,d)||Qb(b,d);r(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",r(g)&&(a=d,this.replace())):(f=Qb(c,g),r(f)&&(f=g)),Ob(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Rb(a)==Rb(b)?(this.$$parse(b),!0):!1}}function Xb(a,b,c){this.$$html5=!0,Wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Rb(d)?f=d:(g=Qb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Yb(a){return function(){return this[a]}}function Zb(a,b){return function(c){return r(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function $b(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return s(b)?(a=b,this):a},this.html5Mode=function(a){return F(a)?(b.enabled=a,this):t(a)?(F(a.enabled)&&(b.enabled=a.enabled),F(a.requireBase)&&(b.requireBase=a.requireBase),F(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw hf("nobase","$location in HTML5 mode requires a tag to be present!");l=Ub(n)+(m||"/"),k=e.history?Vb:Xb}else l=Rb(n),k=Wb;var o=Tb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Ld(a.target);"a"!==L(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");t(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Hc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Sb(j.absUrl())!=Sb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return r(Qb(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Sb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Sb(d.url()),b=Sb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function _b(){var a=!0,b=this;this.debugEnabled=function(b){return s(b)?(a=b,this):a},this.$get=["$window",function(c){function e(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function f(a){var b=c.console||{},f=b[a]||b.log||n,g=!1;try{g=!!f.apply}catch(h){}return g?function(){var a=[];return d(arguments,function(b){a.push(e(b))}),f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function ac(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw kf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function bc(a){return a+""}function cc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw kf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw kf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw kf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function dc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===lf||a===mf||a===nf)throw kf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function ec(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw kf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function fc(a,b){return"undefined"!=typeof a?a:b}function gc(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function hc(a,b){var c=a(b);return!c.$stateful}function ic(a,b){var c,e;switch(a.type){case rf.Program:c=!0,d(a.body,function(a){ic(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case rf.Literal:a.constant=!0,a.toWatch=[];break;case rf.UnaryExpression:ic(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case rf.BinaryExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case rf.LogicalExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case rf.ConditionalExpression:ic(a.test,b),ic(a.alternate,b),ic(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case rf.Identifier:a.constant=!1,a.toWatch=[a];break;case rf.MemberExpression:ic(a.object,b),a.computed&&ic(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case rf.CallExpression:c=a.filter?hc(b,a.callee.name):!1,e=[],d(a.arguments,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&hc(b,a.callee.name)?e:[a];break;case rf.AssignmentExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case rf.ArrayExpression:c=!0,e=[],d(a.elements,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ObjectExpression:c=!0,e=[],d(a.properties,function(a){ic(a.value,b),c=c&&a.value.constant&&!a.computed,a.value.constant||e.push.apply(e,a.value.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ThisExpression:a.constant=!1,a.toWatch=[];break;case rf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function jc(a){if(1==a.length){var b=a[0].expression,c=b.toWatch;return 1!==c.length?c:c[0]!==b?c:void 0}}function kc(a){return a.type===rf.Identifier||a.type===rf.MemberExpression}function lc(a){return 1===a.body.length&&kc(a.body[0].expression)?{type:rf.AssignmentExpression,left:a.body[0].expression,right:{type:rf.NGValueParameter},operator:"="}:void 0}function mc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===rf.Literal||a.body[0].expression.type===rf.ArrayExpression||a.body[0].expression.type===rf.ObjectExpression)}function nc(a){return a.constant}function oc(a,b){this.astBuilder=a,this.$filter=b}function pc(a,b){this.astBuilder=a,this.$filter=b}function qc(a){return"constructor"==a}function rc(a){return y(a.valueOf)?a.valueOf():tf.call(a)}function sc(){var a,b,c=oa(),e=oa(),f={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(a,b){f[a]=b},this.setIdentifierFns=function(c,d){return a=c,b=d,this},this.$get=["$filter",function(g){function h(a,b,d){var f,h,j;switch(d=d||u,typeof a){case"string":a=a.trim(),j=a;var q=d?e:c;if(f=q[j],!f){":"===a.charAt(0)&&":"===a.charAt(1)&&(h=!0,a=a.substring(2));var s=d?t:r,v=new qf(s),w=new sf(v,g,s);f=w.parse(a),f.constant?f.$$watchDelegate=o:h?f.$$watchDelegate=f.literal?m:l:f.inputs&&(f.$$watchDelegate=k),d&&(f=i(f)),q[j]=f}return p(f,b);case"function":return p(a,b);default:return p(n,b)}}function i(a){function b(b,c,d,e){var f=u;u=!0;try{return a(b,c,d,e)}finally{u=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=i(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cl;l++)i[l]=j,k[l]=null;return a.$watch(function(a){for(var b=!1,c=0,e=g.length;e>c;c++){var h=g[c](a);(b||(b=!j(h,i[c])))&&(k[c]=h,i[c]=h&&rc(h))}return b&&(f=d(a,void 0,void 0,k)),f},b,c,e)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,y(b)&&b.apply(this,arguments),s(a)&&d.$$postDigest(function(){s(f)&&e()})},c)}function m(a,b,c,e){function f(a){var b=!0;return d(a,function(a){s(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return e(a)},function(a,c,d){h=a,y(b)&&b.call(this,a,c,d),f(a)&&d.$$postDigest(function(){f(h)&&g()})},c)}function o(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function p(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==m&&c!==l,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return s(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==k?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=k,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var q=$d().noUnsafeEval,r={csp:q,expensiveChecks:!1,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},t={csp:q,expensiveChecks:!0,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},u=!1;return h.$$runningExpensiveChecks=function(){return u},h}]}function tc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vc(function(b){a.$evalAsync(b)},b)}]}function uc(){this.$get=["$browser","$exceptionHandler",function(a,b){return vc(function(b){a.defer(b)},b)}]}function vc(a,c){function e(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function g(a){var b,d,e;e=a.pending,a.processScheduled=!1,a.pending=void 0;for(var f=0,g=e.length;g>f;++f){d=e[f][0],b=e[f][a.status];try{y(b)?d.resolve(b(a.value)):1===a.status?d.resolve(a.value):d.reject(a.value)}catch(h){d.reject(h),c(h)}}}function h(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){g(b)}))}function i(){this.promise=new e}function k(a){var b=new i,c=0,e=Wd(a)?[]:{};return d(a,function(a,d){c++,q(a).then(function(a){e.hasOwnProperty(d)||(e[d]=a,--c||b.resolve(e))},function(a){e.hasOwnProperty(d)||b.reject(a)})}),0===c&&b.resolve(e),b.promise}var l=b("$q",TypeError),m=function(){var a=new i;return a.resolve=f(a,a.resolve),a.reject=f(a,a.reject),a.notify=f(a,a.notify),a};j(e.prototype,{then:function(a,b,c){if(r(a)&&r(b)&&r(c))return this;var d=new i;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&h(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return p(b,!0,a)},function(b){return p(b,!1,a)},b)}}),j(i.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(l("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function b(a){i||(i=!0,g.$$resolve(a))}function d(a){i||(i=!0,g.$$reject(a))}var e,g=this,i=!1;try{(t(a)||y(a))&&(e=a&&a.then),y(e)?(this.promise.$$state.status=-1,e.call(a,b,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,h(this.promise.$$state))}catch(j){d(j),c(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,h(this.promise.$$state)},notify:function(b){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(y(a)?a(b):b)}catch(h){c(h)}}})}});var n=function(a){var b=new i;return b.reject(a),b.promise},o=function(a,b){var c=new i;return b?c.resolve(a):c.reject(a),c.promise},p=function(a,b,c){var d=null;try{y(c)&&(d=c())}catch(e){return o(e,!1)}return G(d)?d.then(function(){return o(a,b)},function(a){return o(a,!1)}):o(a,b)},q=function(a,b,c,d){var e=new i;return e.resolve(a),e.promise.then(b,c,d)},s=q,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!y(a))throw l("norslvr","Expected resolverFn, got '{0}'",a);var d=new i;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=m,u.reject=n,u.when=q,u.resolve=s,u.all=k,u}function wc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function xc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=g(),this.$$ChildScope=null}return b.prototype=a,b}var e=10,f=b("$rootScope"),h=null,i=null;this.digestTtl=function(a){return arguments.length&&(e=a),e},this.$get=["$exceptionHandler","$parse","$browser",function(b,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Kd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=g(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(a){if(z.$$phase)throw f("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function q(){z.$$phase=null}function s(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function v(){}function w(){for(;C.length;)try{C.shift()()}catch(a){b(a)}i=null}function x(){null===i&&(i=k.defer(function(){z.$apply(w)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,g=f.$$watchers,i={fn:b,last:v,get:e,exp:d||a,eq:!!c};return h=null,y(b)||(i.fn=n),g||(g=f.$$watchers=[]),g.unshift(i),s(this,1),function(){M(g,i)>=0&&s(f,-1),h=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(f,f,h)):b(f,e,h)}var e=new Array(a.length),f=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(f,f,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,d){f[0]=a,e[0]=c,b(f,a===c?f:e,d)}):(d(a,function(a,b){var d=h.$watch(a,function(a,d){f[b]=a,e[b]=d,i||(i=!0,h.$evalAsync(c))});g.push(d)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function d(a){f=a;var b,d,e,h,i;if(!r(f)){if(t(f))if(c(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],e=i!==i&&h!==h,e||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(d in f)Fd.call(f,d)&&(b++,h=f[d],i=g[d],d in g?(e=i!==i&&h!==h,e||i===h||(l++,g[d]=h)):(q++,g[d]=h,l++));if(q>b){l++;for(d in g)Fd.call(f,d)||(q--,delete g[d])}}else g!==f&&(g=f,l++);return l}}function e(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(t(f))if(c(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,d),n=[],o={},p=!0,q=0;return this.$watch(m,e)},$digest:function(){var a,c,d,g,j,l,m,n,o,r,s,t,u=e,x=this,C=[];p("$digest"),k.$$checkUrlChange(),this===z&&null!==i&&(k.defer.cancel(i),w()),h=null;do{n=!1,r=x;for(var E=0;Eu&&(s=4-u,C[s]||(C[s]=[]),C[s].push({msg:y(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:c,oldVal:d}))}catch(F){b(F)}if(!(o=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(o=r.$$nextSibling);)r=r.$parent}while(r=o);if((n||A.length)&&!u--)throw q(),f("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,C)}while(n||A.length);for(q();De;e++)if(d[e])try{d[e].apply(null,k)}catch(l){b(l)}else d.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,c){var d=this,e=d,f=d,g={name:a,targetScope:d,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!d.$$listenerCount[a])return g;for(var h,i,j,k=P([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){b(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==d&&e.$$nextSibling))for(;e!==d&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var z=new o,A=z.$$asyncQueue=[],B=z.$$postDigestQueue=[],C=z.$$applyAsyncQueue=[],D=0;return z}]}function yc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return s(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return s(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Hc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function zc(a){if("self"===a)return a;if(v(a)){if(a.indexOf("***")>-1)throw uf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Zd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(z(a))return new RegExp("^"+a.source+"$");throw uf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ac(a){var b=[];return s(a)&&d(a,function(a){b.push(zc(a))}),b}function Bc(){this.SCE_CONTEXTS=vf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=Ac(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=Ac(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Ic(b):!!a.exec(b.href)}function e(c){var e,f,g=Hc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw uf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||r(b)||""===b)return b;if("string"!=typeof b)throw uf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||r(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===vf.RESOURCE_URL){if(e(b))return b;throw uf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===vf.HTML)return j(b);throw uf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw uf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[vf.HTML]=f(k),l[vf.CSS]=f(k),l[vf.URL]=f(k),l[vf.JS]=f(k),l[vf.RESOURCE_URL]=f(l[vf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Cc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Kd)throw uf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var e=qa(vf);e.isEnabled=function(){return a},e.trustAs=c.trustAs,e.getTrusted=c.getTrusted,e.valueOf=c.valueOf,a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=o),e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:b(c,function(b){return e.getTrusted(a,b)})};var f=e.parseAs,g=e.getTrusted,h=e.trustAs;return d(vf,function(a,b){var c=Gd(b);e[va("parse_as_"+c)]=function(b){return f(a,b)},e[va("get_trusted_"+c)]=function(b){return g(a,b)},e[va("trust_as_"+c)]=function(b){return h(a,b)}}),e}]}function Dc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=a.chrome&&a.chrome.app&&a.chrome.app.runtime,g=!f&&a.history&&a.history.pushState,h=l((/android (\d+)/.exec(Gd((a.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((a.navigator||{}).userAgent),j=b[0]||{},k=/^(Moz|webkit|ms)(?=[A-Z])/,m=j.body&&j.body.style,n=!1,o=!1;if(m){for(var p in m)if(d=k.exec(p)){c=d[0],c=c[0].toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in m&&"webkit"),n=!!("transition"in m||c+"Transition"in m),o=!!("animation"in m||c+"Animation"in m),!h||n&&o||(n=v(m.webkitTransition),o=v(m.webkitAnimation))}return{history:!(!g||4>h||i),hasEvent:function(a){if("input"===a&&11>=Kd)return!1;if(r(e[a])){var b=j.createElement("div");e[a]="on"+a in b}return e[a]},csp:$d(),vendorPrefix:c,transitions:n,animations:o,android:h}}]}function Ec(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw wf("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,(!v(g)||r(b.get(g)))&&(g=e.getTrustedResourceUrl(g));var k=c.defaults&&c.defaults.transformResponse;return Wd(k)?k=k.filter(function(a){return a!==Ab}):k===Ab&&(k=null),c.get(g,j({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Fc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var e={};return e.findBindings=function(a,b,c){var e=a.getElementsByClassName("ng-binding"),f=[];return d(e,function(a){var e=Ud.element(a).data("$binding");e&&d(e,function(d){if(c){var e=new RegExp("(^|\\s)"+Zd(b)+"(\\s|\\||$)");e.test(d)&&f.push(a)}else-1!=d.indexOf(b)&&f.push(a)})}),f},e.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),r(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Lc(){this.$get=Kc}function Mc(a){function b(e,f){if(t(e)){var g={};return d(e,function(a,c){g[c]=b(c,a)}),g}return a.factory(e+c,f)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Rc),b("date",ed),b("filter",Nc),b("json",fd),b("limitTo",gd),b("lowercase",Ff),b("number",Sc),b("orderBy",id),b("uppercase",Gf)}function Nc(){return function(a,d,e){if(!c(a)){if(null==a)return a;throw b("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Qc(d);switch(h){case"function":f=d;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Oc(d,e,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Oc(a,b,c){var d,e=t(a)&&"$"in a;return b===!0?b=O:y(b)||(b=function(a,b){return r(a)?!1:null===a||null===b?a===b:t(b)||t(a)&&!q(a)?!1:(a=Gd(""+a),b=Gd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!t(d)?Pc(d,a.$,b,!1):Pc(d,a,b,c)}}function Pc(a,b,c,d,e){var f=Qc(a),g=Qc(b);if("string"===g&&"!"===b.charAt(0))return!Pc(a,b.substring(1),c,d);if(Wd(a))return a.some(function(a){return Pc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Pc(a[h],b,c,!0))return!0;return e?!1:Pc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!y(i)&&!r(i)){var j="$"===h,k=j?a:a[h];if(!Pc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Qc(a){return null===a?"null":typeof a}function Rc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return r(c)&&(c=b.CURRENCY_SYM),r(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Vc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Sc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Vc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Tc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(Af))>-1&&(a=a.replace(Af,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==Bf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==Bf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>zf&&(b=b.splice(0,zf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Uc(a,b,c,d){var e=a.d,f=e.length-a.i;b=r(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0){e.splice(Math.max(a.i,g));for(var i=g;ij;j++)e[j]=0}if(h>=5)if(0>g-1){for(var k=0;k>g;k--)e.unshift(0),a.i++;e.unshift(1),a.i++}else e[g-1]++;for(;fl;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Wc(a,b,c,d){var e="";for((0>a||d&&0>=a)&&(d?a=-a+1:(a=-a, +e="-")),a=""+a;a.length0||g>-c)&&(g+=c),0===g&&-12==c&&(g=12),Wc(g,b,d,e)}}function Yc(a,b,c){return function(d,e){var f=d["get"+a](),g=(c?"STANDALONE":"")+(b?"SHORT":""),h=Hd(g+a);return e[h][f]}}function Zc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Wc(Math[d>0?"floor":"ceil"](d/60),2)+Wc(Math.abs(d%60),2)}function $c(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function _c(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function ad(a){return function(b){var c=$c(b.getFullYear()),d=_c(b),e=+d-+c,f=1+Math.round(e/6048e5);return Wc(f,a)}}function bd(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function cd(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function dd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function ed(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=l(b[9]+b[10]),f=l(b[9]+b[11])),g.call(d,l(b[1]),l(b[2])-1,l(b[3]));var i=l(b[4]||0)-e,j=l(b[5]||0)-f,k=l(b[6]||0),m=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,m),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g,h,i="",j=[];if(e=e||"mediumDate",e=a.DATETIME_FORMATS[e]||e,v(c)&&(c=Ef.test(c)?l(c):b(c)),w(c)&&(c=new Date(c)),!x(c)||!isFinite(c.getTime()))return c;for(;e;)h=Df.exec(e),h?(j=P(j,h,1),e=j.pop()):(j.push(e),e=null);var k=c.getTimezoneOffset();return f&&(k=V(f,k),c=X(c,f,!0)),d(j,function(b){g=Cf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function fd(){return function(a,b){return r(b)&&(b=2),T(a,b)}}function gd(){return function(a,b,d){return b=Math.abs(Number(b))===1/0?Number(b):l(b),isNaN(b)?a:(w(a)&&(a=a.toString()),c(a)?(d=!d||isNaN(d)?0:l(d),d=0>d?Math.max(0,a.length+d):d,b>=0?hd(a,d,d+b):0===d?hd(a,b,a.length):hd(a,Math.max(0,d+b),d)):a)}}function hd(a,b,c){return v(a)?a.slice(b,c):Od.call(a,b,c)}function id(a){function d(b){return b.map(function(b){var c=1,d=o;if(y(b))d=b;else if(v(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(c="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(d=a(b),d.constant))){var e=d();d=function(a){return a[e]}}return{get:d,descending:c}})}function e(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a){return y(a.valueOf)&&(a=a.valueOf(),e(a))?a:q(a)&&(a=a.toString(),e(a))?a:a}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"object"===c&&(a=f(a)),{value:a,type:c,index:b}}function h(a,b){var c=0,d=a.type,e=b.type;if(d===e){var f=a.value,g=b.value;"string"===d?(f=f.toLowerCase(),g=g.toLowerCase()):"object"===d&&(t(f)&&(f=a.index),t(g)&&(g=b.index)),f!==g&&(c=g>f?-1:1)}else c=e>d?-1:1;return c}return function(a,e,f,i){function j(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:l.map(function(c){return g(c.get(a),b)})}}function k(a,b){for(var c=0,d=l.length;d>c;c++){var e=n(a.predicateValues[c],b.predicateValues[c]);if(e)return e*l[c].descending*m}return n(a.tieBreaker,b.tieBreaker)*m}if(null==a)return a;if(!c(a))throw b("orderBy")("notarray","Expected array but received: {0}",a);Wd(e)||(e=[e]),0===e.length&&(e=["+"]);var l=d(e),m=f?-1:1,n=y(i)?i:h,o=Array.prototype.map.call(a,j);return o.sort(k),a=o.map(function(a){return a.value})}}function jd(a){return y(a)&&(a={link:a}),a.restrict=a.restrict||"AC",p(a)}function kd(a,b){a.$name=b}function ld(a,b,c,e,f){var g=this,h=[];g.$error={},g.$$success={},g.$pending=void 0,g.$name=f(b.name||b.ngForm||"")(c),g.$dirty=!1,g.$pristine=!0,g.$valid=!0,g.$invalid=!1,g.$submitted=!1,g.$$parentForm=Jf,g.$rollbackViewValue=function(){d(h,function(a){a.$rollbackViewValue()})},g.$commitViewValue=function(){d(h,function(a){a.$commitViewValue()})},g.$addControl=function(a){la(a.$name,"input"),h.push(a),a.$name&&(g[a.$name]=a),a.$$parentForm=g},g.$$renameControl=function(a,b){var c=a.$name;g[c]===a&&delete g[c],g[b]=a,a.$name=b},g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name],d(g.$pending,function(b,c){g.$setValidity(c,null,a)}),d(g.$error,function(b,c){g.$setValidity(c,null,a)}),d(g.$$success,function(b,c){g.$setValidity(c,null,a)}),M(h,a),a.$$parentForm=Jf},Ad({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(M(d,c),0===d.length&&delete a[b])},$animate:e}),g.$setDirty=function(){e.removeClass(a,tg),e.addClass(a,ug),g.$dirty=!0,g.$pristine=!1,g.$$parentForm.$setDirty()},g.$setPristine=function(){e.setClass(a,tg,ug+" "+Kf),g.$dirty=!1,g.$pristine=!0,g.$submitted=!1,d(h,function(a){a.$setPristine()})},g.$setUntouched=function(){d(h,function(a){a.$setUntouched()})},g.$setSubmitted=function(){e.addClass(a,Kf),g.$submitted=!0,g.$$parentForm.$setSubmitted()}}function md(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function nd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d)}function od(a,b,c,d,e,f){var g=Gd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Yd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Yf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Xf,function(a){if(!i){var b=this[Ed],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,(b.badInput!==c||b.typeMismatch!==d)&&j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function pd(a,b){if(x(a))return a;if(v(a)){Uf.lastIndex=0;var c=Uf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=$c(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function qd(a,b){return function(c,e){var f,g;if(x(c))return c;if(v(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Of.test(c))return new Date(c);if(a.lastIndex=0,f=a.exec(c))return f.shift(),g=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},d(f,function(a,c){c=p},g.$observe("min",function(a){p=m(a),h.$validate()})}if(s(g.max)||g.ngMax){var q;h.$validators.max=function(a){return!l(a)||r(q)||c(a)<=q},g.$observe("max",function(a){q=m(a),h.$validate()})}}}function sd(a,b,c,d){var e=b[0],f=d.$$hasNativeValidators=t(e.validity);f&&d.$parsers.push(function(a){var c=b.prop(Ed)||{};return c.badInput||c.typeMismatch?void 0:a})}function td(a,b,c,d,e,f){if(sd(a,b,c,d),od(a,b,c,d,e,f),d.$$parserName="number",d.$parsers.push(function(a){return d.$isEmpty(a)?null:Rf.test(a)?parseFloat(a):void 0}),d.$formatters.push(function(a){if(!d.$isEmpty(a)){if(!w(a))throw Ag("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),s(c.min)||c.ngMin){var g;d.$validators.min=function(a){return d.$isEmpty(a)||r(g)||a>=g},c.$observe("min",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),g=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}if(s(c.max)||c.ngMax){var h;d.$validators.max=function(a){return d.$isEmpty(a)||r(h)||h>=a},c.$observe("max",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),h=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}}function ud(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Pf.test(c)}}function vd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Qf.test(c)}}function wd(a,b,c,d){r(c.name)&&b.attr("name",g());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function xd(a,b,c,d,e){var f;if(s(d)){if(f=a(d),!f.constant)throw Ag("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function yd(a,b,c,d,e,f,g,h){var i=xd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=xd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return O(a,i)}),d.$parsers.push(function(a){return a?i:j})}function zd(a,b){return a="ngClass"+a,["$animate",function(c){function e(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&e.push(a))}),h.data("$classCounts",c),e.join(" ")}function m(a,b){var d=e(b,a),f=e(a,b);d=l(d,1),f=l(f,-1),d&&d.length&&c.addClass(h,d),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||(1&g.$index)===b){var c=f(a||[]);if(o){if(!O(a,o)){var d=f(o);m(d,c)}}else j(c)}o=Wd(a)?a.map(function(a){return qa(a)}):qa(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var e=1&c;if(e!==(1&d)){var h=f(g.$eval(i[a]));e===b?j(h):k(h)}})}}}]}function Ad(a){function b(a,b,h){r(b)?c("$pending",a,h):d("$pending",a,h),F(b)?b?(k(g.$error,a,h),j(g.$$success,a,h)):(j(g.$error,a,h),k(g.$$success,a,h)):(k(g.$error,a,h),k(g.$$success,a,h)),g.$pending?(e(xg,!0),g.$valid=g.$invalid=void 0,f("",null)):(e(xg,!1),g.$valid=Bd(g.$error),g.$invalid=!g.$valid,f("",g.$valid));var i;i=g.$pending&&g.$pending[a]?void 0:g.$error[a]?!1:g.$$success[a]?!0:null,f(a,i),g.$$parentForm.$setValidity(a,i,g)}function c(a,b,c){g[a]||(g[a]={}),j(g[a],b,c)}function d(a,b,c){g[a]&&k(g[a],b,c),Bd(g[a])&&(g[a]=void 0)}function e(a,b){b&&!i[a]?(l.addClass(h,a),i[a]=!0):!b&&i[a]&&(l.removeClass(h,a),i[a]=!1)}function f(a,b){a=a?"-"+ha(a,"-"):"",e(rg+a,b===!0),e(sg+a,b===!1)}var g=a.ctrl,h=a.$element,i={},j=a.set,k=a.unset,l=a.$animate;i[sg]=!(i[rg]=h.hasClass(rg)),g.$setValidity=b}function Bd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Cd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Dd=/^\/(.+)\/([a-z]*)$/,Ed="validity",Fd=Object.prototype.hasOwnProperty,Gd=function(a){return v(a)?a.toLowerCase():a},Hd=function(a){return v(a)?a.toUpperCase():a},Id=function(a){return v(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Jd=function(a){return v(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Gd=Id,Hd=Jd);var Kd,Ld,Md,Nd,Od=[].slice,Pd=[].splice,Qd=[].push,Rd=Object.prototype.toString,Sd=Object.getPrototypeOf,Td=b("ng"),Ud=a.angular||(a.angular={}),Vd=0;Kd=a.document.documentMode,n.$inject=[],o.$inject=[];var Wd=Array.isArray,Xd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Yd=function(a){return v(a)?a.trim():a},Zd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=be[c],b=a.document.querySelector("["+d.replace(":","\\:")+"jq]")){e=b.getAttribute(d+"jq");break}return _d.name_=e},ae=/:/g,be=["ng-","data-ng-","ng:","x-ng-"],ce=/[A-Z]/g,de=!1,ee=1,fe=2,ge=3,he=8,ie=9,je=11,ke={full:"1.5.7",major:1,minor:5,dot:7,codeName:"hexagonal-circumvolution"};Da.expando="ng339";var le=Da.cache={},me=1,ne=function(a,b,c){a.addEventListener(b,c,!1)},oe=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var pe=/([\:\-\_]+(.))/g,qe=/^moz([A-Z])/,re={mouseleave:"mouseout",mouseenter:"mouseover"},se=b("jqLite"),te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ue=/<|&#?\w+;/,ve=/<([\w:-]+)/,we=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,xe={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td;var ye=a.Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ze=Da.prototype={ready:function(b){function c(){d||(d=!0,b())}var d=!1;"complete"===a.document.readyState?a.setTimeout(c):(this.on("DOMContentLoaded",c),Da(a).on("load",c))},toString:function(){var a=[];return d(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Ld(a>=0?this[a]:this[this.length+a])},length:0,push:Qd,sort:[].sort,splice:[].splice},Ae={};d("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){Ae[Gd(a)]=a});var Be={};d("input,select,option,textarea,button,form,details".split(","),function(a){Be[a]=!0});var Ce={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};d({data:Ja,removeData:Ha,hasData:ya,cleanData:za},function(a,b){Da[b]=a}),d({data:Ja,inheritedData:Pa,scope:function(a){return Ld.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Ld.data(a,"$isolateScope")||Ld.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){return b=va(b),s(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,c){var d=a.nodeType;if(d!==ge&&d!==fe&&d!==he){var e=Gd(b);if(Ae[e]){if(!s(c))return a[b]||(a.attributes.getNamedItem(b)||n).specified?e:void 0;c?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(s(c))a.setAttribute(b,c);else if(a.getAttribute){var f=a.getAttribute(b,2);return null===f?void 0:f}}},prop:function(a,b,c){return s(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(r(b)){var c=a.nodeType;return c===ee||c===ge?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(r(b)){if(a.multiple&&"select"===L(a)){var c=[];return d(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return r(b)?a.innerHTML:(Fa(a,!0),void(a.innerHTML=b))},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&r(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(t(b)){for(d=0;f>d;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=r(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),d({removeData:Ha,on:function(a,b,c,d){if(s(d))throw se("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xa(a)){var e=Ia(a,!0),f=e.events,g=e.handle;g||(g=e.handle=Va(a,f));for(var h=b.indexOf(" ")>=0?b.split(" "):[b],i=h.length,j=function(b,d,e){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=d,"$destroy"===b||e||ne(a,b,g)),h.push(c)};i--;)b=h[i],re[b]?(j(re[b],Xa),j(b,void 0,!0)):j(b)}},off:Ga,one:function(a,b,c){a=Ld(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,e=a.parentNode;Fa(a),d(new Da(b),function(b){c?e.insertBefore(b,c.nextSibling):e.replaceChild(b,a),c=b})},children:function(a){var b=[];return d(a.childNodes,function(a){a.nodeType===ee&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===ee||c===je){b=new Da(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===ee){var c=a.firstChild;d(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Ld(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&d(b.split(" "),function(b){var d=c;r(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==je?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var e,f,g,h=b.type||b,i=Ia(a),k=i&&i.events,l=k&&k[h];l&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:n,type:h,target:a},b.type&&(e=j(e,b)),f=qa(l),g=c?[e].concat(c):[e],d(f,function(b){e.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)r(e)?(e=a(this[f],b,c,d),s(e)&&(e=Ld(e))):Na(e,a(this[f],b,c,d));return s(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var De=[function(){this.$get=[function(){return $a}]}],Ee=/^([^\(]+?)=>/,Fe=/^[^\(]*\(\s*([^\)]*)\)/m,Ge=/,/,He=/^\s*(_?)(\S+?)\1\s*$/,Ie=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Je=b("$injector");db.$$annotate=cb;var Ke=b("$animate"),Le=1,Me="ng-animate",Ne=function(){this.$get=n},Oe=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,e){function f(a,b,c){var e=!1;return b&&(b=v(b)?b.split(" "):Wd(b)?b:[],d(b,function(b){b&&(e=!0,a[b]=c)})),e}function g(){d(b,function(b){var c=a.get(b);if(c){var e=hb(b.attr("class")),f="",g="";d(c,function(a,b){var c=!!e[b];a!==c&&(a?f+=(f.length?" ":"")+b:g+=(g.length?" ":"")+b)}),d(b,function(a){f&&Ma(a,f),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,d,h){var i=a.get(c)||{},j=f(i,d,!0),k=f(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&e.$$postDigest(g))}return{enabled:n,on:n,off:n,pin:n,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Pe=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Ke("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Me+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw Ke("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Me)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=gb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",ib(f))},move:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",ib(f))},leave:function(b,c){return a.push(b,"leave",ib(c),function(){b.remove()})},addClass:function(b,c,d){return d=ib(d),d.addClass=fb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=ib(d),d.removeClass=fb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=ib(e),e.addClass=fb(e.addClass,c),e.removeClass=fb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=ib(f),f.from=f.from?j(f.from,c):c,f.to=f.to?j(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=fb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Qe=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){of[a]=!0});var pf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},qf=function(a){this.options=a};qf.prototype={constructor:qf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var c=a.charCodeAt(0),d=b.charCodeAt(0);return c>=55296&&56319>=c&&d>=56320&&57343>=d?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw kf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:rf.Program,body:a}},expressionStatement:function(){return{type:rf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:rf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:rf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:rf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:rf.LogicalExpression,operator:"&&", +left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:rf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=N(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:rf.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:rf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:rf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:rf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:rf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.filterChain());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:rf.Identifier,name:a.text}},constant:function(){return{type:rf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:rf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:rf.Property,kind:"init"},this.peek().constant?(a.key=this.constant(),a.computed=!1,this.consume(":"),a.value=this.expression()):this.peek().identifier?(a.key=this.identifier(),a.computed=!1,this.peek(":")?(this.consume(":"),a.value=this.expression()):a.value=a.key):this.peek("[")?(this.consume("["),a.key=this.expression(),this.consume("]"),a.computed=!0,this.consume(":"),a.value=this.expression()):this.throwError("invalid key",this.peek()),b.push(a)}while(this.expect(","));return this.consume("}"),{type:rf.ObjectExpression,properties:b}},throwError:function(a,b){throw kf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},selfReferential:{"this":{type:rf.ThisExpression},$locals:{type:rf.LocalsExpression}}},oc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ic(e,c.$filter);var f,g="";if(this.stage="assign",f=lc(e)){this.state.computing="assign";var h=this.nextId();this.recurse(f,h),this.return_(h),g="fn.assign="+this.generateFunction("assign","s,v,l")}var i=jc(e.body);c.stage="inputs",d(i,function(a,b){var d="fn"+b;c.state[d]={vars:[],body:[],own:{}},c.state.computing=d;var e=c.nextId();c.recurse(a,e),c.return_(e),c.state.inputs.push(d),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var j='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+g+this.watchFns()+"return fn;",k=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",j)(this.$filter,ac,cc,dc,bc,ec,fc,gc,a);return this.state=this.stage=void 0,k.literal=mc(e),k.constant=nc(e),k},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return d(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return d(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,c,e,f,g){var h,i,j,k,l,m=this;if(e=e||n,!g&&s(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,c,e,f,!0));switch(a.type){case rf.Program:d(a.body,function(b,c){m.recurse(b.expression,void 0,void 0,function(a){i=a}),c!==a.body.length-1?m.current().body.push(i,";"):m.return_(i)});break;case rf.Literal:k=this.escape(a.value),this.assign(b,k),e(k);break;case rf.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){i=a}),k=a.operator+"("+this.ifDefined(i,0)+")",this.assign(b,k),e(k);break;case rf.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){h=a}),this.recurse(a.right,void 0,void 0,function(a){i=a}),k="+"===a.operator?this.plus(h,i):"-"===a.operator?this.ifDefined(h,0)+a.operator+this.ifDefined(i,0):"("+h+")"+a.operator+"("+i+")",this.assign(b,k),e(k);break;case rf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case rf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case rf.Identifier:b=b||this.nextId(),c&&(c.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),c.computed=!1,c.name=a.name),ac(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){f&&1!==f&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||qc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case rf.MemberExpression:h=c&&(c.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,h,void 0,function(){m.if_(m.notNull(h),function(){f&&1!==f&&m.addEnsureSafeAssignContext(h),a.computed?(i=m.nextId(),m.recurse(a.property,i),m.getStringValue(i),m.addEnsureSafeMemberName(i),f&&1!==f&&m.if_(m.not(m.computedMember(h,i)),m.lazyAssign(m.computedMember(h,i),"{}")),k=m.ensureSafeObject(m.computedMember(h,i)),m.assign(b,k),c&&(c.computed=!0,c.name=i)):(ac(a.property.name),f&&1!==f&&m.if_(m.not(m.nonComputedMember(h,a.property.name)),m.lazyAssign(m.nonComputedMember(h,a.property.name),"{}")),k=m.nonComputedMember(h,a.property.name),(m.state.expensiveChecks||qc(a.property.name))&&(k=m.ensureSafeObject(k)),m.assign(b,k),c&&(c.computed=!1,c.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!f);break;case rf.CallExpression:b=b||this.nextId(),a.filter?(i=m.filter(a.callee.name),j=[],d(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),j.push(b)}),k=i+"("+j.join(",")+")",m.assign(b,k),e(b)):(i=m.nextId(),h={},j=[],m.recurse(a.callee,i,h,function(){m.if_(m.notNull(i),function(){m.addEnsureSafeFunction(i),d(a.arguments,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(m.ensureSafeObject(a))})}),h.name?(m.state.expensiveChecks||m.addEnsureSafeObject(h.context),k=m.member(h.context,h.name,h.computed)+"("+j.join(",")+")"):k=i+"("+j.join(",")+")",k=m.ensureSafeObject(k),m.assign(b,k)},function(){m.assign(b,"undefined")}),e(b)}));break;case rf.AssignmentExpression:if(i=this.nextId(),h={},!kc(a.left))throw kf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,void 0,h,function(){m.if_(m.notNull(h.context),function(){m.recurse(a.right,i),m.addEnsureSafeObject(m.member(h.context,h.name,h.computed)),m.addEnsureSafeAssignContext(h.context),k=m.member(h.context,h.name,h.computed)+a.operator+i,m.assign(b,k),e(b||k)})},1);break;case rf.ArrayExpression:j=[],d(a.elements,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(a)})}),k="["+j.join(",")+"]",this.assign(b,k),e(k);break;case rf.ObjectExpression:j=[],l=!1,d(a.properties,function(a){a.computed&&(l=!0)}),l?(b=b||this.nextId(),this.assign(b,"{}"),d(a.properties,function(a){a.computed?(h=m.nextId(),m.recurse(a.key,h)):h=a.key.type===rf.Identifier?a.key.name:""+a.key.value,i=m.nextId(),m.recurse(a.value,i),m.assign(m.member(b,h,a.computed),i)})):(d(a.properties,function(b){m.recurse(b.value,a.constant?void 0:m.nextId(),void 0,function(a){j.push(m.escape(b.key.type===rf.Identifier?b.key.name:""+b.key.value)+":"+a)})}),k="{"+j.join(",")+"}",this.assign(b,k)),e(b||k);break;case rf.ThisExpression:this.assign(b,"s"),e("s");break;case rf.LocalsExpression:this.assign(b,"l"),e("l");break;case rf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var c=/[$_a-zA-Z][$_a-zA-Z0-9]*/,d=/[^$_a-zA-Z0-9]/g;return c.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(v(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(w(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw kf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},pc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,ic(e,c.$filter);var f,g;(f=lc(e))&&(g=this.recurse(f));var h,i=jc(e.body);i&&(h=[],d(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];d(e.body,function(a){j.push(c.recurse(a.expression))});var k=0===e.body.length?n:1===e.body.length?j[0]:function(a,b){var c;return d(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=mc(e),k.constant=nc(e),k},recurse:function(a,b,c){var e,f,g,h=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case rf.Literal:return this.value(a.value,b);case rf.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case rf.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case rf.Identifier:return ac(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||qc(a.name),b,c,h.expression);case rf.MemberExpression:return e=this.recurse(a.object,!1,!!c),a.computed||(ac(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,b,c,h.expression):this.nonComputedMember(e,f,h.expensiveChecks,b,c,h.expression);case rf.CallExpression:return g=[],d(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,c,d,e){for(var h=[],i=0;i":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,c,d,e){return function(f,g,h,i){var j=g&&a in g?g:f;d&&1!==d&&j&&!j[a]&&(j[a]={});var k=j?j[a]:void 0;return b&&cc(k,e),c?{context:j,name:a,value:k}:k}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=bc(j),ac(j,e),d&&1!==d&&(ec(l),l&&!l[j]&&(l[j]={})),k=l[j],cc(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,c,d,e,f){return function(g,h,i,j){var k=a(g,h,i,j);e&&1!==e&&(ec(k),k&&!k[b]&&(k[b]={}));var l=null!=k?k[b]:void 0;return(c||qc(b))&&cc(l,f),d?{context:k,name:b,value:l}:l}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var sf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new rf(a,c),this.astCompiler=c.csp?new pc(this.ast,b):new oc(this.ast,b)};sf.prototype={constructor:sf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var tf=Object.prototype.valueOf,uf=b("$sce"),vf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},wf=b("$compile"),xf=a.document.createElement("a"),yf=Hc(a.location.href);Kc.$inject=["$document"],Mc.$inject=["$provide"];var zf=22,Af=".",Bf="0";Rc.$inject=["$locale"],Sc.$inject=["$locale"];var Cf={yyyy:Xc("FullYear",4,0,!1,!0),yy:Xc("FullYear",2,0,!0,!0),y:Xc("FullYear",1,0,!1,!0),MMMM:Yc("Month"),MMM:Yc("Month",!0),MM:Xc("Month",2,1),M:Xc("Month",1,1),LLLL:Yc("Month",!1,!0),dd:Xc("Date",2),d:Xc("Date",1),HH:Xc("Hours",2),H:Xc("Hours",1),hh:Xc("Hours",2,-12),h:Xc("Hours",1,-12),mm:Xc("Minutes",2),m:Xc("Minutes",1),ss:Xc("Seconds",2),s:Xc("Seconds",1),sss:Xc("Milliseconds",3),EEEE:Yc("Day"),EEE:Yc("Day",!0),a:bd,Z:Zc,ww:ad(2),w:ad(1),G:cd,GG:cd,GGG:cd,GGGG:dd},Df=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ef=/^\-?\d+$/;ed.$inject=["$locale"];var Ff=p(Gd),Gf=p(Hd);id.$inject=["$parse"];var Hf=p({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Rd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),If={};d(Ae,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=qb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),If[d]=function(){return{restrict:"A",priority:100,link:e}}}}),d(Ce,function(a,b){If[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Dd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),d(["src","srcset","href"],function(a){var b=qb("ng-"+a);If[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Rd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Kd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Jf={$addControl:n,$$renameControl:kd,$removeControl:n,$setValidity:n,$setDirty:n,$setPristine:n,$setSubmitted:n},Kf="ng-submitted";ld.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Lf=function(a){return["$timeout","$parse",function(b,c){function d(a){return""===a?c('this[""]').assign:c(a).assign||n}var e={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:ld,compile:function(c,e){c.addClass(tg).addClass(rg);var f=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,c,e,g){var h=g[0];if(!("action"in e)){var i=function(b){a.$apply(function(){h.$commitViewValue(),h.$setSubmitted()}),b.preventDefault()};ne(c[0],"submit",i),c.on("$destroy",function(){b(function(){oe(c[0],"submit",i)},0,!1)})}var k=g[1]||h.$$parentForm;k.$addControl(h);var l=f?d(h.$name):n;f&&(l(a,h),e.$observe(f,function(b){h.$name!==b&&(l(a,void 0),h.$$parentForm.$$renameControl(h,b),(l=d(h.$name))(a,h))})),c.on("$destroy",function(){h.$$parentForm.$removeControl(h),l(a,void 0),j(h,Jf)})}}}};return e}]},Mf=Lf(),Nf=Lf(!0),Of=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Pf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Qf=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Rf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sf=/^(\d{4,})-(\d{2})-(\d{2})$/,Tf=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Uf=/^(\d{4,})-W(\d\d)$/,Vf=/^(\d{4,})-(\d\d)$/,Wf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xf="keydown wheel mousedown",Yf=oa();d("date,datetime-local,month,time,week".split(","),function(a){Yf[a]=!0});var Zf={text:nd,date:rd("date",Sf,qd(Sf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":rd("datetimelocal",Tf,qd(Tf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:rd("time",Wf,qd(Wf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:rd("week",Uf,pd,"yyyy-Www"),month:rd("month",Vf,qd(Vf,["yyyy","MM"]),"yyyy-MM"),number:td,url:ud,email:vd,radio:wd,checkbox:yd,hidden:n,button:n,submit:n,reset:n,file:n},$f=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Zf[Gd(g.type)]||Zf.text)(e,f,g,h[0],b,a,c,d)}}}}],_f=/^(true|false|\d+)$/,ag=function(){return{restrict:"A",priority:100,compile:function(a,b){return _f.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},bg=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=r(a)?"":a})}}}}],cg=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=r(a)?"":a})}}}}],dg=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],eg=p({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),fg=zd("",!0),gg=zd("Odd",0),hg=zd("Even",1),ig=jd({compile:function(a,b){b.$set("ngCloak",void 0),a.removeClass("ng-cloak")}}),jg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],kg={},lg={blur:!0,focus:!0};d("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=qb("ng-"+a);kg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};lg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var mg=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.$$createComment("end ngIf",e.ngIf),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=na(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],ng=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ud.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!s(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],og=["$compile",function(b){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Rd.call(d[0]).match(/SVG/)?(d.empty(),void b(Aa(f.template,a.document).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void b(d.contents())(c))}}}],pg=jd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),qg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,c,e){var f=b.attr(c.$attr.ngList)||", ",g="false"!==c.ngTrim,h=g?Yd(f):f,i=function(a){if(!r(a)){var b=[];return a&&d(a.split(h),function(a){a&&b.push(g?Yd(a):a)}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Wd(a)?a.join(f):void 0}),e.$isEmpty=function(a){return!a||!a.length}}}},rg="ng-valid",sg="ng-invalid",tg="ng-pristine",ug="ng-dirty",vg="ng-untouched",wg="ng-touched",xg="ng-pending",yg="ng-empty",zg="ng-not-empty",Ag=b("ngModel"),Bg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,c,e,f,g,h,i,j,k){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=k(c.name||"",!1)(a),this.$$parentForm=Jf;var l,m=f(c.ngModel),o=m.assign,p=m,q=o,t=null,u=this;this.$$setOptions=function(a){if(u.$options=a,a&&a.getterSetter){var b=f(c.ngModel+"()"),d=f(c.ngModel+"($$$p)");p=function(a){var c=m(a);return y(c)&&(c=b(a)),c},q=function(a,b){y(m(a))?d(a,{$$$p:b}):o(a,b)}}else if(!m.assign)throw Ag("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,Y(e))},this.$render=n,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){u.$isEmpty(a)?(g.removeClass(e,zg),g.addClass(e,yg)):(g.removeClass(e,yg),g.addClass(e,zg))};var v=0;Ad({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:g}),this.$setPristine=function(){u.$dirty=!1,u.$pristine=!0,g.removeClass(e,ug),g.addClass(e,tg)},this.$setDirty=function(){u.$dirty=!0,u.$pristine=!1,g.removeClass(e,tg),g.addClass(e,ug),u.$$parentForm.$setDirty()},this.$setUntouched=function(){u.$touched=!1,u.$untouched=!0,g.setClass(e,vg,wg)},this.$setTouched=function(){u.$touched=!0,u.$untouched=!1,g.setClass(e,wg,vg)},this.$rollbackViewValue=function(){h.cancel(t),u.$viewValue=u.$$lastCommittedViewValue,u.$render()},this.$validate=function(){if(!w(u.$modelValue)||!isNaN(u.$modelValue)){var a=u.$$lastCommittedViewValue,b=u.$$rawModelValue,c=u.$valid,d=u.$modelValue,e=u.$options&&u.$options.allowInvalid;u.$$runValidators(b,a,function(a){e||c===a||(u.$modelValue=a?b:void 0,u.$modelValue!==d&&u.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function e(){var a=u.$$parserName||"parse";return r(l)?(h(a,null),!0):(l||(d(u.$validators,function(a,b){h(b,null)}),d(u.$asyncValidators,function(a,b){h(b,null)})),h(a,l),l)}function f(){var c=!0;return d(u.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),c?!0:(d(u.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var c=[],e=!0;d(u.$asyncValidators,function(d,f){var g=d(a,b);if(!G(g))throw Ag("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",g);h(f,void 0),c.push(g.then(function(){h(f,!0)},function(){e=!1,h(f,!1)}))}),c.length?j.all(c).then(function(){i(e)},n):i(!0)}function h(a,b){k===v&&u.$setValidity(a,b)}function i(a){k===v&&c(a)}v++;var k=v;return e()&&f()?void g():void i(!1)},this.$commitViewValue=function(){var a=u.$viewValue;h.cancel(t),(u.$$lastCommittedViewValue!==a||""===a&&u.$$hasNativeValidators)&&(u.$$updateEmptyClasses(a),u.$$lastCommittedViewValue=a,u.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){u.$modelValue!==f&&u.$$writeModelToScope()}var c=u.$$lastCommittedViewValue,d=c;if(l=r(d)?void 0:!0)for(var e=0;ef;f++){var i=a===c?f:c[f],j=a[i],k=x(j,i),l=q(j,k);if(b.push(l),h[2]||h[1]){var m=s(d,k);b.push(m)}if(h[4]){var n=u(d,k);b.push(n)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],f=g(c),h=f.length,i=0;h>i;i++){var j=c===f?i:f[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new e(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Ud.copy(a.viewValue):a.viewValue}}}}}function h(a,c,f,h){function k(a,b){var c=i.cloneNode(!1);b.appendChild(c),l(a,c)}function l(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=x&&o.readValue();if(x)for(var b=x.items.length-1;b>=0;b--){var d=x.items[b];Ra(d.group?d.element.parentNode:d.element)}x=y.getOptions();var e={};if(v&&c.prepend(n),x.items.forEach(function(a){var b;s(a.group)?(b=e[a.group],b||(b=j.cloneNode(!1),z.appendChild(b),b.label=a.group,e[a.group]=b),k(a,b)):k(a,z)}),c[0].appendChild(z),p.$render(),!p.$isEmpty(a)){var f=o.readValue(),g=y.trackBy||q;(g?O(a,f):a===f)||(p.$setViewValue(f),p.$render())}}for(var n,o=h[0],p=h[1],q=f.multiple,r=0,t=c.children(),u=t.length;u>r;r++)if(""===t[r].value){n=t.eq(r);break}var v=!!n,w=Ld(i.cloneNode(!1));w.val("?");var x,y=g(f.ngOptions,c,a),z=e[0].createDocumentFragment(),A=function(){v||c.prepend(n),c.val(""),n.prop("selected",!0),n.attr("selected",!0)},B=function(){v||n.remove()},C=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},D=function(){w.remove()};q?(p.$isEmpty=function(a){return!a||0===a.length},o.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&(b.element.selected=!0)})},o.readValue=function(){var a=c.val()||[],b=[];return d(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&a.$watchCollection(function(){return Wd(p.$viewValue)?p.$viewValue.map(function(a){return y.getTrackByValue(a)}):void 0},function(){p.$render()})):(o.writeValue=function(a){var b=x.getOptionFromViewValue(a);b?(c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(D(),A()):(B(),C())},o.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),x.getViewValueFromOption(a)):null},y.trackBy&&a.$watch(function(){return y.getTrackByValue(p.$viewValue)},function(){p.$render()})),v?(n.remove(),b(n)(a),n.removeClass("ng-scope")):n=Ld(i.cloneNode(!1)),c.empty(),m(),a.$watchCollection(y.getWatchables,m)}var i=a.document.createElement("option"),j=a.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=n},post:h}}}],Jg=["$locale","$interpolate","$log",function(a,b,c){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),o=i.offset||0,p=g.$eval(m)||{},q={},s=b.startSymbol(),t=b.endSymbol(),u=s+l+"-"+o+t,v=Ud.noop;d(i,function(a,b){var c=f.exec(b);if(c){var d=(c[1]?"-":"")+Gd(c[2]);p[d]=h.attr(i.$attr[b])}}),d(p,function(a,c){q[c]=b(a.replace(e,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in p||(d=a.pluralCat(d-o)),d!==k&&!(e&&w(k)&&isNaN(k))){v();var f=q[d];r(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=n,j()):v=g.$watch(f,j),k=d}})}}}],Kg=["$parse","$animate","$compile",function(a,e,f){var g="$$NG_REMOVED",h=b("ngRepeat"),i=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},j=function(a){return a.clone[0]},k=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(b,l){var m=l.ngRepeat,n=f.$$createComment("end ngRepeat",m),o=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!o)throw h("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var p=o[1],q=o[2],r=o[3],s=o[4];if(o=p.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!o)throw h("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var t=o[3]||o[1],u=o[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw h("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",r);var v,w,x,y,z={$id:Za};return s?v=a(s):(x=function(a,b){return Za(b)},y=function(a){return a}),function(a,b,f,l,o){v&&(w=function(b,c,d){return u&&(z[u]=b),z[t]=c,z.$index=d,v(a,z)});var p=oa();a.$watchCollection(q,function(f){var l,q,s,v,z,A,B,C,D,E,F,G,H=b[0],I=oa();if(r&&(a[r]=f),c(f))D=f,C=w||x;else{C=w||y,D=[];for(var J in f)Fd.call(f,J)&&"$"!==J.charAt(0)&&D.push(J)}for(v=D.length,F=new Array(v),l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],B=C(z,A,l),p[B])E=p[B],delete p[B],I[B]=E,F[l]=E;else{if(I[B])throw d(F,function(a){a&&a.scope&&(p[a.id]=a)}),h("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,B,A);F[l]={id:B,scope:void 0,clone:void 0},I[B]=!0}for(var K in p){if(E=p[K],G=na(E.clone),e.leave(G),G[0].parentNode)for(l=0,q=G.length;q>l;l++)G[l][g]=!0;E.scope.$destroy()}for(l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],E=F[l],E.scope){s=H;do s=s.nextSibling;while(s&&s[g]);j(E)!=s&&e.move(na(E.clone),null,H),H=k(E),i(E.scope,l,t,A,u,z,v)}else o(function(a,b){E.scope=b;var c=n.cloneNode(!1);a[a.length++]=c,e.enter(a,null,H),H=c,E.clone=a,I[E.id]=E,i(E.scope,l,t,A,u,z,v)});p=I})}}}}],Lg="ng-hide",Mg="ng-hide-animate",Ng=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Lg,{tempClasses:Mg})})}}}],Og=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Lg,{tempClasses:Mg})})}}}],Pg=jd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&d(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Qg=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,e,f,g){var h=f.ngSwitch||f.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var e,f;for(e=0,f=k.length;f>e;++e)a.cancel(k[e]);for(k.length=0,e=0,f=l.length;f>e;++e){var h=na(j[e].clone);l[e].$destroy();var n=k[e]=a.leave(h);n.then(m(k,e))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&d(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Rg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Sg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Tg=b("ngTransclude"),Ug=jd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Tg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Vg=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Wg={$setViewValue:n,$render:n},Xg=["$element","$scope",function(b,c){var d=this,e=new $a;d.ngModelCtrl=Wg,d.unknownOption=Ld(a.document.createElement("option")),d.renderUnknownOption=function(a){var c="? "+Za(a)+" ?";d.unknownOption.val(c),b.prepend(d.unknownOption),b.val(c)},c.$on("$destroy",function(){d.renderUnknownOption=n}),d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()},d.readValue=function(){return d.removeUnknownOption(),b.val()},d.writeValue=function(a){d.hasOption(a)?(d.removeUnknownOption(),b.val(a),""===a&&d.emptyOption.prop("selected",!0)):null==a&&d.emptyOption?(d.removeUnknownOption(),b.val("")):d.renderUnknownOption(a)},d.addOption=function(a,b){if(b[0].nodeType!==he){la(a,'"option value"'),""===a&&(d.emptyOption=b);var c=e.get(a)||0;e.put(a,c+1),d.ngModelCtrl.$render(),Cd(b)}},d.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(d.emptyOption=void 0)):e.put(a,b-1))},d.hasOption=function(a){return!!e.get(a)},d.registerOption=function(a,b,c,e,f){if(e){var g;c.$observe("value",function(a){s(g)&&d.removeOption(g),g=a,d.addOption(a,b)})}else f?a.$watch(f,function(a,e){c.$set("value",a),e!==a&&d.removeOption(e),d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value),d.ngModelCtrl.$render()})}}],Yg=function(){function a(a,b,c,e){var f=e[1];if(f){var g=e[0];if(g.ngModelCtrl=f,b.on("change",function(){a.$apply(function(){f.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return d(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);d(b.find("option"),function(a){a.selected=s(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==f.$viewValue||O(h,f.$viewValue)||(h=qa(f.$viewValue),f.$render()),i=f.$viewValue}),f.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Xg,priority:1,link:{pre:a,post:b}}},Zg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(s(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],$g=p({restrict:"E",terminal:!1}),_g=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},ah=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){if(v(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw b("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",g,a,Y(c));f=a||void 0,e.$validate()}),e.$validators.pattern=function(a,b){return e.$isEmpty(b)||r(f)||f.test(b)}}}}},bh=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=l(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},ch=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=l(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void a.console:(ia(),ta(Ud),Ud.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function c(a,c){var d=c;void 0===d&&(d=Math.min(b(a),3));var e=Math.pow(10,d),f=(a*e|0)%e;return{v:d,f:f}}var d={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var e=0|a,f=c(a,b);return 1==e&&0==f.v?d.ONE:d.OTHER}})}]),void Ld(a.document).ready(function(){da(a.document,ea)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/"); +var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){ +switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n, +content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0), +null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this); +return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),function(a){"use strict";a.module("uuid4",[]).factory("uuid4",function(){var a=function(a){return Math.pow(2,a)},b=(a(4),a(6)),c=a(8),d=a(12),e=(a(14),a(16)),f=a(32),g=(a(40),a(48),function(a,b){return Math.floor(Math.random()*(b-a+1))+a}),h=function(){return g(0,b-1)},i=function(){return g(0,c-1)},j=function(){return g(0,d-1)},k=function(){return g(0,e-1)},l=function(){return g(0,f-1)},m=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},n=function(a,b,c){a=String(a),c=c?c:"0";for(var d=b-a.length;d>0;d>>>=1,c+=c)1&d&&(a=c+a);return a},o=function(a,b,c,d,e,f){var g=n(a.toString(16),8)+"-"+n(b.toString(16),4)+"-"+n(c.toString(16),4)+"-"+n(d.toString(16),2)+n(e.toString(16),2)+"-"+n(f.toString(16),12);return g};return{generate:function(){return o(l(),k(),16384|j(),128|h(),i(),m())},validate:function(a){var b=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return b.test(a)}}})}(angular),angular.module("angular.css.injector",[]).provider("cssInjector",["$interpolateProvider",function(a){function b(b,d,e){var f,g=angular.element(document.getElementsByTagName("head")[0]);d.$on("$locationChangeStart",function(){c===!0&&k()});var h=function(){void 0===f&&(f=e.scope())},i=function(c){if(h(),void 0===f.injectedStylesheets)f.injectedStylesheets=[],g.append(b("")(f));else for(var d in f.injectedStylesheets)if(f.injectedStylesheets[d].href==c)return;f.injectedStylesheets.push({href:c})},j=function(a){if(h(),f.injectedStylesheets)for(var b=0;b0}})}(),function(){angular.module("leodido.luhn",[]).service("luhn",function(){var a=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]];this.check=function(b){if(!b)return!1;for(var c=b.length,d=0,e=0;c--;)e+=a[d][parseInt(b.charAt(c),10)],d^=1;return 0===e%10&&e>0}})}(),function(a,b,c){"object"==typeof exports?module.exports=exports=b(require("./core"),require("./x64-core"),require("./lib-typedarrays"),require("./enc-utf16"),require("./enc-base64"),require("./md5"),require("./sha1"),require("./sha256"),require("./sha224"),require("./sha512"),require("./sha384"),require("./sha3"),require("./ripemd160"),require("./hmac"),require("./pbkdf2"),require("./evpkdf"),require("./cipher-core"),require("./mode-cfb"),require("./mode-ctr"),require("./mode-ctr-gladman"),require("./mode-ofb"),require("./mode-ecb"),require("./pad-ansix923"),require("./pad-iso10126"),require("./pad-iso97971"),require("./pad-zeropadding"),require("./pad-nopadding"),require("./format-hex"),require("./aes"),require("./tripledes"),require("./rc4"),require("./rabbit"),require("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],b):a.CryptoJS=b(a.CryptoJS)}(this,function(a){return a}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.ES6Promise=b()}(this,function(){"use strict";function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){U=a}function d(a){V=a}function e(){return function(){return process.nextTick(j)}}function f(){return function(){T(j)}}function g(){var a=0,b=new Y(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){return a.port2.postMessage(0)}}function i(){var a=setTimeout;return function(){return a(j,1)}}function j(){for(var a=0;S>a;a+=2){var b=_[a],c=_[a+1];b(c),_[a]=void 0,_[a+1]=void 0}S=0}function k(){try{var a=require,b=a("vertx");return T=b.runOnLoop||b.runOnContext,f()}catch(c){return i()}}function l(a,b){var c=arguments,d=this,e=new this.constructor(n);void 0===e[ba]&&G(e);var f=d._state;return f?!function(){var a=c[f-1];V(function(){return D(f,e,a,d._result)})}():z(d,e,a,b),e}function m(a){var b=this;if(a&&"object"==typeof a&&a.constructor===b)return a;var c=new b(n);return v(c,a),c}function n(){}function o(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function q(a){try{return a.then}catch(b){return fa.error=b,fa}}function r(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function s(a,b,c){V(function(a){var d=!1,e=r(c,b,function(c){d||(d=!0,b!==c?v(a,c):x(a,c))},function(b){d||(d=!0,y(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,y(a,e))},a)}function t(a,b){b._state===da?x(a,b._result):b._state===ea?y(a,b._result):z(b,void 0,function(b){return v(a,b)},function(b){return y(a,b)})}function u(a,c,d){c.constructor===a.constructor&&d===l&&c.constructor.resolve===m?t(a,c):d===fa?y(a,fa.error):void 0===d?x(a,c):b(d)?s(a,c,d):x(a,c)}function v(b,c){b===c?y(b,o()):a(c)?u(b,c,q(c)):x(b,c)}function w(a){a._onerror&&a._onerror(a._result),A(a)}function x(a,b){a._state===ca&&(a._result=b,a._state=da,0!==a._subscribers.length&&V(A,a))}function y(a,b){a._state===ca&&(a._state=ea,a._result=b,V(w,a))}function z(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+da]=c,e[f+ea]=d,0===f&&a._state&&V(A,a)}function A(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;gf;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})}function L(a){var b=this,c=new b(n);return y(c,a),c}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function O(a){this[ba]=F(),this._result=this._state=void 0,this._subscribers=[],n!==a&&("function"!=typeof a&&M(),this instanceof O?E(this,a):N())}function P(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(b){throw new Error("polyfill failed because global object is unavailable in this environment")}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(b){}if("[object Promise]"===d&&!c.cast)return}a.Promise=O}var Q=void 0;Q=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var R=Q,S=0,T=void 0,U=void 0,V=function(a,b){_[S]=a,_[S+1]=b,S+=2,2===S&&(U?U(j):aa())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,_=new Array(1e3),aa=void 0;aa=Z?e():Y?g():$?h():void 0===W&&"function"==typeof require?k():i();var ba=Math.random().toString(36).substring(16),ca=void 0,da=1,ea=2,fa=new B,ga=new B,ha=0;return H.prototype._enumerate=function(){for(var a=this.length,b=this._input,c=0;this._state===ca&&a>c;c++)this._eachEntry(b[c],c)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor,d=c.resolve;if(d===m){var e=q(a);if(e===l&&a._state!==ca)this._settledAt(a._state,b,a._result);else if("function"!=typeof e)this._remaining--,this._result[b]=a;else if(c===O){var f=new c(n);u(f,a,e),this._willSettleAt(f,b)}else this._willSettleAt(new c(function(b){return b(a)}),b)}else this._willSettleAt(d(a),b)},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===ca&&(this._remaining--,a===ea?y(d,c):this._result[b]=c),0===this._remaining&&x(d,this._result)},H.prototype._willSettleAt=function(a,b){var c=this;z(a,void 0,function(a){return c._settledAt(da,b,a)},function(a){return c._settledAt(ea,b,a)})},O.all=J,O.race=K,O.resolve=m,O.reject=L,O._setScheduler=c,O._setAsap=d,O._asap=V,O.prototype={constructor:O,then:l,"catch":function(a){return this.then(null,a)}},P(),O.polyfill=P,O.Promise=O,O}),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b},setCountries:function(b){a=b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this),function(a,b){"object"==typeof exports?module.exports=exports=b():"function"==typeof define&&define.amd?define([],b):a.CryptoJS=b()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<>>6-i%4*2,l=j|k;g[h>>>2]|=l<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){ +var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.lengthq;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.lengthk;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<o?m^=1<a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<>>32-z,p=y<>>32-z;else var o=y<>>64-z,p=x<>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.pad.NoPadding={pad:function(){},unpad:function(){}},function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b); +},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a}),function(){function a(a,b){var c=a.split("."),d=ta;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){function c(){}c.prototype=b.prototype,a.ha=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.ma=function(a,c,d){for(var e=Array(arguments.length-2),f=2;fb?1:b>a?-1:0}function g(a){var b,c=[],d=0;for(b in a)c[d++]=a[b];return c}function h(a,b){this.b=a,this.a={};for(var c=0;c=0?(a=a.substring(b),a=a.replace(Sa,""),b=a.search(Ra),b>=0&&(a=a.substring(0,b))):a="",a}function D(a){return 2>a.length?!1:ea(Va,a)}function E(a){return ea(Ta,a)?G(a,La):G(a,Ja)}function F(a){var b=E(a.toString());d(a),a.a(b)}function G(a,b){for(var d,e=new c,f=a.length,g=0;f>g;++g)d=a.charAt(g),d=b[d.toUpperCase()],null!=d&&e.a(d);return e.toString()}function H(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ia}function I(a,b,c){if(0==o(b,2)&&m(b,5)){var d=p(b,5);if(0e;++e){c=a[e];var f=q(c,3);if((0==f||0==b.search(o(c,3,f-1)))&&(f=new RegExp(o(c,1)),ea(f,b)))return c}return null}function P(a,b,c,d){var e=p(b,2),f=new RegExp(o(b,1)),g=p(b,5),h="";return 2==c&&null!=d&&0g;g++){d=c[g];var h=S(a,d);if(m(h,23)){if(0==e.search(o(h,23))){c=d;break a}}else if(-1!=R(e,h)){c=d;break a}}c=null}return c}function X(a){return a=Ha[a],null==a?"ZZ":a[0]}function Y(a,b){var c=S(a,b);if(null==c)throw"Invalid region code: "+b;return p(c,10)}function Z(a,b){return ea(a,b)?0:0==b.search(a)?3:2}function $(a){var b=eb,c=L(a);return a=p(a,1),a in Ha?(b=J(b,a,X(a)),b=o(b,1),b=p(b,3),Z(b,c)):1}function _(a,b){var c=a.toString();if(0==c.length||"0"==c.charAt(0))return 0;for(var d,e=c.length,f=1;3>=f&&e>=f;++f)if(d=parseInt(c.substring(0,f),10),d in Ha)return b.a(c.substring(f)),d;return 0}function aa(a,b,e,f,g){if(0==a.length)return 0;a=new c(a);var h;null!=b&&(h=o(b,11)),null==h&&(h="NonMatch");var i=a.toString();if(0==i.length)h=20;else if(Oa.test(i))i=i.replace(Oa,""),d(a),a.a(E(i)),h=1;else{if(i=new RegExp(h),F(a),h=a.toString(),0==h.search(i)){var i=h.match(i)[0].length,j=h.substring(i).match(Pa);j&&null!=j[1]&&0=a.b.length)throw"Phone number too short after IDD";if(e=_(a,e),0!=e)return r(g,1,e),e;throw"Invalid country calling code"}if(null!=b&&(h=p(b,10),i=""+h,j=a.toString(),0==j.lastIndexOf(i,0))){var k=new c(j.substring(i.length)),j=o(b,1),i=new RegExp(p(j,2));if(ba(k,b,null),b=k.toString(),j=p(j,3),!ea(i,a.toString())&&ea(i,b)||3==Z(j,a.toString()))return e.a(b),f&&r(g,6,10),r(g,1,h),h}return r(g,1,0),0}function ba(a,b,c){var d=a.toString(),e=d.length,f=o(b,15);if(0!=e&&null!=f&&0!=f.length&&(f=new RegExp("^(?:"+f+")"),e=f.exec(d))){var g,h=RegExp;g=o(b,1),g=p(g,2),h=new h(g),g=ea(h,d);var i=e.length-1;b=o(b,16),null==b||0==b.length||null==e[i]||0==e[i].length?(!g||ea(h,d.substring(e[0].length)))&&(null!=c&&i>0&&null!=e[i]&&c.a(e[1]),a.b=""+d.substring(e[0].length)):(d=d.replace(f,b),(!g||ea(h,d))&&(null!=c&&i>0&&c.a(e[1]),a.b=""+d))}}function ca(a,b){var c=eb;if(!H(b)&&00){var i=h+15;if("+"==b.charAt(i)){var j=b.indexOf(";",i);j>0?g.a(b.substring(i,j)):g.a(b.substring(i))}i=b.indexOf("tel:"),g.a(b.substring(i>=0?i+4:0,h))}else g.a(C(b));if(h=g.toString(),i=h.indexOf(";isub="),i>0&&(d(g),g.a(h.substring(0,i))),!D(g.toString()))throw"The string supplied did not seem to be a phone number";if(h=g.toString(),!(H(e)||null!=h&&0=0&&D(b.substring(0,i)))for(var j=b.match(Ua),k=j.length,l=1;k>l;++l)if(null!=j[l]&&0b.b.length)throw"The string supplied is too short to be a phone number";if(null!=i&&(a=new c,e=new c(b.toString()),ba(e,i,a),g=e.toString(),i=o(i,1),i=p(i,3),2!=Z(i,g)&&(b=e,f&&r(h,7,a.toString()))),f=b.toString(),a=f.length,2>a)throw"The string supplied is too short to be a phone number";if(a>17)throw"The string supplied is too long to be a phone number";if(1c;++c){var e=a.f[c],f=p(e,1);if(a.v==f)return!1;var g;g=a;var h=e,i=p(h,1);if(-1!=i.indexOf("|"))g=!1;else{i=i.replace(ab,"\\d"),i=i.replace(bb,"\\d"),d(g.m);var j;j=g;var h=p(h,2),k="999999999999999".match(i)[0];k.lengthf;++f){var g=a.f[f];0==q(g,3)?c.push(a.f[f]):(g=o(g,3,Math.min(d,q(g,3)-1)),0==b.search(g)&&c.push(a.f[f]))}a.f=c}function ja(a,b){a.i.a(b);var c=b;if(Pa.test(c)||1==a.i.b.length&&Na.test(c)){var e,c=b;"+"==c?(e=c,a.u.a(c)):(e=Ja[c],a.u.a(e),a.a.a(e)),b=e}else a.j=!1,a.ga=!0;if(!a.j){if(!a.ga)if(qa(a)){if(ra(a))return ka(a)}else if(0d;++d){var e=a.f[d],f=p(e,1);if(new RegExp("^(?:"+f+")$").test(b))return a.$=db.test(o(e,4)),b=b.replace(new RegExp(f,"g"),o(e,2)),ma(a,b)}return""}function ma(a,b){var c=a.b.b.length;return a.$&&c>0&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function na(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0e;++e){var f,g=c[e];(f=!m(a.g,12)||a.o||o(g,6))||(f=p(g,4),f=0==f.length||$a.test(f)),f&&(f=p(g,2),cb.test(f)&&a.f.push(g))}return ia(a,b),b=la(a),00){for(var d="",e=0;c>e;e++)d=sa(a,b.charAt(e));return a.j?ma(a,d):a.i.toString()}return a.b.toString()}function pa(a){var b,c=a.a.toString(),e=0;return 1!=o(a.g,10)?b=!1:(b=a.a.toString(),b="1"==b.charAt(0)&&"0"!=b.charAt(1)&&"1"!=b.charAt(1)),b?(e=1,a.b.a("1").a(" "),a.o=!0):m(a.g,15)&&(b=new RegExp("^(?:"+o(a.g,15)+")"),b=c.match(b),null!=b&&null!=b[0]&&0c?Math.max(0,a.length+c):c,"string"==typeof a)return"string"==typeof b&&1==b.length?a.indexOf(b,c):-1;for(;c=g?f=e:(d=d.substring(0,g),d=G(d,Ja),0==d.length?f=e:(i=i.clone(),s(i,4),d=[i],i=p(c,1),e=L(c),i in Ha?(f=J(f,i,X(i)),g="",g=O(d,e),null==g?g=e:(d=g.clone(),g=p(g,4),0f;++f)e=c,e.ea=ja(e,a.charAt(f)),e=e.ea;return e})}(),!function(a){a.module("cwill747.phonenumber",[]).directive("phoneNumber",["$log",function(a){function b(a){return a?a.replace(/([^0-9|+])/g,""):a}function c(b,c){var d=b;try{d=phoneUtils.formatAsTyped(b,c)}catch(e){a.debug(e)}return d}return{restrict:"A",require:"?ngModel",scope:{countryCode:"=",nonFormatted:"=?"},controllerAs:"",controller:function(){this.countryCode=this.countryCode||"us"},link:function(d,e,f,g){function h(a){return g.$isEmpty(a)?a:c(b(a),d.countryCode)}function i(a){if(g.$isEmpty(a))return d.nonFormatted="",a;var c=j(a);if(c===a)return a;var e=l.selectionStart,f=l.selectionEnd+c.length-a.length;return a.lengthc.length+1&&(e-=c.length-a.length),g.$setViewValue(c),g.$render(),l.setSelectionRange(e,f),b(c)}function j(a){var e=b(a);d.nonFormatted=e;var f="";return f=e&&e.length>1?c(e,d.countryCode):e,f.trim()}function k(b){var c=!1;try{c=phoneUtils.isValidNumberForRegion(b,d.countryCode)}catch(e){a.debug(e)}var f=g.$isEmpty(b)||c;return g.$setValidity("phoneNumber",f),b}var l=e[0];d.$watch("countryCode",function(){g.$modelValue=g.$viewValue+" "}),g.$formatters.push(h),g.$formatters.push(k),g.$parsers.push(i),g.$parsers.push(k)}}}])}(angular); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css new file mode 100644 index 0000000..61d7d29 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/main.88dcea2c.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;cursor:pointer;text-decoration:none}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;background-color:#d6d6d6;padding:0}*,a :focus{outline:0}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{background-color:#FFF}.app-body{display:none}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.marginless-listgroup{margin-bottom:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px;box-sizing:content-box}.channel-list-container,.text-list-container{padding-left:5px;padding-right:5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.channel-list-container{height:40px;line-height:40px}.left-aligned-list-value-label{float:left;height:100%;text-align:left}.mp-version,.right-aligned-list-value-label{float:right}.mp-version,.poweredByMOLPay{height:20px}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.credit-disclaimer{padding:5px;font-weight:200;color:#595959;font-size:small}.close-button,.proceed-button{color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.proceed-button{background-color:#72529b;font-size:larger;border-radius:4px}button[disabled],html input[disabled]{opacity:.4;-moz-opacity:.4;background-color:gray}.close-button{background-color:#72529b;border-radius:4px}.molpay-disclaimer-container{padding:15px}.mp-version{color:#818285;font-size:8px;display:table;font-weight:700}.mp-version span{display:table-cell;vertical-align:bottom}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.new-credit-card-switch,.new-credit-card-switch .knob,.new-credit-card-switch span{height:28px;min-height:28px}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);min-height:480px;min-height:80vw;overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);min-height:480px;min-height:80vw;overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px;min-height:44px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b;min-height:28px;height:28px}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0;min-height:28px;height:28px}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}}.list-group-item-sandboxed{background-color:#ddd;padding:5px}.list-group-item-sandboxed a,.list-group-item-sandboxed input,.list-group-item-sandboxed span{padding:5px;float:left;color:#000;font-size:14px}.list-group-item-sandboxed input{max-width:40%}.btn-group-sandboxed{float:right}.btn-group-sandboxed label{color:#595959;background-color:#fff;border-color:#ddd}.btn-group-sandboxed .btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#72529b;border-color:#72529b} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..d609f8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,117 @@ +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + hide: function (eventname) { + exec(null, null, "InAppBrowser", "hide", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/test/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/test/tests.js new file mode 100644 index 0000000..09a1793 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/test/tests.js @@ -0,0 +1,64 @@ +cordova.define("cordova-plugin-x-toast.tests", function(require, exports, module) { +exports.defineAutoTests = function() { + + var fail = function (done) { + expect(true).toBe(false); + done(); + }, + succeed = function (done) { + expect(true).toBe(true); + done(); + }; + + describe('Plugin availability', function () { + it("window.plugins.toast should exist", function() { + expect(window.plugins.toast).toBeDefined(); + }); + }); + + describe('API functions', function () { + it("should define show", function() { + expect(window.plugins.toast.show).toBeDefined(); + }); + + it("should define showWithOptions", function() { + expect(window.plugins.toast.showWithOptions).toBeDefined(); + }); + + it("should define optionsBuilder", function() { + expect(window.plugins.toast.optionsBuilder).toBeDefined(); + }); + + it("should define showShortTop", function() { + expect(window.plugins.toast.showShortTop).toBeDefined(); + }); + + it("should define showShortCenter", function() { + expect(window.plugins.toast.showShortCenter).toBeDefined(); + }); + + it("should define showShortBottom", function() { + expect(window.plugins.toast.showShortBottom).toBeDefined(); + }); + + it("should define showLongTop", function() { + expect(window.plugins.toast.showLongTop).toBeDefined(); + }); + + it("should define showLongCenter", function() { + expect(window.plugins.toast.showLongCenter).toBeDefined(); + }); + + it("should define showLongBottom", function() { + expect(window.plugins.toast.showLongBottom).toBeDefined(); + }); + }); + + describe('Invalid usage', function () { + it("should fail due to an invalid position", function(done) { + window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); + }); + }); +}; + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js new file mode 100644 index 0000000..685c677 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-plugin-x-toast/www/Toast.js @@ -0,0 +1,101 @@ +cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { +function Toast() { +} + +Toast.prototype.optionsBuilder = function () { + + // defaults + var message = null; + var duration = "short"; + var position = "center"; + var addPixelsY = 0; + + return { + withMessage: function(m) { + message = m.toString(); + return this; + }, + + withDuration: function(d) { + duration = d.toString(); + return this; + }, + + withPosition: function(p) { + position = p; + return this; + }, + + withAddPixelsY: function(y) { + addPixelsY = y; + return this; + }, + + build: function() { + return { + message: message, + duration: duration, + position: position, + addPixelsY: addPixelsY + }; + } + }; +}; + + +Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { + options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); + options.message = options.message.toString(); + cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); +}; + +Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { + this.showWithOptions( + this.optionsBuilder() + .withMessage(message) + .withDuration(duration) + .withPosition(position) + .build(), + successCallback, + errorCallback); +}; + +Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { + this.show(message, "short", "top", successCallback, errorCallback); +}; + +Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { + this.show(message, "short", "center", successCallback, errorCallback); +}; + +Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { + this.show(message, "short", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { + this.show(message, "long", "top", successCallback, errorCallback); +}; + +Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { + this.show(message, "long", "center", successCallback, errorCallback); +}; + +Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { + this.show(message, "long", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.hide = function (successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, "Toast", "hide", []); +}; + +Toast.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.toast = new Toast(); + return window.plugins.toast; +}; + +cordova.addConstructor(Toast.install); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js new file mode 100644 index 0000000..7596c6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/cordova-save-image-gallery/www/saveImageGallery.js @@ -0,0 +1,183 @@ +cordova.define("cordova-save-image-gallery.saveImageGallery", function(require, exports, module) { +/** + * @file saveImageGallery PhoneGap/Cordova plugin + * @author Alejandro Gómez + * @author Tommy-Carlos Williams + * @author Simba Zhang + * @author StefanoMagrassi + * @copyright Alejandro Gómez - 2016. All rights reserved. + * @license MIT + */ + +var exec = require('cordova/exec'); + +// Consts +var SERVICE = 'SaveImageGallery'; +var SAVE_BASE64_IMAGE_ACTION = 'saveImageDataToLibrary'; +var REMOVE_IMAGE_ACTION = 'removeImageFromLibrary'; +var DEFAULTS = {prefix: 'img_', mediaScanner: true, format: 'JPG', quality: 100}; + + +var ImageSaver = function () { + +}; + + +/** + * Constants. + */ +ImageSaver.FORMAT_JPG = 'jpg'; +ImageSaver.FORMAT_PNG = 'png'; + +/** + * Saves base64 data as image. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Base64 img. + * prefix: String + * format: 'JPG' or 'PNG' - defaults to 'JPG' + * mediaScanner: BOOLEAN. If true, the image will be created in the temporal directory. Otherwise the image will + * be created in the photo album. - defaults to true + * quality: FLOAT (from 0 to 100). - defaults to 100 + * @param {function} [success] + * @param {function} [fail] + * @return The path of the file. + */ + +ImageSaver.prototype.saveBase64Image = function (options, success, fail) { + var actionArgs = prepareSaveBase64Args(options); + + return exec(ok(success), error(fail), SERVICE, SAVE_BASE64_IMAGE_ACTION, actionArgs); +}; + +/** + * Remove an image from a given path. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Image location. + * @param {function} [success] + * @param {function} [fail] + * @return + */ + +ImageSaver.prototype.removeImage = function (options, success, fail) { + var actionArgs = prepareRemoveImageArgs(options); + + return exec(ok(success), error(fail), SERVICE, REMOVE_IMAGE_ACTION, actionArgs); +}; + +/** + * Gets success callback if it is defined and not null. + * Otherwise returns a simple console.log. + * @private + * @param {[function|undefined|null]} success + * @return {function} + */ +function ok(success) { + if (typeof success !== 'function') { + return console.log; + } + + return success; +} + +/** + * Gets fail callback if it is defined and not null. + * Otherwise returns a simple console.error. + * @private + * @param {[function|undefined|null]} fail + * @return {function} + */ +function error(fail) { + if (typeof fail !== 'function') { + return console.error; + } + + return fail; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [filePath] + */ +function prepareRemoveImageArgs(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace('file://', '').replace('file:/', '/'); + args.push(options.data); + + return args; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [base64String, filePrefix, mediaScannerEnabled, format, quality] + */ +function prepareSaveBase64Args(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace(/data:image\/png;base64,/, '').replace(/data:image\/jpeg;base64,/, '').replace( + /data:image\/jpg;base64,/, ''); + args.push(options.data); + + // preparing prefix + if (!options.prefix) { + options.prefix = DEFAULTS.prefix; + } + args.push(options.prefix); + + // preparing mediaScanner + if (options.mediaScanner === undefined || options.mediaScanner === null) { + options.mediaScanner = DEFAULTS.mediaScanner; + } + args.push(options.mediaScanner); + + // preparing format + if (!options.format) { + options.format = DEFAULTS.format; + } + args.push(options.format); + + // preparing quality + if (!options.quality || (!isNaN(options.quality) && options.quality <= 0)) { + options.quality = DEFAULTS.quality; + } + args.push(options.quality); + + return args; +} + + +window.ImageSaver = ImageSaver; +window.imageSaver = new ImageSaver(); +module.exports = new ImageSaver(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..59d3f90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/platform_www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,3 @@ +cordova.define("molpay-mobile-xdk-cordova.MOLPay", function(require, exports, module) { +function MOLPay(){window.open=cordova.InAppBrowser.open}Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var a=this.length-1;a>=0;a--)this[a]&&this[a].parentElement&&this[a].parentElement.removeChild(this[a])};var isInternalDebugging=!1,moduleId="molpay-mobile-xdk-cordova",wrapperVersion="0",molpaySdkUrl="molpay-mobile-xdk-www/index.html",mpopenmolpaywindow="mpopenmolpaywindow://",mptransactionresults="mptransactionresults://",mprunscriptonpopup="mprunscriptonpopup://",mpcloseallwindows="mpcloseallwindows://",mppinstructioncapture="mppinstructioncapture://",molpayresulturl="MOLPay/result.php",molpaynbepayurl="MOLPay/nbepay.php",b4results='"msgType":"B4"',c6results='"msgType":"C6"',molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!1,hideFrame=function(a){a.style.visibility="hidden",a.style.position="absolute",a.style.width="0px",a.style.height="0px"},showFrame=function(a){a.style.visibility="visible",a.style.position="absolute",a.style.width="100%",a.style.height="100%"},postMolpayResultHandler=function(a){var b=a;if(b){var c=new RegExp(""),h=d.match(e);if(d&&h&&f.exec(d)&&g.exec(d))for(var i=h.length-1;i>=0;i--)b=f.exec(d).index,c=g.exec(d).index,d=d.substring(0,b)+""+d.substring(c+1);return d};b=e(b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(g=JSON.parse(b))){var h=g.tranID;h&&mainUiFrame.contentWindow.transactionRequestWithTransactionId(h)}}},createBankUiWindow=function(a){var b="data:text/html;base64,"+a;bankUiWindow=window.open(b,"_blank","location=no,hardwareback=no,disallowoverscroll=yes,toolbarposition=top,transitionstyle=crossdissolve");var c=function(a){mainUiFrame.contentWindow.transactionRequest(),bankUiWindow.removeEventListener("exit",c)};bankUiWindow.addEventListener("exit",c);var d=function(a){var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){var b;if(mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url}),b=new RegExp(molpaynbepayurl),a&&b.test(a.url))var c=10,d=0,f=setInterval(function(){g()},1e3),g=function(){d++,d>c?clearInterval(f):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0],c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){function b(){window.plugins.toast.showWithOptions({message:"Image saved success!",duration:1e3,position:"bottom"})}function c(){window.plugins.toast.showWithOptions({message:"Image saved fail!",duration:1e3,position:"bottom"})}function d(){var a=cordova.plugins.permissions;c();var b=function(){c()};a.requestPermission(a.WRITE_EXTERNAL_STORAGE,function(a){a.hasPermission?k():b()},b)}var e,f;if(a&&a.indexOf(mpopenmolpaywindow)>-1)f=new RegExp(mpopenmolpaywindow,"g"),e=a.replace(f,""),e&&e.length>0&&createBankUiWindow(e);else if(a&&a.indexOf(mpcloseallwindows)>-1)bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1){if(f=new RegExp(mptransactionresults,"g"),e=a.replace(f,""),e&&e.length>0){var g=window.atob(e),h=JSON.stringify(JSON.parse(g));transactionResultCallback(h),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}}else if(a&&a.indexOf(mppinstructioncapture)>-1){f=new RegExp(mppinstructioncapture,"g"),e=a.replace(f,"");var i=JSON.parse(atob(e)),j={data:i.base64ImageUrlData,prefix:i.filename,format:"PNG",quality:100,mediaScanner:!0};window.imageSaver.saveBase64Image(j,function(a){b()},d);var k=function(){window.imageSaver.saveBase64Image(j,function(a){b()},function(a){c()})}}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(f=new RegExp(mprunscriptonpopup,"g"),e=a.replace(f,""),e&&e.length>0)){var l=window.atob(e);bankUiWindow.executeScript({code:l},function(a){})}},testCredentialsCallback=function(a,b){testMerchantCredentialsCallback(a,b),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayChannelRequestFrame&&molpayChannelRequestFrame.remove()},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isClosingMolpay=!1;try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayDiv=document.getElementById("molpay"),molpayDiv.style.width="100%",molpayDiv.style.padding="0px",molpayDiv.style.border="0px",mainUiFrame=document.createElement("iframe");var d=function(a){mainUiFrame.contentWindow.updateSdkData(JSON.stringify(molpayPaymentDetails),inAppCallback),mainUiFrame.removeEventListener("load",d)};mainUiFrame.style.border="0px",mainUiFrame.style.padding="0px",mainUiFrame.style.width="100%",mainUiFrame.style.height="100%",mainUiFrame.id="mainUiFrame",mainUiFrame.allowScriptAccess="always",mainUiFrame.setAttribute("src",molpaySdkUrl),molpayDiv.appendChild(mainUiFrame),mainUiFrame.addEventListener("load",d)},MOLPay.prototype.transactionRequest=function(a,b){try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayTransactionRequestFrame=document.createElement("iframe");var d=function(a){molpayTransactionRequestFrame.contentWindow.updateSdkData(molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame.removeEventListener("load",d)};molpayTransactionRequestFrame.id="molpayTransactionRequestFrame",molpayTransactionRequestFrame.allowScriptAccess="always",molpayTransactionRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document.body.appendChild(molpayTransactionRequestFrame),molpayTransactionRequestFrame.addEventListener("load",d)},MOLPay.prototype.closeMolpay=function(){mainUiFrame.contentWindow.closemolpay()},MOLPay.prototype.testMerchantCredentials=function(a,b){b&&(testMerchantCredentialsCallback=b),molpayChannelRequestFrame=document.createElement("iframe");var c=function(b){molpayChannelRequestFrame.contentWindow.testMerchantCredentials(a,testCredentialsCallback),molpayChannelRequestFrame.removeEventListener("load",c)};molpayChannelRequestFrame.allowScriptAccess="always",molpayChannelRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayChannelRequestFrame),document.body.appendChild(molpayChannelRequestFrame),molpayChannelRequestFrame.addEventListener("load",c)};var molpay=new MOLPay;module.exports=molpay; +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-debug.xcconfig b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-debug.xcconfig new file mode 100644 index 0000000..12c7065 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-debug.xcconfig @@ -0,0 +1,20 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +// DO NOT MODIFY -- auto-generated by Apache Cordova diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-release.xcconfig b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-release.xcconfig new file mode 100644 index 0000000..12e2b13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/pods-release.xcconfig @@ -0,0 +1,20 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +// DO NOT MODIFY -- auto-generated by Apache Cordova \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/exec.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/exec.js new file mode 100644 index 0000000..3fb7fa1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/exec.js @@ -0,0 +1,262 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/*global require, module, atob, document */ + +/** + * Creates a gap bridge iframe used to notify the native code about queued + * commands. + */ +var cordova = require('cordova'), + utils = require('cordova/utils'), + base64 = require('cordova/base64'), + execIframe, + commandQueue = [], // Contains pending JS->Native messages. + isInContextOfEvalJs = 0, + failSafeTimerId = 0; + +function massageArgsJsToNative(args) { + if (!args || utils.typeName(args) != 'Array') { + return args; + } + var ret = []; + args.forEach(function(arg, i) { + if (utils.typeName(arg) == 'ArrayBuffer') { + ret.push({ + 'CDVType': 'ArrayBuffer', + 'data': base64.fromArrayBuffer(arg) + }); + } else { + ret.push(arg); + } + }); + return ret; +} + +function massageMessageNativeToJs(message) { + if (message.CDVType == 'ArrayBuffer') { + var stringToArrayBuffer = function(str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function(b64) { + return stringToArrayBuffer(atob(b64)); + }; + message = base64ToArrayBuffer(message.data); + } + return message; +} + +function convertMessageToArgsNativeToJs(message) { + var args = []; + if (!message || !message.hasOwnProperty('CDVType')) { + args.push(message); + } else if (message.CDVType == 'MultiPart') { + message.messages.forEach(function(e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; +} + +function iOSExec() { + + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);' + ); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = + {success:successCallback, fail:failCallback}; + } + + actionArgs = massageArgsJsToNative(actionArgs); + + var command = [callbackId, service, action, actionArgs]; + + // Stringify and queue the command. We stringify to command now to + // effectively clone the command arguments in case they are mutated before + // the command is executed. + commandQueue.push(JSON.stringify(command)); + + // If we're in the context of a stringByEvaluatingJavaScriptFromString call, + // then the queue will be flushed when it returns; no need for a poke. + // Also, if there is already a command in the queue, then we've already + // poked the native side, so there is no reason to do so again. + if (!isInContextOfEvalJs && commandQueue.length == 1) { + pokeNative(); + } +} + +// CB-10530 +function proxyChanged() { + var cexec = cordovaExec(); + + return (execProxy !== cexec && // proxy objects are different + iOSExec !== cexec // proxy object is not the current iOSExec + ); +} + +// CB-10106 +function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while(commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); + + commandString = commandQueue.shift(); + }; + return true; + } + + return false; +} + +function pokeNative() { + // CB-5488 - Don't attempt to create iframe before document.body is available. + if (!document.body) { + setTimeout(pokeNative); + return; + } + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; + } else { + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); + } + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function() { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } + } + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). +} + +iOSExec.nativeFetchMessages = function() { + // Stop listing for window detatch once native side confirms poke. + if (failSafeTimerId) { + clearTimeout(failSafeTimerId); + failSafeTimerId = 0; + } + // Each entry in commandQueue is a JSON string already. + if (!commandQueue.length) { + return ''; + } + var json = '[' + commandQueue.join(',') + ']'; + commandQueue.length = 0; + return json; +}; + +iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) { + return iOSExec.nativeEvalAndFetch(function() { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + function nc2() { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + } + setTimeout(nc2, 0); + }); +}; + +iOSExec.nativeEvalAndFetch = function(func) { + // This shouldn't be nested, but better to be safe. + isInContextOfEvalJs++; + try { + func(); + return iOSExec.nativeFetchMessages(); + } finally { + isInContextOfEvalJs--; + } +}; + +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec)? cexec : iOSExec; +} + +function execProxy() { + cordovaExec().apply(null, arguments); +}; + +execProxy.nativeFetchMessages = function() { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function() { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function() { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/platform.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/platform.js new file mode 100644 index 0000000..36529ba --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova-js-src/platform.js @@ -0,0 +1,28 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +module.exports = { + id: 'ios', + bootstrap: function() { + require('cordova/channel').onNativeReady.fire(); + } +}; + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova.js new file mode 100644 index 0000000..29be909 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova.js @@ -0,0 +1,1938 @@ +// Platform: ios +// a3732cb71d9b1dd590338e8cf44196f366d46da3 +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +;(function() { +var PLATFORM_VERSION_BUILD_LABEL = '4.3.1'; +// file: src/scripts/require.js + +/*jshint -W079 */ +/*jshint -W020 */ + +var require, + define; + +(function () { + var modules = {}, + // Stack of moduleIds currently being built. + requireStack = [], + // Map of module ID -> index into requireStack of modules currently being built. + inProgressModules = {}, + SEPARATOR = "."; + + + + function build(module) { + var factory = module.factory, + localRequire = function (id) { + var resultantId = id; + //Its a relative path, so lop off the last portion and add the id (minus "./") + if (id.charAt(0) === ".") { + resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2); + } + return require(resultantId); + }; + module.exports = {}; + delete module.factory; + factory(localRequire, module.exports, module); + return module.exports; + } + + require = function (id) { + if (!modules[id]) { + throw "module " + id + " not found"; + } else if (id in inProgressModules) { + var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; + throw "Cycle in require graph: " + cycle; + } + if (modules[id].factory) { + try { + inProgressModules[id] = requireStack.length; + requireStack.push(id); + return build(modules[id]); + } finally { + delete inProgressModules[id]; + requireStack.pop(); + } + } + return modules[id].exports; + }; + + define = function (id, factory) { + if (modules[id]) { + throw "module " + id + " already defined"; + } + + modules[id] = { + id: id, + factory: factory + }; + }; + + define.remove = function (id) { + delete modules[id]; + }; + + define.moduleMap = modules; +})(); + +//Export for use in node +if (typeof module === "object" && typeof require === "function") { + module.exports.require = require; + module.exports.define = define; +} + +// file: src/cordova.js +define("cordova", function(require, exports, module) { + +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error("cordova already defined"); +} + + +var channel = require('cordova/channel'); +var platform = require('cordova/platform'); + + +/** + * Intercept calls to addEventListener + removeEventListener and handle deviceready, + * resume, and pause events. + */ +var m_document_addEventListener = document.addEventListener; +var m_document_removeEventListener = document.removeEventListener; +var m_window_addEventListener = window.addEventListener; +var m_window_removeEventListener = window.removeEventListener; + +/** + * Houses custom event handlers to intercept on document + window event listeners. + */ +var documentEventHandlers = {}, + windowEventHandlers = {}; + +document.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof documentEventHandlers[e] != 'undefined') { + documentEventHandlers[e].subscribe(handler); + } else { + m_document_addEventListener.call(document, evt, handler, capture); + } +}; + +window.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof windowEventHandlers[e] != 'undefined') { + windowEventHandlers[e].subscribe(handler); + } else { + m_window_addEventListener.call(window, evt, handler, capture); + } +}; + +document.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof documentEventHandlers[e] != "undefined") { + documentEventHandlers[e].unsubscribe(handler); + } else { + m_document_removeEventListener.call(document, evt, handler, capture); + } +}; + +window.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof windowEventHandlers[e] != "undefined") { + windowEventHandlers[e].unsubscribe(handler); + } else { + m_window_removeEventListener.call(window, evt, handler, capture); + } +}; + +function createEvent(type, data) { + var event = document.createEvent('Events'); + event.initEvent(type, false, false); + if (data) { + for (var i in data) { + if (data.hasOwnProperty(i)) { + event[i] = data[i]; + } + } + } + return event; +} + + +var cordova = { + define:define, + require:require, + version:PLATFORM_VERSION_BUILD_LABEL, + platformVersion:PLATFORM_VERSION_BUILD_LABEL, + platformId:platform.id, + /** + * Methods to add/remove your own addEventListener hijacking on document + window. + */ + addWindowEventHandler:function(event) { + return (windowEventHandlers[event] = channel.create(event)); + }, + addStickyDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.createSticky(event)); + }, + addDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.create(event)); + }, + removeWindowEventHandler:function(event) { + delete windowEventHandlers[event]; + }, + removeDocumentEventHandler:function(event) { + delete documentEventHandlers[event]; + }, + /** + * Retrieve original event handlers that were replaced by Cordova + * + * @return object + */ + getOriginalHandlers: function() { + return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener}, + 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}}; + }, + /** + * Method to fire event from native code + * bNoDetach is required for events which cause an exception which needs to be caught in native code + */ + fireDocumentEvent: function(type, data, bNoDetach) { + var evt = createEvent(type, data); + if (typeof documentEventHandlers[type] != 'undefined') { + if( bNoDetach ) { + documentEventHandlers[type].fire(evt); + } + else { + setTimeout(function() { + // Fire deviceready on listeners that were registered before cordova.js was loaded. + if (type == 'deviceready') { + document.dispatchEvent(evt); + } + documentEventHandlers[type].fire(evt); + }, 0); + } + } else { + document.dispatchEvent(evt); + } + }, + fireWindowEvent: function(type, data) { + var evt = createEvent(type,data); + if (typeof windowEventHandlers[type] != 'undefined') { + setTimeout(function() { + windowEventHandlers[type].fire(evt); + }, 0); + } else { + window.dispatchEvent(evt); + } + }, + + /** + * Plugin callback mechanism. + */ + // Randomize the starting callbackId to avoid collisions after refreshing or navigating. + // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. + callbackId: Math.floor(Math.random() * 2000000000), + callbacks: {}, + callbackStatus: { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9 + }, + + /** + * Called by native code when returning successful result from an action. + */ + callbackSuccess: function(callbackId, args) { + cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning error result from an action. + */ + callbackError: function(callbackId, args) { + // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. + // Derive success from status. + cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning the result from an action. + */ + callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) { + try { + var callback = cordova.callbacks[callbackId]; + if (callback) { + if (isSuccess && status == cordova.callbackStatus.OK) { + callback.success && callback.success.apply(null, args); + } else if (!isSuccess) { + callback.fail && callback.fail.apply(null, args); + } + /* + else + Note, this case is intentionally not caught. + this can happen if isSuccess is true, but callbackStatus is NO_RESULT + which is used to remove a callback from the list without calling the callbacks + typically keepCallback is false in this case + */ + // Clear callback if not expecting any more results + if (!keepCallback) { + delete cordova.callbacks[callbackId]; + } + } + } + catch (err) { + var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err; + console && console.log && console.log(msg); + cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg }); + throw err; + } + }, + addConstructor: function(func) { + channel.onCordovaReady.subscribe(function() { + try { + func(); + } catch(e) { + console.log("Failed to run constructor: " + e); + } + }); + } +}; + + +module.exports = cordova; + +}); + +// file: src/common/argscheck.js +define("cordova/argscheck", function(require, exports, module) { + +var utils = require('cordova/utils'); + +var moduleExports = module.exports; + +var typeMap = { + 'A': 'Array', + 'D': 'Date', + 'N': 'Number', + 'S': 'String', + 'F': 'Function', + 'O': 'Object' +}; + +function extractParamName(callee, argIndex) { + return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex]; +} + +function checkArgs(spec, functionName, args, opt_callee) { + if (!moduleExports.enableChecks) { + return; + } + var errMsg = null; + var typeName; + for (var i = 0; i < spec.length; ++i) { + var c = spec.charAt(i), + cUpper = c.toUpperCase(), + arg = args[i]; + // Asterix means allow anything. + if (c == '*') { + continue; + } + typeName = utils.typeName(arg); + if ((arg === null || arg === undefined) && c == cUpper) { + continue; + } + if (typeName != typeMap[cUpper]) { + errMsg = 'Expected ' + typeMap[cUpper]; + break; + } + } + if (errMsg) { + errMsg += ', but got ' + typeName + '.'; + errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; + // Don't log when running unit tests. + if (typeof jasmine == 'undefined') { + console.error(errMsg); + } + throw TypeError(errMsg); + } +} + +function getValue(value, defaultValue) { + return value === undefined ? defaultValue : value; +} + +moduleExports.checkArgs = checkArgs; +moduleExports.getValue = getValue; +moduleExports.enableChecks = true; + + +}); + +// file: src/common/base64.js +define("cordova/base64", function(require, exports, module) { + +var base64 = exports; + +base64.fromArrayBuffer = function(arrayBuffer) { + var array = new Uint8Array(arrayBuffer); + return uint8ToBase64(array); +}; + +base64.toArrayBuffer = function(str) { + var decodedStr = typeof atob != 'undefined' ? atob(str) : new Buffer(str,'base64').toString('binary'); + var arrayBuffer = new ArrayBuffer(decodedStr.length); + var array = new Uint8Array(arrayBuffer); + for (var i=0, len=decodedStr.length; i < len; i++) { + array[i] = decodedStr.charCodeAt(i); + } + return arrayBuffer; +}; + +//------------------------------------------------------------------------------ + +/* This code is based on the performance tests at http://jsperf.com/b64tests + * This 12-bit-at-a-time algorithm was the best performing version on all + * platforms tested. + */ + +var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var b64_12bit; + +var b64_12bitTable = function() { + b64_12bit = []; + for (var i=0; i<64; i++) { + for (var j=0; j<64; j++) { + b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j]; + } + } + b64_12bitTable = function() { return b64_12bit; }; + return b64_12bit; +}; + +function uint8ToBase64(rawData) { + var numBytes = rawData.byteLength; + var output=""; + var segment; + var table = b64_12bitTable(); + for (var i=0;i> 12]; + output += table[segment & 0xfff]; + } + if (numBytes - i == 2) { + segment = (rawData[i] << 16) + (rawData[i+1] << 8); + output += table[segment >> 12]; + output += b64_6bit[(segment & 0xfff) >> 6]; + output += '='; + } else if (numBytes - i == 1) { + segment = (rawData[i] << 16); + output += table[segment >> 12]; + output += '=='; + } + return output; +} + +}); + +// file: src/common/builder.js +define("cordova/builder", function(require, exports, module) { + +var utils = require('cordova/utils'); + +function each(objects, func, context) { + for (var prop in objects) { + if (objects.hasOwnProperty(prop)) { + func.apply(context, [objects[prop], prop]); + } + } +} + +function clobber(obj, key, value) { + exports.replaceHookForTesting(obj, key); + var needsProperty = false; + try { + obj[key] = value; + } catch (e) { + needsProperty = true; + } + // Getters can only be overridden by getters. + if (needsProperty || obj[key] !== value) { + utils.defineGetter(obj, key, function() { + return value; + }); + } +} + +function assignOrWrapInDeprecateGetter(obj, key, value, message) { + if (message) { + utils.defineGetter(obj, key, function() { + console.log(message); + delete obj[key]; + clobber(obj, key, value); + return value; + }); + } else { + clobber(obj, key, value); + } +} + +function include(parent, objects, clobber, merge) { + each(objects, function (obj, key) { + try { + var result = obj.path ? require(obj.path) : {}; + + if (clobber) { + // Clobber if it doesn't exist. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else if (typeof obj.path !== 'undefined') { + // If merging, merge properties onto parent, otherwise, clobber. + if (merge) { + recursiveMerge(parent[key], result); + } else { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } + } + result = parent[key]; + } else { + // Overwrite if not currently defined. + if (typeof parent[key] == 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else { + // Set result to what already exists, so we can build children into it if they exist. + result = parent[key]; + } + } + + if (obj.children) { + include(result, obj.children, clobber, merge); + } + } catch(e) { + utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); + } + }); +} + +/** + * Merge properties from one object onto another recursively. Properties from + * the src object will overwrite existing target property. + * + * @param target Object to merge properties into. + * @param src Object to merge properties from. + */ +function recursiveMerge(target, src) { + for (var prop in src) { + if (src.hasOwnProperty(prop)) { + if (target.prototype && target.prototype.constructor === target) { + // If the target object is a constructor override off prototype. + clobber(target.prototype, prop, src[prop]); + } else { + if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { + recursiveMerge(target[prop], src[prop]); + } else { + clobber(target, prop, src[prop]); + } + } + } + } +} + +exports.buildIntoButDoNotClobber = function(objects, target) { + include(target, objects, false, false); +}; +exports.buildIntoAndClobber = function(objects, target) { + include(target, objects, true, false); +}; +exports.buildIntoAndMerge = function(objects, target) { + include(target, objects, true, true); +}; +exports.recursiveMerge = recursiveMerge; +exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; +exports.replaceHookForTesting = function() {}; + +}); + +// file: src/common/channel.js +define("cordova/channel", function(require, exports, module) { + +var utils = require('cordova/utils'), + nextGuid = 1; + +/** + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization, as well as for custom events thereafter. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. + * onNativeReady* Internal event that indicates the Cordova native side is ready. + * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. + * onDeviceReady* User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * + * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. + * All listeners that subscribe after the event is fired will be executed right away. + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + +/** + * Channel + * @constructor + * @param type String the channel name + */ +var Channel = function(type, sticky) { + this.type = type; + // Map of guid -> function. + this.handlers = {}; + // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. + this.state = sticky ? 1 : 0; + // Used in sticky mode to remember args passed to fire(). + this.fireArgs = null; + // Used by onHasSubscribersChange to know if there are any listeners. + this.numHandlers = 0; + // Function that is called when the first listener is subscribed, or when + // the last listener is unsubscribed. + this.onHasSubscribersChange = null; +}, + channel = { + /** + * Calls the provided function only after all of the channels specified + * have been fired. All channels must be sticky channels. + */ + join: function(h, c) { + var len = c.length, + i = len, + f = function() { + if (!(--i)) h(); + }; + for (var j=0; jNative messages. + isInContextOfEvalJs = 0, + failSafeTimerId = 0; + +function massageArgsJsToNative(args) { + if (!args || utils.typeName(args) != 'Array') { + return args; + } + var ret = []; + args.forEach(function(arg, i) { + if (utils.typeName(arg) == 'ArrayBuffer') { + ret.push({ + 'CDVType': 'ArrayBuffer', + 'data': base64.fromArrayBuffer(arg) + }); + } else { + ret.push(arg); + } + }); + return ret; +} + +function massageMessageNativeToJs(message) { + if (message.CDVType == 'ArrayBuffer') { + var stringToArrayBuffer = function(str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function(b64) { + return stringToArrayBuffer(atob(b64)); + }; + message = base64ToArrayBuffer(message.data); + } + return message; +} + +function convertMessageToArgsNativeToJs(message) { + var args = []; + if (!message || !message.hasOwnProperty('CDVType')) { + args.push(message); + } else if (message.CDVType == 'MultiPart') { + message.messages.forEach(function(e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; +} + +function iOSExec() { + + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);' + ); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = + {success:successCallback, fail:failCallback}; + } + + actionArgs = massageArgsJsToNative(actionArgs); + + var command = [callbackId, service, action, actionArgs]; + + // Stringify and queue the command. We stringify to command now to + // effectively clone the command arguments in case they are mutated before + // the command is executed. + commandQueue.push(JSON.stringify(command)); + + // If we're in the context of a stringByEvaluatingJavaScriptFromString call, + // then the queue will be flushed when it returns; no need for a poke. + // Also, if there is already a command in the queue, then we've already + // poked the native side, so there is no reason to do so again. + if (!isInContextOfEvalJs && commandQueue.length == 1) { + pokeNative(); + } +} + +// CB-10530 +function proxyChanged() { + var cexec = cordovaExec(); + + return (execProxy !== cexec && // proxy objects are different + iOSExec !== cexec // proxy object is not the current iOSExec + ); +} + +// CB-10106 +function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while(commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); + + commandString = commandQueue.shift(); + }; + return true; + } + + return false; +} + +function pokeNative() { + // CB-5488 - Don't attempt to create iframe before document.body is available. + if (!document.body) { + setTimeout(pokeNative); + return; + } + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; + } else { + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); + } + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function() { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } + } + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). +} + +iOSExec.nativeFetchMessages = function() { + // Stop listing for window detatch once native side confirms poke. + if (failSafeTimerId) { + clearTimeout(failSafeTimerId); + failSafeTimerId = 0; + } + // Each entry in commandQueue is a JSON string already. + if (!commandQueue.length) { + return ''; + } + var json = '[' + commandQueue.join(',') + ']'; + commandQueue.length = 0; + return json; +}; + +iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) { + return iOSExec.nativeEvalAndFetch(function() { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + function nc2() { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + } + setTimeout(nc2, 0); + }); +}; + +iOSExec.nativeEvalAndFetch = function(func) { + // This shouldn't be nested, but better to be safe. + isInContextOfEvalJs++; + try { + func(); + return iOSExec.nativeFetchMessages(); + } finally { + isInContextOfEvalJs--; + } +}; + +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec)? cexec : iOSExec; +} + +function execProxy() { + cordovaExec().apply(null, arguments); +}; + +execProxy.nativeFetchMessages = function() { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function() { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function() { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; + +}); + +// file: src/common/exec/proxy.js +define("cordova/exec/proxy", function(require, exports, module) { + + +// internal map of proxy function +var CommandProxyMap = {}; + +module.exports = { + + // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); + add:function(id,proxyObj) { + console.log("adding proxy for " + id); + CommandProxyMap[id] = proxyObj; + return proxyObj; + }, + + // cordova.commandProxy.remove("Accelerometer"); + remove:function(id) { + var proxy = CommandProxyMap[id]; + delete CommandProxyMap[id]; + CommandProxyMap[id] = null; + return proxy; + }, + + get:function(service,action) { + return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null ); + } +}; +}); + +// file: src/common/init.js +define("cordova/init", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; +} + +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} + +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +modulemapper.clobbers('cordova', 'cordova'); +modulemapper.clobbers('cordova/exec', 'cordova.exec'); +modulemapper.clobbers('cordova/exec', 'Cordova.exec'); + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + +}, platformInitChannelsArray); + + +}); + +// file: src/common/init_b.js +define("cordova/init_b", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; + +// setting exec +cordova.exec = require('cordova/exec'); + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; +} +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} + +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + +}, platformInitChannelsArray); + +}); + +// file: src/common/modulemapper.js +define("cordova/modulemapper", function(require, exports, module) { + +var builder = require('cordova/builder'), + moduleMap = define.moduleMap, + symbolList, + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + if (!(moduleName in moduleMap)) { + throw new Error('Module ' + moduleName + ' does not exist.'); + } + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: src/common/modulemapper_b.js +define("cordova/modulemapper_b", function(require, exports, module) { + +var builder = require('cordova/builder'), + symbolList = [], + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: /Users/shazron/Documents/git/apache/cordova-ios/cordova-js-src/platform.js +define("cordova/platform", function(require, exports, module) { + +module.exports = { + id: 'ios', + bootstrap: function() { + require('cordova/channel').onNativeReady.fire(); + } +}; + + +}); + +// file: src/common/pluginloader.js +define("cordova/pluginloader", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); +var urlutil = require('cordova/urlutil'); + +// Helper function to inject a + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js new file mode 100644 index 0000000..6f25493 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +var d = document.getElementById("header") +d.innerHTML = "Script file successfully injected"; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html new file mode 100644 index 0000000..d23a714 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.html @@ -0,0 +1,67 @@ + + + + + + + + + IAB test page + + + + + +

    Local URL

    +
    + You have successfully loaded a local URL: + +
    +
    +
    User-Agent =
    +
    +
    Likely running inAppBrowser: Device version from Cordova=not found, Back link should not work, toolbar may be present, logcat should show failed 'gap:' calls.
    +
    +
    Visit Google (whitelisted)
    +
    Visit Yahoo (not whitelisted)
    + + +

    Back +

    + +

    tall div with border
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf new file mode 100644 index 0000000..b54f1b7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html new file mode 100644 index 0000000..4f167f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/resources/video.html @@ -0,0 +1,45 @@ + + + + + + + + + Cordova Mobile Spec + + + + +
    + + +
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js new file mode 100644 index 0000000..03e3e12 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/tests/tests.js @@ -0,0 +1,632 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var cordova = require('cordova'); +var isWindows = cordova.platformId == 'windows'; + +window.alert = window.alert || navigator.notification.alert; + +exports.defineAutoTests = function () { + + describe('cordova.InAppBrowser', function () { + + it("inappbrowser.spec.1 should exist", function () { + expect(cordova.InAppBrowser).toBeDefined(); + }); + + it("inappbrowser.spec.2 should contain open function", function () { + expect(cordova.InAppBrowser.open).toBeDefined(); + expect(cordova.InAppBrowser.open).toEqual(jasmine.any(Function)); + }); + }); + + describe('open method', function () { + + var iabInstance; + var originalTimeout; + var url = 'https://dist.apache.org/repos/dist/dev/cordova/'; + var badUrl = 'http://bad-uri/'; + + beforeEach(function () { + // increase timeout to ensure test url could be loaded within test time + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000; + + iabInstance = null; + }); + + afterEach(function (done) { + // restore original timeout + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + + if (iabInstance !== null && iabInstance.close) { + iabInstance.close(); + } + iabInstance = null; + // add some extra time so that iab dialog is closed + setTimeout(done, 2000); + }); + + function verifyEvent(evt, type) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual(type); + if (type !== 'exit') { // `exit` event does not have url field + expect(evt.url).toEqual(url); + } + } + + function verifyLoadErrorEvent(evt) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual('loaderror'); + expect(evt.url).toEqual(badUrl); + expect(evt.code).toEqual(jasmine.any(Number)); + expect(evt.message).toEqual(jasmine.any(String)); + } + + it("inappbrowser.spec.3 should retun InAppBrowser instance with required methods", function () { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + + expect(iabInstance).toBeDefined(); + + expect(iabInstance.addEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.removeEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.close).toEqual(jasmine.any(Function)); + expect(iabInstance.show).toEqual(jasmine.any(Function)); + expect(iabInstance.executeScript).toEqual(jasmine.any(Function)); + expect(iabInstance.insertCSS).toEqual(jasmine.any(Function)); + }); + + it("inappbrowser.spec.4 should support loadstart and loadstop events", function (done) { + var onLoadStart = jasmine.createSpy('loadstart event callback').and.callFake(function (evt) { + verifyEvent(evt, 'loadstart'); + }); + + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('loadstart', onLoadStart); + iabInstance.addEventListener('loadstop', function (evt) { + verifyEvent(evt, 'loadstop'); + expect(onLoadStart).toHaveBeenCalled(); + done(); + }); + }); + + it("inappbrowser.spec.5 should support exit event", function (done) { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('exit', function (evt) { + verifyEvent(evt, 'exit'); + done(); + }); + iabInstance.close(); + iabInstance = null; + }); + + it("inappbrowser.spec.6 should support loaderror event", function (done) { + iabInstance = cordova.InAppBrowser.open(badUrl, '_blank'); + iabInstance.addEventListener('loaderror', function (evt) { + verifyLoadErrorEvent(evt); + done(); + }); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + + function doOpen(url, target, params, numExpectedRedirects, useWindowOpen) { + numExpectedRedirects = numExpectedRedirects || 0; + useWindowOpen = useWindowOpen || false; + console.log("Opening " + url); + + var counts; + var lastLoadStartURL; + var wasReset = false; + function reset() { + counts = { + 'loaderror': 0, + 'loadstart': 0, + 'loadstop': 0, + 'exit': 0 + }; + lastLoadStartURL = ''; + } + reset(); + + var iab; + var callbacks = { + loaderror: logEvent, + loadstart: logEvent, + loadstop: logEvent, + exit: logEvent + }; + if (useWindowOpen) { + console.log('Use window.open() for url'); + iab = window.open(url, target, params, callbacks); + } + else { + iab = cordova.InAppBrowser.open(url, target, params, callbacks); + } + if (!iab) { + alert('open returned ' + iab); + return; + } + + function logEvent(e) { + console.log('IAB event=' + JSON.stringify(e)); + counts[e.type]++; + // Verify that event.url gets updated on redirects. + if (e.type == 'loadstart') { + if (e.url == lastLoadStartURL) { + alert('Unexpected: loadstart fired multiple times for the same URL.'); + } + lastLoadStartURL = e.url; + } + // Verify the right number of loadstart events were fired. + if (e.type == 'loadstop' || e.type == 'loaderror') { + if (e.url != lastLoadStartURL) { + alert('Unexpected: ' + e.type + ' event.url != loadstart\'s event.url'); + } + if (numExpectedRedirects === 0 && counts['loadstart'] !== 1) { + // Do allow a loaderror without a loadstart (e.g. in the case of an invalid URL). + if (!(e.type == 'loaderror' && counts['loadstart'] === 0)) { + alert('Unexpected: got multiple loadstart events. (' + counts['loadstart'] + ')'); + } + } else if (numExpectedRedirects > 0 && counts['loadstart'] < (numExpectedRedirects + 1)) { + alert('Unexpected: should have got at least ' + (numExpectedRedirects + 1) + ' loadstart events, but got ' + counts['loadstart']); + } + wasReset = true; + numExpectedRedirects = 0; + reset(); + } + // Verify that loadend / loaderror was called. + if (e.type == 'exit') { + var numStopEvents = counts['loadstop'] + counts['loaderror']; + if (numStopEvents === 0 && !wasReset) { + alert('Unexpected: browser closed without a loadstop or loaderror.'); + } else if (numStopEvents > 1) { + alert('Unexpected: got multiple loadstop/loaderror events.'); + } + } + } + + return iab; + } + + function doHookOpen(url, target, params, numExpectedRedirects) { + var originalFunc = window.open; + var wasClobbered = window.hasOwnProperty('open'); + window.open = cordova.InAppBrowser.open; + + try { + doOpen(url, target, params, numExpectedRedirects, true); + } + finally { + if (wasClobbered) { + window.open = originalFunc; + } + else { + console.log('just delete, to restore open from prototype'); + delete window.open; + } + } + } + + function openWithStyle(url, cssUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + var callback = function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }; + if (cssUrl) { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ file: cssUrl }, useCallback && callback); + }); + } else { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ code: '#style-update-literal { \ndisplay: block !important; \n}' }, + useCallback && callback); + }); + } + } + + function openWithScript(url, jsUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + if (jsUrl) { + iab.addEventListener('loadstop', function (event) { + iab.executeScript({ file: jsUrl }, useCallback && function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } else { + iab.addEventListener('loadstop', function (event) { + var code = '(function(){\n' + + ' var header = document.getElementById("header");\n' + + ' header.innerHTML = "Script literal successfully injected";\n' + + ' return "abc";\n' + + '})()'; + iab.executeScript({ code: code }, useCallback && function (results) { + if (results && results.length === 1 && results[0] === 'abc') { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } + } + var hiddenwnd = null; + var loadlistener = function (event) { alert('background window loaded '); }; + function openHidden(url, startHidden) { + var shopt = (startHidden) ? 'hidden=yes' : ''; + hiddenwnd = cordova.InAppBrowser.open(url, 'random_string', shopt); + if (!hiddenwnd) { + alert('cordova.InAppBrowser.open returned ' + hiddenwnd); + return; + } + if (startHidden) hiddenwnd.addEventListener('loadstop', loadlistener); + } + function showHidden() { + if (!!hiddenwnd) { + hiddenwnd.show(); + } + } + function closeHidden() { + if (!!hiddenwnd) { + hiddenwnd.removeEventListener('loadstop', loadlistener); + hiddenwnd.close(); + hiddenwnd = null; + } + } + + var info_div = '

    InAppBrowser

    ' + + '
    ' + + 'Make sure http://cordova.apache.org and http://google.co.uk and https://www.google.co.uk are white listed.
    ' + + 'Make sure http://www.apple.com is not in the white list.
    ' + + 'In iOS, starred * tests will put the app in a state with no way to return.
    ' + + '

    User-Agent: ' + + '

    '; + + var local_tests = '

    Local URL

    ' + + '
    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView (using hook of window.open()).' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: fails to open' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar at top.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser without locationBar.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the bottom.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the top.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with no locationBar. On iOS the toolbar is at the top.'; + + var white_listed_tests = '

    White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org (using hook of window.open())' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in system browser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org with no location bar.'; + + var non_white_listed_tests = '

    Non White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (using hook of window.open()).' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).' + + '

    ' + + 'Expected result: open successfully in system browser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com without locationBar.'; + + var page_with_redirects_tests = '

    Page with redirect

    ' + + '
    ' + + 'Expected result: should 301 and open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.'; + + var pdf_url_tests = '

    PDF URL

    ' + + '
    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.' + + '

    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.'; + + var invalid_url_tests = '

    Invalid URL

    ' + + '
    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser (404).'; + + var css_js_injection_tests = '

    CSS / JS Injection

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser without text "Style updated from..."' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected" and alert dialog with the text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" .' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" and alert dialog with the text "Results verified".'; + + var open_hidden_tests = '

    Open Hidden

    ' + + '
    ' + + 'Expected result: no additional browser window. Alert appears with the text "background window loaded".' + + '

    ' + + 'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: no output. But click on "show hidden" again and nothing should be shown.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to https://www.google.co.uk'; + + var clearing_cache_tests = '

    Clearing Cache

    ' + + '
    ' + + 'Expected result: ?' + + '

    ' + + 'Expected result: ?'; + + var video_tag_tests = '

    Video tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video does not play automatically on iOS and Android but rather works after clicking the "play" button.'; + + var local_with_anchor_tag_tests = '

    Local with anchor tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the top as normal.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the beginning of the tall div with border.'; + + // CB-7490 We need to wrap this code due to Windows security restrictions + // see http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences for details + if (window.MSApp && window.MSApp.execUnsafeLocalFunction) { + MSApp.execUnsafeLocalFunction(function() { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + }); + } else { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests; + } + + document.getElementById("user-agent").textContent = navigator.userAgent; + + // we are already in cdvtests directory + var basePath = 'iab-resources/'; + var localhtml = basePath + 'local.html', + localpdf = basePath + 'local.pdf', + injecthtml = basePath + 'inject.html', + injectjs = isWindows ? basePath + 'inject.js' : 'inject.js', + injectcss = isWindows ? basePath + 'inject.css' : 'inject.css', + videohtml = basePath + 'video.html'; + + //Local + createActionButton('target=Default', function () { + doOpen(localhtml); + }, 'openLocal'); + createActionButton('target=Default (window.open)', function () { + doHookOpen(localhtml); + }, 'openLocalHook'); + createActionButton('target=_self', function () { + doOpen(localhtml, '_self'); + }, 'openLocalSelf'); + createActionButton('target=_system', function () { + doOpen(localhtml, '_system'); + }, 'openLocalSystem'); + createActionButton('target=_blank', function () { + doOpen(localhtml, '_blank'); + }, 'openLocalBlank'); + createActionButton('target=Random, location=no, disallowoverscroll=yes', function () { + doOpen(localhtml, 'random_string', 'location=no, disallowoverscroll=yes'); + }, 'openLocalRandomNoLocation'); + createActionButton('target=Random, toolbarposition=bottom', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=bottom'); + }, 'openLocalRandomToolBarBottom'); + createActionButton('target=Random, toolbarposition=top', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top'); + }, 'openLocalRandomToolBarTop'); + createActionButton('target=Random, toolbarposition=top, location=no', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top,location=no'); + }, 'openLocalRandomToolBarTopNoLocation'); + + //White Listed + createActionButton('* target=Default', function () { + doOpen('http://cordova.apache.org'); + }, 'openWhiteListed'); + createActionButton('* target=Default (window.open)', function () { + doHookOpen('http://cordova.apache.org'); + }, 'openWhiteListedHook'); + createActionButton('* target=_self', function () { + doOpen('http://cordova.apache.org', '_self'); + }, 'openWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://cordova.apache.org', '_system'); + }, 'openWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://cordova.apache.org', '_blank'); + }, 'openWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://cordova.apache.org', 'random_string'); + }, 'openWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://cordova.apache.org', 'random_string', 'location=no'); + }, 'openWhiteListedRandomNoLocation'); + + //Non White Listed + createActionButton('target=Default', function () { + doOpen('http://www.apple.com'); + }, 'openNonWhiteListed'); + createActionButton('target=Default (window.open)', function () { + doHookOpen('http://www.apple.com'); + }, 'openNonWhiteListedHook'); + createActionButton('target=_self', function () { + doOpen('http://www.apple.com', '_self'); + }, 'openNonWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://www.apple.com', '_system'); + }, 'openNonWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://www.apple.com', '_blank'); + }, 'openNonWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://www.apple.com', 'random_string'); + }, 'openNonWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://www.apple.com', 'random_string', 'location=no'); + }, 'openNonWhiteListedRandomNoLocation'); + + //Page with redirect + createActionButton('http://google.co.uk', function () { + doOpen('http://google.co.uk', 'random_string', '', 1); + }, 'openRedirect301'); + createActionButton('http://goo.gl/pUFqg', function () { + doOpen('http://goo.gl/pUFqg', 'random_string', '', 2); + }, 'openRedirect302'); + + //PDF URL + createActionButton('Remote URL', function () { + doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf'); + }, 'openPDF'); + createActionButton('Local URL', function () { + doOpen(localpdf, '_blank'); + }, 'openPDFBlank'); + + //Invalid URL + createActionButton('Invalid Scheme', function () { + doOpen('x-ttp://www.invalid.com/', '_blank'); + }, 'openInvalidScheme'); + createActionButton('Invalid Host', function () { + doOpen('http://www.inv;alid.com/', '_blank'); + }, 'openInvalidHost'); + createActionButton('Missing Local File', function () { + doOpen('nonexistent.html', '_blank'); + }, 'openInvalidMissing'); + + //CSS / JS injection + createActionButton('Original Document', function () { + doOpen(injecthtml, '_blank'); + }, 'openOriginalDocument'); + createActionButton('CSS File Injection', function () { + openWithStyle(injecthtml, injectcss); + }, 'openCSSInjection'); + createActionButton('CSS File Injection (callback)', function () { + openWithStyle(injecthtml, injectcss, true); + }, 'openCSSInjectionCallback'); + createActionButton('CSS Literal Injection', function () { + openWithStyle(injecthtml); + }, 'openCSSLiteralInjection'); + createActionButton('CSS Literal Injection (callback)', function () { + openWithStyle(injecthtml, null, true); + }, 'openCSSLiteralInjectionCallback'); + createActionButton('Script File Injection', function () { + openWithScript(injecthtml, injectjs); + }, 'openScriptInjection'); + createActionButton('Script File Injection (callback)', function () { + openWithScript(injecthtml, injectjs, true); + }, 'openScriptInjectionCallback'); + createActionButton('Script Literal Injection', function () { + openWithScript(injecthtml); + }, 'openScriptLiteralInjection'); + createActionButton('Script Literal Injection (callback)', function () { + openWithScript(injecthtml, null, true); + }, 'openScriptLiteralInjectionCallback'); + + //Open hidden + createActionButton('Create Hidden', function () { + openHidden('https://www.google.co.uk', true); + }, 'openHidden'); + createActionButton('Show Hidden', function () { + showHidden(); + }, 'showHidden'); + createActionButton('Close Hidden', function () { + closeHidden(); + }, 'closeHidden'); + createActionButton('google.co.uk Not Hidden', function () { + openHidden('https://www.google.co.uk', false); + }, 'openHiddenShow'); + + //Clearing cache + createActionButton('Clear Browser Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearcache=yes'); + }, 'openClearCache'); + createActionButton('Clear Session Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearsessioncache=yes'); + }, 'openClearSessionCache'); + + //Video tag + createActionButton('Remote Video', function () { + doOpen(videohtml, '_blank'); + }, 'openRemoteVideo'); + createActionButton('Remote Need User No Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=no'); + }, 'openRemoteNeedUserNoVideo'); + createActionButton('Remote Need User Yes Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=yes'); + }, 'openRemoteNeedUserYesVideo'); + + //Local With Anchor Tag + createActionButton('Anchor1', function () { + doOpen(localhtml + '#bogusanchor', '_blank'); + }, 'openAnchor1'); + createActionButton('Anchor2', function () { + doOpen(localhtml + '#anchor2', '_blank'); + }, 'openAnchor2'); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css new file mode 100644 index 0000000..5762c74 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.inAppBrowserWrap { + margin: 0; + padding: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: 0 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9999999; + box-sizing: border-box; + border: 40px solid #bfbfbf; + border: 40px solid rgba(0, 0, 0, 0.25); +} + +.inAppBrowserWrapFullscreen { + border: 0; +} + +.inappbrowser-app-bar { + height: 70px; + background-color: #404040; + z-index: 9999999; +} + +.inappbrowser-app-bar-inner { + padding-top: 10px; + height: 60px; + width: 155px; + margin: 0 auto; + background-color: #404040; + z-index: 9999999; +} + +.app-bar-action { + width: auto; + height: 40px; + margin-left: 20px; + font-family: "Segoe UI Symbol"; + float: left; + color: white; + font-size: 12px; + text-transform: lowercase; + text-align: center; + cursor: default; +} + +.app-bar-action[disabled] { + color: gray; + /*disable click*/ + pointer-events: none; +} + +.app-bar-action::before { + font-size: 28px; + display: block; + height: 36px; +} + +/* Back */ +.action-back { + margin-left: 0px; +} + +.action-back::before { + content: "\E0BA"; +} + +.action-back:not([disabled]):hover::before { + content: "\E0B3"; +} + +/* Forward */ +.action-forward::before { + content: "\E0AC"; +} + +.action-forward:not([disabled]):hover::before { + content: "\E0AF"; +} + +/* Close */ +.action-close::before { + content: "\E0C7"; + /* close icon is larger so we re-size it to fit other icons */ + font-size: 20px; + line-height: 40px; +} + +.action-close:not([disabled]):hover::before { + content: "\E0CA"; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..25f6271 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,111 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js new file mode 100644 index 0000000..42d15d2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -0,0 +1,129 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +/*jslint sloppy:true */ +/*global Windows:true, require, document, setTimeout, window, module */ + + +var cordova = require('cordova'), + channel = require('cordova/channel'); + +var browserWrap; + +var IAB = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + } + }, + show: function (win, lose) { + /* empty block, ran out of bacon? + if (browserWrap) { + + }*/ + }, + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features = args[2], + url, + elem; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_blank") { + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.width = (window.innerWidth - 80) + "px"; + browserWrap.style.height = (window.innerHeight - 80) + "px"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + browserWrap.style.zIndex = "9999999"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + var localFile = (strUrl.indexOf('ms-appdata:///') > -1); + if (localFile) { + elem = document.createElement("x-ms-webview"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + + } else { + elem = document.createElement("iframe"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + } + + browserWrap.appendChild(elem); + } else { + window.location = strUrl; + } + + //var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl }); + + }, + + injectScriptCode: function (code, bCB) { + + // "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)" + }, + + injectScriptFile: function (file, bCB) { + + } +}; + +module.exports = IAB; + + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/fetch.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/fetch.json new file mode 100644 index 0000000..2987041 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/fetch.json @@ -0,0 +1,18 @@ +{ + "molpay-mobile-xdk-cordova": { + "source": { + "type": "local", + "path": "../molpay-mobile-xdk-cordova" + }, + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-inappbrowser": { + "source": { + "type": "registry", + "id": "cordova-plugin-inappbrowser" + }, + "is_top_level": false, + "variables": {} + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/FontAwesome.otf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d05688e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png new file mode 100644 index 0000000..16f1bde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/images/poweredByMOLPay.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html new file mode 100644 index 0000000..9272260 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +
    Loading...
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js new file mode 100644 index 0000000..f62b4ff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/scripts.581f1282.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('"6V 7S";1u.1z("1w",["8b","7p","7o","7h-3p","r.4e","89.7w","7x","7v.7u","3i-20","2w"]).4w("6q",q(){W{3Z:q(a){W a.4U=7s,a}}}).7t(["$7y","$7z",q(a,b){a.3L("/",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2p",{2b:"1g/2p.1c",1h:"4a",3s:"2p"}).3L("/2s",{2b:"1g/2s.1c",1h:"6p",3s:"2s"}).3L("/27",{2b:"1g/27.1c",1h:"6f",3s:"27"}).7E({7F:"/"}),b.7D.7C("6q")}]).6H(["$2k","$31","$4T","3p","4j","4e","5Y","$1A","4x",q(a,b,c,d,e,f,g,h,i){7A.7B(7r.2l),a.z=!1,a.5E="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7q",a.3W="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7g",a.47="2O://2a.2S.2R.2E/28/2x/4J/2V.2F?4S=3P&4P=4M/7f",a.1Q="2O://2a.2S.2R.2E/28/2x/7e/2V.2F",a.4c="2O://2a.2S.2R.2E/28/2x/7c/2V.2F",a.2U="",a.1s="",a.2y="",a.7d="7i://",a.6J="7j://",a.4E="7n://",a.6r="7m://",a.2W="7k://",a.6M="2O://2a.2S.2R.2E/28/1x.2F",a.7G="#7H",a.6o="#1i",a.2u=!1,a.6Q=["82","83","81","80","7Y","7Z","6u-84","6u-85"],a.14={3X:"8a 1k",41:"7b 88, 50 4X 86 87, 7X 1Z, 7W 7M 7N",4u:"65 1b 1F, 50 4X 5H w",6t:"2K w 1H 1F",6x:"2L w 1H 1F",6y:"Y w 1H 1F",6E:"1K w 1H 1F",6L:"1G w 1H 1F",6P:"17 w 1H 1F",5a:"1R w 1H 1F",5G:"1X w 1H 1F",5L:"2d 1X w",5R:"1v w 1H 1F",5M:"1J w 7L 2s 3Z 1H 1F"},a.7={2K:"",2L:"",Y:"",1K:"",1G:"",17:"",1R:"7I",1X:"2o",1v:"",36:!1,O:"",2j:!0,1f:"",1E:"",1S:"",1P:"",2m:"",5C:!1,3k:!1,7J:"",1J:"",1j:"",34:"",2B:"2",7O:"",48:"",37:"",2Q:"",1r:"",1m:"",1I:"",2z:"",2t:"",1O:"",U:!0,1D:"2o",3c:"4y",23:"",1d:"",2g:"",4t:"",2C:"1",26:"",2M:"",3r:"",2i:""},a.$2I("7.1D",q(){v b=g.4D(),c=h("1A")(b,a.7.1D,!0);c.J?a.7.3c=c[0][1]:a.7.1D=""}),a.$2I("7.1m",q(){v b=a.7.1m;b=b.3F(/\\//g,"");v c="";b.J>4&&(b=b.Q(0,4)),1===b.J&&(c=5O(b.Q(0,1)),c>1&&(b="")),2===b.J&&(c=5O(b.Q(0,2)),c>12&&(b=b.Q(0,1))),b.J>2&&(b=b.Q(0,2)+"/"+b.Q(2,b.J)),a.7.1m=b,5===a.7.1m.J&&(a.7.2z=a.7.1m.Q(0,2),a.7.2t=a.7.1m.Q(3,5))}),a.$2I("7.1d",q(){v b=a.7.1d;b.J>10&&(b=b.Q(0,10)),a.7.1d=b}),a.$2I("7.U",q(){1l(a.7.U)a.7.23="",a.7.1r="",a.7.1m="",a.7.1I="",a.7.1D="2o",a.7.3c="4y",a.7.2z="",a.7.2t="",a.7.1O="";21{v b=a.7.2M[0];1q 0!==b&&(a.7.23=b.7P+"******"+b.7U,a.7.1r="",a.7.1m=b.5N.Q(2,4)+"/"+b.5N.Q(0,2),a.7.1I=b.7V,a.7.1D=b.7T,a.7.1O=b.1O)}}),a.$2I("7.23",q(){v b=a.7.23;b=b.3F(/ /g,""),b.J>16&&(b=b.Q(0,16)),b.J>4&&b.J<=8?b=b.Q(0,4)+" "+b.Q(4,b.J):b.J>8&&b.J<=12?b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,b.J):b.J>12&&b.J<16&&(b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,b.J)),16===b.J&&(a.7.2Q=b,b=b.Q(0,4)+" "+b.Q(4,8)+" "+b.Q(8,12)+" "+b.Q(12,16)),a.7.23=b}),a.$2I("7.1r",q(){v b=a.7.1r;b.J>4&&(b=b.Q(0,4)),a.7.1r=b}),a.5w=q(a){v b=!1,c=g.4D(),d=h("1A")(c,a,!0);W d.J&&(b=!0),b},a.5A=q(b){a.z&&A.B("5A: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].4F),c},a.6d=q(){v b=a.7.17,c=7R(b);c=5U*c,a.7.4t=c.5v(0)},a.3y=q(){W a.7.17?(1u.8c(a.7.17)&&(a.7.17=a.7.17.5v(2)),a.7.2K?a.7.2L?a.7.Y?a.7.1K?a.7.1G?a.7.1R?a.7.1X?a.5w(a.7.1X)?a.7.1v?(a.7.5P="70 "+d.2A(a.7.2K+":"+a.7.2L),a.7.48="6X 1.0.0",a.7.37=f.7a.77,a.7.2B="2",a.7.2C="1",a.7.5C=!1,a.7.36=!1,a.7.2j||(a.7.2j=!1),a.7.O?"2N"===a.7.O&&(a.7.2j=!0,a.7.2i="(2H 38 a 1b)"):(a.7.O="2N",a.7.2j=!0,a.7.2i="(2H 38 a 1b)"),a.7.1f||(a.7.1f=!1),a.7.1E&&a.7.1S&&a.7.1P&&a.7.2m&&a.7.1E||(a.7.1f=!0),a.7.3k||(a.7.3k=!1),a.7.1D="2o",a.7.3c="4y",a.7.U=!0,"2n"!==a.7.1j||a.7.1J?1q e.4V():1q i.1e({1k:a.14.5M})):1q i.1e({1k:a.14.5R}):1q i.1e({1k:a.14.5L}):1q i.1e({1k:a.14.5G}):1q i.1e({1k:a.14.5a}):1q i.1e({1k:a.14.6L}):1q i.1e({1k:a.14.6E}):1q i.1e({1k:a.14.6y}):1q i.1e({1k:a.14.6x}):1q i.1e({1k:a.14.6t})):1q i.1e({1k:a.14.6P})},a.73=q(){W a.7.37},a.4H=q(b){v c=!1,d=h("1A")(a.6Q,b,!0);W d.J&&(c=!0),c},a.4f=q(b){a.z&&A.B("4f: "+b);v c="",d=h("1A")(a.7.26,{1Z:b},!0);W d.J&&(c=d[0].54),c},2T.3y=q(b){a.7=b,a.3y()},2T.72=q(b){v f=b.6T;a.z&&A.B("1M.6T: "+f);v g="";1l(f.6l(a.6M)>-1)a.z&&A.B("5T 1x 78"),a.2U=f,e.68(),g=a.4E,a.1C(g);21 1l(f.6l(a.6o)>-1)20(a.7.O){1o"6W":1o"75":1o"71":1o"74":1o"76":c.79(a.1Q).2v(q(){a.z&&A.B("5r 2c: 6U, \\6Z 5Q 5k"+a.1Q);v b="6Y()",c=d.2A(b);g=a.6r+c,a.z&&A.B("8z 1i 9j, 9i 9h 3t = "+g),a.1C(g)},q(){a.z&&A.B("5r 2c: 9f, \\9g 5Q 5k "+a.1Q),a.3l()});22;6R:a.z&&A.B("9k 1b 1i 4O\'t 4Q a 4K"),a.5F(a.7.O+" 1b 1i 4O\'t 4Q a 4K")}},a.6N=q(){v b=a.4E;a.1C(b)},a.3l=q(){e.4n(),a.6N()},2T.3l=q(){a.3l()},a.4L=q(){"2n"===a.7.1j&&a.7.1J&&""!==a.7.1J?a.3a():a.7.1J&&""!==a.7.1J?a.3a():e.4n()},2T.4L=q(){a.4L()},a.1C=q(b){v c=b,d=f.66;a.z&&A.B("1C 66 I:"+1a.19(d,18,"")),"9l"===d&&(c=b.3F(/\\+/g,"-"),c=c.3F(/\\=/g,"9q")),a.z&&A.B("1C: \\6i: "+c),2T.31=c},a.5m=q(){a.3y(),b.2J("/2p")}}]),1u.1z("1w").1h("9p",q(){}),1u.1z("1w").1h("4a",["$1V","$2k","$31","$9o","4j",q(a,b,c,d,e){a.4Y=q(){1l(b.7.2j){v c=d.3A({3B:!0,2b:"1g/56.1c",1h:"6e",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6m=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/53.1c",1h:"6n",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6a=q(){1l(b.7.U){v c=d.3A({3B:!0,2b:"1g/6S.1c",1h:"6h",3n:"",3m:{1V:q(){W a}}});c.1x.2v(q(){},q(){})}},a.6C=q(){v a=!1,c={};1l(c.6F="2d 4C 9m",c.1W="","2N"===b.7.O?(a=!0,c.1W="2H 38 a 4C 1b"):"25"===b.7.O||"3H"===b.7.O?!b.7.2Q||b.7.2Q.J<16?(a=!0,c.1W="2d 25 2r 2P"):!b.7.1r||b.7.1r.J<3?(a=!0,c.1W="2d 3d 2P"):!b.7.1m||b.7.1m.J<5?(a=!0,c.1W="2d 3j 42"):b.7.1I||(a=!0,c.1W="2d 57 1Z"):"3b"===b.7.O&&(!b.7.1d||b.7.1d.J<10?(a=!0,c.1W="2d 5Z 2P"):b.7.2g||(a=!0,c.1W="2d 5Z 6D")),a){v f=d.3A({3B:!0,2b:"1g/6G.1c",1h:"62",3n:"K",3m:{32:q(){W c}}});f.1x.2v(q(){},q(){})}21 b.4H(b.7.O)&&(b.7.1j="2n"),e.5f(),e.5d()}}]),1u.1z("1w").1h("6p",["$1V","$2k",q(a,b){a.3x={},a.3x.3g={9n:2,9e:60,9d:10,95:!1,94:"93",91:"2e",92:12,96:"",9s:"#97"},a.4Z=b.4f(b.S.1b)}]),1u.1z("1w").4w("4j",["3p","$4T","$2k","$4U","4e","4x","$31",q(a,b,c,d,e,f,g){v h={};W h.2G=q(a){W 5I.2G(a).1B()},h.29=q(a){W 5I.29(a).1B()},h.1t=q(a,b){W"9c="+a+"&9b="+1a.19(b,18,"")},h.1U=q(a,d){c.2u=!0;v e={5z:"5x",3t:a,5t:{5s:"3I/3Q",9a:c.7.5P,"5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q","98-99":c.7.48},1M:d};b(e).2v(q(b){1l(c.2u=!1,b.1M.2c)c.z&&A.B("2x 9r 6s 1M 9D 2c:"+b.1M.2c),f.3w(a,b.1M.1x);21 1l("9C"===b.5y){1l(c.z&&A.B("2x 9F: \\n"+1a.19(b.1M,18,"")),b.1M.2c===!1)20(b.1M.1x.9G){1o 9u:1o 9v:c.z&&A.B(c.14.41),f.1e({1k:c.14.41});22;1o 9A:c.7.U=!0}(a===c.1Q||a===c.2U)&&f.3w(a,b.1M)}21 c.z&&A.B("9E 5x 3Z 63: "+b.5y)},q(){c.2u=!1,c.z&&A.B(c.14.3X),f.1e({1k:c.14.3X})})},h.9w=q(a){c.2u=!0;v d={5z:"9y",3t:a,5t:{5s:"3I/3Q","5n-3R":"3I/x-2a-D-5o","5p-3R":"3Q"}};b(d).2v(q(){c.2u=!1},q(){c.2u=!1,c.z&&A.B("9z 9x 9t")})},h.2X=q(){c.z&&A.B("(R 1) 3u:"+c.7.1v);v a=h.2G(c.7.1v).1B(),b=c.7.Y+c.7.1K+a;c.z&&A.B("(R 2) 9B + 8d + 8Z(3u):"+b);v d=h.29(b).1B();W c.z&&A.B("(R 3) 29(8u 33 R 2):"+d),d},h.4i=q(a){v b="";1l(c.7.36)b=c.7.1v;21{v d=c.7.17,e=c.7.Y,f=c.7.1G,g=c.7.1v,i=a;b=h.2G(d+e+f+g+i).1B()}W b},h.6z=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1J,f=c.7.1v,g="46";a=h.2G(d+g+e+b+f).1B()}W a},h.4v=q(){v a="";1l(c.7.36)a=c.7.1v;21{v b=c.7.17,d=c.7.Y,e=c.7.1G,f=c.7.1v,g="40",i=d+g+e+b+f;c.z&&A.B("4v 8t:"+i),a=h.2G(i).1B()}W a},c.5F=q(a){v b=c.5E,d=c.7.Y+a+c.7.37,e=d+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+e);v f=h.29(e).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+f);v g={4d:c.7.Y,8s:a+c.7.37},i=h.1t(f,g);c.z&&A.B("(R 6) 2h 1t:"+i),h.1U(b,i)},h.51=q(){v a=c.3W,b=c.7.Y+c.7.1R,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y,5H:c.7.1R},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5j=q(){v a=c.47,b=c.7.Y,d=b+h.2X();c.z&&A.B("(R 4) 3K 3M + 3T 3G:"+d);v e=h.29(d).1B();c.z&&A.B("(R 5) 3N(1x 33 R 4):"+e);v f={4d:c.7.Y},g=h.1t(e,f);c.z&&A.B("(R 6) 2h 1t:"+g),h.1U(a,g)},h.5e=q(){v a="8v",b="0",d=c.4c,e=c.7.Y+c.7.1E+c.7.1S+c.7.1P+c.7.1K+a+b,f=e;c.z&&A.B("(R 4) 3K 3M:"+f);v g=h.29(f).1B(),i=g+h.2X();c.z&&A.B("(R 5) 3N(1x 33 R 4) + 3T 3G:"+i);v j={2Y:c.7.Y,4m:c.7.1E,4k:c.7.1S,4l:c.7.1P,4q:c.7.1K,30:a,1A:b},k=h.1t(i,j);c.z&&A.B("(R 6) 2h 1t:"+k),h.1U(d,k)},h.4V=q(){h.51(),h.5j(),h.5e()},h.5d=q(){c.1s="6c";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.5f=q(){c.1s="6k";v a=c.1s,b=c.1Q,d={3f:c.7.17,4q:c.7.1K,5g:c.7.2m,4k:c.7.1S,4l:c.7.1P,4m:c.7.1E,1b:c.7.O,4r:c.7.1R,2B:c.7.2B,2Y:c.7.Y,30:a,5c:c.7.1G,2C:c.7.2C,2Z:c.7.1X,3u:h.4i(a),1d:c.7.1d};"25"===c.7.O||"3H"===c.7.O?(d.3d=c.7.1r,d.2z=c.7.2z,d.2t=c.7.2t,d.58=c.7.1I,c.7.U&&c.7.1O?d.1O=c.7.1O:d.59=c.7.2Q):"3b"===c.7.O&&(d.1d=c.7.1d,d.2g=c.7.2g),c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),h.1U(b,d)},h.68=q(){v a=c.2U,b="";c.z&&A.B("8x 5T 6s 3t:"+a),h.1U(a,b)},c.3a=q(){c.1s="46";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,4s:c.7.1J,3f:c.7.17,34:h.6z(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h.4n=q(){c.1s="40";v a=c.1s,b=c.1Q,d={2Y:c.7.Y,8q:c.7.1G,3f:c.7.17,34:h.4v(),30:a};c.z&&A.B("(R 6) 2h 1t:"+1a.19(d,18,"")),g.2J("/27"),h.1U(b,d)},h}]),1u.1z("1w").4w("4x",["$2k","3p","$31","$1A",q(a,b,c,d){v e={};W e.3V=q(b){1l(b){1l(a.7.26=b,0===a.7.26.J&&(a.z&&A.B(a.14.4u),e.1e({1k:a.14.4u})),"2N"!==a.7.O){v c=d("1A")(a.7.26,{4F:a.7.O},!0);c.J?a.7.2i=c[0].4G:(a.7.O="2N",a.7.2i="(2H 38 a 1b)")}21 a.7.O="2N",a.7.2i="(2H 38 a 1b)";"2n"===a.7.1j&&a.3a()}a.z&&A.B("3V: \\1Y: "+1a.19(a.7.26,18,""))},e.3Y=q(b){b&&(a.7.2M=b,a.7.2M.J>0?a.7.U=!1:a.7.U=!0),a.z&&A.B("3Y: \\1Y: "+1a.19(a.7.2M,18,""))},e.49=q(b){b&&(a.7.3r=b),a.z&&A.B("49: \\1Y: "+1a.19(a.7.3r,18,""))},e.4b=q(c){a.z&&A.B("4b: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.6J+d;a.1C(e)},e.6K=q(c){a.z&&A.B("6K: \\1Y: "+c);v d=b.2A(c);a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.44=q(b){a.2y=b,a.z&&A.B("44: \\1Y: "+1a.19(a.2y,18,"")),a.2y&&""!==a.2y&&(a.7.1J=a.2y.8e,a.7.34=a.2y.34,a.3a())},e.45=q(d){a.S=d,a.7.1j&&(a.S.1j=a.7.1j,"2n"===a.S.1j&&a.S&&a.S.3C&&"11"==a.S.3C&&(a.z&&A.B("2n 2c 63, 8j 8k 8o"),a.S.1j="")),a.z&&A.B("45: \\1Y: "+1a.19(a.S,18,""));v e=b.2A(1a.19(a.S,18,""));a.z&&A.B("35: \\39: "+e);v f=a.2W+e;a.1C(f),"2n"===a.7.1j&&a.S&&a.S.3C&&"11"!==a.S.3C&&c.2J("/2s")},e.3z=q(c){a.3D=c,a.7.1j&&(a.3D.1j=a.7.1j),a.z&&A.B("3z: \\1Y: "+1a.19(a.3D,18,""));v d=b.2A(1a.19(a.3D,18,""));a.z&&A.B("35: \\39: "+d);v e=a.2W+d;a.1C(e)},e.1e=q(d){v e=d;e.61=a.7.61,c.2J("/27"),a.z&&A.B("1e: \\1Y: "+1a.19(d,18,""));v f=b.2A(1a.19(d,18,""));a.z&&A.B("35: \\39: "+f);v g=a.2W+f;a.1C(g)},e.3w=q(b,c){20(a.z&&A.B("3w: \\6i: "+b),b){1o a.3W:e.3V(c);22;1o a.4c:e.3Y(c);22;1o a.47:e.49(c);22;1o a.8C:e.8S(c);22;1o a.1Q:"6c"===a.1s?e.4b(c):"46"===a.1s?e.45(c):"40"===a.1s?e.3z(c):"6k"===a.1s&&e.3z(c);22;1o a.2U:e.44(c);22;6R:a.z&&A.B("8P 4O\'t 4Q a 4K")}},e}]),1u.1z("1w").1h("6f",q(){}),1u.1z("1w").1h("6e",["$1V","$3v","$2k",q(a,b,c){a.5i=q(a){c.7.O=a.4F,c.7.2i=a.4G,"3b"===c.7.O?c.6d():c.4H(c.7.O)?c.7.1j="2n":c.7.1j="",b.2q()},a.1i=q(){b.2q()}}]),1u.1z("1w").1h("6h",["$2k","$1V","$3v",q(a,b,c){b.55=q(b){a.7.1I=b.1Z,c.2q()},b.1i=q(){c.2q()}}]),1u.1z("1w").1h("6n",["$1V","5Y","$2k","$3v",q(a,b,c,d){a.5S=b.4D(),a.5J=q(a){c.7.1D=a[0],d.2q()},a.1i=q(){d.2q()}}]),1u.1z("1w").1h("62",["$1V","$3v","32",q(a,b,c){a.32=c,a.1i=q(){b.2q()}}]),1u.1z("1w").6H(["$8W",q(a){a.2f("1g/6G.1c",\' <6v>{{32.6F}} <6B>{{32.1W}} 4B \'),a.2f("1g/6S.1c",\' {{ C.1Z }} 4B \'),a.2f("1g/56.1c",\' {{ C.4G }} &1p; <3h 9="1b-4W" r-4h="{{ C.54 }}"> 4B \'),a.2f("1g/53.1c",\' {{ C[1] }} 8F \'),a.2f("1g/27.1c","

    8D 4C 2c.

    2H 8I.

    "),a.2f("1g/8M.1c",\'

    <67>28 X-8L

    1v 2m 1G 2K 1E 1X 1R Y 1S 1P 1K 2L 17 3k O 5b \'),a.2f("1g/2p.1c",\' 8H 5K {{7.1G}} {{7.1R}} {{7.17}} &1p; &1p; &1p; &1p; 5b 8N &1p; {{7.2i}} 8V 2r <3i-20 r-P="7.U" 9="4N-25-2r-20" 8X-u="8Y" 8U-u="65"><3i-20> 6I 2P &1p; 6b &1p; 6A 42 &1p; 8B &1p; {{7.3c}} 69 1Z &1p; {{7.1I}} 8l 5V 8m (8n = 5U 5V 8f) {{7.4t}} 6I# 8g 43 &1p; 8p &1p; 8y <3h r-4h="90/5h.8A" 9="5h"> \'),a.2f("1g/2s.1c",\' <3h 9="2s-4W" r-4h="{{ 4Z }}"> 8w 28 {{S.1b}} 8r 5K {{S.4s}} <2w I="5l" 5u="3h" 5W="{{S.4s}}" 3g="3x.3g"> {{S.5B}} {{S.6j}} <2w I="5l" 5u="3h" 5W="{{S.6j}}" 3g="3x.3g"> 7Q 3f {{S.4r}}{{S.7K}} 7l <6g 9="s-y-C 13-s-y-C 4z" r-3o="C 3q S.4z"> {{ C }} \')}]);',62,602,'|||||||sdkData||class||||||||||||div|span||||function|ng|list||label|var|value||group|isInternalDebugging|console|log|item|form|right|fa|pull|input|type|length|sm|control|col|text|mp_channel|model|substring|Step|C5ResultData|click|new_credit_card|button|return||mp_merchant_ID|left||||modal|sdkConstants|show||mp_amount|null|stringify|JSON|channel|html|bcard_no|commErrorHandler|mp_editing_enabled|views|controller|close|mp_request_type|Error|if|mp_credit_card_expiry|placeholder|case|nbsp|void|mp_credit_card_cvv|CurrentMsgType|Payload|angular|mp_verification_key|molpayXsdkApp|result|search|module|filter|toString|callNativeWebview|mp_credit_card_country|mp_bill_name|found|mp_order_ID|not|mp_credit_card_bank|mp_transaction_id|mp_app_name|circle|data|lg|token|mp_bill_mobile|MobileNewApiUrl|mp_currency|mp_bill_email|times|HttpPost|scope|errorDesc|mp_country|nresult|name|switch|else|break|mp_credit_card_no_display|hide|credit|available_channel|finalizingpayment|MOLPay|SHA1|www|templateUrl|status|Invalid|center|put|bcard_pin|The|mp_channel_title|mp_channel_editing|rootScope|body|mp_bill_description|Receipt|MY|paymentinfo|dismiss|card|receipt|year|isLoading|then|barcode|API|B4ResultData|month|encode|l_version|token_status|readonly|my|php|MD5|Please|watch|path|mp_username|mp_password|available_token|multi|https|number|mp_credit_card_no|com|onlinepayment|window|B4ResultUrl|index|nativeWebTransactionResults|PasswordHash|merchant_id|country|msgType|location|alertdata|of|chksum|htmlStringBase64|mp_is_secure|device_info|select|nhtmlStringBase64|ApiC5|pointbcard|mp_credit_card_country_title|cvv|tel|amount|options|img|toggle|exp|mp_debug_mode|closemolpay|resolve|size|repeat|base64|in|available_banklist|controllerAs|url|vcode|uibModalInstance|OnApiResponseReceived|vm|updateSdkData|D7Handler|open|animation|status_code|D7ResultData|xxxx|replace|password|credit3|application|Billing|all|when|variables|sha1|billing|mobile|json|Type|footer|checksum|chevron|GetAvailableChannelByIdHandler|GetAvailableChannelByIdUrl|CommunicationError|T1Handler|request|D7|AccessDeniedMidAppnameVerificationkey|date||B4Handler|C5Handler|C5|GetBankListUrl|sdk_version|GetBankListHandler|PaymentInfoCtrl|B3Handler|T1Url|merchantID|deviceDetector|getChannelLogoFromChannelName|row|src|VcodeHash|AuthenticationService|bill_email|bill_mobile|bill_name|ApiD7|split|bcard|app_name|cur|txn_ID|bcard_point|NoChannelFoundCheckCurrencyValue|ChecksumForD7|factory|ApiHandlerService|Malaysia|notes|bar|CLOSE|payment|getCountries|nativeWebCloseAllWindows|maskname|title|checkIfThisIsACashChannel|header|InternalUsed|handler|transactionRequest|Payment|new|doesn|opt|have|icon|mod|http|timeout|PreloadData|logo|check|onChannelListClicked|toplogourl|please|ApiGetAvailableChannelById|Search|countrylistmodal|logo_url|onBankSelected|channelmodal|bank|bank_name|cardnumber|CurrencyNotFound|Pay|orderid|ApiB3|ApiT1|ApiB3A|bill_desc|poweredByMOLPay|onChannelSelected|ApiGetBankList|to|code128c|onPayClicked|Content|urlencoded|Data|container|Online|Accept|headers|render|toFixed|checkIfThisIsAValidCountryCode|POST|statusText|method|getChannelMasknameFromChannelName|pcode_lbl|mp_is_escrow|proceed|PaymentRecordsLogUrl|ApiRecordsLog|CountryNotFound|currency|CryptoJS|onCountrySelected|ID|InvalidCountryCode|TransactionIdForReceiptRequestNotFound|expdate|parseInt|authData|connect|VerificationKeyNotFound|countryArray|B4|100|BCARD|string|MM|Countries|BCard||mp_transaction_request_type|AlertModalCtrl|failed|point|No|device|h2|ApiB4|Bank|onBanklistClicked|CVV|B3|updateBCardPoints|ChannelModalCtrl|FinalizingPaymentCtrl|li|BanklistModalCtrl|nurl|pcode|B3A|indexOf|onCountrylistClicked|CountrylistModalCtrl|manualCloseHandler|ReceiptCtrl|timeoutHttpIntercept|nativeWebClosePopupAndRunScriptOnMOLPayWindow|with|UsernameNotFound|Cash|h4|larger|PasswordNotFound|MerchantIdNotFound|ChecksumForC5|Exp|h5|proceedClicked|pin|AppNameNotFound|errorTitle|alertmodal|run|Card|nativeWebOpenMOLPayWindow|B3AHandler|OrderIdNotFound|molpayResultString|closeAll|xxx|AmountNotFound|sdkCashChannelList|default|banklistmodal|requestPath|YES|use|maybank2u|XP|actionForWindowClose|nCan|Basic|MOLWallet|nativeWebRequestUrlUpdates|getDeviceInfo|hlb|cimb|amb|userAgent|returned|get|raw|Access|chips|nativeWebOpenPopup|mobile_new|GetBankList|GetAvailableChannelById|ab|mpopenpopup|mpopenmolpaywindow|mptransactionresults|Note|mpclosepopupandrunscriptonmolpaywindow|mpcloseallwindows|ngTouch|ngSanitize|recordsLog|document|1e4|config|countries|maha|bootstrap|creditCardInput|routeProvider|httpProvider|FastClick|attach|push|interceptors|otherwise|redirectTo|manualPopupHandler|popup|MYR|mp_url_scheme|payable_amt|for|verification|key|mp_authData|bin|Payable|parseFloat|strict|bank_country|bin4|issuer_bank|or|app|webcash|paylink|esapay|singpost|epay|cash|MBBCDM|PermataBank|merchant|id|denied|ui|Communication|ngRoute|isNumber|appName|tranID|Points|6298|Last|digit|just|send|Use|points|RM1|results|Pin|order_ID|Transaction|message|checksumString|Result|T1|Services|Get|PROCEED|Manual|png|Country|ApiGenBarcode|Finalizing|email|Close|description|Order|wait|offset|horizontal|Platform|main|through|creditcard|Response|cvc|YYYY|GenBarcodeHandler|YY|off|New|templateCache|on|Yes|md5|images|textAlign|fontSize|monospace|font|displayValue|backgroundColor|000|SDK|Version|Authorization|Params|Checksum|quite|height|NO|nCannot|step|next|detected|This|iphone|information|width|uibModal|MainCtrl|_|responded|lineColor|Sent|1001|1002|HttpGet|Not|GET|Request|1003|mID|OK|and|Http|Returned|code|checkbox'.split('|'),0,{})) diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js new file mode 100644 index 0000000..8d978f3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/scripts/vendor.5c181371.js @@ -0,0 +1,11 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a,b,c){"use strict";function d(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function f(a,b,c){var d,g;if(a)if(A(a))for(d in a)"prototype"==d||"length"==d||"name"==d||a.hasOwnProperty&&!a.hasOwnProperty(d)||b.call(c,a[d],d,a);else if(Td(a)||e(a)){var h="object"!=typeof a;for(d=0,g=a.length;g>d;d++)(h||d in a)&&b.call(c,a[d],d,a)}else if(a.forEach&&a.forEach!==f)a.forEach(b,c,a);else if(w(a))for(d in a)b.call(c,a[d],d,a);else if("function"==typeof a.hasOwnProperty)for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);else for(d in a)Cd.call(a,d)&&b.call(c,a[d],d,a);return a}function g(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(v(g)||A(g))for(var h=Object.keys(g),i=0,l=h.length;l>i;i++){var m=h[i],n=g[m];c&&v(n)?z(n)?a[m]=new Date(n.valueOf()):B(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):L(n)?a[m]=n.clone():(v(a[m])||(a[m]=Td(n)?[]:{}),k(a[m],[n],!0)):a[m]=n}}return j(a,d),a}function l(a){return k(a,Ld.call(arguments,1),!1)}function m(a){return k(a,Ld.call(arguments,1),!0)}function n(a){return parseInt(a,10)}function o(a,b){return l(Object.create(a),b)}function p(){}function q(a){return a}function r(a){return function(){return a}}function s(a){return A(a.toString)&&a.toString!==Od}function t(a){return"undefined"==typeof a}function u(a){return"undefined"!=typeof a}function v(a){return null!==a&&"object"==typeof a}function w(a){return null!==a&&"object"==typeof a&&!Pd(a)}function x(a){return"string"==typeof a}function y(a){return"number"==typeof a}function z(a){return"[object Date]"===Od.call(a)}function A(a){return"function"==typeof a}function B(a){return"[object RegExp]"===Od.call(a)}function C(a){return a&&a.window===a}function D(a){return a&&a.$evalAsync&&a.$watch}function E(a){return"[object File]"===Od.call(a)}function F(a){return"[object FormData]"===Od.call(a)}function G(a){return"[object Blob]"===Od.call(a)}function H(a){return"boolean"==typeof a}function I(a){return a&&A(a.then)}function J(a){return a&&y(a.length)&&Ud.test(Od.call(a))}function K(a){return"[object ArrayBuffer]"===Od.call(a)}function L(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function M(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function P(a,b){function d(a,b){var c,d=b.$$hashKey;if(Td(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(w(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Cd.call(a,c)&&(b[c]=e(a[c]));return j(b,d),b}function e(a){if(!v(a))return a;var b=h.indexOf(a);if(-1!==b)return i[b];if(C(a)||D(a))throw Qd("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var e=!1,f=g(a);return f===c&&(f=Td(a)?[]:Object.create(Pd(a)),e=!0),h.push(a),i.push(f),e?d(a,f):f}function g(a){switch(Od.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c}return A(a.cloneNode)?a.cloneNode(!0):void 0}var h=[],i=[];if(b){if(J(b)||K(b))throw Qd("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Qd("cpi","Can't copy! Source and destination are identical.");return Td(b)?b.length=0:f(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),h.push(a),i.push(b),d(a,b)}return e(a)}function Q(a,b){if(Td(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(v(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function R(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Td(a)){if(z(a))return z(b)?R(a.getTime(),b.getTime()):!1;if(B(a))return B(b)?a.toString()==b.toString():!1;if(D(a)||D(b)||C(a)||C(b)||Td(b)||z(b)||B(b))return!1;e=ra();for(d in a)if("$"!==d.charAt(0)&&!A(a[d])){if(!R(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&u(b[d])&&!A(b[d]))return!1;return!0}if(!Td(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!R(a[d],b[d]))return!1;return!0}}return!1}function S(a,b,c){return a.concat(Ld.call(b,c))}function T(a,b){return Ld.call(a,b||0)}function U(a,b){var c=arguments.length>2?T(arguments,2):[];return!A(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,S(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function V(a,d){var e=d;return"string"==typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?e=c:C(d)?e="$WINDOW":d&&b===d?e="$DOCUMENT":D(d)&&(e="$SCOPE"),e}function W(a,b){return t(a)?c:(y(b)||(b=b?2:null),JSON.stringify(a,V,b))}function X(a){return x(a)?JSON.parse(a):a}function Y(a,b){a=a.replace(Zd,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function Z(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function $(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=Y(b,d);return Z(a,c*(e-d))}function _(a){a=Id(a).clone();try{a.empty()}catch(b){}var c=Id("
    ").append(a).html();try{return a[0].nodeType===de?Dd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Dd(b)})}catch(b){return Dd(c)}}function aa(a){try{return decodeURIComponent(a)}catch(b){}}function ba(a){var b={};return f((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=aa(d),u(d)&&(e=u(e)?aa(e):!0,Cd.call(b,d)?Td(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function ca(a){var b=[];return f(a,function(a,c){Td(a)?f(a,function(a){b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}):b.push(ea(c,!0)+(a===!0?"":"="+ea(a,!0)))}),b.length?b.join("&"):""}function da(a){return ea(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ea(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function fa(a,b){var c,d,e=$d.length;for(d=0;e>d;++d)if(c=$d[d]+b,x(c=a.getAttribute(c)))return c;return null}function ga(a,b){var c,d,e={};f($d,function(b){var e=b+"app";!c&&a.hasAttribute&&a.hasAttribute(e)&&(c=a,d=a.getAttribute(e))}),f($d,function(b){var e,f=b+"app";!c&&(e=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(f))}),c&&(e.strictDi=null!==fa(c,"strict-di"),b(c,d?[d]:[],e))}function ha(c,d,e){v(e)||(e={});var g={strictDi:!1};e=l(g,e);var h=function(){if(c=Id(c),c.injector()){var a=c[0]===b?"document":_(c);throw Qd("btstrpd","App Already Bootstrapped with this Element '{0}'",a.replace(//,">"))}d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),e.debugInfoEnabled&&d.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),d.unshift("ng");var f=eb(d,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},i=/^NG_ENABLE_DEBUG_INFO!/,j=/^NG_DEFER_BOOTSTRAP!/;return a&&i.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(i,"")),a&&!j.test(a.name)?h():(a.name=a.name.replace(j,""),Rd.resumeBootstrap=function(a){return f(a,function(a){d.push(a)}),h()},void(A(Rd.resumeDeferredBootstrap)&&Rd.resumeDeferredBootstrap()))}function ia(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ja(a){var b=Rd.element(a).injector();if(!b)throw Qd("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ka(a,b){return b=b||"_",a.replace(_d,function(a,c){return(c?b:"")+a.toLowerCase()})}function la(){var b;if(!ae){var d=Yd();Jd=t(d)?a.jQuery:d?a[d]:c,Jd&&Jd.fn.on?(Id=Jd,l(Jd.fn,{scope:we.scope,isolateScope:we.isolateScope,controller:we.controller,injector:we.injector,inheritedData:we.inheritedData}),b=Jd.cleanData,Jd.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Jd._data(d,"events"),c&&c.$destroy&&Jd(d).triggerHandler("$destroy");b(a)}):Id=Fa,Rd.element=Id,ae=!0}}function ma(a,b,c){if(!a)throw Qd("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function na(a,b,c){return c&&Td(a)&&(a=a[a.length-1]),ma(A(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function oa(a,b){if("hasOwnProperty"===a)throw Qd("badname","hasOwnProperty is not a valid {0} name",b)}function pa(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&A(a)?U(f,a):a}function qa(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Id(Ld.call(a,0,e))),b.push(c));return b||a}function ra(){return Object.create(null)}function sa(a){function b(a,b,c){return a[b]||(a[b]=c())}var c=d("$injector"),e=d("ng"),f=b(a,"angular",Object);return f.$$minErr=f.$$minErr||d,b(f,"module",function(){var a={};return function(d,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(d,"module"),f&&a.hasOwnProperty(d)&&(a[d]=null),b(a,d,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function b(a,b){return function(c,f){return f&&A(f)&&(f.$$moduleName=d),e.push([a,b,arguments]),k}}if(!f)throw c("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",d);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:d,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function ta(a){var b=[];return JSON.stringify(a,function(a,c){if(c=V(a,c),v(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function ua(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):t(a)?"undefined":"string"!=typeof a?ta(a):a}function va(b){l(b,{bootstrap:ha,copy:P,extend:l,merge:m,equals:R,element:Id,forEach:f,injector:eb,noop:p,bind:U,toJson:W,fromJson:X,identity:q,isUndefined:t,isDefined:u,isString:x,isFunction:A,isObject:v,isNumber:y,isElement:L,isArray:Td,version:he,isDate:z,lowercase:Dd,uppercase:Ed,callbacks:{counter:0},getTestability:ja,$$minErr:d,$$csp:Xd,reloadWithDebugInfo:ia}),(Kd=sa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:wc}),a.provider("$compile",ob).directive({a:Cf,input:Tf,textarea:Tf,form:Hf,script:Og,select:Rg,style:Tg,option:Sg,ngBind:Wf,ngBindHtml:Yf,ngBindTemplate:Xf,ngClass:$f,ngClassEven:ag,ngClassOdd:_f,ngCloak:bg,ngController:cg,ngForm:If,ngHide:Hg,ngIf:fg,ngInclude:gg,ngInit:ig,ngNonBindable:yg,ngPluralize:Cg,ngRepeat:Dg,ngShow:Gg,ngStyle:Ig,ngSwitch:Jg,ngSwitchWhen:Kg,ngSwitchDefault:Lg,ngOptions:Bg,ngTransclude:Ng,ngModel:vg,ngList:jg,ngChange:Zf,pattern:Vg,ngPattern:Vg,required:Ug,ngRequired:Ug,minlength:Xg,ngMinlength:Xg,maxlength:Wg,ngMaxlength:Wg,ngValue:Vf,ngModelOptions:xg}).directive({ngInclude:hg}).directive(Df).directive(dg),a.provider({$anchorScroll:fb,$animate:Me,$animateCss:Pe,$$animateJs:Ke,$$animateQueue:Le,$$AnimateRunner:Oe,$$animateAsyncRun:Ne,$browser:lb,$cacheFactory:mb,$controller:tb,$document:ub,$exceptionHandler:vb,$filter:Kc,$$forceReflow:Ue,$interpolate:Jb,$interval:Kb,$http:Fb,$httpParamSerializer:xb,$httpParamSerializerJQLike:yb,$httpBackend:Hb,$xhrFactory:Gb,$location:Yb,$log:Zb,$parse:qc,$rootScope:vc,$q:rc,$$q:sc,$sce:Ac,$sceDelegate:zc,$sniffer:Bc,$templateCache:nb,$templateRequest:Cc,$$testability:Dc,$timeout:Ec,$window:Hc,$$rAF:uc,$$jqLite:$a,$$HashMap:Ae,$$cookieReader:Jc})}])}function wa(){return++je}function xa(a){return a.replace(me,function(a,b,c,d){return d?c.toUpperCase():c}).replace(ne,"Moz$1")}function ya(a){return!re.test(a)}function za(a){var b=a.nodeType;return b===be||!b||b===fe}function Aa(a){for(var b in ie[a.ng339])return!0;return!1}function Ba(a){for(var b=0,c=a.length;c>b;b++)Ja(a[b])}function Ca(a,b){var c,d,e,g,h=b.createDocumentFragment(),i=[];if(ya(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),d=(se.exec(a)||["",""])[1].toLowerCase(),e=ue[d]||ue._default,c.innerHTML=e[1]+a.replace(te,"<$1>")+e[2],g=e[0];g--;)c=c.lastChild;i=S(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",f(i,function(a){h.appendChild(a)}),h}function Da(a,c){c=c||b;var d;return(d=qe.exec(a))?[c.createElement(d[1])]:(d=Ca(a,c))?d.childNodes:[]}function Ea(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Fa(a){if(a instanceof Fa)return a;var b;if(x(a)&&(a=Vd(a),b=!0),!(this instanceof Fa)){if(b&&"<"!=a.charAt(0))throw pe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Fa(a)}b?Pa(this,Da(a)):Pa(this,a)}function Ga(a){return a.cloneNode(!0)}function Ha(a,b){if(b||Ja(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ja(c[d])}function Ia(a,b,c,d){if(u(d))throw pe("offargs","jqLite#off() does not support the `selector` argument");var e=Ka(a),g=e&&e.events,h=e&&e.handle;if(h)if(b){var i=function(b){var d=g[b];u(c)&&O(d||[],c),u(c)&&d&&d.length>0||(le(a,b,h),delete g[b])};f(b.split(" "),function(a){i(a),oe[a]&&i(oe[a])})}else for(b in g)"$destroy"!==b&&le(a,b,h),delete g[b]}function Ja(a,b){var d=a.ng339,e=d&&ie[d];if(e){if(b)return void delete e.data[b];e.handle&&(e.events.$destroy&&e.handle({},"$destroy"),Ia(a)),delete ie[d],a.ng339=c}}function Ka(a,b){var d=a.ng339,e=d&&ie[d];return b&&!e&&(a.ng339=d=wa(),e=ie[d]={events:{},data:{},handle:c}),e}function La(a,b,c){if(za(a)){var d=u(c),e=!d&&b&&!v(b),f=!b,g=Ka(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];l(h,b)}}}function Ma(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function Na(a,b){b&&a.setAttribute&&f(b.split(" "),function(b){a.setAttribute("class",Vd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vd(b)+" "," ")))})}function Oa(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");f(b.split(" "),function(a){a=Vd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Vd(c))}}function Pa(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Qa(a,b){return Ra(a,"$"+(b||"ngController")+"Controller")}function Ra(a,b,c){a.nodeType==fe&&(a=a.documentElement);for(var d=Td(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(u(c=Id.data(a,d[e])))return c;a=a.parentNode||a.nodeType===ge&&a.host}}function Sa(a){for(Ha(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ta(a,b){b||Ha(a);var c=a.parentNode;c&&c.removeChild(a)}function Ua(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Id(c).on("load",b)}function Va(a,b){var c=xe[b.toLowerCase()];return c&&ye[N(a)]&&c}function Wa(a){return ze[a]}function Xa(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(t(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Ya;f>1&&(e=Q(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Ya(a,b,c){c.call(a,b)}function Za(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ve.call(a,d))&&c.call(a,b)}function $a(){this.$get=function(){return l(Fa,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Oa(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),Na(a,b)}})}}function _a(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||i)():d+":"+a}function ab(a,b){if(b){var c=0;this.nextUid=function(){return++c}}f(a,this.put,this)}function bb(a){var b=a.toString().replace(Fe,""),c=b.match(Be)||b.match(Ce);return c}function cb(a){var b=bb(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function db(a,b,c){var d,e,g;if("function"==typeof a){if(!(d=a.$inject)){if(d=[],a.length){if(b)throw x(c)&&c||(c=a.name||cb(a)),Ge("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);e=bb(a),f(e[1].split(De),function(a){a.replace(Ee,function(a,b,c){d.push(c)})})}a.$inject=d}}else Td(a)?(g=a.length-1,na(a[g],"fn"),d=a.slice(0,g)):na(a,"fn",!0);return d}function eb(a,b){function d(a){return function(b,c){return v(b)?void f(b,h(a)):a(b,c)}}function e(a,b){if(oa(a,"service"),(A(b)||Td(b))&&(b=y.instantiate(b)),!b.$get)throw Ge("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=C.invoke(b,this);if(t(c))throw Ge("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function i(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function j(a,b){return i(a,["$injector",function(a){return a.instantiate(b)}])}function k(a,b){return i(a,r(b),!1)}function l(a,b){oa(a,"constant"),w[a]=b,z[a]=b}function m(a,b){var c=y.get(a+q),d=c.$get;c.$get=function(){var a=C.invoke(d,c);return C.invoke(b,null,{$delegate:a})}}function n(a){ma(t(a)||Td(a),"modulesToLoad","not an array");var b,c=[];return f(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=y.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{x(a)?(b=Kd(a),c=c.concat(n(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):A(a)?c.push(y.invoke(a)):Td(a)?c.push(y.invoke(a)):na(a,"module")}catch(e){throw Td(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ge("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function o(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===p)throw Ge("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=p,a[b]=c(b,d)}catch(e){throw a[b]===p&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=eb.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Ge("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Hd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(Function.prototype.toString.call(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Td(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Td(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:eb.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var p={},q="Provider",s=[],u=new ab([],!0),w={$provide:{provider:d(e),factory:d(i),service:d(j),value:d(k),constant:d(l),decorator:m}},y=w.$injector=o(w,function(a,b){throw Rd.isString(b)&&s.push(b),Ge("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},B=o(z,function(a,b){var d=y.get(a+q,b);return C.invoke(d.$get,d,c,a)}),C=B;w["$injector"+q]={$get:r(B)};var D=n(a);return C=B.get("$injector"),C.strictDi=b,f(D,function(a){a&&C.invoke(a)}),C}function fb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===N(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(A(a))a=a();else if(L(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else y(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=x(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Ua(function(){d.$evalAsync(h)})}),h}]}function gb(a,b){return a||b?a?b?(Td(a)&&(a=a.join(" ")),Td(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function hb(a){for(var b=0;bj&&this.remove(n.key),b}},get:function(a){if(j";var d=ja.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function F(a,b){try{a.addClass(b)}catch(c){}}function G(a,c,d,e,f){a instanceof Id||(a=Id(a));for(var g=/\S+/,h=0,i=a.length;i>h;h++){var j=a[h];j.nodeType===de&&j.nodeValue.match(g)&&Ea(j,a[h]=b.createElement("span"))}var k=J(a,c,a,d,e,f);G.$$addScopeClass(a);var l=null;return function(b,c,d){ma(b,"scope"),f&&f.needsNewScope&&(b=b.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=I(h));var i;if(i="html"!==l?Id(ba(l,Id("
    ").append(a).html())):c?we.clone.call(a):a,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return G.$$addScopeInfo(i,b),c&&c(i,b),k&&k(b,i,i,e),i}}function I(a){var b=a&&a[0];return b&&"foreignobject"!==N(b)&&Od.call(b).match(/SVG/)?"svg":"html"}function J(a,b,d,e,f,g){function h(a,d,e,f){var g,h,i,j,k,l,m,n,q;if(o){var r=d.length;for(q=new Array(r),k=0;kk;)i=q[p[k++]],g=p[k++],h=p[k++],g?(g.scope?(j=a.$new(),G.$$addScopeInfo(Id(i),j)):j=a,n=g.transcludeOnThisElement?K(a,g.transclude,f):!g.templateOnThisElement&&f?f:!f&&b?K(a,b):null,g(h,j,i,e,n)):h&&h(a,i.childNodes,c,f)}for(var i,j,k,l,m,n,o,p=[],q=0;qs;s++){var u=!1,w=!1;j=r[s],k=j.name,p=Vd(j.value),o=pb(k),(q=qa.test(o))&&(k=k.replace(Re,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=o.match(sa);y&&W(y[1])&&(u=k,w=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=pb(k.toLowerCase()),i[l]=k,(q||!c.hasOwnProperty(l))&&(c[l]=p,Va(a,l)&&(c[l]=!0)),da(a,b,p,l,q),V(b,l,"A",d,e,u,w)}if(g=a.className,v(g)&&(g=g.animVal),x(g)&&""!==g)for(;f=n.exec(g);)l=pb(f[2]),V(b,l,"C",d,e)&&(c[l]=Vd(f[3])),g=g.substr(f.index+f[0].length);break;case de:if(11===Hd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===de;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);aa(b,a.nodeValue);break;case ee:try{f=m.exec(a.nodeValue),f&&(l=pb(f[1]),V(b,l,"M",d,e)&&(c[l]=Vd(f[2])))}catch(z){}}return b.sort(Z),b}function M(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Qe("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==be&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Id(d)}function P(a,b,c){return function(d,e,f,g,h){return e=M(e[0],b,c),a(d,e,f,g,h)}}function Q(a,b,c,d,e,f){if(a)return G(b,c,d,e,f);var g;return function(){return g||(g=G(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function S(a,d,g,h,j,k,m,n,o){function p(a,b,c,d){a&&(c&&(a=P(a,c,d)),a.require=u.require,a.directiveName=y,(I===u||u.$$isolateScope)&&(a=fa(a,{isolateScope:!0})),m.push(a)),b&&(c&&(b=P(b,c,d)),b.require=u.require,b.directiveName=y,(I===u||u.$$isolateScope)&&(b=fa(b,{isolateScope:!0})),n.push(b))}function q(a,b,c,d){var e;if(x(b)){var g=b.match(w),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(e=d&&d[h],e=e&&e.instance),!e){var k="$"+h+"Controller";e=i?c.inheritedData(k):c.data(k)}if(!e&&!j)throw Qe("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Td(b)){e=[];for(var l=0,m=b.length;m>l;l++)e[l]=q(a,b[l],c,d)}else v(b)&&(e={},f(b,function(b,f){e[f]=q(a,b,c,d)}));return e||null}function r(a,b,c,d,e,f){var g=ra();for(var h in d){var j=d[h],k={$scope:j===I||j.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},l=j.controller;"@"==l&&(l=b[j.name]);var m=i(l,k,!0,j.controllerAs);g[j.name]=m,S||a.data("$"+j.name+"Controller",m.instance)}return g}function s(a,b,e,h,i){function j(a,b,d,e){var f;if(D(a)||(e=d,d=b,b=a,a=c),S&&(f=w),d||(d=S?y.parent():y),!e)return i(a,b,f,d,O);var g=i.$$slots[e];if(g)return g(a,b,f,d,O);if(t(g))throw Qe("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',e,_(y))}var k,o,p,s,u,w,x,y,z,B,C;d===e?(z=g,y=g.$$element):(y=Id(e),z=new la(y,g)),u=b,I?s=b.$new(!0):F&&(u=b.$parent),i&&(x=j,x.$$boundTransclude=i,x.isSlotFilled=function(a){return!!i.$$slots[a]}),H&&(w=r(y,z,x,H,s,b)),I&&(G.$$addScopeInfo(y,s,!0,!(J&&(J===I||J===I.$$originalDirective))),G.$$addScopeClass(y,!0),s.$$isolateBindings=I.$$isolateBindings,B=ha(b,z,s,s.$$isolateBindings,I),B&&s.$on("$destroy",B));for(var E in w){var K=H[E],L=w[E],M=K.$$bindings.bindToController;L.identifier&&M&&(C=ha(u,z,L.instance,M,K));var N=L();N!==L.instance&&(L.instance=N,y.data("$"+K.name+"Controller",N),C&&C(),C=ha(u,z,L.instance,M,K))}for(f(H,function(a,b){var c=a.require;a.bindToController&&!Td(c)&&v(c)&&l(w[b].instance,q(b,c,y,w))}),f(w,function(a){A(a.instance.$onInit)&&a.instance.$onInit()}),k=0,o=m.length;o>k;k++)p=m[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x);var O=b;for(I&&(I.template||null===I.templateUrl)&&(O=s),a&&a(O,e.childNodes,c,i),k=n.length-1;k>=0;k--)p=n[k],ga(p,p.isolateScope?s:b,y,z,p.require&&q(p.directiveName,p.require,y,w),x)}o=o||{};for(var u,y,z,B,C,E=-Number.MAX_VALUE,F=o.newScopeDirective,H=o.controllerDirectives,I=o.newIsolateScopeDirective,J=o.templateDirective,K=o.nonTlbTranscludeDirective,O=!1,R=!1,S=o.hasElementTranscludeDirective,V=g.$$element=Id(d),W=k,Z=h,aa=!1,ca=!1,da=0,ia=a.length;ia>da;da++){u=a[da];var ja=u.$$start,ka=u.$$end;if(ja&&(V=M(d,ja,ka)),z=c,E>u.priority)break;if((C=u.scope)&&(u.templateUrl||(v(C)?($("new/isolated scope",I||F,u,V),I=u):$("new/isolated scope",I,u,V)),F=F||u),y=u.name,!aa&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(var ma,na=da+1;ma=a[na++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){ca=!0;break}aa=!0}if(!u.templateUrl&&u.controller&&(C=u.controller,H=H||ra(),$("'"+y+"' controller",H[y],u,V),H[y]=u),C=u.transclude)if(O=!0,u.$$tlb||($("transclusion",K,u,V),K=u),"element"==C)S=!0,E=u.priority,z=V,V=g.$$element=Id(b.createComment(" "+y+": "+g[y]+" ")),d=V[0],ea(j,T(z),d),Z=Q(ca,z,h,E,W&&W.name,{nonTlbTranscludeDirective:K});else{var oa=ra();if(z=Id(Ga(d)).contents(),v(C)){z=[];var qa=ra(),sa=ra();f(C,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,qa[a]=b,oa[b]=null,sa[b]=c}),f(V.contents(),function(a){var b=qa[pb(N(a))];b?(sa[b]=!0,oa[b]=oa[b]||[],oa[b].push(a)):z.push(a)}),f(sa,function(a,b){if(!a)throw Qe("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ta in oa)oa[ta]&&(oa[ta]=Q(ca,oa[ta],h))}V.empty(),Z=Q(ca,z,h,c,c,{needsNewScope:u.$$isolateScope||u.$$newScope}),Z.$$slots=oa}if(u.template)if(R=!0,$("template",J,u,V),J=u,C=A(u.template)?u.template(V,g):u.template,C=pa(C),u.replace){if(W=u,z=ya(C)?[]:rb(ba(u.templateNamespace,Vd(C))),d=z[0],1!=z.length||d.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");ea(j,V,d);var ua={$attr:{}},va=L(d,[],ua),wa=a.splice(da+1,a.length-(da+1));(I||F)&&U(va,I,F),a=a.concat(va).concat(wa),X(g,ua),ia=a.length}else V.html(C);if(u.templateUrl)R=!0,$("template",J,u,V),J=u,u.replace&&(W=u),s=Y(a.splice(da,a.length-da),V,g,j,O&&Z,m,n,{controllerDirectives:H,newScopeDirective:F!==u&&F,newIsolateScopeDirective:I,templateDirective:J,nonTlbTranscludeDirective:K}),ia=a.length;else if(u.compile)try{B=u.compile(V,g,Z),A(B)?p(null,B,ja,ka):B&&p(B.pre,B.post,ja,ka)}catch(xa){e(xa,_(V))}u.terminal&&(s.terminal=!0,E=Math.max(E,u.priority))}return s.scope=F&&F.scope===!0,s.transcludeOnThisElement=O,s.templateOnThisElement=R,s.transclude=Z,o.hasElementTranscludeDirective=S,s}function U(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=o(a[d],{$$isolateScope:b,$$newScope:c})}function V(b,c,d,f,g,h,i){if(c===g)return null;var l=null;if(j.hasOwnProperty(c))for(var m,n=a.get(c+k),p=0,q=n.length;q>p;p++)try{m=n[p],(t(f)||f>m.priority)&&-1!=m.restrict.indexOf(d)&&(h&&(m=o(m,{$$start:h,$$end:i})),b.push(m),l=m)}catch(r){e(r)}return l}function W(b){if(j.hasOwnProperty(b))for(var c,d=a.get(b+k),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function X(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;f(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),f(b,function(b,f){"class"==f?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Y(a,b,c,d,e,h,i,j){var k,l,m=[],n=b[0],p=a.shift(),q=o(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=A(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),g(r).then(function(g){var o,t,u,w;if(g=pa(g),p.replace){if(u=ya(g)?[]:rb(ba(s,Vd(g))),o=u[0],1!=u.length||o.nodeType!==be)throw Qe("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);t={$attr:{}},ea(d,b,o);var x=L(o,[],t);v(p.scope)&&U(x,!0),a=x.concat(a),X(c,t)}else o=n,b.html(g);for(a.unshift(q),k=S(a,o,c,e,b,p,h,i,j),f(d,function(a,c){a==o&&(d[c]=b[0])}),l=J(b[0].childNodes,e);m.length;){var y=m.shift(),z=m.shift(),A=m.shift(),B=m.shift(),C=b[0];if(!y.$$destroyed){if(z!==n){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ga(o)),ea(A,Id(z),C),F(Id(C),D)}w=k.transcludeOnThisElement?K(y,k.transclude,B):B,k(l,y,C,d,w)}}m=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(m?m.push(b,c,d,f):(k.transcludeOnThisElement&&(f=K(b,k.transclude,e)),k(l,b,c,d,f)))}}function Z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function ca(a,b){if("srcdoc"==b)return u.HTML;var c=N(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?u.RESOURCE_URL:void 0}function da(a,b,c,e,f){var g=ca(a,e);f=s[e]||f;var h=d(c,!0,g,f);if(h){if("multiple"===e&&"select"===N(a))throw Qe("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",_(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=ra());if(y.test(e))throw Qe("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==c&&(h=k&&d(k,!0,g,f),c=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function ea(a,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(a)for(e=0,f=a.length;f>e;e++)if(a[e]==g){a[e++]=d;for(var j=e,k=j+h-1,l=a.length;l>j;j++,k++)l>k?a[j]=a[k]:delete a[j];a.length-=h-1,a.context===g&&(a.context=d);break}i&&i.replaceChild(d,g);var m=b.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Id.hasData(g)&&(Id.data(d,Id.data(g)),Id(g).off("$destroy")),Id.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function fa(a,b){return l(function(){return a.apply(null,arguments)},a,b)}function ga(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,_(c))}}function ha(a,b,c,e,g){var i=[];return f(e,function(e,f){var j,k,l,m,n,o=e.attrName,q=e.optional,r=e.mode;switch(r){case"@":q||Cd.call(b,o)||(c[f]=b[o]=void 0),b.$observe(o,function(a){x(a)&&(c[f]=a)}),b.$$observers[o].$$scope=a,j=b[o],x(j)?c[f]=d(j)(a):H(j)&&(c[f]=j);break;case"=":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),m=k.literal?R:function(a,b){return a===b||a!==a&&b!==b},l=k.assign||function(){throw j=c[f]=k(a),Qe("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[o],o,g.name)},j=c[f]=k(a);var s=function(b){return m(b,c[f])||(m(b,j)?l(a,b=c[f]):c[f]=b),j=b};s.$stateful=!0,n=e.collection?a.$watchCollection(b[o],s):a.$watch(h(b[o],s),null,k.literal),i.push(n);break;case"<":if(!Cd.call(b,o)){if(q)break;b[o]=void 0}if(q&&!b[o])break;k=h(b[o]),c[f]=k(a),n=a.$watch(k,function(a){c[f]=a},k.literal),i.push(n);break;case"&":if(k=b.hasOwnProperty(o)?h(b[o]):p,k===p&&q)break;c[f]=function(b){return k(a,b)}}}),i.length&&function(){for(var a=0,b=i.length;b>a;++a)i[a]()}}var ia=/^\w/,ja=b.createElement("div"),la=function(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a};la.prototype={$normalize:pb,$addClass:function(a){a&&a.length>0&&B.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&B.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=qb(a,b);c&&c.length&&B.addClass(this.$$element,c);var d=qb(b,a);d&&d.length&&B.removeClass(this.$$element,d)},$set:function(a,b,c,d){var g,h=this.$$element[0],i=Va(h,a),j=Wa(a),k=a;if(i?(this.$$element.prop(a,b),d=i):j&&(this[j]=b,k=j),this[a]=b,d?this.$attr[a]=d:(d=this.$attr[a],d||(this.$attr[a]=d=ka(a,"-"))),g=N(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=C(b,"src"===a);else if("img"===g&&"srcset"===a){for(var l="",m=Vd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),r=0;q>r;r++){var s=2*r;l+=C(Vd(p[s]),!0),l+=" "+Vd(p[s+1])}var u=Vd(p[2*r]).split(/\s/);l+=C(Vd(u[0]),!0),2===u.length&&(l+=" "+Vd(u[1])),this[a]=b=l}c!==!1&&(null===b||t(b)?this.$$element.removeAttr(d):ia.test(d)?this.$$element.attr(d,b):E(this.$$element[0],d,b));var v=this.$$observers;v&&f(v[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=ra()),e=d[a]||(d[a]=[]);return e.push(b),r.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||t(c[a])||b(c[a])}),function(){O(e,b)}}};var na=d.startSymbol(),oa=d.endSymbol(),pa="{{"==na&&"}}"==oa?q:function(a){return a.replace(/\{\{/g,na).replace(/}}/g,oa)},qa=/^ngAttr[A-Z]/,sa=/^(.+)Start$/;return G.$$addBindingInfo=z?function(a,b){var c=a.data("$binding")||[];Td(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:p,G.$$addBindingClass=z?function(a){F(a,"ng-binding")}:p,G.$$addScopeInfo=z?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:p,G.$$addScopeClass=z?function(a,b){F(a,b?"ng-isolate-scope":"ng-scope")}:p,G}]}function pb(a){return xa(a.replace(Re,""))}function qb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function rb(a){a=Id(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===ee&&Md.call(a,b,1)}return a}function sb(a,b){if(b&&x(b))return b;if(x(a)){var c=Te.exec(a);if(c)return c[3]}}function tb(){var a={},b=!1;this.register=function(b,c){oa(b,"controller"),v(b)?l(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(e,f){function g(a,b,c,e){if(!a||!v(a.$scope))throw d("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,b);a.$scope[b]=c}return function(d,h,i,j){var k,m,n,o;if(i=i===!0,j&&x(j)&&(o=j),x(d)){if(m=d.match(Te),!m)throw Se("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",d);n=m[1],o=o||m[3],d=a.hasOwnProperty(n)?a[n]:pa(h.$scope,n,!0)||(b?pa(f,n,!0):c),na(d,n,!0)}if(i){var p=(Td(d)?d[d.length-1]:d).prototype;k=Object.create(p||null),o&&g(h,o,k,n||d.name);var q;return q=l(function(){var a=e.invoke(d,k,h,n);return a!==k&&(v(a)||A(a))&&(k=a,o&&g(h,o,k,n||d.name)),k},{instance:k,identifier:o})}return k=e.instantiate(d,h,n),o&&g(h,o,k,n||d.name),k}}]}function ub(){this.$get=["$window",function(a){return Id(a.document)}]}function vb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function wb(a){return v(a)?z(a)?a.toISOString():W(a):a}function xb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return g(a,function(a,c){null===a||t(a)||(Td(a)?f(a,function(a,d){b.push(ea(c)+"="+ea(wb(a)))}):b.push(ea(c)+"="+ea(wb(a))))}),b.join("&")}}}function yb(){this.$get=function(){return function(a){function b(a,d,e){null===a||t(a)||(Td(a)?f(a,function(a,c){b(a,d+"["+(v(a)?c:"")+"]")}):v(a)&&!z(a)?g(a,function(a,c){b(a,d+(e?"":"[")+c+(e?"":"]"))}):c.push(ea(d)+"="+ea(wb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function zb(a,b){if(x(a)){var c=a.replace(Ze,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ve)||Ab(c))&&(a=X(c))}}return a}function Ab(a){var b=a.match(Xe);return b&&Ye[b[0]].test(a)}function Bb(a){function b(a,b){a&&(d[a]=d[a]?d[a]+", "+b:b)}var c,d=ra();return x(a)?f(a.split("\n"),function(a){c=a.indexOf(":"),b(Dd(Vd(a.substr(0,c))),Vd(a.substr(c+1)))}):v(a)&&f(a,function(a,c){b(Dd(c),Vd(a))}),d}function Cb(a){var b;return function(c){if(b||(b=Bb(a)),c){var d=b[Dd(c)];return void 0===d&&(d=null),d}return b}}function Db(a,b,c,d){return A(d)?d(a,b,c):(f(d,function(d){a=d(a,b,c)}),a)}function Eb(a){return a>=200&&300>a}function Fb(){var a=this.defaults={transformResponse:[zb],transformRequest:[function(a){return!v(a)||E(a)||G(a)||F(a)?a:W(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:Q(We),put:Q(We),patch:Q(We)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var e=!0;this.useLegacyPromiseExtensions=function(a){return u(a)?(e=!!a,this):e};var g=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,i,j,k,m,n){function o(b){function g(a){var b=l({},a);return b.data=Db(a.data,a.headers,a.status,j.transformResponse),Eb(a.status)?b:m.reject(b)}function h(a,b){var c,d={};return f(a,function(a,e){A(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a}),d}function i(b){var c,d,e,f=a.headers,g=l({},b.headers);f=l({},f.common,f[Dd(b.method)]);a:for(c in f){d=Dd(c);for(e in g)if(Dd(e)===d)continue a;g[c]=f[c]}return h(g,Q(b))}if(!v(b))throw d("$http")("badreq","Http request configuration must be an object. Received: {0}",b);if(!x(b.url))throw d("$http")("badreq","Http request configuration url must be a string. Received: {0}",b.url);var j=l({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);j.headers=i(b),j.method=Ed(j.method),j.paramSerializer=x(j.paramSerializer)?n.get(j.paramSerializer):j.paramSerializer;var k=function(b){var d=b.headers,e=Db(b.data,Cb(d),c,b.transformRequest);return t(e)&&f(d,function(a,b){"content-type"===Dd(b)&&delete d[b]}),t(b.withCredentials)&&!t(a.withCredentials)&&(b.withCredentials=a.withCredentials),r(b,e).then(g,g)},o=[k,c],p=m.when(j);for(f(y,function(a){(a.request||a.requestError)&&o.unshift(a.request,a.requestError),(a.response||a.responseError)&&o.push(a.response,a.responseError)});o.length;){var q=o.shift(),s=o.shift();p=p.then(q,s)}return e?(p.success=function(a){return na(a,"fn"),p.then(function(b){a(b.data,b.status,b.headers,j)}),p},p.error=function(a){return na(a,"fn"),p.then(null,function(b){a(b.data,b.status,b.headers,j)}),p}):(p.success=_e("success"),p.error=_e("error")),p}function p(a){f(arguments,function(a){o[a]=function(b,c){return o(l({},c||{},{method:a,url:b}))}})}function q(a){f(arguments,function(a){o[a]=function(b,c,d){return o(l({},d||{},{method:a,url:b,data:c}))}})}function r(d,e){function f(a,c,d,e){function f(){g(c,a,d,e)}n&&(Eb(a)?n.put(y,[a,c,Bb(d),e]):n.remove(y)),b?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function g(a,b,c,e){b=b>=-1?b:0,(Eb(b)?q.resolve:q.reject)({data:a,status:b,headers:Cb(c),config:d,statusText:e})}function j(a){g(a.data,a.status,Q(a.headers()),a.statusText)}function l(){var a=o.pendingRequests.indexOf(d);-1!==a&&o.pendingRequests.splice(a,1)}var n,p,q=m.defer(),r=q.promise,x=d.headers,y=s(d.url,d.paramSerializer(d.params));if(o.pendingRequests.push(d),r.then(l,l),!d.cache&&!a.cache||d.cache===!1||"GET"!==d.method&&"JSONP"!==d.method||(n=v(d.cache)?d.cache:v(a.cache)?a.cache:w),n&&(p=n.get(y),u(p)?I(p)?p.then(j,j):Td(p)?g(p[1],p[0],Q(p[2]),p[3]):g(p,200,{},"OK"):n.put(y,r)),t(p)){var z=Gc(d.url)?i()[d.xsrfCookieName||a.xsrfCookieName]:c;z&&(x[d.xsrfHeaderName||a.xsrfHeaderName]=z),h(d.method,y,e,f,x,d.timeout,d.withCredentials,d.responseType)}return r}function s(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=j("$http");a.paramSerializer=x(a.paramSerializer)?n.get(a.paramSerializer):a.paramSerializer;var y=[];return f(g,function(a){y.unshift(x(a)?n.get(a):n.invoke(a))}),o.pendingRequests=[],p("get","delete","head","jsonp"),q("post","put","patch"),o.defaults=a,o}]}function Gb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Hb(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Ib(a,d,a.defer,b.angular.callbacks,c[0])}]}function Ib(a,b,c,d,e){function g(a,b,c){var f=e.createElement("script"),g=null;return f.type="text/javascript",f.src=a,f.async=!0,g=function(a){le(f,"load",g),le(f,"error",g),e.body.removeChild(f),f=null;var h=-1,i="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ke(f,"load",g),ke(f,"error",g),e.body.appendChild(f),g}return function(e,h,i,j,k,l,m,n){function o(){s&&s(),v&&v.abort()}function q(b,d,e,f,g){u(y)&&c.cancel(y),s=v=null,b(d,e,f,g),a.$$completeOutstandingRequest(p)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Dd(e)){var r="_"+(d.counter++).toString(36);d[r]=function(a){d[r].data=a,d[r].called=!0};var s=g(h.replace("JSON_CALLBACK","angular.callbacks."+r),r,function(a,b){q(j,a,d[r].data,"",b),d[r]=p})}else{var v=b(e,h);v.open(e,h,!0),f(k,function(a,b){u(a)&&v.setRequestHeader(b,a)}),v.onload=function(){var a=v.statusText||"",b="response"in v?v.response:v.responseText,c=1223===v.status?204:v.status;0===c&&(c=b?200:"file"==Fc(h).protocol?404:0),q(j,c,b,v.getAllResponseHeaders(),a)};var w=function(){q(j,-1,null,null,"")};if(v.onerror=w,v.onabort=w,m&&(v.withCredentials=!0),n)try{v.responseType=n}catch(x){if("json"!==n)throw x}v.send(t(i)?null:i)}if(l>0)var y=c(o,l);else I(l)&&l.then(o)}}function Jb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=W(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function j(f,j,n,o){function p(a){try{return a=G(a),o&&!u(a)?a:h(a)}catch(b){d(af.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var q;if(!j){var s=g(f);q=r(s),q.exp=f,q.expressions=[],q.$$watchDelegate=i}return q}o=!!o;for(var v,w,x,y=0,z=[],B=[],C=f.length,D=[],E=[];C>y;){if(-1==(v=f.indexOf(a,y))||-1==(w=f.indexOf(b,v+k))){y!==C&&D.push(g(f.substring(y)));break}y!==v&&D.push(g(f.substring(y,v))),x=f.substring(v+k,w),z.push(x),B.push(c(x,p)),y=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&af.throwNoconcat(f),!j||z.length){var F=function(a){for(var b=0,c=z.length;c>b;b++){if(o&&t(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return l(function(a){var b=0,c=z.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(af.interr(f,g))}},{exp:f,expressions:z,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);A(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var k=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return j.startSymbol=function(){return a},j.endSymbol=function(){return b},j}]}function Kb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?T(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=u(j)&&!j,r=(q?d:c).defer(),s=r.promise;return i=u(i)?i:0,s.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(s.$$intervalId),delete g[s.$$intervalId]),q||a.$apply()},h),g[s.$$intervalId]=r,s}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Lb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=da(b[c]);return b.join("/")}function Mb(a,b){var c=Fc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=n(c.port)||cf[c.protocol]||null}function Nb(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Fc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=ba(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Ob(a,b){return 0===b.indexOf(a)?b.substr(a.length):void 0}function Pb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Qb(a){return a.replace(/(#.+)|#$/,"$1")}function Rb(a){return a.substr(0,Pb(a).lastIndexOf("/")+1)}function Sb(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Tb(a,b,c){this.$$html5=!0,c=c||"",Mb(a,this),this.$$parse=function(a){var c=Ob(b,a);if(!x(c))throw df("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Nb(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=ca(this.$$search),c=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return u(f=Ob(a,d))?(g=f,h=u(f=Ob(c,f))?b+(Ob("/",f)||f):a+g):u(f=Ob(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Ub(a,b,c){Mb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return 0===b.indexOf(c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Ob(a,d)||Ob(b,d);t(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",t(g)&&(a=d,this.replace())):(f=Ob(c,g),t(f)&&(f=g)),Nb(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Pb(a)==Pb(b)?(this.$$parse(b),!0):!1}}function Vb(a,b,c){this.$$html5=!0,Ub.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Pb(d)?f=d:(g=Ob(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){ +var b=ca(this.$$search),d=this.$$hash?"#"+da(this.$$hash):"";this.$$url=Lb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Wb(a){return function(){return this[a]}}function Xb(a,b){return function(c){return t(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function Yb(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a},this.html5Mode=function(a){return H(a)?(b.enabled=a,this):v(a)?(H(a.enabled)&&(b.enabled=a.enabled),H(a.requireBase)&&(b.requireBase=a.requireBase),H(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw df("nobase","$location in HTML5 mode requires a tag to be present!");l=Sb(n)+(m||"/"),k=e.history?Tb:Vb}else l=Pb(n),k=Ub;var o=Rb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Id(a.target);"a"!==N(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");v(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Fc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Qb(j.absUrl())!=Qb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return t(Ob(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Qb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Qb(d.url()),b=Qb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function Zb(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=c.console||{},e=b[a]||b.log||p,g=!1;try{g=!!e.apply}catch(h){}return g?function(){var a=[];return f(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function $b(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ff("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function _b(a){return a+""}function ac(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw ff("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ff("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw ff("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function bc(a,b){if(a){if(a.constructor===a)throw ff("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===gf||a===hf||a===jf)throw ff("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function cc(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ff("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function dc(a,b){return"undefined"!=typeof a?a:b}function ec(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function fc(a,b){var c=a(b);return!c.$stateful}function gc(a,b){var c,d;switch(a.type){case nf.Program:c=!0,f(a.body,function(a){gc(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case nf.Literal:a.constant=!0,a.toWatch=[];break;case nf.UnaryExpression:gc(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case nf.BinaryExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case nf.LogicalExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case nf.ConditionalExpression:gc(a.test,b),gc(a.alternate,b),gc(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case nf.Identifier:a.constant=!1,a.toWatch=[a];break;case nf.MemberExpression:gc(a.object,b),a.computed&&gc(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case nf.CallExpression:c=a.filter?fc(b,a.callee.name):!1,d=[],f(a.arguments,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&fc(b,a.callee.name)?d:[a];break;case nf.AssignmentExpression:gc(a.left,b),gc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case nf.ArrayExpression:c=!0,d=[],f(a.elements,function(a){gc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ObjectExpression:c=!0,d=[],f(a.properties,function(a){gc(a.value,b),c=c&&a.value.constant,a.value.constant||d.push.apply(d,a.value.toWatch)}),a.constant=c,a.toWatch=d;break;case nf.ThisExpression:a.constant=!1,a.toWatch=[];break;case nf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function hc(a){if(1==a.length){var b=a[0].expression,d=b.toWatch;return 1!==d.length?d:d[0]!==b?d:c}}function ic(a){return a.type===nf.Identifier||a.type===nf.MemberExpression}function jc(a){return 1===a.body.length&&ic(a.body[0].expression)?{type:nf.AssignmentExpression,left:a.body[0].expression,right:{type:nf.NGValueParameter},operator:"="}:void 0}function kc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===nf.Literal||a.body[0].expression.type===nf.ArrayExpression||a.body[0].expression.type===nf.ObjectExpression)}function lc(a){return a.constant}function mc(a,b){this.astBuilder=a,this.$filter=b}function nc(a,b){this.astBuilder=a,this.$filter=b}function oc(a){return"constructor"==a}function pc(a){return A(a.valueOf)?a.valueOf():pf.call(a)}function qc(){var a=ra(),b=ra();this.$get=["$filter",function(d){function e(c,e,f){var h,n,s;switch(f=f||r,typeof c){case"string":c=c.trim(),s=c;var t=f?b:a;if(h=t[s],!h){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2));var u=f?q:o,v=new mf(u),w=new of(v,d,u);h=w.parse(c),h.constant?h.$$watchDelegate=l:n?h.$$watchDelegate=h.literal?k:j:h.inputs&&(h.$$watchDelegate=i),f&&(h=g(h)),t[s]=h}return m(h,e);case"function":return m(c,e);default:return m(p,e)}}function g(a){function b(b,c,d,e){var f=r;r=!0;try{return a(b,c,d,e)}finally{r=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=g(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cm;m++)k[m]=h,l[m]=null;return a.$watch(function(a){for(var b=!1,d=0,f=i.length;f>d;d++){var j=i[d](a);(b||(b=!h(j,k[d])))&&(l[d]=j,k[d]=j&&pc(j))}return b&&(g=e(a,c,c,l)),g},b,d,f)}function j(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,A(b)&&b.apply(this,arguments),u(a)&&d.$$postDigest(function(){u(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;return f(a,function(a){u(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return d(a)},function(a,c,d){h=a,A(b)&&b.call(this,a,c,d),e(a)&&d.$$postDigest(function(){e(h)&&g()})},c)}function l(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function m(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==k&&c!==j,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return u(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==i?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=i,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var n=Xd().noUnsafeEval,o={csp:n,expensiveChecks:!1},q={csp:n,expensiveChecks:!0},r=!1;return e.$$runningExpensiveChecks=function(){return r},e}]}function rc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return tc(function(b){a.$evalAsync(b)},b)}]}function sc(){this.$get=["$browser","$exceptionHandler",function(a,b){return tc(function(b){a.defer(b)},b)}]}function tc(a,b){function e(){this.$$state={status:0}}function g(a,b){return function(c){b.call(a,c)}}function h(a){var d,e,f;f=a.pending,a.processScheduled=!1,a.pending=c;for(var g=0,h=f.length;h>g;++g){e=f[g][0],d=f[g][a.status];try{A(d)?e.resolve(d(a.value)):1===a.status?e.resolve(a.value):e.reject(a.value)}catch(i){e.reject(i),b(i)}}}function i(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){h(b)}))}function j(){this.promise=new e}function k(a){var b=new j,c=0,d=Td(a)?[]:{};return f(a,function(a,e){c++,r(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})}),0===c&&b.resolve(d),b.promise}var m=d("$q",TypeError),n=function(){var a=new j;return a.resolve=g(a,a.resolve),a.reject=g(a,a.reject),a.notify=g(a,a.notify),a};l(e.prototype,{then:function(a,b,c){if(t(a)&&t(b)&&t(c))return this;var d=new j;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&i(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return q(b,!0,a)},function(b){return q(b,!1,a)},b)}}),l(j.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(m("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function c(a){h||(h=!0,f.$$resolve(a))}function d(a){h||(h=!0,f.$$reject(a))}var e,f=this,h=!1;try{(v(a)||A(a))&&(e=a&&a.then),A(e)?(this.promise.$$state.status=-1,e.call(a,c,d,g(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,i(this.promise.$$state))}catch(j){d(j),b(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,i(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(A(a)?a(c):c)}catch(h){b(h)}}})}});var o=function(a){var b=new j;return b.reject(a),b.promise},p=function(a,b){var c=new j;return b?c.resolve(a):c.reject(a),c.promise},q=function(a,b,c){var d=null;try{A(c)&&(d=c())}catch(e){return p(e,!1)}return I(d)?d.then(function(){return p(a,b)},function(a){return p(a,!1)}):p(a,b)},r=function(a,b,c,d){var e=new j;return e.resolve(a),e.promise.then(b,c,d)},s=r,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!A(a))throw m("norslvr","Expected resolverFn, got '{0}'",a);var d=new j;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=n,u.reject=o,u.when=r,u.resolve=s,u.all=k,u}function uc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function vc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=i(),this.$$ChildScope=null}return b.prototype=a,b}var b=10,c=d("$rootScope"),g=null,h=null;this.digestTtl=function(a){return arguments.length&&(b=a),b},this.$get=["$exceptionHandler","$parse","$browser",function(d,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Hd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function n(){this.$id=i(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function o(a){if(y.$$phase)throw c("inprog","{0} already in progress",y.$$phase);y.$$phase=a}function q(){y.$$phase=null}function r(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function u(){}function w(){for(;C.length;)try{C.shift()()}catch(a){d(a)}h=null}function x(){null===h&&(h=k.defer(function(){y.$apply(w)}))}n.prototype={constructor:n,$new:function(b,c){var d;return c=c||this,b?(d=new n,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,h=f.$$watchers,i={fn:b,last:u,get:e,exp:d||a,eq:!!c};return g=null,A(b)||(i.fn=p),h||(h=f.$$watchers=[]),h.unshift(i),r(this,1),function(){O(h,i)>=0&&r(f,-1),g=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(e,e,h)):b(e,d,h)}var d=new Array(a.length),e=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(e,e,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,f){e[0]=a,d[0]=c,b(e,a===c?e:d,f)}):(f(a,function(a,b){var f=h.$watch(a,function(a,f){e[b]=a,d[b]=f,i||(i=!0,h.$evalAsync(c))});g.push(f)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function c(a){f=a;var b,c,d,h,i;if(!t(f)){if(v(f))if(e(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],d=i!==i&&h!==h,d||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(c in f)Cd.call(f,c)&&(b++,h=f[c],i=g[c],c in g?(d=i!==i&&h!==h,d||i===h||(l++,g[c]=h)):(q++,g[c]=h,l++));if(q>b){l++;for(c in g)Cd.call(f,c)||(q--,delete g[c])}}else g!==f&&(g=f,l++);return l}}function d(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(v(f))if(e(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,c),n=[],o={},p=!0,q=0;return this.$watch(m,d)},$digest:function(){var a,e,f,i,j,l,m,n,p,r,s,t,v=b,x=this,C=[];o("$digest"),k.$$checkUrlChange(),this===y&&null!==h&&(k.defer.cancel(h),w()),g=null;do{for(n=!1,r=x;z.length;){try{t=z.shift(),t.scope.$eval(t.expression,t.locals)}catch(D){d(D)}g=null}a:do{if(l=r.$$watchers)for(m=l.length;m--;)try{if(a=l[m])if(j=a.get,(e=j(r))===(f=a.last)||(a.eq?R(e,f):"number"==typeof e&&"number"==typeof f&&isNaN(e)&&isNaN(f))){if(a===g){n=!1;break a}}else n=!0,g=a,a.last=a.eq?P(e,null):e,i=a.fn,i(e,f===u?e:f,r),5>v&&(s=4-v,C[s]||(C[s]=[]),C[s].push({msg:A(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:e,oldVal:f}))}catch(D){d(D)}if(!(p=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(p=r.$$nextSibling);)r=r.$parent}while(r=p);if((n||z.length)&&!v--)throw q(),c("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",b,C)}while(n||z.length);for(q();B.length;)try{B.shift()()}catch(D){d(D)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===y&&k.$$applicationDestroyed(),r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,m(this)}},$eval:function(a,b){return j(a)(this,b)},$evalAsync:function(a,b){y.$$phase||z.length||k.defer(function(){z.length&&y.$digest()}),z.push({scope:this,expression:j(a),locals:b})},$$postDigest:function(a){B.push(a)},$apply:function(a){try{o("$apply");try{return this.$eval(a)}finally{q()}}catch(b){d(b)}finally{try{y.$digest()}catch(b){throw d(b),b}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&C.push(b),a=j(a),x()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]),c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,s(e,1,a))}},$emit:function(a,b){var c,e,f,g=[],h=this,i=!1,j={name:a,targetScope:h,stopPropagation:function(){i=!0},preventDefault:function(){j.defaultPrevented=!0},defaultPrevented:!1},k=S([j],arguments,1);do{for(c=h.$$listeners[a]||g,j.currentScope=h,e=0,f=c.length;f>e;e++)if(c[e])try{c[e].apply(null,k)}catch(l){d(l)}else c.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,b){var c=this,e=c,f=c,g={name:a,targetScope:c,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!c.$$listenerCount[a])return g;for(var h,i,j,k=S([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){d(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==c&&e.$$nextSibling))for(;e!==c&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var y=new n,z=y.$$asyncQueue=[],B=y.$$postDigestQueue=[],C=y.$$applyAsyncQueue=[];return y}]}function wc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return u(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return u(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Fc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function xc(a){if("self"===a)return a;if(x(a)){if(a.indexOf("***")>-1)throw qf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Wd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(B(a))return new RegExp("^"+a.source+"$");throw qf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yc(a){var b=[];return u(a)&&f(a,function(a){b.push(xc(a))}),b}function zc(){this.SCE_CONTEXTS=rf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=yc(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=yc(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Gc(b):!!a.exec(b.href)}function e(c){var e,f,g=Fc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw qf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||t(b)||""===b)return b;if("string"!=typeof b)throw qf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||t(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===rf.RESOURCE_URL){if(e(b))return b;throw qf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===rf.HTML)return j(b);throw qf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw qf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[rf.HTML]=f(k),l[rf.CSS]=f(k),l[rf.URL]=f(k),l[rf.JS]=f(k),l[rf.RESOURCE_URL]=f(l[rf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Ac(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Hd)throw qf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var d=Q(rf);d.isEnabled=function(){return a},d.trustAs=c.trustAs,d.getTrusted=c.getTrusted,d.valueOf=c.valueOf,a||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=q),d.parseAs=function(a,c){var e=b(c);return e.literal&&e.constant?e:b(c,function(b){return d.getTrusted(a,b)})};var e=d.parseAs,g=d.getTrusted,h=d.trustAs;return f(rf,function(a,b){var c=Dd(b);d[xa("parse_as_"+c)]=function(b){return e(a,b)},d[xa("get_trusted_"+c)]=function(b){return g(a,b)},d[xa("trust_as_"+c)]=function(b){return h(a,b)}}),d}]}function Bc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=n((/android (\d+)/.exec(Dd((a.navigator||{}).userAgent))||[])[1]),g=/Boxee/i.test((a.navigator||{}).userAgent),h=b[0]||{},i=/^(Moz|webkit|ms)(?=[A-Z])/,j=h.body&&h.body.style,k=!1,l=!1;if(j){for(var m in j)if(d=i.exec(m)){c=d[0],c=c.substr(0,1).toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in j&&"webkit"),k=!!("transition"in j||c+"Transition"in j),l=!!("animation"in j||c+"Animation"in j),!f||k&&l||(k=x(j.webkitTransition),l=x(j.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>f||g),hasEvent:function(a){if("input"===a&&11>=Hd)return!1;if(t(e[a])){var b=h.createElement("div");e[a]="on"+a in b}return e[a]},csp:Xd(),vendorPrefix:c,transitions:k,animations:l,android:f}}]}function Cc(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw Qe("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,x(g)&&b.get(g)||(g=e.getTrustedResourceUrl(g));var j=c.defaults&&c.defaults.transformResponse;return Td(j)?j=j.filter(function(a){return a!==zb}):j===zb&&(j=null),c.get(g,l({cache:b,transformResponse:j},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Dc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var d={};return d.findBindings=function(a,b,c){var d=a.getElementsByClassName("ng-binding"),e=[];return f(d,function(a){var d=Rd.element(a).data("$binding");d&&f(d,function(d){if(c){var f=new RegExp("(^|\\s)"+Wd(b)+"(\\s|\\||$)");f.test(d)&&e.push(a)}else-1!=d.indexOf(b)&&e.push(a)})}),e},d.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),t(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Jc(){this.$get=Ic}function Kc(a){function b(d,e){if(v(d)){var g={};return f(d,function(a,c){g[c]=b(c,a)}),g}return a.factory(d+c,e)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Pc),b("date",cd),b("filter",Lc),b("json",dd),b("limitTo",ed),b("lowercase",Af),b("number",Qc),b("orderBy",fd),b("uppercase",Bf)}function Lc(){return function(a,b,c){if(!e(a)){if(null==a)return a;throw d("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Oc(b);switch(h){case"function":f=b;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Mc(b,c,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Mc(a,b,c){var d,e=v(a)&&"$"in a;return b===!0?b=R:A(b)||(b=function(a,b){return t(a)?!1:null===a||null===b?a===b:v(b)||v(a)&&!s(a)?!1:(a=Dd(""+a),b=Dd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!v(d)?Nc(d,a.$,b,!1):Nc(d,a,b,c)}}function Nc(a,b,c,d,e){var f=Oc(a),g=Oc(b);if("string"===g&&"!"===b.charAt(0))return!Nc(a,b.substring(1),c,d);if(Td(a))return a.some(function(a){return Nc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Nc(a[h],b,c,!0))return!0;return e?!1:Nc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!A(i)&&!t(i)){var j="$"===h,k=j?a:a[h];if(!Nc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Oc(a){return null===a?"null":typeof a}function Pc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return t(c)&&(c=b.CURRENCY_SYM),t(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Tc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Qc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Tc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Rc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(vf))>-1&&(a=a.replace(vf,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==wf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==wf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>uf&&(b=b.splice(0,uf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Sc(a,b,c,d){var e=a.d,f=e.length-a.i;b=t(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0)e.splice(g);else{a.i=1,e.length=g=b+1;for(var i=0;g>i;i++)e[i]=0}for(h>=5&&e[g-1]++;b>f;f++)e.push(0);var j=e.reduceRight(function(a,b,c,d){return b+=a,d[c]=b%10,Math.floor(b/10)},0);j&&(e.unshift(j),a.i++)}function Tc(a,b,c,d,e){if(!x(a)&&!y(a)||isNaN(a))return"";var f,g=!isFinite(a),h=!1,i=Math.abs(a)+"",j="";if(g)j="∞";else{f=Rc(i),Sc(f,e,b.minFrac,b.maxFrac);var k=f.d,l=f.i,m=f.e,n=[];for(h=k.reduce(function(a,b){return a&&!b},!0);0>l;)k.unshift(0),l++;l>0?n=k.splice(l):(n=k,k=[0]);var o=[];for(k.length>b.lgSize&&o.unshift(k.splice(-b.lgSize).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Uc(a,b,c){var d="";for(0>a&&(d="-",a=-a),a=""+a;a.length0||f>-c)&&(f+=c),0===f&&-12==c&&(f=12),Uc(f,b,d)}}function Wc(a,b){return function(c,d){var e=c["get"+a](),f=Ed(b?"SHORT"+a:a);return d[f][e]}}function Xc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Uc(Math[d>0?"floor":"ceil"](d/60),2)+Uc(Math.abs(d%60),2)}function Yc(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Zc(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function $c(a){return function(b){var c=Yc(b.getFullYear()),d=Zc(b),e=+d-+c,f=1+Math.round(e/6048e5);return Uc(f,a)}}function _c(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function ad(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function bd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function cd(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=n(b[9]+b[10]),f=n(b[9]+b[11])),g.call(d,n(b[1]),n(b[2])-1,n(b[3]));var i=n(b[4]||0)-e,j=n(b[5]||0)-f,k=n(b[6]||0),l=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,l),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g,h,i="",j=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,x(c)&&(c=zf.test(c)?n(c):b(c)),y(c)&&(c=new Date(c)),!z(c)||!isFinite(c.getTime()))return c;for(;d;)h=yf.exec(d),h?(j=S(j,h,1),d=j.pop()):(j.push(d),d=null);var k=c.getTimezoneOffset();return e&&(k=Y(e,k),c=$(c,e,!0)),f(j,function(b){g=xf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function dd(){return function(a,b){return t(b)&&(b=2),W(a,b)}}function ed(){return function(a,b,c){return b=Math.abs(Number(b))===1/0?Number(b):n(b),isNaN(b)?a:(y(a)&&(a=a.toString()),Td(a)||x(a)?(c=!c||isNaN(c)?0:n(c),c=0>c?Math.max(0,a.length+c):c,b>=0?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function fd(a){function b(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=q;if(A(b))e=b;else if(x(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant))){var f=e();e=function(a){return a[f]}}return{get:e,descending:d*c}})}function c(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a,b){return"function"==typeof a.valueOf&&(a=a.valueOf(),c(a))?a:s(a)&&(a=a.toString(),c(a))?a:b}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"string"===c?a=a.toLowerCase():"object"===c&&(a=f(a,b)), +{value:a,type:c}}function h(a,b){var c=0;return a.type===b.type?a.value!==b.value&&(c=a.valued&&!(c=h(a.predicateValues[d],b.predicateValues[d])*k[d].descending);++d);return c}if(null==a)return a;if(!e(a))throw d("orderBy")("notarray","Expected array but received: {0}",a);Td(c)||(c=[c]),0===c.length&&(c=["+"]);var k=b(c,f);k.push({get:function(){return{}},descending:f?-1:1});var l=Array.prototype.map.call(a,i);return l.sort(j),a=l.map(function(a){return a.value})}}function gd(a){return A(a)&&(a={link:a}),a.restrict=a.restrict||"AC",r(a)}function hd(a,b){a.$name=b}function id(a,b,d,e,g){var h=this,i=[];h.$error={},h.$$success={},h.$pending=c,h.$name=g(b.name||b.ngForm||"")(d),h.$dirty=!1,h.$pristine=!0,h.$valid=!0,h.$invalid=!1,h.$submitted=!1,h.$$parentForm=Ef,h.$rollbackViewValue=function(){f(i,function(a){a.$rollbackViewValue()})},h.$commitViewValue=function(){f(i,function(a){a.$commitViewValue()})},h.$addControl=function(a){oa(a.$name,"input"),i.push(a),a.$name&&(h[a.$name]=a),a.$$parentForm=h},h.$$renameControl=function(a,b){var c=a.$name;h[c]===a&&delete h[c],h[b]=a,a.$name=b},h.$removeControl=function(a){a.$name&&h[a.$name]===a&&delete h[a.$name],f(h.$pending,function(b,c){h.$setValidity(c,null,a)}),f(h.$error,function(b,c){h.$setValidity(c,null,a)}),f(h.$$success,function(b,c){h.$setValidity(c,null,a)}),O(i,a),a.$$parentForm=Ef},xd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(O(d,c),0===d.length&&delete a[b])},$animate:e}),h.$setDirty=function(){e.removeClass(a,mg),e.addClass(a,ng),h.$dirty=!0,h.$pristine=!1,h.$$parentForm.$setDirty()},h.$setPristine=function(){e.setClass(a,mg,ng+" "+Ff),h.$dirty=!1,h.$pristine=!0,h.$submitted=!1,f(i,function(a){a.$setPristine()})},h.$setUntouched=function(){f(i,function(a){a.$setUntouched()})},h.$setSubmitted=function(){e.addClass(a,Ff),h.$submitted=!0,h.$$parentForm.$setSubmitted()}}function jd(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function kd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d)}function ld(a,b,c,d,e,f){var g=Dd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0}),b.on("compositionend",function(){h=!1,i()})}var i=function(a){if(j&&(f.defer.cancel(j),j=null),!h){var e=b.val(),i=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Vd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,i)}};if(e.hasEvent("input"))b.on("input",i);else{var j,k=function(a,b,c){j||(j=f.defer(function(){j=null,b&&b.value===c||i(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",i),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function md(a,b){if(z(a))return a;if(x(a)){Pf.lastIndex=0;var c=Pf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=Yc(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function nd(a,b){return function(c,d){var e,g;if(z(c))return c;if(x(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Jf.test(c))return new Date(c);if(a.lastIndex=0,e=a.exec(c))return e.shift(),g=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},f(e,function(a,c){c=q},h.$observe("min",function(a){q=n(a),i.$validate()})}if(u(h.max)||h.ngMax){var r;i.$validators.max=function(a){return!m(a)||t(r)||d(a)<=r},h.$observe("max",function(a){r=n(a),i.$validate()})}}}function pd(a,b,d,e){var f=b[0],g=e.$$hasNativeValidators=v(f.validity);g&&e.$parsers.push(function(a){var d=b.prop(Bd)||{};return d.badInput||d.typeMismatch?c:a})}function qd(a,b,d,e,f,g){if(pd(a,b,d,e),ld(a,b,d,e,f,g),e.$$parserName="number",e.$parsers.push(function(a){return e.$isEmpty(a)?null:Mf.test(a)?parseFloat(a):c}),e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!y(a))throw tg("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),u(d.min)||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||t(h)||a>=h},d.$observe("min",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),h=y(a)&&!isNaN(a)?a:c,e.$validate()})}if(u(d.max)||d.ngMax){var i;e.$validators.max=function(a){return e.$isEmpty(a)||t(i)||i>=a},d.$observe("max",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),i=y(a)&&!isNaN(a)?a:c,e.$validate()})}}function rd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Kf.test(c)}}function sd(a,b,c,d,e,f){ld(a,b,c,d,e,f),jd(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Lf.test(c)}}function td(a,b,c,d){t(c.name)&&b.attr("name",i());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function ud(a,b,c,d,e){var f;if(u(d)){if(f=a(d),!f.constant)throw tg("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function vd(a,b,c,d,e,f,g,h){var i=ud(h,a,"ngTrueValue",c.ngTrueValue,!0),j=ud(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return R(a,i)}),d.$parsers.push(function(a){return a?i:j})}function wd(a,b){return a="ngClass"+a,["$animate",function(c){function d(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&d.push(a))}),h.data("$classCounts",c),d.join(" ")}function m(a,b){var e=d(b,a),f=d(a,b);e=l(e,1),f=l(f,-1),e&&e.length&&c.addClass(h,e),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||g.$index%2===b){var c=e(a||[]);if(o){if(!R(a,o)){var d=e(o);m(d,c)}}else j(c)}o=Q(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var f=1&c;if(f!==(1&d)){var h=e(g.$eval(i[a]));f===b?j(h):k(h)}})}}}]}function xd(a){function b(a,b,i){t(b)?d("$pending",a,i):e("$pending",a,i),H(b)?b?(l(h.$error,a,i),k(h.$$success,a,i)):(k(h.$error,a,i),l(h.$$success,a,i)):(l(h.$error,a,i),l(h.$$success,a,i)),h.$pending?(f(qg,!0),h.$valid=h.$invalid=c,g("",null)):(f(qg,!1),h.$valid=yd(h.$error),h.$invalid=!h.$valid,g("",h.$valid));var j;j=h.$pending&&h.$pending[a]?c:h.$error[a]?!1:h.$$success[a]?!0:null,g(a,j),h.$$parentForm.$setValidity(a,j,h)}function d(a,b,c){h[a]||(h[a]={}),k(h[a],b,c)}function e(a,b,d){h[a]&&l(h[a],b,d),yd(h[a])&&(h[a]=c)}function f(a,b){b&&!j[a]?(m.addClass(i,a),j[a]=!0):!b&&j[a]&&(m.removeClass(i,a),j[a]=!1)}function g(a,b){a=a?"-"+ka(a,"-"):"",f(kg+a,b===!0),f(lg+a,b===!1)}var h=a.ctrl,i=a.$element,j={},k=a.set,l=a.unset,m=a.$animate;j[lg]=!(j[kg]=i.hasClass(kg)),h.$setValidity=b}function yd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function zd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Ad=/^\/(.+)\/([a-z]*)$/,Bd="validity",Cd=Object.prototype.hasOwnProperty,Dd=function(a){return x(a)?a.toLowerCase():a},Ed=function(a){return x(a)?a.toUpperCase():a},Fd=function(a){return x(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Gd=function(a){return x(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Dd=Fd,Ed=Gd);var Hd,Id,Jd,Kd,Ld=[].slice,Md=[].splice,Nd=[].push,Od=Object.prototype.toString,Pd=Object.getPrototypeOf,Qd=d("ng"),Rd=a.angular||(a.angular={}),Sd=0;Hd=b.documentMode,p.$inject=[],q.$inject=[];var Td=Array.isArray,Ud=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Vd=function(a){return x(a)?a.trim():a},Wd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=$d[c],a=b.querySelector("["+d.replace(":","\\:")+"jq]")){e=a.getAttribute(d+"jq");break}return Yd.name_=e},Zd=/:/g,$d=["ng-","data-ng-","ng:","x-ng-"],_d=/[A-Z]/g,ae=!1,be=1,ce=2,de=3,ee=8,fe=9,ge=11,he={full:"1.5.0",major:1,minor:5,dot:0,codeName:"ennoblement-facilitation"};Fa.expando="ng339";var ie=Fa.cache={},je=1,ke=function(a,b,c){a.addEventListener(b,c,!1)},le=function(a,b,c){a.removeEventListener(b,c,!1)};Fa._data=function(a){return this.cache[a[this.expando]]||{}};var me=/([\:\-\_]+(.))/g,ne=/^moz([A-Z])/,oe={mouseleave:"mouseout",mouseenter:"mouseover"},pe=d("jqLite"),qe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,re=/<|&#?\w+;/,se=/<([\w:-]+)/,te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ue={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ue.optgroup=ue.option,ue.tbody=ue.tfoot=ue.colgroup=ue.caption=ue.thead,ue.th=ue.td;var ve=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},we=Fa.prototype={ready:function(c){function d(){e||(e=!0,c())}var e=!1;"complete"===b.readyState?setTimeout(d):(this.on("DOMContentLoaded",d),Fa(a).on("load",d))},toString:function(){var a=[];return f(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Id(a>=0?this[a]:this[this.length+a])},length:0,push:Nd,sort:[].sort,splice:[].splice},xe={};f("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){xe[Dd(a)]=a});var ye={};f("input,select,option,textarea,button,form,details".split(","),function(a){ye[a]=!0});var ze={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};f({data:La,removeData:Ja,hasData:Aa,cleanData:Ba},function(a,b){Fa[b]=a}),f({data:La,inheritedData:Ra,scope:function(a){return Id.data(a,"$scope")||Ra(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Id.data(a,"$isolateScope")||Id.data(a,"$isolateScopeNoTemplate")},controller:Qa,injector:function(a){return Ra(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ma,css:function(a,b,c){return b=xa(b),u(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,d){var e=a.nodeType;if(e!==de&&e!==ce&&e!==ee){var f=Dd(b);if(xe[f]){if(!u(d))return a[b]||(a.attributes.getNamedItem(b)||p).specified?f:c;d?(a[b]=!0,a.setAttribute(b,f)):(a[b]=!1,a.removeAttribute(f))}else if(u(d))a.setAttribute(b,d);else if(a.getAttribute){var g=a.getAttribute(b,2);return null===g?c:g}}},prop:function(a,b,c){return u(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(t(b)){var c=a.nodeType;return c===be||c===de?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(t(b)){if(a.multiple&&"select"===N(a)){var c=[];return f(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return t(b)?a.innerHTML:(Ha(a,!0),void(a.innerHTML=b))},empty:Sa},function(a,b){Fa.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Sa&&t(2==a.length&&a!==Ma&&a!==Qa?b:c)){if(v(b)){for(d=0;f>d;d++)if(a===La)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=t(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),f({removeData:Ja,on:function(a,b,d,e){if(u(e))throw pe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(za(a)){var f=Ka(a,!0),g=f.events,h=f.handle;h||(h=f.handle=Xa(a,g));for(var i=b.indexOf(" ")>=0?b.split(" "):[b],j=i.length,k=function(b,c,e){var f=g[b];f||(f=g[b]=[],f.specialHandlerWrapper=c,"$destroy"===b||e||ke(a,b,h)),f.push(d)};j--;)b=i[j],oe[b]?(k(oe[b],Za),k(b,c,!0)):k(b)}},off:Ia,one:function(a,b,c){a=Id(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,d=a.parentNode;Ha(a),f(new Fa(b),function(b){c?d.insertBefore(b,c.nextSibling):d.replaceChild(b,a),c=b})},children:function(a){var b=[];return f(a.childNodes,function(a){a.nodeType===be&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===be||c===ge){b=new Fa(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===be){var c=a.firstChild;f(new Fa(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ea(a,Id(b).eq(0).clone()[0])},remove:Ta,detach:function(a){Ta(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Fa(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Oa,removeClass:Na,toggleClass:function(a,b,c){b&&f(b.split(" "),function(b){var d=c;t(d)&&(d=!Ma(a,b)),(d?Oa:Na)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==ge?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ga,triggerHandler:function(a,b,c){var d,e,g,h=b.type||b,i=Ka(a),j=i&&i.events,k=j&&j[h];k&&(d={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:h,target:a},b.type&&(d=l(d,b)),e=Q(k),g=c?[d].concat(c):[d],f(e,function(b){d.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Fa.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)t(e)?(e=a(this[f],b,c,d),u(e)&&(e=Id(e))):Pa(e,a(this[f],b,c,d));return u(e)?e:this},Fa.prototype.bind=Fa.prototype.on,Fa.prototype.unbind=Fa.prototype.off}),ab.prototype={put:function(a,b){this[_a(a,this.nextUid)]=b},get:function(a){return this[_a(a,this.nextUid)]},remove:function(a){var b=this[a=_a(a,this.nextUid)];return delete this[a],b}};var Ae=[function(){this.$get=[function(){return ab}]}],Be=/^([^\(]+?)=>/,Ce=/^[^\(]*\(\s*([^\)]*)\)/m,De=/,/,Ee=/^\s*(_?)(\S+?)\1\s*$/,Fe=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ge=d("$injector");eb.$$annotate=db;var He=d("$animate"),Ie=1,Je="ng-animate",Ke=function(){this.$get=function(){}},Le=function(){var a=new ab,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,d){function e(a,b,c){var d=!1;return b&&(b=x(b)?b.split(" "):Td(b)?b:[],f(b,function(b){b&&(d=!0,a[b]=c)})),d}function g(){f(b,function(b){var c=a.get(b);if(c){var d=ib(b.attr("class")),e="",g="";f(c,function(a,b){var c=!!d[b];a!==c&&(a?e+=(e.length?" ":"")+b:g+=(g.length?" ":"")+b)}),f(b,function(a){e&&Oa(a,e),g&&Na(a,g)}),a.remove(b)}}),b.length=0}function h(c,f,h){var i=a.get(c)||{},j=e(i,f,!0),k=e(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&d.$$postDigest(g))}return{enabled:p,on:p,off:p,pin:p,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Me=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw He("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Je+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw He("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Je)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=hb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",jb(f))},move:function(c,d,e,f){return d=d&&Id(d),e=e&&Id(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",jb(f))},leave:function(b,c){return a.push(b,"leave",jb(c),function(){b.remove()})},addClass:function(b,c,d){return d=jb(d),d.addClass=gb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=jb(d),d.removeClass=gb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=jb(e),e.addClass=gb(e.addClass,c),e.removeClass=gb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=jb(f),f.from=f.from?l(f.from,c):c,f.to=f.to?l(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=gb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Ne=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){kf[a]=!0});var lf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},mf=function(a){this.options=a};mf.prototype={constructor:mf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdent:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw ff("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:nf.Program,body:a}},expressionStatement:function(){return{type:nf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:nf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:nf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:nf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:nf.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:nf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:nf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=P(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:nf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:nf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:nf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:nf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.expression());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:nf.Identifier,name:a.text}},constant:function(){return{type:nf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:nf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:nf.Property,kind:"init"},this.peek().constant?a.key=this.constant():this.peek().identifier?a.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),a.value=this.expression(),b.push(a)}while(this.expect(","));return this.consume("}"),{type:nf.ObjectExpression,properties:b}},throwError:function(a,b){throw ff("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw ff("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},constants:{"true":{type:nf.Literal,value:!0},"false":{type:nf.Literal,value:!1},"null":{type:nf.Literal,value:null},undefined:{type:nf.Literal,value:c},"this":{type:nf.ThisExpression},$locals:{type:nf.LocalsExpression}}},mc.prototype={compile:function(a,b){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},gc(e,d.$filter);var g,h="";if(this.stage="assign",g=jc(e)){this.state.computing="assign";var i=this.nextId();this.recurse(g,i), +this.return_(i),h="fn.assign="+this.generateFunction("assign","s,v,l")}var j=hc(e.body);d.stage="inputs",f(j,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var k='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+h+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",k)(this.$filter,$b,ac,bc,_b,cc,dc,ec,a);return this.state=this.stage=c,l.literal=kc(e),l.constant=lc(e),l},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return f(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return f(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,e,g,h){var i,j,k,l,m=this;if(e=e||p,!h&&u(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,e,g,!0));switch(a.type){case nf.Program:f(a.body,function(b,d){m.recurse(b.expression,c,c,function(a){j=a}),d!==a.body.length-1?m.current().body.push(j,";"):m.return_(j)});break;case nf.Literal:l=this.escape(a.value),this.assign(b,l),e(l);break;case nf.UnaryExpression:this.recurse(a.argument,c,c,function(a){j=a}),l=a.operator+"("+this.ifDefined(j,0)+")",this.assign(b,l),e(l);break;case nf.BinaryExpression:this.recurse(a.left,c,c,function(a){i=a}),this.recurse(a.right,c,c,function(a){j=a}),l="+"===a.operator?this.plus(i,j):"-"===a.operator?this.ifDefined(i,0)+a.operator+this.ifDefined(j,0):"("+i+")"+a.operator+"("+j+")",this.assign(b,l),e(l);break;case nf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case nf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case nf.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),$b(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){g&&1!==g&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||oc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case nf.MemberExpression:i=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,i,c,function(){m.if_(m.notNull(i),function(){g&&1!==g&&m.addEnsureSafeAssignContext(i),a.computed?(j=m.nextId(),m.recurse(a.property,j),m.getStringValue(j),m.addEnsureSafeMemberName(j),g&&1!==g&&m.if_(m.not(m.computedMember(i,j)),m.lazyAssign(m.computedMember(i,j),"{}")),l=m.ensureSafeObject(m.computedMember(i,j)),m.assign(b,l),d&&(d.computed=!0,d.name=j)):($b(a.property.name),g&&1!==g&&m.if_(m.not(m.nonComputedMember(i,a.property.name)),m.lazyAssign(m.nonComputedMember(i,a.property.name),"{}")),l=m.nonComputedMember(i,a.property.name),(m.state.expensiveChecks||oc(a.property.name))&&(l=m.ensureSafeObject(l)),m.assign(b,l),d&&(d.computed=!1,d.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!g);break;case nf.CallExpression:b=b||this.nextId(),a.filter?(j=m.filter(a.callee.name),k=[],f(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),k.push(b)}),l=j+"("+k.join(",")+")",m.assign(b,l),e(b)):(j=m.nextId(),i={},k=[],m.recurse(a.callee,j,i,function(){m.if_(m.notNull(j),function(){m.addEnsureSafeFunction(j),f(a.arguments,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(m.ensureSafeObject(a))})}),i.name?(m.state.expensiveChecks||m.addEnsureSafeObject(i.context),l=m.member(i.context,i.name,i.computed)+"("+k.join(",")+")"):l=j+"("+k.join(",")+")",l=m.ensureSafeObject(l),m.assign(b,l)},function(){m.assign(b,"undefined")}),e(b)}));break;case nf.AssignmentExpression:if(j=this.nextId(),i={},!ic(a.left))throw ff("lval","Trying to assign a value to a non l-value");this.recurse(a.left,c,i,function(){m.if_(m.notNull(i.context),function(){m.recurse(a.right,j),m.addEnsureSafeObject(m.member(i.context,i.name,i.computed)),m.addEnsureSafeAssignContext(i.context),l=m.member(i.context,i.name,i.computed)+a.operator+j,m.assign(b,l),e(b||l)})},1);break;case nf.ArrayExpression:k=[],f(a.elements,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(a)})}),l="["+k.join(",")+"]",this.assign(b,l),e(l);break;case nf.ObjectExpression:k=[],f(a.properties,function(a){m.recurse(a.value,m.nextId(),c,function(b){k.push(m.escape(a.key.type===nf.Identifier?a.key.name:""+a.key.value)+":"+b)})}),l="{"+k.join(",")+"}",this.assign(b,l),e(l);break;case nf.ThisExpression:this.assign(b,"s"),e("s");break;case nf.LocalsExpression:this.assign(b,"l"),e("l");break;case nf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(x(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(y(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw ff("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},nc.prototype={compile:function(a,b){var c=this,d=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,gc(d,c.$filter);var e,g;(e=jc(d))&&(g=this.recurse(e));var h,i=hc(d.body);i&&(h=[],f(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];f(d.body,function(a){j.push(c.recurse(a.expression))});var k=0===d.body.length?function(){}:1===d.body.length?j[0]:function(a,b){var c;return f(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=kc(d),k.constant=lc(d),k},recurse:function(a,b,d){var e,g,h,i=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case nf.Literal:return this.value(a.value,b);case nf.UnaryExpression:return g=this.recurse(a.argument),this["unary"+a.operator](g,b);case nf.BinaryExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.LogicalExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case nf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case nf.Identifier:return $b(a.name,i.expression),i.identifier(a.name,i.expensiveChecks||oc(a.name),b,d,i.expression);case nf.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||($b(a.property.name,i.expression),g=a.property.name),a.computed&&(g=this.recurse(a.property)),a.computed?this.computedMember(e,g,b,d,i.expression):this.nonComputedMember(e,g,i.expensiveChecks,b,d,i.expression);case nf.CallExpression:return h=[],f(a.arguments,function(a){h.push(i.recurse(a))}),a.filter&&(g=this.$filter(a.callee.name)),a.filter||(g=this.recurse(a.callee,!0)),a.filter?function(a,d,e,f){for(var i=[],j=0;j":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:c,name:c,value:a}:a}},identifier:function(a,b,d,e,f){return function(g,h,i,j){var k=h&&a in h?h:g;e&&1!==e&&k&&!k[a]&&(k[a]={});var l=k?k[a]:c;return b&&ac(l,f),d?{context:k,name:a,value:l}:l}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=_b(j),$b(j,e),d&&1!==d&&(cc(l),l&&!l[j]&&(l[j]={})),k=l[j],ac(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,d,e,f,g){return function(h,i,j,k){var l=a(h,i,j,k);f&&1!==f&&(cc(l),l&&!l[b]&&(l[b]={}));var m=null!=l?l[b]:c;return(d||oc(b))&&ac(m,g),e?{context:l,name:b,value:m}:m}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var of=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new nf(this.lexer),this.astCompiler=c.csp?new nc(this.ast,b):new mc(this.ast,b)};of.prototype={constructor:of,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var pf=Object.prototype.valueOf,qf=d("$sce"),rf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Qe=d("$compile"),sf=b.createElement("a"),tf=Fc(a.location.href);Ic.$inject=["$document"],Kc.$inject=["$provide"];var uf=22,vf=".",wf="0";Pc.$inject=["$locale"],Qc.$inject=["$locale"];var xf={yyyy:Vc("FullYear",4),yy:Vc("FullYear",2,0,!0),y:Vc("FullYear",1),MMMM:Wc("Month"),MMM:Wc("Month",!0),MM:Vc("Month",2,1),M:Vc("Month",1,1),dd:Vc("Date",2),d:Vc("Date",1),HH:Vc("Hours",2),H:Vc("Hours",1),hh:Vc("Hours",2,-12),h:Vc("Hours",1,-12),mm:Vc("Minutes",2),m:Vc("Minutes",1),ss:Vc("Seconds",2),s:Vc("Seconds",1),sss:Vc("Milliseconds",3),EEEE:Wc("Day"),EEE:Wc("Day",!0),a:_c,Z:Xc,ww:$c(2),w:$c(1),G:ad,GG:ad,GGG:ad,GGGG:bd},yf=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,zf=/^\-?\d+$/;cd.$inject=["$locale"];var Af=r(Dd),Bf=r(Ed);fd.$inject=["$parse"];var Cf=r({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Od.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Df={};f(xe,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=pb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Df[d]=function(){return{restrict:"A",priority:100,link:e}}}}),f(ze,function(a,b){Df[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Ad);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),f(["src","srcset","href"],function(a){var b=pb("ng-"+a);Df[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Od.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Hd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Ef={$addControl:p,$$renameControl:hd,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ff="ng-submitted";id.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Gf=function(a){return["$timeout","$parse",function(b,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||p}var f={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:id,compile:function(d,f){d.addClass(mg).addClass(kg);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,f,h){var i=h[0];if(!("action"in f)){var j=function(b){a.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),b.preventDefault()};ke(d[0],"submit",j),d.on("$destroy",function(){b(function(){le(d[0],"submit",j)},0,!1)})}var k=h[1]||i.$$parentForm;k.$addControl(i);var m=g?e(i.$name):p;g&&(m(a,i),f.$observe(g,function(b){i.$name!==b&&(m(a,c),i.$$parentForm.$$renameControl(i,b),(m=e(i.$name))(a,i))})),d.on("$destroy",function(){i.$$parentForm.$removeControl(i),m(a,c),l(i,Ef)})}}}};return f}]},Hf=Gf(),If=Gf(!0),Jf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Kf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Lf=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Mf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Nf=/^(\d{4})-(\d{2})-(\d{2})$/,Of=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Pf=/^(\d{4})-W(\d\d)$/,Qf=/^(\d{4})-(\d\d)$/,Rf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sf={text:kd,date:od("date",Nf,nd(Nf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":od("datetimelocal",Of,nd(Of,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:od("time",Rf,nd(Rf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:od("week",Pf,md,"yyyy-Www"),month:od("month",Qf,nd(Qf,["yyyy","MM"]),"yyyy-MM"),number:qd,url:rd,email:sd,radio:td,checkbox:vd,hidden:p,button:p,submit:p,reset:p,file:p},Tf=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sf[Dd(g.type)]||Sf.text)(e,f,g,h[0],b,a,c,d)}}}}],Uf=/^(true|false|\d+)$/,Vf=function(){return{restrict:"A",priority:100,compile:function(a,b){return Uf.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Wf=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=t(a)?"":a})}}}}],Xf=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=t(a)?"":a})}}}}],Yf=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){d.html(a.getTrustedHtml(f(b))||"")})}}}}],Zf=r({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),$f=wd("",!0),_f=wd("Odd",0),ag=wd("Even",1),bg=gd({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),cg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],dg={},eg={blur:!0,focus:!0};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=pb("ng-"+a);dg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};eg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var fg=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=qa(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],gg=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Rd.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!u(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],hg=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Od.call(d[0]).match(/SVG/)?(d.empty(),void a(Ca(f.template,b).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void a(d.contents())(c))}}}],ig=gd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),jg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,e){var g=b.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,i=h?Vd(g):g,j=function(a){if(!t(a)){var b=[];return a&&f(a.split(i),function(a){a&&b.push(h?Vd(a):a)}),b}};e.$parsers.push(j),e.$formatters.push(function(a){return Td(a)?a.join(g):c}),e.$isEmpty=function(a){return!a||!a.length}}}},kg="ng-valid",lg="ng-invalid",mg="ng-pristine",ng="ng-dirty",og="ng-untouched",pg="ng-touched",qg="ng-pending",rg="ng-empty",sg="ng-not-empty",tg=d("ngModel"),ug=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,e,g,h,i,j,k,l){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=c,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=c,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Ef;var m,n=g(d.ngModel),o=n.assign,q=n,r=o,s=null,v=this;this.$$setOptions=function(a){if(v.$options=a,a&&a.getterSetter){var b=g(d.ngModel+"()"),c=g(d.ngModel+"($$$p)");q=function(a){var c=n(a);return A(c)&&(c=b(a)),c},r=function(a,b){A(n(a))?c(a,{$$$p:v.$modelValue}):o(a,v.$modelValue)}}else if(!n.assign)throw tg("nonassign","Expression '{0}' is non-assignable. Element: {1}",d.ngModel,_(e))},this.$render=p,this.$isEmpty=function(a){return t(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){v.$isEmpty(a)?(h.removeClass(e,sg),h.addClass(e,rg)):(h.removeClass(e,rg),h.addClass(e,sg))};var w=0;xd({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:h}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,h.removeClass(e,ng),h.addClass(e,mg)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,h.removeClass(e,mg),h.addClass(e,ng),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,h.setClass(e,og,pg)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,h.setClass(e,pg,og)},this.$rollbackViewValue=function(){i.cancel(s),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!y(v.$modelValue)||!isNaN(v.$modelValue)){var a=v.$$lastCommittedViewValue,b=v.$$rawModelValue,d=v.$valid,e=v.$modelValue,f=v.$options&&v.$options.allowInvalid;v.$$runValidators(b,a,function(a){f||d===a||(v.$modelValue=a?b:c,v.$modelValue!==e&&v.$$writeModelToScope())})}},this.$$runValidators=function(a,b,d){function e(){var a=v.$$parserName||"parse";return t(m)?(i(a,null),!0):(m||(f(v.$validators,function(a,b){i(b,null)}),f(v.$asyncValidators,function(a,b){i(b,null)})),i(a,m),m)}function g(){var c=!0;return f(v.$validators,function(d,e){var f=d(a,b);c=c&&f,i(e,f)}),c?!0:(f(v.$asyncValidators,function(a,b){i(b,null)}),!1)}function h(){var d=[],e=!0;f(v.$asyncValidators,function(f,g){var h=f(a,b);if(!I(h))throw tg("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",h);i(g,c),d.push(h.then(function(){i(g,!0)},function(a){e=!1,i(g,!1)}))}),d.length?k.all(d).then(function(){j(e)},p):j(!0)}function i(a,b){l===w&&v.$setValidity(a,b)}function j(a){l===w&&d(a)}w++;var l=w;return e()&&g()?void h():void j(!1)},this.$commitViewValue=function(){var a=v.$viewValue;i.cancel(s),(v.$$lastCommittedViewValue!==a||""===a&&v.$$hasNativeValidators)&&(v.$$updateEmptyClasses(a),v.$$lastCommittedViewValue=a,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){v.$modelValue!==g&&v.$$writeModelToScope()}var d=v.$$lastCommittedViewValue,e=d;if(m=t(e)?c:!0)for(var f=0;ff;f++){var i=a===c?f:c[f],j=(a[i],x(a[i],i)),k=q(a[i],j);if(b.push(k),h[2]||h[1]){var l=s(d,j);b.push(l)}if(h[4]){var m=u(d,j);b.push(m)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],e=g(c),h=e.length,i=0;h>i;i++){var j=c===e?i:e[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new f(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Rd.copy(a.viewValue):a.viewValue}}}}}function g(b,c,e,g){function j(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function k(a,b,c,d){var e;return b&&Dd(b.nodeName)===c?e=b:(e=d.cloneNode(!1),b?a.insertBefore(e,b):a.appendChild(e)),e}function l(a){for(var b;a;)b=a.nextSibling,Ta(a),a=b}function m(a){var b=o&&o[0],c=x&&x[0];if(b||c)for(;a&&(a===b||a===c||a.nodeType===ee||"option"===N(a)&&""===a.value);)a=a.nextSibling;return a}function n(){var a=y&&p.readValue();y=z.getOptions();var b={},d=c[0].firstChild;if(w&&c.prepend(o),d=m(d),y.items.forEach(function(a){var e,f,g;u(a.group)?(e=b[a.group],e||(f=k(c[0],d,"optgroup",i),d=f.nextSibling,f.label=a.group,e=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),g=k(e.groupElement,e.currentOptionElement,"option",h),j(a,g),e.currentOptionElement=g.nextSibling):(g=k(c[0],d,"option",h),j(a,g),d=g.nextSibling)}),Object.keys(b).forEach(function(a){l(b[a].currentOptionElement)}),l(d),q.$render(),!q.$isEmpty(a)){var e=p.readValue(),f=z.trackBy||r;(f?R(a,e):a===e)||(q.$setViewValue(e),q.$render())}}for(var o,p=g[0],q=g[1],r=e.multiple,s=0,t=c.children(),v=t.length;v>s;s++)if(""===t[s].value){o=t.eq(s);break}var w=!!o,x=Id(h.cloneNode(!1));x.val("?");var y,z=d(e.ngOptions,c,b),A=function(){w||c.prepend(o),c.val(""),o.prop("selected",!0),o.attr("selected",!0)},B=function(){w||o.remove()},C=function(){c.prepend(x),c.val("?"),x.prop("selected",!0),x.attr("selected",!0)},D=function(){x.remove()};r?(q.$isEmpty=function(a){return!a||0===a.length},p.writeValue=function(a){y.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled&&(b.element.selected=!0)})},p.readValue=function(){var a=c.val()||[],b=[];return f(a,function(a){var c=y.selectValueMap[a];c&&!c.disabled&&b.push(y.getViewValueFromOption(c))}),b},z.trackBy&&b.$watchCollection(function(){return Td(q.$viewValue)?q.$viewValue.map(function(a){return z.getTrackByValue(a)}):void 0},function(){q.$render()})):(p.writeValue=function(a){var b=y.getOptionFromViewValue(a);b&&!b.disabled?c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||w?(D(),A()):(B(),C())},p.readValue=function(){var a=y.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),y.getViewValueFromOption(a)):null},z.trackBy&&b.$watch(function(){return z.getTrackByValue(q.$viewValue)},function(){q.$render()})),w?(o.remove(),a(o)(b),o.removeClass("ng-scope")):o=Id(h.cloneNode(!1)),n(),b.$watchCollection(z.getWatchables,n)}var h=b.createElement("option"),i=b.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=p},post:g +}}}],Cg=["$locale","$interpolate","$log",function(a,b,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),n=i.offset||0,o=g.$eval(m)||{},q={},r=b.startSymbol(),s=b.endSymbol(),u=r+l+"-"+n+s,v=Rd.noop;f(i,function(a,b){var c=e.exec(b);if(c){var d=(c[1]?"-":"")+Dd(c[2]);o[d]=h.attr(i.$attr[b])}}),f(o,function(a,c){q[c]=b(a.replace(d,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in o||(d=a.pluralCat(d-n)),d!==k&&!(e&&y(k)&&isNaN(k))){v();var f=q[d];t(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=p,j()):v=g.$watch(f,j),k=d}})}}}],Dg=["$parse","$animate",function(a,g){var h="$$NG_REMOVED",i=d("ngRepeat"),j=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},k=function(a){return a.clone[0]},l=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(d,m){var n=m.ngRepeat,o=b.createComment(" end ngRepeat: "+n+" "),p=n.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);var q=p[1],r=p[2],s=p[3],t=p[4];if(p=q.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!p)throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",q);var u=p[3]||p[1],v=p[2];if(s&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(s)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(s)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",s);var w,x,y,z,A={$id:_a};return t?w=a(t):(y=function(a,b){return _a(b)},z=function(a){return a}),function(a,b,d,m,p){w&&(x=function(b,c,d){return v&&(A[v]=b),A[u]=c,A.$index=d,w(a,A)});var q=ra();a.$watchCollection(r,function(d){var m,r,t,w,A,B,C,D,E,F,G,H,I=b[0],J=ra();if(s&&(a[s]=d),e(d))E=d,D=x||y;else{D=x||z,E=[];for(var K in d)Cd.call(d,K)&&"$"!==K.charAt(0)&&E.push(K)}for(w=E.length,G=new Array(w),m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],C=D(A,B,m),q[C])F=q[C],delete q[C],J[C]=F,G[m]=F;else{if(J[C])throw f(G,function(a){a&&a.scope&&(q[a.id]=a)}),i("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",n,C,B);G[m]={id:C,scope:c,clone:c},J[C]=!0}for(var L in q){if(F=q[L],H=qa(F.clone),g.leave(H),H[0].parentNode)for(m=0,r=H.length;r>m;m++)H[m][h]=!0;F.scope.$destroy()}for(m=0;w>m;m++)if(A=d===E?m:E[m],B=d[A],F=G[m],F.scope){t=I;do t=t.nextSibling;while(t&&t[h]);k(F)!=t&&g.move(qa(F.clone),null,Id(I)),I=l(F),j(F.scope,m,u,B,v,A,w)}else p(function(a,b){F.scope=b;var c=o.cloneNode(!1);a[a.length++]=c,g.enter(a,null,Id(I)),I=c,F.clone=a,J[F.id]=F,j(F.scope,m,u,B,v,A,w)});q=J})}}}}],Eg="ng-hide",Fg="ng-hide-animate",Gg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Eg,{tempClasses:Fg})})}}}],Hg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Eg,{tempClasses:Fg})})}}}],Ig=gd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&f(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Jg=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var h=e.ngSwitch||e.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var d,e;for(d=0,e=k.length;e>d;++d)a.cancel(k[d]);for(k.length=0,d=0,e=l.length;e>d;++d){var h=qa(j[d].clone);l[d].$destroy();var n=k[d]=a.leave(h);n.then(m(k,d))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&f(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.createComment(" end ngSwitchWhen: ");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Kg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Lg=gd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Mg=d("ngTransclude"),Ng=gd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Mg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",_(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Og=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Pg={$setViewValue:p,$render:p},Qg=["$element","$scope","$attrs",function(a,d,e){var f=this,g=new ab;f.ngModelCtrl=Pg,f.unknownOption=Id(b.createElement("option")),f.renderUnknownOption=function(b){var c="? "+_a(b)+" ?";f.unknownOption.val(c),a.prepend(f.unknownOption),a.val(c)},d.$on("$destroy",function(){f.renderUnknownOption=p}),f.removeUnknownOption=function(){f.unknownOption.parent()&&f.unknownOption.remove()},f.readValue=function(){return f.removeUnknownOption(),a.val()},f.writeValue=function(b){f.hasOption(b)?(f.removeUnknownOption(),a.val(b),""===b&&f.emptyOption.prop("selected",!0)):null==b&&f.emptyOption?(f.removeUnknownOption(),a.val("")):f.renderUnknownOption(b)},f.addOption=function(a,b){if(b[0].nodeType!==ee){oa(a,'"option value"'),""===a&&(f.emptyOption=b);var c=g.get(a)||0;g.put(a,c+1),f.ngModelCtrl.$render(),zd(b)}},f.removeOption=function(a){var b=g.get(a);b&&(1===b?(g.remove(a),""===a&&(f.emptyOption=c)):g.put(a,b-1))},f.hasOption=function(a){return!!g.get(a)},f.registerOption=function(a,b,c,d,e){if(d){var g;c.$observe("value",function(a){u(g)&&f.removeOption(g),g=a,f.addOption(a,b)})}else e?a.$watch(e,function(a,d){c.$set("value",a),d!==a&&f.removeOption(d),f.addOption(a,b)}):f.addOption(c.value,b);b.on("$destroy",function(){f.removeOption(c.value),f.ngModelCtrl.$render()})}}],Rg=function(){function a(a,b,c,d){var e=d[1];if(e){var g=d[0];if(g.ngModelCtrl=e,b.on("change",function(){a.$apply(function(){e.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return f(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new ab(a);f(b.find("option"),function(a){a.selected=u(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==e.$viewValue||R(h,e.$viewValue)||(h=Q(e.$viewValue),e.$render()),i=e.$viewValue}),e.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Qg,priority:1,link:{pre:a,post:b}}},Sg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(u(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],Tg=r({restrict:"E",terminal:!1}),Ug=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},Vg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,e,f){if(f){var g,h=e.ngPattern||e.pattern;e.$observe("pattern",function(a){if(x(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw d("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",h,a,_(b));g=a||c,f.$validate()}),f.$validators.pattern=function(a,b){return f.$isEmpty(b)||t(g)||g.test(b)}}}}},Wg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=n(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},Xg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=n(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(la(),va(Rd),Rd.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function d(a,d){var e=d;c===e&&(e=Math.min(b(a),3));var f=Math.pow(10,e),g=(a*f|0)%f;return{v:e,f:g}}var e={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var c=0|a,f=d(a,b);return 1==c&&0==f.v?e.ONE:e.OTHER}})}]),void Id(b).ready(function(){ga(b,ha)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/");var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/ +},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){ +return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){ +function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n'); +}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]; +},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),angular.module("barcode",[]).directive("barcode",["BarcodeService","Code39Service","Code128BService","Code128CService","EanService","Itf14NumberService","ItfNumberService","UpcService",function(a,b,c,d,e,f,g,h){function i(i,j,k){var l={width:2,height:100,quite:10,displayValue:!1,font:"monospace",textAlign:"center",fontSize:12,backgroundColor:"",lineColor:"#000"},m=[];m=a.merge(l,i.options);var n=j.find("canvas")[0];if("img"==k.render&&(n=document.createElement("canvas")),!n.getContext)return null;var o="";switch(k.type){case"upc":o=h;break;case"ean":o=e;break;case"code39":o=b;break;case"code128b":o=c;break;case"code128c":o=d;break;case"itf":o=g;break;case"itf14":o=f}if(""!==o){var p=o.encoded(k.string);if(!angular.isUndefined(p)){var q=function(a){var b,c;c=m.height,r.font=m.fontSize+"px "+m.font,r.textBaseline="bottom",r.textBaseline="top","left"==m.textAlign?(b=m.quite,r.textAlign="left"):"right"==m.textAlign?(b=n.width-m.quite,r.textAlign="right"):(b=n.width/2,r.textAlign="center"),r.fillText(a,b,c)},r=n.getContext("2d");n.width=p.length*m.width+2*m.quite,n.height=m.height+(m.displayValue?1.3*m.fontSize:0),r.clearRect(0,0,n.width,n.height),m.backgroundColor&&(r.fillStyle=m.backgroundColor,r.fillRect(0,0,n.width,n.height)),r.fillStyle=m.lineColor;for(var s=0;s"),a.append(c),{post:j}}return{restrict:"E",scope:{options:"=options"},compile:k}}]),angular.module("barcode").factory("BarcodeService",[function(){"use strict";var a={};return a.merge=function(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c},a}]),angular.module("barcode").factory("Code128Service",[function(){"use strict";var a={},b=[[" ","11011001100",0],["!","11001101100",1],['"',"11001100110",2],["#","10010011000",3],["$","10010001100",4],["%","10001001100",5],["&","10011001000",6],["'","10011000100",7],["(","10001100100",8],[")","11001001000",9],["*","11001000100",10],["+","11000100100",11],[",","10110011100",12],["-","10011011100",13],[".","10011001110",14],["/","10111001100",15],["0","10011101100",16],["1","10011100110",17],["2","11001110010",18],["3","11001011100",19],["4","11001001110",20],["5","11011100100",21],["6","11001110100",22],["7","11101101110",23],["8","11101001100",24],["9","11100101100",25],[":","11100100110",26],[";","11101100100",27],["<","11100110100",28],["=","11100110010",29],[">","11011011000",30],["?","11011000110",31],["@","11000110110",32],["A","10100011000",33],["B","10001011000",34],["C","10001000110",35],["D","10110001000",36],["E","10001101000",37],["F","10001100010",38],["G","11010001000",39],["H","11000101000",40],["I","11000100010",41],["J","10110111000",42],["K","10110001110",43],["L","10001101110",44],["M","10111011000",45],["N","10111000110",46],["O","10001110110",47],["P","11101110110",48],["Q","11010001110",49],["R","11000101110",50],["S","11011101000",51],["T","11011100010",52],["U","11011101110",53],["V","11101011000",54],["W","11101000110",55],["X","11100010110",56],["Y","11101101000",57],["Z","11101100010",58],["[","11100011010",59],["\\","11101111010",60],["]","11001000010",61],["^","11110001010",62],["_","10100110000",63],["`","10100001100",64],["a","10010110000",65],["b","10010000110",66],["c","10000101100",67],["d","10000100110",68],["e","10110010000",69],["f","10110000100",70],["g","10011010000",71],["h","10011000010",72],["i","10000110100",73],["j","10000110010",74],["k","11000010010",75],["l","11001010000",76],["m","11110111010",77],["n","11000010100",78],["o","10001111010",79],["p","10100111100",80],["q","10010111100",81],["r","10010011110",82],["s","10111100100",83],["t","10011110100",84],["u","10011110010",85],["v","11110100100",86],["w","11110010100",87],["x","11110010010",88],["y","11011011110",89],["z","11011110110",90],["{","11110110110",91],["|","10101111000",92],["}","10100011110",93],["~","10001011110",94],[String.fromCharCode(127),"10111101000",95],[String.fromCharCode(128),"10111100010",96],[String.fromCharCode(129),"11110101000",97],[String.fromCharCode(130),"11110100010",98],[String.fromCharCode(131),"10111011110",99],[String.fromCharCode(132),"10111101110",100],[String.fromCharCode(133),"11101011110",101],[String.fromCharCode(134),"11110101110",102],[String.fromCharCode(135),"11010000100",103],[String.fromCharCode(136),"11010010000",104],[String.fromCharCode(137),"11010011100",105]],c="1100011101011",d=/^[!-~ ]+$/;return a.valid=function(a){return-1==a.search(d)?!1:!0},a.calculateCode128=function(b,d,e,f){var g="";return g+=a.encodingById(e),g+=d(b),g+=a.encodingById(f(b,e)),g+=c},a.encodingById=function(a){for(var c=0;cc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),angular.module("barcode").factory("Itf14NumberService",[function(){"use strict";function a(a){var d="";13==a.length&&(a+=c(a)),d+=g;for(var e=0;14>e;e+=2)d+=b(a.substr(e,2));return d+=h}function b(a){for(var b="",c=f[a[0]],d=f[a[1]],e=0;5>e;e++)b+="1"==c[e]?"111":"1",b+="1"==d[e]?"000":"0";return b}function c(a){for(var b=0,c=0;13>c;c++)b+=parseInt(a[c])*(3-c%2*2);return 10-b%10}function d(a){return-1==a.search(i)?!1:14==a.length?a[13]==c(a):!0}var e={};e.valid=function(a){return d(a)},e.encoded=function(b){return d(b)?a(b):""};var f={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},g="1010",h="11101",i=/^[0-9]{13,14}$/;return e}]),angular.module("barcode").factory("ItfNumberService",[function(){"use strict";function a(a){var c="";c+=f;for(var d=0;df;f++)b+="1"==c[f]?"111":"1",b+="1"==d[f]?"000":"0";return b}function c(a){return-1!==a.search(h)}var d={};d.valid=function(a){return c(a)},d.encoded=function(b){return c(b)?a(b):""};var e={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"},f="1010",g="11101",h=/^([0-9][0-9])+$/;return d}]),angular.module("barcode").factory("UpcService",[function(){"use strict";function a(a){var c="",d=a[0],e=a.substr(1,7),f=a.substr(7,6);return c+=j,c+=b(e,i[d]),c+=l,c+=b(f,"RRRRRR"),c+=k}function b(a,b){for(var c="",d=0;dc;c+=2)b+=parseInt(a[c]);for(var d=1;12>d;d+=2)b+=3*parseInt(a[d]);return(10-b%10)%10}function d(a){return-1==a.search(m)?!1:a[12]==c(a)}var e={};e.valid=function(a){return d("0"+a)},e.encoded=function(b){return d("0"+b)?a("0"+b):""};var f={0:"0001101",1:"0011001",2:"0010011",3:"0111101",4:"0100011",5:"0110001",6:"0101111",7:"0111011",8:"0110111",9:"0001011"},g={0:"0100111",1:"0110011",2:"0011011",3:"0100001",4:"0011101",5:"0111001",6:"0000101",7:"0010001",8:"0001001",9:"0010111"},h={0:"1110010",1:"1100110",2:"1101100",3:"1000010",4:"1011100",5:"1001110",6:"1010000",7:"1000100",8:"1001000",9:"1110100"},i={0:"LLLLLL",1:"LLGLGG",2:"LLGGLG",3:"LLGGGL",4:"LGLLGG",5:"LGGLLG",6:"LGGGLL",7:"LGLGLG",8:"LGLGGL",9:"LGGLGL"},j="101",k="101",l="01010",m=/^[0-9]{13}$/;return e}]),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css new file mode 100644 index 0000000..fe87a68 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/main.120d552f.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.modal-body,.modal-footer,body{font-family:FontAwesome}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{background-color:#d6d6d6;padding:0}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.close-button,.proceed-button{background-color:#72529b;color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.proceed-button{font-size:larger;border-radius:4px}.close-button{border-radius:4px}.poweredByMOLPay{margin-top:15px;max-height:20px;max-width:150px}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html new file mode 100644 index 0000000..1172c42 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/alertmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html new file mode 100644 index 0000000..cab8cc3 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/banklistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html new file mode 100644 index 0000000..9e47ece --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/channelmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html new file mode 100644 index 0000000..6f04d86 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/countrylistmodal.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html new file mode 100644 index 0000000..a77da9e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/finalizingpayment.html @@ -0,0 +1 @@ +

    Finalizing payment status.

    Please wait.

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html new file mode 100644 index 0000000..4d9bee4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/main.html @@ -0,0 +1 @@ +

    MOLPay X-Platform

    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html new file mode 100644 index 0000000..1f22555 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/paymentinfo.html @@ -0,0 +1,10 @@ +
    Order ID {{sdkData.mp_order_ID}}
    {{sdkData.mp_currency}} {{sdkData.mp_amount}}
     
     
     
     
    Pay through   {{sdkData.mp_channel_title}}
    New card
    Card number  
    CVV  
    Exp date  
    Country   {{sdkData.mp_credit_card_country_title}}
    Bank name   {{sdkData.mp_credit_card_bank}}
    Use BCARD points (RM1 = 100 BCARD Points)
    {{sdkData.bcard_point}}
    Card# 6298 43  
    Pin  
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html new file mode 100644 index 0000000..909397f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay-mobile-xdk-www/views/receipt.html @@ -0,0 +1 @@ +
    Services MOLPay {{C5ResultData.channel}}
    Transaction ID {{C5ResultData.txn_ID}}
    {{C5ResultData.pcode_lbl}} {{C5ResultData.pcode}}
    Payable amount {{C5ResultData.cur}}{{C5ResultData.payable_amt}}
    Note
    \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..dd70808 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var iabRef = null; +var molpaySdkUrl = 'molpay-mobile-xdk-www/index.html'; + +var sdkData = { + // ------- SDK required basic data ---------- + 'mp_amount' : '1.10', + 'mp_username' : 'molpayapi', + 'mp_password' : '*M0Lp4y4p1!*', + 'mp_merchant_ID' : 'molpaymerchant', + 'mp_app_name' : 'wilwe_makan2', + 'mp_order_ID' : 'XP010', + 'mp_currency' : 'MYR', + 'mp_country' : 'MY', + 'mp_verification_key' : '501c4f508cf1c3f486f4f5c820591f41', + 'mp_channel' : 'multi', + 'mp_bill_description' : 'Cordova payment test', + 'mp_bill_name' : 'MOLPay Developer', + 'mp_bill_email' : 'clement@molpay.com', + 'mp_bill_mobile' : '123456', + 'mp_channel_editing' : false, + 'mp_editing_enabled' : false, + 'mp_transaction_id' : '', // Required if mp_request_type is 'Receipt' + 'mp_request_type' : '', // 'Receipt' for Cash channels +}; + + +var app = { + + onMOLPayLoadstart: function(event) { + console.log('onMOLPayLoadstart event = '+JSON.stringify(event, null, '')); + }, + + onMOLPayLoadstop: function(event) { + console.log('onMOLPayLoadstop event = '+JSON.stringify(sdkData, null, '')); + iabRef.executeScript({ + code: "updateSdkData("+JSON.stringify(sdkData)+");" + }, function() { + alert("updateSdkData executed successfully"); + }); + }, + + + // Application Constructor + initialize: function() { + this.bindEvents(); + }, + // Bind Event Listeners + // + // Bind any events that are required on startup. Common events are: + // 'load', 'deviceready', 'offline', and 'online'. + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + // deviceready Event Handler + // + // The scope of 'this' is the event. In order to call the 'receivedEvent' + // function, we must explicitly call 'app.receivedEvent(...);' + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + // Update DOM on a Received Event + receivedEvent: function(id) { + var parentElement = document.getElementById(id); + var listeningElement = parentElement.querySelector('.listening'); + var receivedElement = parentElement.querySelector('.received'); + + listeningElement.setAttribute('style', 'display:none;'); + receivedElement.setAttribute('style', 'display:block;'); + + console.log('Received Event: ' + id); + + window.open = cordova.InAppBrowser.open; + iabRef = window.open(molpaySdkUrl, '_blank', 'location=no'); + iabRef.addEventListener('loadstart', app.onMOLPayLoadstart); + iabRef.addEventListener('loadstop', app.onMOLPayLoadstop); + + // iabRef = window.open(molpaySdkUrl,'_blank','location=yes,hardwareback=yes'); + } +}; + +app.initialize(); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml new file mode 100644 index 0000000..626db73 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova/plugins/molpay-mobile-xdk-cordova/plugin.xml @@ -0,0 +1,24 @@ + + + MOLPay XDK for Cordova + MOLPay official in-app payment module for Cordova + MOLPay Mobile Division + MOLPay,payment,gateway + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js new file mode 100644 index 0000000..1289dbf --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/cordova_plugins.js @@ -0,0 +1,54 @@ +cordova.define('cordova/plugin_list', function(require, exports, module) { +module.exports = [ + { + "id": "cordova-plugin-inappbrowser.inappbrowser", + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", + "pluginId": "cordova-plugin-inappbrowser", + "clobbers": [ + "cordova.InAppBrowser.open", + "window.open" + ] + }, + { + "id": "cordova-save-image-gallery.saveImageGallery", + "file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js", + "pluginId": "cordova-save-image-gallery", + "clobbers": [ + "cordova.saveImageGallery" + ] + }, + { + "id": "cordova-plugin-x-toast.Toast", + "file": "plugins/cordova-plugin-x-toast/www/Toast.js", + "pluginId": "cordova-plugin-x-toast", + "clobbers": [ + "window.plugins.toast" + ] + }, + { + "id": "cordova-plugin-x-toast.tests", + "file": "plugins/cordova-plugin-x-toast/test/tests.js", + "pluginId": "cordova-plugin-x-toast" + }, + { + "id": "molpay-mobile-xdk-cordova.MOLPay", + "file": "plugins/molpay-mobile-xdk-cordova/molpay.js", + "pluginId": "molpay-mobile-xdk-cordova", + "clobbers": [ + "molpay" + ] + } +]; +module.exports.metadata = +// TOP OF METADATA +{ + "cordova-plugin-whitelist": "1.3.2", + "cordova-plugin-inappbrowser": "1.7.0", + "cordova-plugin-privacyscreen": "0.3.1", + "cordova-save-image-gallery": "0.0.26", + "cordova-plugin-x-toast": "2.6.0", + "cordova-plugin-android-permissions": "0.10.0", + "molpay-mobile-xdk-cordova": "3.11.0" +}; +// BOTTOM OF METADATA +}); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/css/index.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/css/index.css new file mode 100644 index 0000000..dd2f06d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/css/index.css @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ +} + +body { + -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ + -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ + -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ + background-color:#E4E4E4; + background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:-webkit-gradient( + linear, + left top, + left bottom, + color-stop(0, #A7A7A7), + color-stop(0.51, #E4E4E4) + ); + background-attachment:fixed; + font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; + font-size:12px; + height:100%; + margin:0px; + padding:0px; + text-transform:uppercase; + width:100%; +} + +/* Portrait layout (default) */ +.app { + position:absolute; + height:100%; + width:100%; + padding:0px; + margin:0px; +} + +/* Landscape layout (with min-width) */ +@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { + .app { + background-position:left center; + padding:0px; /* padding-top + padding-bottom + text area = image height */ + margin:0px; /* offset vertical: half of image height */ + /* offset horizontal: half of image width and text area width */ + } +} + +h1 { + font-size:24px; + font-weight:normal; + margin:0px; + overflow:visible; + padding:0px; + text-align:center; +} + +.event { + border-radius:4px; + -webkit-border-radius:4px; + color:#FFFFFF; + font-size:12px; + margin:0px 30px; + padding:2px 0px; +} + +.event.listening { + background-color:#333333; + display:block; +} + +.event.received { + background-color:#4B946A; + display:none; +} + +@keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +@-webkit-keyframes fade { + from { opacity: 1.0; } + 50% { opacity: 0.4; } + to { opacity: 1.0; } +} + +.blink { + animation:fade 3000ms infinite; + -webkit-animation:fade 3000ms infinite; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/custom.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/custom.css new file mode 100644 index 0000000..56e9551 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/custom.css @@ -0,0 +1,367 @@ +/* Original CSS + +.nav, .pagination, .carousel, .panel-title a { cursor: pointer; } + +body { + font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + background-color: #d6d6d6; + padding: 0; +} + +.container-fluid { + padding-top: 15px; + padding-bottom: 15px; +} + +.list-group-item:last-child, +.list-group-item:first-child { + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + border-top-right-radius: 0px; + border-top-left-radius: 0px; +} + +.marginless-listgroup { + margin-bottom: 0px; +} + +.list-group-item { + padding: 15px 15px; + overflow: auto; +} + +.modal-list-group-item { + padding: 10px 5px; + height: 64px; +} + +.list-value { + font-weight: normal; + color: #595959; + padding-top: 0px; + border: 0px; + text-align: right; +} + +.channel-list-container { + height: 40px; + line-height: 40px; + padding-left: 5px; + padding-right: 5px; +} + +.text-list-container { + padding-left: 5px; + padding-right: 5px; +} + +.left-aligned-list-value-label { + float: left; + height: 100%; + text-align: left; +} + +.right-aligned-list-value-label { + float: right; +} + +.left-label { + font-weight: 200; + color: #ababab; + text-align: left; + width: 100%; +} + +.larger-text { + font-size: 40px; + font-weight: bold; +} + +.proceed-row { + margin-left: 20px; + margin-right: 20px; +} + +.proceed-button { + background-color: #72529b; + color: #FFFFFF; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: 0; + padding: 10px 15px; + width: 100%; + font-weight: bold; + font-size: larger; +} + +button[disabled], html input[disabled] { + opacity: 0.4; + -moz-opacity: 0.4; + background-color: gray; +} + +.close-button { + background-color: #72529b; + color: #FFFFFF; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: 0; + padding: 10px 15px; + width: 100%; + font-weight: bold; +} + +.molpay-disclaimer-container { + padding: 15px; +} + +.poweredByMOLPay { + height: 20px; +} + +.mp-version { + color: #818285; + float: right; + height: 20px; + font-size: 8px; + display: table; + font-weight: bold; +} + +.mp-version span { + display: table-cell; + vertical-align: bottom; +} + +.modal-body { + font-size: larger; + text-align: center; +} + +.loading { + position: fixed; + z-index: 999; + height: 2em; + overflow: show; + margin: auto; + top: 0px; + left: 0px; + bottom: 0px; + right: 0px; +} + +.loading:before { + display: block; + width: 100%; + height: 100%; +} + +.loadingbackground { + content: ''; + display: block; + position: fixed; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background-color: Black; + filter: alpha(opacity=60); + opacity: 0.6; + -moz-opacity: 0.8; + display:block; +} + +.fa-spinner:before { + color: white; +} + +.loading-text { + position: relative; + z-index: 999; + height: 100%; + width: 100%; + top: 10px; + left:0px; + display:block; + color: #FFFFFF; +} + +.channel-logo { + max-height: 40px; +} + +.creditcard-form { + margin-top: 10px; +} + +.split { + padding: 0px; + border-width: 0px; + display: -webkit-flex; + display: flex; +} + +.split-cvv { + width: 40%; +} + +.split-exp { + width: 60%; +} + +.card-number-input { + border-width: 0px; + text-align: right; + max-width: 160px; +} + +.cvv-input { + border-width: 0px; + text-align: right; + width: 50%; +} + +.exp-input { + border-width: 0px; + text-align: right; + width: 50%; +} + +.channel-list-modal-body { + max-height: calc(100vh - 105px); + min-height: 480px; + min-height: 80vw; + overflow-y: auto; +} + +.country-list-modal-body { + max-height: calc(100vh - 185px); + min-height: 480px; + min-height: 80vw; + overflow-y: auto; +} + +.search-bar { + margin-bottom: 0px; +} + +.search-icon { + float: right; + margin-right: 10px; + margin-top: -24px; + position: relative; + z-index: 2; +} + +.modal-header { + text-align: center; +} + +.bcard-form { + margin-top: 10px; +} + +.new-credit-card-form { + position: relative; + display: block; + padding-left: 15px; + padding-top: 5px; + padding-bottom: 5px; + border: 0px; + margin-bottom: -1px; + min-height: 44px; +} + +.new-card-label { + position: absolute; + margin-top: 5px; + font-weight: 200; + color: #595959; +} + +.new-credit-card-switch { + margin-left: 80px; + position: relative; + border: 0px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + min-height: 28px; +} + +.new-credit-card-switch span { + min-height: 28px; +} + +.new-credit-card-switch .switch-left { + background: #72529b; +} + +.new-credit-card-switch .switch-right { + color: #333; + background: #f0f0f0; +} + +.new-credit-card-switch .knob { + background: red; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + background-color: #FFFFFF; + width: 34%; + z-index: 100; +} + +.billing { + text-align: left; + width: 90%; +} + +.bcard-point-label { + padding-bottom: 0px; + margin-bottom: 0px; + border-bottom: 0px; +} + +.bcard-point { + border-top: 0px; +} + +.notes { + border: 0px; + padding-bottom: 0px; +} + +.barcode-container { + width: 100%; + padding-top: 15px; + padding-left: 10px; + padding-right: 10px; + text-align: center; +} + +.receipt-logo { + height: 70px; +} + +.pull-right { + max-width: 70%; +} + +.credit-card-input { + max-width: 160px; +} + +@media screen and (min-width: 320px) { + .container { + width: auto; + } +} + +*/ \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/img/logo.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/img/logo.png new file mode 100755 index 0000000..9519e7d Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/img/logo.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/index.html new file mode 100644 index 0000000..fa9a358 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/index.html @@ -0,0 +1,21 @@ + + + + + + + + + MOLPay Example + + +
    +
    + +
    +
    +
    + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/js/index.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/js/index.js new file mode 100644 index 0000000..4476fb7 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/js/index.js @@ -0,0 +1,65 @@ +var app = { + initialize: function() { + this.bindEvents(); + }, + bindEvents: function() { + document.addEventListener('deviceready', this.onDeviceReady, false); + }, + onDeviceReady: function() { + app.receivedEvent('deviceready'); + }, + receivedEvent: function(id) { + + // MOLPay payment details + var paymentDetails = { + // ------- SDK required data ---------- + 'mp_amount' : '', + 'mp_username' : '', + 'mp_password' : '', + 'mp_merchant_ID' : '', + 'mp_app_name' : '', + 'mp_order_ID' : '', + 'mp_currency' : 'MYR', + 'mp_country' : 'MY', + 'mp_verification_key' : '', + 'mp_channel' : '', + 'mp_bill_description' : 'Bill description', + 'mp_bill_name' : 'Bill name', + 'mp_bill_email' : 'email@email.com', + 'mp_bill_mobile' : '123456' + // 'mp_channel_editing' : false, + // 'mp_editing_enabled' : false, + // 'mp_transaction_id' : '', // Optional, required when mp_request_type is 'Status' + // 'mp_preferred_token' : '', // Optional, set the token id to nominate a preferred token as the default selection + // 'mp_request_type' : '', // Optional, set 'Status' when performing a transactionRequest + // 'mp_bin_lock' : ['414170', '414171'], // Optional for credit card BIN restrictions + // 'mp_bin_lock_err_msg' : 'Only UOB allowed', // Optional for credit card BIN restrictions + // 'mp_is_escrow' : '', // Optional for Escrow, put "1" to enable escrow + // 'mp_filter' : '0', // Optional for debit card only transactions + // 'mp_custom_css_url' : cordova.file.applicationDirectory + 'www/custom.css', // Optional for custom UI + // 'mp_is_recurring' : false, // Optional, set true to process this transaction through the recurring api, please refer the MOLPay Recurring API pdf + // 'mp_allowed_channels': ['credit', 'credit3'], // Optional for channels restriction + // 'mp_sandbox_mode': true, // Optional for sandboxed development environment, set boolean value to enable. + // 'mp_express_mode': true, // Optional, required a valid mp_channel value, this will skip the payment info page and go direct to the payment screen. + // 'mp_advanced_email_validation_enabled': true, // Optional, enable this for extended email format validation based on W3C standards. + // 'mp_advanced_phone_validation_enabled': true, // Optional, enable this for extended phone format validation based on Google i18n standards. + // 'mp_bill_name_edit_disabled': true, // Optional, explicitly force disable billing name edit. + // 'mp_bill_email_edit_disabled': true, // Optional, explicitly force disable billing email edit. + // 'mp_bill_mobile_edit_disabled': true, // Optional, explicitly force disable billing mobile edit. + // 'mp_bill_description_edit_disabled': true // Optional, explicitly force disable billing description edit. + }; + + var molpayCallback = function (transactionResult) { + console.log('molpayCallback transactionResult = '+transactionResult); + alert('molpayCallback transactionResult = '+transactionResult); + }; + + window.molpay.startMolpay(paymentDetails, molpayCallback); + // window.molpay.transactionRequest(paymentDetails, molpayCallback); + // window.molpay.closeMolpay(); + + } + +}; + +app.initialize(); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/FontAwesome.otf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.eot differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d05688e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.ttf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/fonts/fontawesome-webfont.woff2 differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/ImageUnavailable.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/ImageUnavailable.png new file mode 100644 index 0000000..0a50061 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/ImageUnavailable.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png new file mode 100644 index 0000000..16f1bde Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/images/poweredByMOLPay.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html new file mode 100644 index 0000000..e06c9e0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/index.html @@ -0,0 +1 @@ +

    {{label_preparing}}

    {{label_pleasewait}}

    {{label_loading}}
    \ No newline at end of file diff --git a/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js similarity index 100% rename from MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js rename to MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/scripts.03193944.js diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js new file mode 100644 index 0000000..684c2dc --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/scripts/vendor.f57621ed.js @@ -0,0 +1,19 @@ +!function(){"use strict";function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(),function(a){"use strict";function b(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function d(a,b,e){var f,g;if(a)if(y(a))for(f in a)"prototype"==f||"length"==f||"name"==f||a.hasOwnProperty&&!a.hasOwnProperty(f)||b.call(e,a[f],f,a);else if(Wd(a)||c(a)){var h="object"!=typeof a;for(f=0,g=a.length;g>f;f++)(h||f in a)&&b.call(e,a[f],f,a)}else if(a.forEach&&a.forEach!==d)a.forEach(b,e,a);else if(u(a))for(f in a)b.call(e,a[f],f,a);else if("function"==typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&b.call(e,a[f],f,a);else for(f in a)Fd.call(a,f)&&b.call(e,a[f],f,a);return a}function e(a,b,c){for(var d=Object.keys(a).sort(),e=0;ee;++e){var g=b[e];if(t(g)||y(g))for(var j=Object.keys(g),k=0,l=j.length;l>k;k++){var m=j[k],n=g[m];c&&t(n)?x(n)?a[m]=new Date(n.valueOf()):z(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):J(n)?a[m]=n.clone():(t(a[m])||(a[m]=Wd(n)?[]:{}),i(a[m],[n],!0)):a[m]=n}}return h(a,d),a}function j(a){return i(a,Od.call(arguments,1),!1)}function k(a){return i(a,Od.call(arguments,1),!0)}function l(a){return parseInt(a,10)}function m(a,b){return j(Object.create(a),b)}function n(){}function o(a){return a}function p(a){return function(){return a}}function q(a){return y(a.toString)&&a.toString!==Rd}function r(a){return"undefined"==typeof a}function s(a){return"undefined"!=typeof a}function t(a){return null!==a&&"object"==typeof a}function u(a){return null!==a&&"object"==typeof a&&!Sd(a)}function v(a){return"string"==typeof a}function w(a){return"number"==typeof a}function x(a){return"[object Date]"===Rd.call(a)}function y(a){return"function"==typeof a}function z(a){return"[object RegExp]"===Rd.call(a)}function A(a){return a&&a.window===a}function B(a){return a&&a.$evalAsync&&a.$watch}function C(a){return"[object File]"===Rd.call(a)}function D(a){return"[object FormData]"===Rd.call(a)}function E(a){return"[object Blob]"===Rd.call(a)}function F(a){return"boolean"==typeof a}function G(a){return a&&y(a.then)}function H(a){return a&&w(a.length)&&Xd.test(Rd.call(a))}function I(a){return"[object ArrayBuffer]"===Rd.call(a)}function J(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function K(a){var b,c={},d=a.split(",");for(b=0;b=0&&a.splice(c,1),c}function N(a,b){function c(a,b){var c,d=b.$$hashKey;if(Wd(a))for(var f=0,g=a.length;g>f;f++)b.push(e(a[f]));else if(u(a))for(c in a)b[c]=e(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=e(a[c]));else for(c in a)Fd.call(a,c)&&(b[c]=e(a[c]));return h(b,d),b}function e(a){if(!t(a))return a;var b=g.indexOf(a);if(-1!==b)return i[b];if(A(a)||B(a))throw Td("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d=!1,e=f(a);return void 0===e&&(e=Wd(a)?[]:Object.create(Sd(a)),d=!0),g.push(a),i.push(e),d?c(a,e):e}function f(a){switch(Rd.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(e(a.buffer));case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(new Uint8Array(a)),b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":var c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]);return c.lastIndex=a.lastIndex,c;case"[object Blob]":return new a.constructor([a],{type:a.type})}return y(a.cloneNode)?a.cloneNode(!0):void 0}var g=[],i=[];if(b){if(H(b)||I(b))throw Td("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Td("cpi","Can't copy! Source and destination are identical.");return Wd(b)?b.length=0:d(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),g.push(a),i.push(b),c(a,b)}return e(a)}function O(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Wd(a)){if(x(a))return x(b)?O(a.getTime(),b.getTime()):!1;if(z(a))return z(b)?a.toString()==b.toString():!1;if(B(a)||B(b)||A(a)||A(b)||Wd(b)||x(b)||z(b))return!1;e=oa();for(d in a)if("$"!==d.charAt(0)&&!y(a[d])){if(!O(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&s(b[d])&&!y(b[d]))return!1;return!0}if(!Wd(b))return!1;if((c=a.length)==b.length){for(d=0;c>d;d++)if(!O(a[d],b[d]))return!1;return!0}}return!1}function P(a,b,c){return a.concat(Od.call(b,c))}function Q(a,b){return Od.call(a,b||0)}function R(a,b){var c=arguments.length>2?Q(arguments,2):[];return!y(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,P(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function S(b,c){var d=c;return"string"==typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?d=void 0:A(c)?d="$WINDOW":c&&a.document===c?d="$DOCUMENT":B(c)&&(d="$SCOPE"),d}function T(a,b){return r(a)?void 0:(w(b)||(b=b?2:null),JSON.stringify(a,S,b))}function U(a){return v(a)?JSON.parse(a):a}function V(a,b){a=a.replace(ae,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function W(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function X(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=V(b,d);return W(a,c*(e-d))}function Y(a){a=Ld(a).clone();try{a.empty()}catch(b){}var c=Ld("
    ").append(a).html();try{return a[0].nodeType===ge?Gd(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Gd(b)})}catch(b){return Gd(c)}}function Z(a){try{return decodeURIComponent(a)}catch(b){}}function $(a){var b={};return d((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=Z(d),s(d)&&(e=s(e)?Z(e):!0,Fd.call(b,d)?Wd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function _(a){var b=[];return d(a,function(a,c){Wd(a)?d(a,function(a){b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(a===!0?"":"="+ba(a,!0)))}),b.length?b.join("&"):""}function aa(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ca(a,b){var c,d,e=be.length;for(d=0;e>d;++d)if(c=be[d]+b,v(c=a.getAttribute(c)))return c;return null}function da(a,b){var c,e,f={};d(be,function(b){var d=b+"app";!c&&a.hasAttribute&&a.hasAttribute(d)&&(c=a,e=a.getAttribute(d))}),d(be,function(b){var d,f=b+"app";!c&&(d=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=d,e=d.getAttribute(f))}),c&&(f.strictDi=null!==ca(c,"strict-di"),b(c,e?[e]:[],f))}function ea(b,c,e){t(e)||(e={});var f={strictDi:!1};e=j(f,e);var g=function(){if(b=Ld(b),b.injector()){var d=b[0]===a.document?"document":Y(b);throw Td("btstrpd","App already bootstrapped with this element '{0}'",d.replace(//,">"))}c=c||[],c.unshift(["$provide",function(a){a.value("$rootElement",b)}]),e.debugInfoEnabled&&c.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),c.unshift("ng");var f=db(c,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),Ud.resumeBootstrap=function(a){return d(a,function(a){c.push(a)}),g()},void(y(Ud.resumeDeferredBootstrap)&&Ud.resumeDeferredBootstrap()))}function fa(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ga(a){var b=Ud.element(a).injector();if(!b)throw Td("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ha(a,b){return b=b||"_",a.replace(ce,function(a,c){return(c?b:"")+a.toLowerCase()})}function ia(){var b;if(!de){var c=_d();Md=r(c)?a.jQuery:c?a[c]:void 0,Md&&Md.fn.on?(Ld=Md,j(Md.fn,{scope:ze.scope,isolateScope:ze.isolateScope,controller:ze.controller,injector:ze.injector,inheritedData:ze.inheritedData}),b=Md.cleanData,Md.cleanData=function(a){for(var c,d,e=0;null!=(d=a[e]);e++)c=Md._data(d,"events"),c&&c.$destroy&&Md(d).triggerHandler("$destroy");b(a)}):Ld=Da,Ud.element=Ld,de=!0}}function ja(a,b,c){if(!a)throw Td("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function ka(a,b,c){return c&&Wd(a)&&(a=a[a.length-1]),ja(y(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function la(a,b){if("hasOwnProperty"===a)throw Td("badname","hasOwnProperty is not a valid {0} name",b)}function ma(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;g>h;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&y(a)?R(f,a):a}function na(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Ld(Od.call(a,0,e))),b.push(c));return b||a}function oa(){return Object.create(null)}function pa(a){function c(a,b,c){return a[b]||(a[b]=c())}var d=b("$injector"),e=b("ng"),f=c(a,"angular",Object);return f.$$minErr=f.$$minErr||b,c(f,"module",function(){var a={};return function(b,f,g){var h=function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)};return h(b,"module"),f&&a.hasOwnProperty(b)&&(a[b]=null),c(a,b,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function c(a,c){return function(d,f){return f&&y(f)&&(f.$$moduleName=b),e.push([a,c,arguments]),k}}if(!f)throw d("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",b);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:b,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:c("$provide","decorator"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),component:c("$compileProvider","component"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function qa(a,b){if(Wd(a)){b=b||[];for(var c=0,d=a.length;d>c;c++)b[c]=a[c]}else if(t(a)){b=b||{};for(var e in a)("$"!==e.charAt(0)||"$"!==e.charAt(1))&&(b[e]=a[e])}return b||a}function ra(a){var b=[];return JSON.stringify(a,function(a,c){if(c=S(a,c),t(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function sa(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):r(a)?"undefined":"string"!=typeof a?ra(a):a}function ta(c){j(c,{bootstrap:ea,copy:N,extend:j,merge:k,equals:O,element:Ld,forEach:d,injector:db,noop:n,bind:R,toJson:T,fromJson:U,identity:o,isUndefined:r,isDefined:s,isString:v,isFunction:y,isObject:t,isNumber:w,isElement:J,isArray:Wd,version:ke,isDate:x,lowercase:Gd,uppercase:Hd,callbacks:{counter:0},getTestability:ga,$$minErr:b,$$csp:$d,reloadWithDebugInfo:fa}),(Nd=pa(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:yc}),a.provider("$compile",ob).directive({a:Hf,input:$f,textarea:$f,form:Mf,script:Vg,select:Yg,style:$g,option:Zg,ngBind:bg,ngBindHtml:dg,ngBindTemplate:cg,ngClass:fg,ngClassEven:hg,ngClassOdd:gg,ngCloak:ig,ngController:jg,ngForm:Nf,ngHide:Og,ngIf:mg,ngInclude:ng,ngInit:pg,ngNonBindable:Fg,ngPluralize:Jg,ngRepeat:Kg,ngShow:Ng,ngStyle:Pg,ngSwitch:Qg,ngSwitchWhen:Rg,ngSwitchDefault:Sg,ngOptions:Ig,ngTransclude:Ug,ngModel:Cg,ngList:qg,ngChange:eg,pattern:ah,ngPattern:ah,required:_g,ngRequired:_g,minlength:ch,ngMinlength:ch,maxlength:bh,ngMaxlength:bh,ngValue:ag,ngModelOptions:Eg}).directive({ngInclude:og}).directive(If).directive(kg),a.provider({$anchorScroll:eb,$animate:Pe,$animateCss:Se,$$animateJs:Ne,$$animateQueue:Oe,$$AnimateRunner:Re,$$animateAsyncRun:Qe,$browser:kb,$cacheFactory:lb,$controller:ub,$document:vb,$exceptionHandler:wb,$filter:Mc,$$forceReflow:Ye,$interpolate:Kb,$interval:Lb,$http:Gb,$httpParamSerializer:yb,$httpParamSerializerJQLike:zb,$httpBackend:Ib,$xhrFactory:Hb,$location:$b,$log:_b,$parse:sc,$rootScope:xc,$q:tc,$$q:uc,$sce:Cc,$sceDelegate:Bc,$sniffer:Dc,$templateCache:mb,$templateRequest:Ec,$$testability:Fc,$timeout:Gc,$window:Jc,$$rAF:wc,$$jqLite:Ya,$$HashMap:De,$$cookieReader:Lc})}])}function ua(){return++me}function va(a){return a.replace(pe,function(a,b,c,d){return d?c.toUpperCase():c}).replace(qe,"Moz$1")}function wa(a){return!ue.test(a)}function xa(a){var b=a.nodeType;return b===ee||!b||b===ie}function ya(a){for(var b in le[a.ng339])return!0;return!1}function za(a){for(var b=0,c=a.length;c>b;b++)Ha(a[b])}function Aa(a,b){var c,e,f,g,h=b.createDocumentFragment(),i=[];if(wa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),e=(ve.exec(a)||["",""])[1].toLowerCase(),f=xe[e]||xe._default,c.innerHTML=f[1]+a.replace(we,"<$1>")+f[2],g=f[0];g--;)c=c.lastChild;i=P(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",d(i,function(a){h.appendChild(a)}),h}function Ba(b,c){c=c||a.document;var d;return(d=te.exec(b))?[c.createElement(d[1])]:(d=Aa(b,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(v(a)&&(a=Yd(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw se("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;e>d;d++)Ha(c[d])}function Ga(a,b,c,e){if(s(e))throw se("offargs","jqLite#off() does not support the `selector` argument");var f=Ia(a),g=f&&f.events,h=f&&f.handle;if(h)if(b){var i=function(b){var d=g[b];s(c)&&M(d||[],c),s(c)&&d&&d.length>0||(oe(a,b,h),delete g[b])};d(b.split(" "),function(a){i(a),re[a]&&i(re[a])})}else for(b in g)"$destroy"!==b&&oe(a,b,h),delete g[b]}function Ha(a,b){var c=a.ng339,d=c&&le[c];if(d){if(b)return void delete d.data[b];d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Ga(a)),delete le[c],a.ng339=void 0}}function Ia(a,b){var c=a.ng339,d=c&&le[c];return b&&!d&&(a.ng339=c=ua(),d=le[c]={events:{},data:{},handle:void 0}),d}function Ja(a,b,c){if(xa(a)){var d=s(c),e=!d&&b&&!t(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];j(h,b)}}}function Ka(a,b){return a.getAttribute?(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1:!1}function La(a,b){b&&a.setAttribute&&d(b.split(" "),function(b){a.setAttribute("class",Yd((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Yd(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");d(b.split(" "),function(a){a=Yd(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Yd(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;c>d;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==ie&&(a=a.documentElement);for(var d=Wd(b)?b:[b];a;){for(var e=0,f=d.length;f>e;e++)if(s(c=Ld.data(a,d[e])))return c;a=a.parentNode||a.nodeType===je&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Ld(c).on("load",b)}function Ta(a,b){var c=Ae[b.toLowerCase()];return c&&Be[L(a)]&&c}function Ua(a){return Ce[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(r(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return c.immediatePropagationStopped===!0};var h=e.specialHandlerWrapper||Wa;f>1&&(e=qa(e));for(var i=0;f>i;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;(!d||d!==a&&!ye.call(a,d))&&c.call(a,b)}function Ya(){this.$get=function(){return j(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||g)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}d(a,this.put,this)}function _a(a){return Function.prototype.toString.call(a)+" "}function ab(a){var b=_a(a).replace(Ie,""),c=b.match(Ee)||b.match(Fe);return c}function bb(a){var b=ab(a);return b?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b,c){var e,f,g;if("function"==typeof a){if(!(e=a.$inject)){if(e=[],a.length){if(b)throw v(c)&&c||(c=a.name||bb(a)),Je("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);f=ab(a),d(f[1].split(Ge),function(a){a.replace(He,function(a,b,c){e.push(c)})})}a.$inject=e}}else Wd(a)?(g=a.length-1,ka(a[g],"fn"),e=a.slice(0,g)):ka(a,"fn",!0);return e}function db(a,b){function c(a){return function(b,c){return t(b)?void d(b,f(a)):a(b,c)}}function e(a,b){if(la(a,"service"),(y(b)||Wd(b))&&(b=x.instantiate(b)),!b.$get)throw Je("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(r(c))throw Je("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function h(a,b,c){return e(a,{$get:c!==!1?g(a,b):b})}function i(a,b){return h(a,["$injector",function(a){return a.instantiate(b)}])}function j(a,b){return h(a,p(b),!1)}function k(a,b){la(a,"constant"),w[a]=b,z[a]=b}function l(a,b){var c=x.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function m(a){ja(r(a)||Wd(a),"modulesToLoad","not an array");var b,c=[];return d(a,function(a){function d(a){var b,c;for(b=0,c=a.length;c>b;b++){var d=a[b],e=x.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{v(a)?(b=Nd(a),c=c.concat(m(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):y(a)?c.push(x.invoke(a)):Wd(a)?c.push(x.invoke(a)):ka(a,"module")}catch(e){throw Wd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Je("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function n(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===o)throw Je("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=o,a[b]=c(b,d)}catch(e){throw a[b]===o&&delete a[b],e}finally{s.shift()}}function e(a,c,e){for(var f=[],g=db.$$annotate(a,b,e),h=0,i=g.length;i>h;h++){var j=g[h];if("string"!=typeof j)throw Je("itkn","Incorrect injection token! Expected service name as string, got {0}",j);f.push(c&&c.hasOwnProperty(j)?c[j]:d(j,e))}return f}function f(a){return 11>=Kd?!1:"function"==typeof a&&/^(?:class\s|constructor\()/.test(_a(a))}function g(a,b,c,d){"string"==typeof c&&(d=c,c=null);var g=e(a,c,d);return Wd(a)&&(a=a[a.length-1]),f(a)?(g.unshift(null),new(Function.prototype.bind.apply(a,g))):a.apply(b,g)}function h(a,b,c){var d=Wd(a)?a[a.length-1]:a,f=e(a,b,c);return f.unshift(null),new(Function.prototype.bind.apply(d,f))}return{invoke:g,instantiate:h,get:d,annotate:db.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=b===!0;var o={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:c(e),factory:c(h),service:c(i),value:c(j),constant:c(k),decorator:l}},x=w.$injector=n(w,function(a,b){throw Ud.isString(b)&&s.push(b),Je("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},A=n(z,function(a,b){var c=x.get(a+q,b);return B.invoke(c.$get,c,void 0,a)}),B=A;w["$injector"+q]={$get:p(A)};var C=m(a);return B=A.get("$injector"),B.strictDi=b,d(C,function(a){a&&B.invoke(a)}),B}function eb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){return"a"===L(a)?(b=a,!0):void 0}),b}function f(){var a=h.yOffset;if(y(a))a=a();else if(J(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else w(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=v(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){(a!==b||""!==a)&&Sa(function(){d.$evalAsync(h)})}),h}]}function fb(a,b){return a||b?a?b?(Wd(a)&&(a=a.join(" ")),Wd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function gb(a){for(var b=0;bk&&this.remove(n.key),b}},get:function(a){if(kb;++b)try{sa[b]()}catch(d){a.push(d)}if(sa=void 0,a.length)throw a})}finally{va++}}function I(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;d>c;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a}function J(a,b,c){ua.innerHTML="";var d=ua.firstChild.attributes,e=d[0];d.removeNamedItem(e.name),e.value=c,a.attributes.setNamedItem(e)}function K(a,b){try{a.addClass(b)}catch(c){}}function N(b,c,d,e,f){b instanceof Ld||(b=Ld(b));for(var g=/\S+/,h=0,i=b.length;i>h;h++){var j=b[h];j.nodeType===ge&&j.nodeValue.match(g)&&Ca(j,b[h]=a.document.createElement("span"))}var k=S(b,c,b,d,e,f);N.$$addScopeClass(b);var l=null;return function(a,c,d){ja(a,"scope"),f&&f.needsNewScope&&(a=a.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=P(h));var i;if(i="html"!==l?Ld(ka(l,Ld("
    ").append(b).html())):c?ze.clone.call(b):b,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return N.$$addScopeInfo(i,a),c&&c(i,a),k&&k(a,i,i,e),i}}function P(a){var b=a&&a[0];return b&&"foreignobject"!==L(b)&&Rd.call(b).match(/SVG/)?"svg":"html"}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,g,h,i,j,k,l,m,p;if(n){var q=c.length;for(p=new Array(q),j=0;jj;)h=p[o[j++]],f=o[j++],g=o[j++],f?(f.scope?(i=a.$new(),N.$$addScopeInfo(Ld(h),i)):i=a,m=f.transcludeOnThisElement?T(a,f.transclude,e):!f.templateOnThisElement&&e?e:!e&&b?T(a,b):null,f(g,i,h,d,m)):g&&g(a,h.childNodes,void 0,e)}for(var h,i,j,k,l,m,n,o=[],p=0;pr;r++){var w=!1,x=!1;j=p[r],k=j.name,n=Yd(j.value),m=qb(k),(o=Aa.test(m))&&(k=k.replace(Ve,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var y=m.match(Ba);y&&ca(y[1])&&(w=k,x=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6)),l=qb(k.toLowerCase()),i[l]=k,(o||!c.hasOwnProperty(l))&&(c[l]=n,Ta(a,l)&&(c[l]=!0)),ma(a,b,n,l,o),ba(b,l,"A",d,e,w,x)}if(g=a.className,t(g)&&(g=g.animVal),v(g)&&""!==g)for(;f=u.exec(g);)l=qb(f[2]),ba(b,l,"C",d,e)&&(c[l]=Yd(f[3])),g=g.substr(f.index+f[0].length);break;case ge:if(11===Kd)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===ge;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ia(b,a.nodeValue);break;case he:try{f=q.exec(a.nodeValue),f&&(l=qb(f[1]),ba(b,l,"M",d,e)&&(c[l]=Yd(f[2])))}catch(z){}}return b.sort(fa),b}function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw Te("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==ee&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return Ld(d)}function W(a,b,c){return function(d,e,f,g,h){return e=V(e[0],b,c),a(d,e,f,g,h)}}function X(a,b,c,d,e,f){var g;return a?N(b,c,d,e,f):function(){return g||(g=N(b,c,d,e,f),b=c=f=null),g.apply(this,arguments)}}function Z(a,b,c,f,g,h,i,k,l){function m(a,b,c,d){a&&(c&&(a=W(a,c,d)),a.require=o.require,a.directiveName=p,(z===o||o.$$isolateScope)&&(a=pa(a,{isolateScope:!0})),i.push(a)),b&&(c&&(b=W(b,c,d)),b.require=o.require,b.directiveName=p,(z===o||o.$$isolateScope)&&(b=pa(b,{isolateScope:!0})),k.push(b))}function n(a,f,g,h,l){function m(a,b,c,d){var e;if(B(a)||(d=c,c=b,b=a,a=void 0),F&&(e=u),c||(c=F?C.parent():C),!d)return l(a,b,e,c,M);var f=l.$$slots[d];if(f)return f(a,b,e,c,M);if(r(f))throw Te("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',d,Y(C))}var n,o,p,q,s,u,v,C,D,E;b===g?(D=c,C=c.$$element):(C=Ld(g),D=new I(C,c)),s=f,z?q=f.$new(!0):w&&(s=f.$parent),l&&(v=m,v.$$boundTransclude=l,v.isSlotFilled=function(a){return!!l.$$slots[a]}),x&&(u=_(C,D,v,x,q,f,z)),z&&(N.$$addScopeInfo(C,q,!0,!(A&&(A===z||A===z.$$originalDirective))),N.$$addScopeClass(C,!0),q.$$isolateBindings=z.$$isolateBindings,E=ra(f,D,q,q.$$isolateBindings,z),E.removeWatches&&q.$on("$destroy",E.removeWatches));for(var G in u){var H=x[G],J=u[G],K=H.$$bindings.bindToController;J.identifier&&K?J.bindingInfo=ra(s,D,J.instance,K,H):J.bindingInfo={};var L=J();L!==J.instance&&(J.instance=L,C.data("$"+H.name+"Controller",L),J.bindingInfo.removeWatches&&J.bindingInfo.removeWatches(),J.bindingInfo=ra(s,D,J.instance,K,H))}for(d(x,function(a,b){var c=a.require;a.bindToController&&!Wd(c)&&t(c)&&j(u[b].instance,$(b,c,C,u))}),d(u,function(a){var b=a.instance;if(y(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(c){e(c)}if(y(b.$onInit))try{b.$onInit()}catch(c){e(c)}y(b.$onDestroy)&&s.$on("$destroy",function(){b.$onDestroy()})}),n=0,o=i.length;o>n;n++)p=i[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);var M=f;for(z&&(z.template||null===z.templateUrl)&&(M=q),a&&a(M,g.childNodes,void 0,l),n=k.length-1;n>=0;n--)p=k[n],qa(p,p.isolateScope?q:f,C,D,p.require&&$(p.directiveName,p.require,C,u),v);d(u,function(a){var b=a.instance;y(b.$postLink)&&b.$postLink()})}l=l||{};for(var o,p,q,s,u,v=-Number.MAX_VALUE,w=l.newScopeDirective,x=l.controllerDirectives,z=l.newIsolateScopeDirective,A=l.templateDirective,C=l.nonTlbTranscludeDirective,D=!1,E=!1,F=l.hasElementTranscludeDirective,G=c.$$element=Ld(b),H=h,J=f,K=!1,M=!1,O=0,P=a.length;P>O;O++){o=a[O];var S=o.$$start,T=o.$$end;if(S&&(G=V(b,S,T)),q=void 0,v>o.priority)break;if((u=o.scope)&&(o.templateUrl||(t(u)?(ga("new/isolated scope",z||w,o,G),z=o):ga("new/isolated scope",z,o,G)),w=w||o),p=o.name,!K&&(o.replace&&(o.templateUrl||o.template)||o.transclude&&!o.$$tlb)){for(var Z,ba=O+1;Z=a[ba++];)if(Z.transclude&&!Z.$$tlb||Z.replace&&(Z.templateUrl||Z.template)){M=!0;break}K=!0}if(!o.templateUrl&&o.controller&&(u=o.controller,x=x||oa(),ga("'"+p+"' controller",x[p],o,G),x[p]=o),u=o.transclude)if(D=!0,o.$$tlb||(ga("transclusion",C,o,G),C=o),"element"==u)F=!0,v=o.priority,q=G,G=c.$$element=Ld(N.$$createComment(p,c[p])),b=G[0],na(g,Q(q),b),q[0].$$parentNode=q[0].parentNode,J=X(M,q,f,v,H&&H.name,{nonTlbTranscludeDirective:C});else{var ca=oa();if(q=Ld(Ea(b)).contents(),t(u)){q=[];var fa=oa(),ha=oa();d(u,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a,fa[a]=b,ca[b]=null,ha[b]=c}),d(G.contents(),function(a){var b=fa[qb(L(a))];b?(ha[b]=!0,ca[b]=ca[b]||[],ca[b].push(a)):q.push(a)}),d(ha,function(a,b){if(!a)throw Te("reqslot","Required transclusion slot `{0}` was not filled.",b)});for(var ia in ca)ca[ia]&&(ca[ia]=X(M,ca[ia],f))}G.empty(),J=X(M,q,f,void 0,void 0,{needsNewScope:o.$$isolateScope||o.$$newScope}),J.$$slots=ca}if(o.template)if(E=!0,ga("template",A,o,G),A=o,u=y(o.template)?o.template(G,c):o.template,u=za(u),o.replace){if(H=o,q=wa(u)?[]:sb(ka(o.templateNamespace,Yd(u))),b=q[0],1!=q.length||b.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p,"");na(g,G,b);var ja={$attr:{}},la=U(b,[],ja),ma=a.splice(O+1,a.length-(O+1));(z||w)&&aa(la,z,w),a=a.concat(la).concat(ma),da(c,ja),P=a.length}else G.html(u);if(o.templateUrl)E=!0,ga("template",A,o,G),A=o,o.replace&&(H=o),n=ea(a.splice(O,a.length-O),G,c,g,D&&J,i,k,{controllerDirectives:x,newScopeDirective:w!==o&&w,newIsolateScopeDirective:z,templateDirective:A,nonTlbTranscludeDirective:C}),P=a.length;else if(o.compile)try{s=o.compile(G,c,J);var sa=o.$$originalDirective||o;y(s)?m(null,R(sa,s),S,T):s&&m(R(sa,s.pre),R(sa,s.post),S,T)}catch(ta){e(ta,Y(G))}o.terminal&&(n.terminal=!0,v=Math.max(v,o.priority))}return n.scope=w&&w.scope===!0,n.transcludeOnThisElement=D,n.templateOnThisElement=E,n.transclude=J,l.hasElementTranscludeDirective=F,n}function $(a,b,c,e){var f;if(v(b)){var g=b.match(x),h=b.substring(g[0].length),i=g[1]||g[3],j="?"===g[2];if("^^"===i?c=c.parent():(f=e&&e[h],f=f&&f.instance),!f){var k="$"+h+"Controller";f=i?c.inheritedData(k):c.data(k)}if(!f&&!j)throw Te("ctreq","Controller '{0}', required by directive '{1}', can't be found!",h,a)}else if(Wd(b)){f=[];for(var l=0,m=b.length;m>l;l++)f[l]=$(a,b[l],c,e)}else t(b)&&(f={},d(b,function(b,d){f[d]=$(a,b,c,e)}));return f||null}function _(a,b,c,d,e,f,g){var h=oa();for(var j in d){var k=d[j],l={$scope:k===g||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);var n=i(m,l,!0,k.controllerAs);h[k.name]=n,a.data("$"+k.name+"Controller",n.instance)}return h}function aa(a,b,c){for(var d=0,e=a.length;e>d;d++)a[d]=m(a[d],{$$isolateScope:b,$$newScope:c})}function ba(a,c,d,f,h,i,j){if(c===h)return null;var n=null;if(k.hasOwnProperty(c))for(var o,p=b.get(c+l),q=0,s=p.length;s>q;q++)try{if(o=p[q],(r(f)||f>o.priority)&&-1!=o.restrict.indexOf(d)){if(i&&(o=m(o,{$$start:i,$$end:j})),!o.$$bindings){var u=o.$$bindings=g(o,o.name);t(u.isolateScope)&&(o.$$isolateBindings=u.isolateScope)}a.push(o),n=o}}catch(v){e(v)}return n}function ca(a){if(k.hasOwnProperty(a))for(var c,d=b.get(a+l),e=0,f=d.length;f>e;e++)if(c=d[e],c.multiElement)return!0;return!1}function da(a,b){var c=b.$attr,e=a.$attr;a.$$element;d(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),d(b,function(b,d){a.hasOwnProperty(d)||"$"===d.charAt(0)||(a[d]=b,"class"!==d&&"style"!==d&&(e[d]=c[d]))})}function ea(a,b,c,e,g,h,i,j){var k,l,n=[],o=b[0],p=a.shift(),q=m(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=y(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),f(r).then(function(f){var m,u,v,w;if(f=za(f),p.replace){if(v=wa(f)?[]:sb(ka(s,Yd(f))),m=v[0],1!=v.length||m.nodeType!==ee)throw Te("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);u={$attr:{}},na(e,b,m);var x=U(m,[],u);t(p.scope)&&aa(x,!0),a=x.concat(a),da(c,u)}else m=o,b.html(f);for(a.unshift(q),k=Z(a,m,c,g,b,p,h,i,j),d(e,function(a,c){a==m&&(e[c]=b[0])}),l=S(b[0].childNodes,g);n.length;){var y=n.shift(),z=n.shift(),A=n.shift(),B=n.shift(),C=b[0];if(!y.$$destroyed){if(z!==o){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(m)),na(A,Ld(z),C),K(Ld(C),D)}w=k.transcludeOnThisElement?T(y,k.transclude,B):B,k(l,y,C,e,w)}}n=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(n?n.push(b,c,d,f):(k.transcludeOnThisElement&&(f=T(b,k.transclude,e)),k(l,b,c,d,f)))}}function fa(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name"+c+"",d.childNodes[0].childNodes;default:return c}}function la(a,b){if("srcdoc"==b)return A.HTML;var c=L(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?A.RESOURCE_URL:void 0}function ma(a,b,d,e,f){var g=la(a,e);f=w[e]||f;var h=c(d,!0,g,f);if(h){if("multiple"===e&&"select"===L(a))throw Te("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=oa());if(z.test(e))throw Te("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==d&&(h=k&&c(k,!0,g,f),d=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function na(b,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(b)for(e=0,f=b.length;f>e;e++)if(b[e]==g){b[e++]=d;for(var j=e,k=j+h-1,l=b.length;l>j;j++,k++)l>k?b[j]=b[k]:delete b[j];b.length-=h-1,b.context===g&&(b.context=d);break}i&&i.replaceChild(d,g);var m=a.document.createDocumentFragment();for(e=0;h>e;e++)m.appendChild(c[e]);for(Ld.hasData(g)&&(Ld.data(d,Ld.data(g)),Ld(g).off("$destroy")),Ld.cleanData(m.querySelectorAll("*")),e=1;h>e;e++)delete c[e];c[0]=d,c.length=1}function pa(a,b){return j(function(){return a.apply(null,arguments)},a,b)}function qa(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,Y(c))}}function ra(a,b,e,f,g){function i(b,c,d){y(e.$onChanges)&&c!==d&&(sa||(a.$$postDigest(H),sa=[]),k||(k={},sa.push(j)),k[b]&&(d=k[b].previousValue),k[b]=new pb(d,c))}function j(){e.$onChanges(k),k=void 0}var k,l=[],m={};return d(f,function(d,f){var j,k,o,p,q,r=d.attrName,s=d.optional,t=d.mode;switch(t){case"@":s||Fd.call(b,r)||(e[f]=b[r]=void 0),b.$observe(r,function(a){if(v(a)||F(a)){var b=e[f];i(f,a,b),e[f]=a}}),b.$$observers[r].$$scope=a,j=b[r],v(j)?e[f]=c(j)(a):F(j)&&(e[f]=j),m[f]=new pb(Ue,e[f]);break;case"=":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]),p=k.literal?O:function(a,b){return a===b||a!==a&&b!==b},o=k.assign||function(){throw j=e[f]=k(a),Te("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[r],r,g.name)},j=e[f]=k(a);var u=function(b){return p(b,e[f])||(p(b,j)?o(a,b=e[f]):e[f]=b),j=b};u.$stateful=!0,q=d.collection?a.$watchCollection(b[r],u):a.$watch(h(b[r],u),null,k.literal),l.push(q);break;case"<":if(!Fd.call(b,r)){if(s)break;b[r]=void 0}if(s&&!b[r])break;k=h(b[r]);var w=e[f]=k(a);m[f]=new pb(Ue,e[f]),q=a.$watch(k,function(a,b){if(b===a){if(b===w)return;b=w}i(f,a,b),e[f]=a},k.literal),l.push(q);break;case"&":if(k=b.hasOwnProperty(r)?h(b[r]):n,k===n&&s)break;e[f]=function(b){return k(a,b)}}}),{initialChanges:m,removeWatches:l.length&&function(){for(var a=0,b=l.length;b>a;++a)l[a]()}}}var sa,ta=/^\w/,ua=a.document.createElement("div"),va=D;I.prototype={$normalize:qb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=rb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=rb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,f){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),f=i):j&&(this[j]=b,k=j),this[a]=b,f?this.$attr[a]=f:(f=this.$attr[a],f||(this.$attr[a]=f=ha(a,"-"))),g=L(this.$$element),"a"===g&&("href"===a||"xlinkHref"===a)||"img"===g&&"src"===a)this[a]=b=G(b,"src"===a);else if("img"===g&&"srcset"===a&&s(b)){for(var l="",m=Yd(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),t=0;q>t;t++){var u=2*t;l+=G(Yd(p[u]),!0),l+=" "+Yd(p[u+1])}var v=Yd(p[2*t]).split(/\s/);l+=G(Yd(v[0]),!0),2===v.length&&(l+=" "+Yd(v[1])),this[a]=b=l}c!==!1&&(null===b||r(b)?this.$$element.removeAttr(f):ta.test(f)?this.$$element.attr(f,b):J(this.$$element[0],f,b));var w=this.$$observers;w&&d(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=oa()),e=d[a]||(d[a]=[]);return e.push(b),p.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||r(c[a])||b(c[a])}),function(){M(e,b)}}};var xa=c.startSymbol(),ya=c.endSymbol(),za="{{"==xa&&"}}"==ya?o:function(a){return a.replace(/\{\{/g,xa).replace(/}}/g,ya)},Aa=/^ngAttr[A-Z]/,Ba=/^(.+)Start$/;return N.$$addBindingInfo=C?function(a,b){var c=a.data("$binding")||[];Wd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:n,N.$$addBindingClass=C?function(a){K(a,"ng-binding")}:n,N.$$addScopeInfo=C?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:n,N.$$addScopeClass=C?function(a,b){K(a,b?"ng-isolate-scope":"ng-scope")}:n,N.$$createComment=function(b,c){var d="";return C&&(d=" "+(b||"")+": ",c&&(d+=c+" ")),a.document.createComment(d)},N}]}function pb(a,b){this.previousValue=a,this.currentValue=b}function qb(a){return va(a.replace(Ve,""))}function rb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f0?" ":"")+g}return c}function sb(a){a=Ld(a);var b=a.length;if(1>=b)return a;for(;b--;){var c=a[b];c.nodeType===he&&Pd.call(a,b,1)}return a}function tb(a,b){if(b&&v(b))return b;if(v(a)){var c=Xe.exec(a);if(c)return c[3]}}function ub(){var a={},c=!1;this.has=function(b){return a.hasOwnProperty(b)},this.register=function(b,c){la(b,"controller"),t(b)?j(a,b):a[b]=c},this.allowGlobals=function(){c=!0},this.$get=["$injector","$window",function(d,e){function f(a,c,d,e){if(!a||!t(a.$scope))throw b("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,c);a.$scope[c]=d}return function(b,g,h,i){var k,l,m,n;if(h=h===!0,i&&v(i)&&(n=i),v(b)){if(l=b.match(Xe),!l)throw We("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",b);m=l[1],n=n||l[3],b=a.hasOwnProperty(m)?a[m]:ma(g.$scope,m,!0)||(c?ma(e,m,!0):void 0),ka(b,m,!0)}if(h){var o=(Wd(b)?b[b.length-1]:b).prototype;k=Object.create(o||null),n&&f(g,n,k,m||b.name);var p;return p=j(function(){var a=d.invoke(b,k,g,m);return a!==k&&(t(a)||y(a))&&(k=a,n&&f(g,n,k,m||b.name)),k},{instance:k,identifier:n})}return k=d.instantiate(b,g,m),n&&f(g,n,k,m||b.name),k}}]}function vb(){this.$get=["$window",function(a){return Ld(a.document)}]}function wb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function xb(a){return t(a)?x(a)?a.toISOString():T(a):a}function yb(){this.$get=function(){return function(a){if(!a)return"";var b=[];return e(a,function(a,c){null===a||r(a)||(Wd(a)?d(a,function(a){b.push(ba(c)+"="+ba(xb(a)))}):b.push(ba(c)+"="+ba(xb(a))))}),b.join("&")}}}function zb(){this.$get=function(){return function(a){function b(a,f,g){null===a||r(a)||(Wd(a)?d(a,function(a,c){b(a,f+"["+(t(a)?c:"")+"]")}):t(a)&&!x(a)?e(a,function(a,c){b(a,f+(g?"":"[")+c+(g?"":"]"))}):c.push(ba(f)+"="+ba(xb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function Ab(a,b){if(v(a)){var c=a.replace(bf,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Ze)||Bb(c))&&(a=U(c))}}return a}function Bb(a){var b=a.match(_e);return b&&af[b[0]].test(a)}function Cb(a){function b(a,b){a&&(e[a]=e[a]?e[a]+", "+b:b)}var c,e=oa();return v(a)?d(a.split("\n"),function(a){c=a.indexOf(":"),b(Gd(Yd(a.substr(0,c))),Yd(a.substr(c+1)))}):t(a)&&d(a,function(a,c){b(Gd(c),Yd(a))}),e}function Db(a){var b;return function(c){if(b||(b=Cb(a)),c){var d=b[Gd(c)];return void 0===d&&(d=null),d}return b}}function Eb(a,b,c,e){return y(e)?e(a,b,c):(d(e,function(d){a=d(a,b,c)}),a)}function Fb(a){return a>=200&&300>a}function Gb(){var a=this.defaults={transformResponse:[Ab],transformRequest:[function(a){return!t(a)||C(a)||E(a)||D(a)?a:T(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:qa($e),put:qa($e),patch:qa($e)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},c=!1;this.useApplyAsync=function(a){return s(a)?(c=!!a,this):c};var e=!0;this.useLegacyPromiseExtensions=function(a){return s(a)?(e=!!a,this):e};var f=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(g,h,i,k,l,m){function n(c){function f(a){var b=j({},a);return b.data=Eb(a.data,a.headers,a.status,i.transformResponse),Fb(a.status)?b:l.reject(b)}function g(a,b){var c,e={};return d(a,function(a,d){y(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a}),e}function h(b){var c,d,e,f=a.headers,h=j({},b.headers);f=j({},f.common,f[Gd(b.method)]);a:for(c in f){d=Gd(c);for(e in h)if(Gd(e)===d)continue a;h[c]=f[c]}return g(h,qa(b))}if(!t(c))throw b("$http")("badreq","Http request configuration must be an object. Received: {0}",c);if(!v(c.url))throw b("$http")("badreq","Http request configuration url must be a string. Received: {0}",c.url);var i=j({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},c);i.headers=h(c),i.method=Hd(i.method),i.paramSerializer=v(i.paramSerializer)?m.get(i.paramSerializer):i.paramSerializer;var k=function(b){var c=b.headers,e=Eb(b.data,Db(c),void 0,b.transformRequest);return r(e)&&d(c,function(a,b){"content-type"===Gd(b)&&delete c[b]}),r(b.withCredentials)&&!r(a.withCredentials)&&(b.withCredentials=a.withCredentials),q(b,e).then(f,f)},n=[k,void 0],o=l.when(i);for(d(x,function(a){(a.request||a.requestError)&&n.unshift(a.request,a.requestError),(a.response||a.responseError)&&n.push(a.response,a.responseError)});n.length;){var p=n.shift(),s=n.shift();o=o.then(p,s)}return e?(o.success=function(a){return ka(a,"fn"),o.then(function(b){a(b.data,b.status,b.headers,i)}),o},o.error=function(a){return ka(a,"fn"),o.then(null,function(b){a(b.data,b.status,b.headers,i)}),o}):(o.success=df("success"),o.error=df("error")),o}function o(a){d(arguments,function(a){n[a]=function(b,c){return n(j({},c||{},{method:a,url:b}))}})}function p(a){d(arguments,function(a){n[a]=function(b,c,d){return n(j({},d||{},{method:a,url:b,data:c}))}})}function q(b,e){function f(a){if(a){var b={};return d(a,function(a,d){b[d]=function(b){function d(){a(b)}c?k.$applyAsync(d):k.$$phase?d():k.$apply(d)}}),b}}function i(a,b,d,e){function f(){j(b,a,d,e)}p&&(Fb(a)?p.put(z,[a,b,Cb(d),e]):p.remove(z)),c?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function j(a,c,d,e){c=c>=-1?c:0,(Fb(c)?v.resolve:v.reject)({data:a,status:c,headers:Db(d),config:b,statusText:e})}function m(a){j(a.data,a.status,qa(a.headers()),a.statusText)}function o(){var a=n.pendingRequests.indexOf(b);-1!==a&&n.pendingRequests.splice(a,1)}var p,q,v=l.defer(),x=v.promise,y=b.headers,z=u(b.url,b.paramSerializer(b.params));if(n.pendingRequests.push(b),x.then(o,o),!b.cache&&!a.cache||b.cache===!1||"GET"!==b.method&&"JSONP"!==b.method||(p=t(b.cache)?b.cache:t(a.cache)?a.cache:w),p&&(q=p.get(z),s(q)?G(q)?q.then(m,m):Wd(q)?j(q[1],q[0],qa(q[2]),q[3]):j(q,200,{},"OK"):p.put(z,x)),r(q)){var A=Ic(b.url)?h()[b.xsrfCookieName||a.xsrfCookieName]:void 0;A&&(y[b.xsrfHeaderName||a.xsrfHeaderName]=A),g(b.method,z,e,i,y,b.timeout,b.withCredentials,b.responseType,f(b.eventHandlers),f(b.uploadEventHandlers))}return x}function u(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=i("$http");a.paramSerializer=v(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var x=[];return d(f,function(a){x.unshift(v(a)?m.get(a):m.invoke(a))}),n.pendingRequests=[],o("get","delete","head","jsonp"),p("post","put","patch"),n.defaults=a,n}]}function Hb(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Ib(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Jb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Jb(a,b,c,e,f){function g(a,b,c){var d=f.createElement("script"),g=null;return d.type="text/javascript",d.src=a,d.async=!0,g=function(a){oe(d,"load",g),oe(d,"error",g),f.body.removeChild(d),d=null;var h=-1,i="unknown";a&&("load"!==a.type||e[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ne(d,"load",g),ne(d,"error",g),f.body.appendChild(d),g}return function(f,h,i,j,k,l,m,o,p,q){function t(){w&&w(),x&&x.abort()}function u(b,d,e,f,g){s(A)&&c.cancel(A),w=x=null,b(d,e,f,g),a.$$completeOutstandingRequest(n)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==Gd(f)){var v="_"+(e.counter++).toString(36);e[v]=function(a){e[v].data=a,e[v].called=!0};var w=g(h.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(a,b){u(j,a,e[v].data,"",b),e[v]=n})}else{var x=b(f,h);x.open(f,h,!0),d(k,function(a,b){s(a)&&x.setRequestHeader(b,a)}),x.onload=function(){var a=x.statusText||"",b="response"in x?x.response:x.responseText,c=1223===x.status?204:x.status;0===c&&(c=b?200:"file"==Hc(h).protocol?404:0),u(j,c,b,x.getAllResponseHeaders(),a)};var y=function(){u(j,-1,null,null,"")};if(x.onerror=y,x.onabort=y,d(p,function(a,b){x.addEventListener(b,a)}),d(q,function(a,b){x.upload.addEventListener(b,a)}),m&&(x.withCredentials=!0),o)try{x.responseType=o}catch(z){if("json"!==o)throw z}x.send(r(i)?null:i)}if(l>0)var A=c(t,l);else G(l)&&l.then(t)}}function Kb(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(o,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=T(a)}return a}function i(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function k(f,k,n,o){function q(a){try{return a=G(a),o&&!s(a)?a:h(a)}catch(b){d(ef.interr(f,b))}}if(!f.length||-1===f.indexOf(a)){var t;if(!k){var u=g(f);t=p(u),t.exp=f,t.expressions=[],t.$$watchDelegate=i}return t}o=!!o;for(var v,w,x,z=0,A=[],B=[],C=f.length,D=[],E=[];C>z;){if(-1==(v=f.indexOf(a,z))||-1==(w=f.indexOf(b,v+l))){z!==C&&D.push(g(f.substring(z)));break}z!==v&&D.push(g(f.substring(z,v))),x=f.substring(v+l,w),A.push(x),B.push(c(x,q)),z=w+m,E.push(D.length),D.push("")}if(n&&D.length>1&&ef.throwNoconcat(f),!k||A.length){var F=function(a){for(var b=0,c=A.length;c>b;b++){if(o&&r(a[b]))return;D[E[b]]=a[b]}return D.join("")},G=function(a){return n?e.getTrusted(n,a):e.valueOf(a)};return j(function(a){var b=0,c=A.length,e=new Array(c);try{for(;c>b;b++)e[b]=B[b](a);return F(e)}catch(g){d(ef.interr(f,g))}},{exp:f,expressions:A,$$watchDelegate:function(a,b){var c;return a.$watchGroup(B,function(d,e){var f=F(d);y(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),o=new RegExp(b.replace(/./g,f),"g");return k.startSymbol=function(){return a},k.endSymbol=function(){return b},k}]}function Lb(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,c,d,e){function f(f,h,i,j){function k(){l?f.apply(null,m):f(p)}var l=arguments.length>4,m=l?Q(arguments,4):[],n=b.setInterval,o=b.clearInterval,p=0,q=s(j)&&!j,r=(q?d:c).defer(),t=r.promise;return i=s(i)?i:0,t.$$intervalId=n(function(){q?e.defer(k):a.$evalAsync(k),r.notify(p++),i>0&&p>=i&&(r.resolve(p),o(t.$$intervalId),delete g[t.$$intervalId]),q||a.$apply()},h),g[t.$$intervalId]=r,t}var g={};return f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1},f}]}function Mb(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=aa(b[c]);return b.join("/")}function Nb(a,b){var c=Hc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=l(c.port)||gf[c.protocol]||null}function Ob(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Hc(a); +b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=$(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Pb(a,b){return 0===a.lastIndexOf(b,0)}function Qb(a,b){return Pb(b,a)?b.substr(a.length):void 0}function Rb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Sb(a){return a.replace(/(#.+)|#$/,"$1")}function Tb(a){return a.substr(0,Rb(a).lastIndexOf("/")+1)}function Ub(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Vb(a,b,c){this.$$html5=!0,c=c||"",Nb(a,this),this.$$parse=function(a){var c=Qb(b,a);if(!v(c))throw hf("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Ob(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=_(this.$$search),c=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return s(f=Qb(a,d))?(g=f,h=s(f=Qb(c,f))?b+(Qb("/",f)||f):a+g):s(f=Qb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Wb(a,b,c){Nb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return Pb(b,c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Qb(a,d)||Qb(b,d);r(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",r(g)&&(a=d,this.replace())):(f=Qb(c,g),r(f)&&(f=g)),Ob(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Rb(a)==Rb(b)?(this.$$parse(b),!0):!1}}function Xb(a,b,c){this.$$html5=!0,Wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Rb(d)?f=d:(g=Qb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=_(this.$$search),d=this.$$hash?"#"+aa(this.$$hash):"";this.$$url=Mb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Yb(a){return function(){return this[a]}}function Zb(a,b){return function(c){return r(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function $b(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return s(b)?(a=b,this):a},this.html5Mode=function(a){return F(a)?(b.enabled=a,this):t(a)?(F(a.enabled)&&(b.enabled=a.enabled),F(a.requireBase)&&(b.requireBase=a.requireBase),F(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw hf("nobase","$location in HTML5 mode requires a tag to be present!");l=Ub(n)+(m||"/"),k=e.history?Vb:Xb}else l=Rb(n),k=Wb;var o=Tb(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Ld(a.target);"a"!==L(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");t(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Hc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Sb(j.absUrl())!=Sb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){return r(Qb(o,a))?void(g.location.href=a):(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Sb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),void(c.$$phase||c.$digest()))}),c.$watch(function(){var a=Sb(d.url()),b=Sb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function _b(){var a=!0,b=this;this.debugEnabled=function(b){return s(b)?(a=b,this):a},this.$get=["$window",function(c){function e(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function f(a){var b=c.console||{},f=b[a]||b.log||n,g=!1;try{g=!!f.apply}catch(h){}return g?function(){var a=[];return d(arguments,function(b){a.push(e(b))}),f.apply(b,a)}:function(a,b){f(a,null==b?"":b)}}return{log:f("log"),info:f("info"),warn:f("warn"),error:f("error"),debug:function(){var c=f("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function ac(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw kf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function bc(a){return a+""}function cc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw kf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw kf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw kf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function dc(a,b){if(a){if(a.constructor===a)throw kf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===lf||a===mf||a===nf)throw kf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function ec(a,b){if(a&&(a===0..constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw kf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function fc(a,b){return"undefined"!=typeof a?a:b}function gc(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function hc(a,b){var c=a(b);return!c.$stateful}function ic(a,b){var c,e;switch(a.type){case rf.Program:c=!0,d(a.body,function(a){ic(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case rf.Literal:a.constant=!0,a.toWatch=[];break;case rf.UnaryExpression:ic(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case rf.BinaryExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case rf.LogicalExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case rf.ConditionalExpression:ic(a.test,b),ic(a.alternate,b),ic(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case rf.Identifier:a.constant=!1,a.toWatch=[a];break;case rf.MemberExpression:ic(a.object,b),a.computed&&ic(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case rf.CallExpression:c=a.filter?hc(b,a.callee.name):!1,e=[],d(a.arguments,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&hc(b,a.callee.name)?e:[a];break;case rf.AssignmentExpression:ic(a.left,b),ic(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case rf.ArrayExpression:c=!0,e=[],d(a.elements,function(a){ic(a,b),c=c&&a.constant,a.constant||e.push.apply(e,a.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ObjectExpression:c=!0,e=[],d(a.properties,function(a){ic(a.value,b),c=c&&a.value.constant&&!a.computed,a.value.constant||e.push.apply(e,a.value.toWatch)}),a.constant=c,a.toWatch=e;break;case rf.ThisExpression:a.constant=!1,a.toWatch=[];break;case rf.LocalsExpression:a.constant=!1,a.toWatch=[]}}function jc(a){if(1==a.length){var b=a[0].expression,c=b.toWatch;return 1!==c.length?c:c[0]!==b?c:void 0}}function kc(a){return a.type===rf.Identifier||a.type===rf.MemberExpression}function lc(a){return 1===a.body.length&&kc(a.body[0].expression)?{type:rf.AssignmentExpression,left:a.body[0].expression,right:{type:rf.NGValueParameter},operator:"="}:void 0}function mc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===rf.Literal||a.body[0].expression.type===rf.ArrayExpression||a.body[0].expression.type===rf.ObjectExpression)}function nc(a){return a.constant}function oc(a,b){this.astBuilder=a,this.$filter=b}function pc(a,b){this.astBuilder=a,this.$filter=b}function qc(a){return"constructor"==a}function rc(a){return y(a.valueOf)?a.valueOf():tf.call(a)}function sc(){var a,b,c=oa(),e=oa(),f={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(a,b){f[a]=b},this.setIdentifierFns=function(c,d){return a=c,b=d,this},this.$get=["$filter",function(g){function h(a,b,d){var f,h,j;switch(d=d||u,typeof a){case"string":a=a.trim(),j=a;var q=d?e:c;if(f=q[j],!f){":"===a.charAt(0)&&":"===a.charAt(1)&&(h=!0,a=a.substring(2));var s=d?t:r,v=new qf(s),w=new sf(v,g,s);f=w.parse(a),f.constant?f.$$watchDelegate=o:h?f.$$watchDelegate=f.literal?m:l:f.inputs&&(f.$$watchDelegate=k),d&&(f=i(f)),q[j]=f}return p(f,b);case"function":return p(a,b);default:return p(n,b)}}function i(a){function b(b,c,d,e){var f=u;u=!0;try{return a(b,c,d,e)}finally{u=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=i(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&cl;l++)i[l]=j,k[l]=null;return a.$watch(function(a){for(var b=!1,c=0,e=g.length;e>c;c++){var h=g[c](a);(b||(b=!j(h,i[c])))&&(k[c]=h,i[c]=h&&rc(h))}return b&&(f=d(a,void 0,void 0,k)),f},b,c,e)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,y(b)&&b.apply(this,arguments),s(a)&&d.$$postDigest(function(){s(f)&&e()})},c)}function m(a,b,c,e){function f(a){var b=!0;return d(a,function(a){s(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return e(a)},function(a,c,d){h=a,y(b)&&b.call(this,a,c,d),f(a)&&d.$$postDigest(function(){f(h)&&g()})},c)}function o(a,b,c,d){var e;return e=a.$watch(function(a){return e(),d(a)},b,c)}function p(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==m&&c!==l,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return s(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==k?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=k,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var q=$d().noUnsafeEval,r={csp:q,expensiveChecks:!1,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},t={csp:q,expensiveChecks:!0,literals:N(f),isIdentifierStart:y(a)&&a,isIdentifierContinue:y(b)&&b},u=!1;return h.$$runningExpensiveChecks=function(){return u},h}]}function tc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vc(function(b){a.$evalAsync(b)},b)}]}function uc(){this.$get=["$browser","$exceptionHandler",function(a,b){return vc(function(b){a.defer(b)},b)}]}function vc(a,c){function e(){this.$$state={status:0}}function f(a,b){return function(c){b.call(a,c)}}function g(a){var b,d,e;e=a.pending,a.processScheduled=!1,a.pending=void 0;for(var f=0,g=e.length;g>f;++f){d=e[f][0],b=e[f][a.status];try{y(b)?d.resolve(b(a.value)):1===a.status?d.resolve(a.value):d.reject(a.value)}catch(h){d.reject(h),c(h)}}}function h(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){g(b)}))}function i(){this.promise=new e}function k(a){var b=new i,c=0,e=Wd(a)?[]:{};return d(a,function(a,d){c++,q(a).then(function(a){e.hasOwnProperty(d)||(e[d]=a,--c||b.resolve(e))},function(a){e.hasOwnProperty(d)||b.reject(a)})}),0===c&&b.resolve(e),b.promise}var l=b("$q",TypeError),m=function(){var a=new i;return a.resolve=f(a,a.resolve),a.reject=f(a,a.reject),a.notify=f(a,a.notify),a};j(e.prototype,{then:function(a,b,c){if(r(a)&&r(b)&&r(c))return this;var d=new i;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&h(this.$$state),d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return p(b,!0,a)},function(b){return p(b,!1,a)},b)}}),j(i.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(l("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){function b(a){i||(i=!0,g.$$resolve(a))}function d(a){i||(i=!0,g.$$reject(a))}var e,g=this,i=!1;try{(t(a)||y(a))&&(e=a&&a.then),y(e)?(this.promise.$$state.status=-1,e.call(a,b,d,f(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,h(this.promise.$$state))}catch(j){d(j),c(j)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,h(this.promise.$$state)},notify:function(b){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;g>f;f++){e=d[f][0],a=d[f][3];try{e.notify(y(a)?a(b):b)}catch(h){c(h)}}})}});var n=function(a){var b=new i;return b.reject(a),b.promise},o=function(a,b){var c=new i;return b?c.resolve(a):c.reject(a),c.promise},p=function(a,b,c){var d=null;try{y(c)&&(d=c())}catch(e){return o(e,!1)}return G(d)?d.then(function(){return o(a,b)},function(a){return o(a,!1)}):o(a,b)},q=function(a,b,c,d){var e=new i;return e.resolve(a),e.promise.then(b,c,d)},s=q,u=function(a){function b(a){d.resolve(a)}function c(a){d.reject(a)}if(!y(a))throw l("norslvr","Expected resolverFn, got '{0}'",a);var d=new i;return a(b,c),d.promise};return u.prototype=e.prototype,u.defer=m,u.reject=n,u.when=q,u.resolve=s,u.all=k,u}function wc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function xc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=g(),this.$$ChildScope=null}return b.prototype=a,b}var e=10,f=b("$rootScope"),h=null,i=null;this.digestTtl=function(a){return arguments.length&&(e=a),e},this.$get=["$exceptionHandler","$parse","$browser",function(b,j,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Kd&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=g(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function p(a){if(z.$$phase)throw f("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function q(){z.$$phase=null}function s(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function v(){}function w(){for(;C.length;)try{C.shift()()}catch(a){b(a)}i=null}function x(){null===i&&(i=k.defer(function(){z.$apply(w)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope),d.$parent=c,d.$$prevSibling=c.$$childTail,c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d,(b||c!=this)&&d.$on("$destroy",l),d},$watch:function(a,b,c,d){var e=j(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,g=f.$$watchers,i={fn:b,last:v,get:e,exp:d||a,eq:!!c};return h=null,y(b)||(i.fn=n),g||(g=f.$$watchers=[]),g.unshift(i),s(this,1),function(){M(g,i)>=0&&s(f,-1),h=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(f,f,h)):b(f,e,h)}var e=new Array(a.length),f=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(f,f,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,d){f[0]=a,e[0]=c,b(f,a===c?f:e,d)}):(d(a,function(a,b){var d=h.$watch(a,function(a,d){f[b]=a,e[b]=d,i||(i=!0,h.$evalAsync(c))});g.push(d)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function d(a){f=a;var b,d,e,h,i;if(!r(f)){if(t(f))if(c(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var j=0;b>j;j++)i=g[j],h=f[j],e=i!==i&&h!==h,e||i===h||(l++,g[j]=h)}else{g!==o&&(g=o={},q=0,l++),b=0;for(d in f)Fd.call(f,d)&&(b++,h=f[d],i=g[d],d in g?(e=i!==i&&h!==h,e||i===h||(l++,g[d]=h)):(q++,g[d]=h,l++));if(q>b){l++;for(d in g)Fd.call(f,d)||(q--,delete g[d])}}else g!==f&&(g=f,l++);return l}}function e(){if(p?(p=!1,b(f,f,i)):b(f,h,i),k)if(t(f))if(c(f)){h=new Array(f.length);for(var a=0;a1,l=0,m=j(a,d),n=[],o={},p=!0,q=0;return this.$watch(m,e)},$digest:function(){var a,c,d,g,j,l,m,n,o,r,s,t,u=e,x=this,C=[];p("$digest"),k.$$checkUrlChange(),this===z&&null!==i&&(k.defer.cancel(i),w()),h=null;do{n=!1,r=x;for(var E=0;Eu&&(s=4-u,C[s]||(C[s]=[]),C[s].push({msg:y(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:c,oldVal:d}))}catch(F){b(F)}if(!(o=r.$$watchersCount&&r.$$childHead||r!==x&&r.$$nextSibling))for(;r!==x&&!(o=r.$$nextSibling);)r=r.$parent}while(r=o);if((n||A.length)&&!u--)throw q(),f("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,C)}while(n||A.length);for(q();De;e++)if(d[e])try{d[e].apply(null,k)}catch(l){b(l)}else d.splice(e,1),e--,f--;if(i)return j.currentScope=null,j;h=h.$parent}while(h);return j.currentScope=null,j},$broadcast:function(a,c){var d=this,e=d,f=d,g={name:a,targetScope:d,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1};if(!d.$$listenerCount[a])return g;for(var h,i,j,k=P([g],arguments,1);e=f;){for(g.currentScope=e,h=e.$$listeners[a]||[],i=0,j=h.length;j>i;i++)if(h[i])try{h[i].apply(null,k)}catch(l){b(l)}else h.splice(i,1),i--,j--;if(!(f=e.$$listenerCount[a]&&e.$$childHead||e!==d&&e.$$nextSibling))for(;e!==d&&!(f=e.$$nextSibling);)e=e.$parent}return g.currentScope=null,g}};var z=new o,A=z.$$asyncQueue=[],B=z.$$postDigestQueue=[],C=z.$$applyAsyncQueue=[],D=0;return z}]}function yc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return s(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return s(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Hc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function zc(a){if("self"===a)return a;if(v(a)){if(a.indexOf("***")>-1)throw uf("iwcard","Illegal sequence *** in string matcher. String: {0}",a);return a=Zd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(z(a))return new RegExp("^"+a.source+"$");throw uf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ac(a){var b=[];return s(a)&&d(a,function(a){b.push(zc(a))}),b}function Bc(){this.SCE_CONTEXTS=vf;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=Ac(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=Ac(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Ic(b):!!a.exec(b.href)}function e(c){var e,f,g=Hc(c.toString()),h=!1;for(e=0,f=a.length;f>e;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;f>e;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw uf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||r(b)||""===b)return b;if("string"!=typeof b)throw uf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||r(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===vf.RESOURCE_URL){if(e(b))return b;throw uf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===vf.HTML)return j(b);throw uf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw uf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[vf.HTML]=f(k),l[vf.CSS]=f(k),l[vf.URL]=f(k),l[vf.JS]=f(k),l[vf.RESOURCE_URL]=f(l[vf.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function Cc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&8>Kd)throw uf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var e=qa(vf);e.isEnabled=function(){return a},e.trustAs=c.trustAs,e.getTrusted=c.getTrusted,e.valueOf=c.valueOf,a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=o),e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:b(c,function(b){return e.getTrusted(a,b)})};var f=e.parseAs,g=e.getTrusted,h=e.trustAs;return d(vf,function(a,b){var c=Gd(b);e[va("parse_as_"+c)]=function(b){return f(a,b)},e[va("get_trusted_"+c)]=function(b){return g(a,b)},e[va("trust_as_"+c)]=function(b){return h(a,b)}}),e}]}function Dc(){this.$get=["$window","$document",function(a,b){var c,d,e={},f=a.chrome&&a.chrome.app&&a.chrome.app.runtime,g=!f&&a.history&&a.history.pushState,h=l((/android (\d+)/.exec(Gd((a.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((a.navigator||{}).userAgent),j=b[0]||{},k=/^(Moz|webkit|ms)(?=[A-Z])/,m=j.body&&j.body.style,n=!1,o=!1;if(m){for(var p in m)if(d=k.exec(p)){c=d[0],c=c[0].toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in m&&"webkit"),n=!!("transition"in m||c+"Transition"in m),o=!!("animation"in m||c+"Animation"in m),!h||n&&o||(n=v(m.webkitTransition),o=v(m.webkitAnimation))}return{history:!(!g||4>h||i),hasEvent:function(a){if("input"===a&&11>=Kd)return!1;if(r(e[a])){var b=j.createElement("div");e[a]="on"+a in b}return e[a]},csp:$d(),vendorPrefix:c,transitions:n,animations:o,android:h}}]}function Ec(){var a;this.httpOptions=function(b){return b?(a=b,this):a},this.$get=["$templateCache","$http","$q","$sce",function(b,c,d,e){function f(g,h){function i(a){if(!h)throw wf("tpload","Failed to load template: {0} (HTTP status: {1} {2})",g,a.status,a.statusText);return d.reject(a)}f.totalPendingRequests++,(!v(g)||r(b.get(g)))&&(g=e.getTrustedResourceUrl(g));var k=c.defaults&&c.defaults.transformResponse;return Wd(k)?k=k.filter(function(a){return a!==Ab}):k===Ab&&(k=null),c.get(g,j({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){return b.put(g,a.data),a.data},i)}return f.totalPendingRequests=0,f}]}function Fc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var e={};return e.findBindings=function(a,b,c){var e=a.getElementsByClassName("ng-binding"),f=[];return d(e,function(a){var e=Ud.element(a).data("$binding");e&&d(e,function(d){if(c){var e=new RegExp("(^|\\s)"+Zd(b)+"(\\s|\\||$)");e.test(d)&&f.push(a)}else-1!=d.indexOf(b)&&f.push(a)})}),f},e.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e0&&(i=b(f.substring(0,h)),r(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Lc(){this.$get=Kc}function Mc(a){function b(e,f){if(t(e)){var g={};return d(e,function(a,c){g[c]=b(c,a)}),g}return a.factory(e+c,f)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Rc),b("date",ed),b("filter",Nc),b("json",fd),b("limitTo",gd),b("lowercase",Ff),b("number",Sc),b("orderBy",id),b("uppercase",Gf)}function Nc(){return function(a,d,e){if(!c(a)){if(null==a)return a;throw b("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Qc(d);switch(h){case"function":f=d;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Oc(d,e,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Oc(a,b,c){var d,e=t(a)&&"$"in a;return b===!0?b=O:y(b)||(b=function(a,b){return r(a)?!1:null===a||null===b?a===b:t(b)||t(a)&&!q(a)?!1:(a=Gd(""+a),b=Gd(""+b),-1!==a.indexOf(b))}),d=function(d){return e&&!t(d)?Pc(d,a.$,b,!1):Pc(d,a,b,c)}}function Pc(a,b,c,d,e){var f=Qc(a),g=Qc(b);if("string"===g&&"!"===b.charAt(0))return!Pc(a,b.substring(1),c,d);if(Wd(a))return a.some(function(a){return Pc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Pc(a[h],b,c,!0))return!0;return e?!1:Pc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!y(i)&&!r(i)){var j="$"===h,k=j?a:a[h];if(!Pc(k,i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Qc(a){return null===a?"null":typeof a}function Rc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return r(c)&&(c=b.CURRENCY_SYM),r(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Vc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Sc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Vc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Tc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(Af))>-1&&(a=a.replace(Af,"")),(d=a.search(/e/i))>0?(0>c&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==Bf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==Bf;)f--;for(c-=d,b=[],e=0;f>=d;d++,e++)b[e]=+a.charAt(d)}return c>zf&&(b=b.splice(0,zf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Uc(a,b,c,d){var e=a.d,f=e.length-a.i;b=r(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0){e.splice(Math.max(a.i,g));for(var i=g;ij;j++)e[j]=0}if(h>=5)if(0>g-1){for(var k=0;k>g;k--)e.unshift(0),a.i++;e.unshift(1),a.i++}else e[g-1]++;for(;fl;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return 0>a&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Wc(a,b,c,d){var e="";for((0>a||d&&0>=a)&&(d?a=-a+1:(a=-a, +e="-")),a=""+a;a.length0||g>-c)&&(g+=c),0===g&&-12==c&&(g=12),Wc(g,b,d,e)}}function Yc(a,b,c){return function(d,e){var f=d["get"+a](),g=(c?"STANDALONE":"")+(b?"SHORT":""),h=Hd(g+a);return e[h][f]}}function Zc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Wc(Math[d>0?"floor":"ceil"](d/60),2)+Wc(Math.abs(d%60),2)}function $c(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function _c(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function ad(a){return function(b){var c=$c(b.getFullYear()),d=_c(b),e=+d-+c,f=1+Math.round(e/6048e5);return Wc(f,a)}}function bd(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function cd(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function dd(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function ed(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=l(b[9]+b[10]),f=l(b[9]+b[11])),g.call(d,l(b[1]),l(b[2])-1,l(b[3]));var i=l(b[4]||0)-e,j=l(b[5]||0)-f,k=l(b[6]||0),m=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,m),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g,h,i="",j=[];if(e=e||"mediumDate",e=a.DATETIME_FORMATS[e]||e,v(c)&&(c=Ef.test(c)?l(c):b(c)),w(c)&&(c=new Date(c)),!x(c)||!isFinite(c.getTime()))return c;for(;e;)h=Df.exec(e),h?(j=P(j,h,1),e=j.pop()):(j.push(e),e=null);var k=c.getTimezoneOffset();return f&&(k=V(f,k),c=X(c,f,!0)),d(j,function(b){g=Cf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function fd(){return function(a,b){return r(b)&&(b=2),T(a,b)}}function gd(){return function(a,b,d){return b=Math.abs(Number(b))===1/0?Number(b):l(b),isNaN(b)?a:(w(a)&&(a=a.toString()),c(a)?(d=!d||isNaN(d)?0:l(d),d=0>d?Math.max(0,a.length+d):d,b>=0?hd(a,d,d+b):0===d?hd(a,b,a.length):hd(a,Math.max(0,d+b),d)):a)}}function hd(a,b,c){return v(a)?a.slice(b,c):Od.call(a,b,c)}function id(a){function d(b){return b.map(function(b){var c=1,d=o;if(y(b))d=b;else if(v(b)&&(("+"==b.charAt(0)||"-"==b.charAt(0))&&(c="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(d=a(b),d.constant))){var e=d();d=function(a){return a[e]}}return{get:d,descending:c}})}function e(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function f(a){return y(a.valueOf)&&(a=a.valueOf(),e(a))?a:q(a)&&(a=a.toString(),e(a))?a:a}function g(a,b){var c=typeof a;return null===a?(c="string",a="null"):"object"===c&&(a=f(a)),{value:a,type:c,index:b}}function h(a,b){var c=0,d=a.type,e=b.type;if(d===e){var f=a.value,g=b.value;"string"===d?(f=f.toLowerCase(),g=g.toLowerCase()):"object"===d&&(t(f)&&(f=a.index),t(g)&&(g=b.index)),f!==g&&(c=g>f?-1:1)}else c=e>d?-1:1;return c}return function(a,e,f,i){function j(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:l.map(function(c){return g(c.get(a),b)})}}function k(a,b){for(var c=0,d=l.length;d>c;c++){var e=n(a.predicateValues[c],b.predicateValues[c]);if(e)return e*l[c].descending*m}return n(a.tieBreaker,b.tieBreaker)*m}if(null==a)return a;if(!c(a))throw b("orderBy")("notarray","Expected array but received: {0}",a);Wd(e)||(e=[e]),0===e.length&&(e=["+"]);var l=d(e),m=f?-1:1,n=y(i)?i:h,o=Array.prototype.map.call(a,j);return o.sort(k),a=o.map(function(a){return a.value})}}function jd(a){return y(a)&&(a={link:a}),a.restrict=a.restrict||"AC",p(a)}function kd(a,b){a.$name=b}function ld(a,b,c,e,f){var g=this,h=[];g.$error={},g.$$success={},g.$pending=void 0,g.$name=f(b.name||b.ngForm||"")(c),g.$dirty=!1,g.$pristine=!0,g.$valid=!0,g.$invalid=!1,g.$submitted=!1,g.$$parentForm=Jf,g.$rollbackViewValue=function(){d(h,function(a){a.$rollbackViewValue()})},g.$commitViewValue=function(){d(h,function(a){a.$commitViewValue()})},g.$addControl=function(a){la(a.$name,"input"),h.push(a),a.$name&&(g[a.$name]=a),a.$$parentForm=g},g.$$renameControl=function(a,b){var c=a.$name;g[c]===a&&delete g[c],g[b]=a,a.$name=b},g.$removeControl=function(a){a.$name&&g[a.$name]===a&&delete g[a.$name],d(g.$pending,function(b,c){g.$setValidity(c,null,a)}),d(g.$error,function(b,c){g.$setValidity(c,null,a)}),d(g.$$success,function(b,c){g.$setValidity(c,null,a)}),M(h,a),a.$$parentForm=Jf},Ad({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){var e=d.indexOf(c);-1===e&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(M(d,c),0===d.length&&delete a[b])},$animate:e}),g.$setDirty=function(){e.removeClass(a,tg),e.addClass(a,ug),g.$dirty=!0,g.$pristine=!1,g.$$parentForm.$setDirty()},g.$setPristine=function(){e.setClass(a,tg,ug+" "+Kf),g.$dirty=!1,g.$pristine=!0,g.$submitted=!1,d(h,function(a){a.$setPristine()})},g.$setUntouched=function(){d(h,function(a){a.$setUntouched()})},g.$setSubmitted=function(){e.addClass(a,Kf),g.$submitted=!0,g.$$parentForm.$setSubmitted()}}function md(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function nd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d)}function od(a,b,c,d,e,f){var g=Gd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Yd(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||b>15&&19>b||b>=37&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Yf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Xf,function(a){if(!i){var b=this[Ed],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,(b.badInput!==c||b.typeMismatch!==d)&&j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function pd(a,b){if(x(a))return a;if(v(a)){Uf.lastIndex=0;var c=Uf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=$c(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function qd(a,b){return function(c,e){var f,g;if(x(c))return c;if(v(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Of.test(c))return new Date(c);if(a.lastIndex=0,f=a.exec(c))return f.shift(),g=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},d(f,function(a,c){c=p},g.$observe("min",function(a){p=m(a),h.$validate()})}if(s(g.max)||g.ngMax){var q;h.$validators.max=function(a){return!l(a)||r(q)||c(a)<=q},g.$observe("max",function(a){q=m(a),h.$validate()})}}}function sd(a,b,c,d){var e=b[0],f=d.$$hasNativeValidators=t(e.validity);f&&d.$parsers.push(function(a){var c=b.prop(Ed)||{};return c.badInput||c.typeMismatch?void 0:a})}function td(a,b,c,d,e,f){if(sd(a,b,c,d),od(a,b,c,d,e,f),d.$$parserName="number",d.$parsers.push(function(a){return d.$isEmpty(a)?null:Rf.test(a)?parseFloat(a):void 0}),d.$formatters.push(function(a){if(!d.$isEmpty(a)){if(!w(a))throw Ag("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),s(c.min)||c.ngMin){var g;d.$validators.min=function(a){return d.$isEmpty(a)||r(g)||a>=g},c.$observe("min",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),g=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}if(s(c.max)||c.ngMax){var h;d.$validators.max=function(a){return d.$isEmpty(a)||r(h)||h>=a},c.$observe("max",function(a){s(a)&&!w(a)&&(a=parseFloat(a,10)),h=w(a)&&!isNaN(a)?a:void 0,d.$validate()})}}function ud(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Pf.test(c)}}function vd(a,b,c,d,e,f){od(a,b,c,d,e,f),md(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Qf.test(c)}}function wd(a,b,c,d){r(c.name)&&b.attr("name",g());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function xd(a,b,c,d,e){var f;if(s(d)){if(f=a(d),!f.constant)throw Ag("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function yd(a,b,c,d,e,f,g,h){var i=xd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=xd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return a===!1},d.$formatters.push(function(a){return O(a,i)}),d.$parsers.push(function(a){return a?i:j})}function zd(a,b){return a="ngClass"+a,["$animate",function(c){function e(a,b){var c=[];a:for(var d=0;d0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&e.push(a))}),h.data("$classCounts",c),e.join(" ")}function m(a,b){var d=e(b,a),f=e(a,b);d=l(d,1),f=l(f,-1),d&&d.length&&c.addClass(h,d),f&&f.length&&c.removeClass(h,f)}function n(a){if(b===!0||(1&g.$index)===b){var c=f(a||[]);if(o){if(!O(a,o)){var d=f(o);m(d,c)}}else j(c)}o=Wd(a)?a.map(function(a){return qa(a)}):qa(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var e=1&c;if(e!==(1&d)){var h=f(g.$eval(i[a]));e===b?j(h):k(h)}})}}}]}function Ad(a){function b(a,b,h){r(b)?c("$pending",a,h):d("$pending",a,h),F(b)?b?(k(g.$error,a,h),j(g.$$success,a,h)):(j(g.$error,a,h),k(g.$$success,a,h)):(k(g.$error,a,h),k(g.$$success,a,h)),g.$pending?(e(xg,!0),g.$valid=g.$invalid=void 0,f("",null)):(e(xg,!1),g.$valid=Bd(g.$error),g.$invalid=!g.$valid,f("",g.$valid));var i;i=g.$pending&&g.$pending[a]?void 0:g.$error[a]?!1:g.$$success[a]?!0:null,f(a,i),g.$$parentForm.$setValidity(a,i,g)}function c(a,b,c){g[a]||(g[a]={}),j(g[a],b,c)}function d(a,b,c){g[a]&&k(g[a],b,c),Bd(g[a])&&(g[a]=void 0)}function e(a,b){b&&!i[a]?(l.addClass(h,a),i[a]=!0):!b&&i[a]&&(l.removeClass(h,a),i[a]=!1)}function f(a,b){a=a?"-"+ha(a,"-"):"",e(rg+a,b===!0),e(sg+a,b===!1)}var g=a.ctrl,h=a.$element,i={},j=a.set,k=a.unset,l=a.$animate;i[sg]=!(i[rg]=h.hasClass(rg)),g.$setValidity=b}function Bd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Cd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var Dd=/^\/(.+)\/([a-z]*)$/,Ed="validity",Fd=Object.prototype.hasOwnProperty,Gd=function(a){return v(a)?a.toLowerCase():a},Hd=function(a){return v(a)?a.toUpperCase():a},Id=function(a){return v(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Jd=function(a){return v(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(Gd=Id,Hd=Jd);var Kd,Ld,Md,Nd,Od=[].slice,Pd=[].splice,Qd=[].push,Rd=Object.prototype.toString,Sd=Object.getPrototypeOf,Td=b("ng"),Ud=a.angular||(a.angular={}),Vd=0;Kd=a.document.documentMode,n.$inject=[],o.$inject=[];var Wd=Array.isArray,Xd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Yd=function(a){return v(a)?a.trim():a},Zd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#c;++c)if(d=be[c],b=a.document.querySelector("["+d.replace(":","\\:")+"jq]")){e=b.getAttribute(d+"jq");break}return _d.name_=e},ae=/:/g,be=["ng-","data-ng-","ng:","x-ng-"],ce=/[A-Z]/g,de=!1,ee=1,fe=2,ge=3,he=8,ie=9,je=11,ke={full:"1.5.7",major:1,minor:5,dot:7,codeName:"hexagonal-circumvolution"};Da.expando="ng339";var le=Da.cache={},me=1,ne=function(a,b,c){a.addEventListener(b,c,!1)},oe=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var pe=/([\:\-\_]+(.))/g,qe=/^moz([A-Z])/,re={mouseleave:"mouseout",mouseenter:"mouseover"},se=b("jqLite"),te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ue=/<|&#?\w+;/,ve=/<([\w:-]+)/,we=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,xe={option:[1,'"],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td;var ye=a.Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ze=Da.prototype={ready:function(b){function c(){d||(d=!0,b())}var d=!1;"complete"===a.document.readyState?a.setTimeout(c):(this.on("DOMContentLoaded",c),Da(a).on("load",c))},toString:function(){var a=[];return d(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Ld(a>=0?this[a]:this[this.length+a])},length:0,push:Qd,sort:[].sort,splice:[].splice},Ae={};d("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){Ae[Gd(a)]=a});var Be={};d("input,select,option,textarea,button,form,details".split(","),function(a){Be[a]=!0});var Ce={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};d({data:Ja,removeData:Ha,hasData:ya,cleanData:za},function(a,b){Da[b]=a}),d({data:Ja,inheritedData:Pa,scope:function(a){return Ld.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Ld.data(a,"$isolateScope")||Ld.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){return b=va(b),s(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,c){var d=a.nodeType;if(d!==ge&&d!==fe&&d!==he){var e=Gd(b);if(Ae[e]){if(!s(c))return a[b]||(a.attributes.getNamedItem(b)||n).specified?e:void 0;c?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(s(c))a.setAttribute(b,c);else if(a.getAttribute){var f=a.getAttribute(b,2);return null===f?void 0:f}}},prop:function(a,b,c){return s(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(r(b)){var c=a.nodeType;return c===ee||c===ge?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(r(b)){if(a.multiple&&"select"===L(a)){var c=[];return d(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return r(b)?a.innerHTML:(Fa(a,!0),void(a.innerHTML=b))},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&r(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(t(b)){for(d=0;f>d;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=r(g)?Math.min(f,1):f,i=0;h>i;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;f>d;d++)a(this[d],b,c);return this}}),d({removeData:Ha,on:function(a,b,c,d){if(s(d))throw se("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xa(a)){var e=Ia(a,!0),f=e.events,g=e.handle;g||(g=e.handle=Va(a,f));for(var h=b.indexOf(" ")>=0?b.split(" "):[b],i=h.length,j=function(b,d,e){var h=f[b];h||(h=f[b]=[],h.specialHandlerWrapper=d,"$destroy"===b||e||ne(a,b,g)),h.push(c)};i--;)b=h[i],re[b]?(j(re[b],Xa),j(b,void 0,!0)):j(b)}},off:Ga,one:function(a,b,c){a=Ld(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,e=a.parentNode;Fa(a),d(new Da(b),function(b){c?e.insertBefore(b,c.nextSibling):e.replaceChild(b,a),c=b})},children:function(a){var b=[];return d(a.childNodes,function(a){a.nodeType===ee&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===ee||c===je){b=new Da(b);for(var d=0,e=b.length;e>d;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===ee){var c=a.firstChild;d(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Ld(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;f>e;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&d(b.split(" "),function(b){var d=c;r(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==je?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var e,f,g,h=b.type||b,i=Ia(a),k=i&&i.events,l=k&&k[h];l&&(e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:n,type:h,target:a},b.type&&(e=j(e,b)),f=qa(l),g=c?[e].concat(c):[e],d(f,function(b){e.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;g>f;f++)r(e)?(e=a(this[f],b,c,d),s(e)&&(e=Ld(e))):Na(e,a(this[f],b,c,d));return s(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var De=[function(){this.$get=[function(){return $a}]}],Ee=/^([^\(]+?)=>/,Fe=/^[^\(]*\(\s*([^\)]*)\)/m,Ge=/,/,He=/^\s*(_?)(\S+?)\1\s*$/,Ie=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Je=b("$injector");db.$$annotate=cb;var Ke=b("$animate"),Le=1,Me="ng-animate",Ne=function(){this.$get=n},Oe=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,e){function f(a,b,c){var e=!1;return b&&(b=v(b)?b.split(" "):Wd(b)?b:[],d(b,function(b){b&&(e=!0,a[b]=c)})),e}function g(){d(b,function(b){var c=a.get(b);if(c){var e=hb(b.attr("class")),f="",g="";d(c,function(a,b){var c=!!e[b];a!==c&&(a?f+=(f.length?" ":"")+b:g+=(g.length?" ":"")+b)}),d(b,function(a){f&&Ma(a,f),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,d,h){var i=a.get(c)||{},j=f(i,d,!0),k=f(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&e.$$postDigest(g))}return{enabled:n,on:n,off:n,pin:n,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Pe=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Ke("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){var b=new RegExp("(\\s+|\\/)"+Me+"(\\s+|\\/)");if(b.test(this.$$classNameFilter.toString()))throw Ke("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Me)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=gb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",ib(f))},move:function(c,d,e,f){return d=d&&Ld(d),e=e&&Ld(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",ib(f))},leave:function(b,c){return a.push(b,"leave",ib(c),function(){b.remove()})},addClass:function(b,c,d){return d=ib(d),d.addClass=fb(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=ib(d),d.removeClass=fb(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=ib(e),e.addClass=fb(e.addClass,c),e.removeClass=fb(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=ib(f),f.from=f.from?j(f.from,c):c,f.to=f.to?j(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=fb(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Qe=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a <= >= && || ! = |".split(" "),function(a){of[a]=!0});var pf={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},qf=function(a){this.options=a};qf.prototype={constructor:qf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index="0"&&"9">=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var c=a.charCodeAt(0),d=b.charCodeAt(0);return c>=55296&&56319>=c&&d>=56320&&57343>=d?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw kf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:rf.Program,body:a}},expressionStatement:function(){return{type:rf.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a,b=this.expression();a=this.expect("|");)b=this.filter(b);return b},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();return this.expect("=")&&(a={type:rf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:rf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:rf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:rf.LogicalExpression,operator:"&&", +left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:rf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:rf.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=N(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:rf.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:rf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:rf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:rf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:rf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.filterChain());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:rf.Identifier,name:a.text}},constant:function(){return{type:rf.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:rf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:rf.Property,kind:"init"},this.peek().constant?(a.key=this.constant(),a.computed=!1,this.consume(":"),a.value=this.expression()):this.peek().identifier?(a.key=this.identifier(),a.computed=!1,this.peek(":")?(this.consume(":"),a.value=this.expression()):a.value=a.key):this.peek("[")?(this.consume("["),a.key=this.expression(),this.consume("]"),a.computed=!0,this.consume(":"),a.value=this.expression()):this.throwError("invalid key",this.peek()),b.push(a)}while(this.expect(","));return this.consume("}"),{type:rf.ObjectExpression,properties:b}},throwError:function(a,b){throw kf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw kf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},selfReferential:{"this":{type:rf.ThisExpression},$locals:{type:rf.LocalsExpression}}},oc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ic(e,c.$filter);var f,g="";if(this.stage="assign",f=lc(e)){this.state.computing="assign";var h=this.nextId();this.recurse(f,h),this.return_(h),g="fn.assign="+this.generateFunction("assign","s,v,l")}var i=jc(e.body);c.stage="inputs",d(i,function(a,b){var d="fn"+b;c.state[d]={vars:[],body:[],own:{}},c.state.computing=d;var e=c.nextId();c.recurse(a,e),c.return_(e),c.state.inputs.push(d),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var j='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+g+this.watchFns()+"return fn;",k=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",j)(this.$filter,ac,cc,dc,bc,ec,fc,gc,a);return this.state=this.stage=void 0,k.literal=mc(e),k.constant=nc(e),k},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return d(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return d(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,c,e,f,g){var h,i,j,k,l,m=this;if(e=e||n,!g&&s(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,c,e,f,!0));switch(a.type){case rf.Program:d(a.body,function(b,c){m.recurse(b.expression,void 0,void 0,function(a){i=a}),c!==a.body.length-1?m.current().body.push(i,";"):m.return_(i)});break;case rf.Literal:k=this.escape(a.value),this.assign(b,k),e(k);break;case rf.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){i=a}),k=a.operator+"("+this.ifDefined(i,0)+")",this.assign(b,k),e(k);break;case rf.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){h=a}),this.recurse(a.right,void 0,void 0,function(a){i=a}),k="+"===a.operator?this.plus(h,i):"-"===a.operator?this.ifDefined(h,0)+a.operator+this.ifDefined(i,0):"("+h+")"+a.operator+"("+i+")",this.assign(b,k),e(k);break;case rf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case rf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case rf.Identifier:b=b||this.nextId(),c&&(c.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),c.computed=!1,c.name=a.name),ac(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){f&&1!==f&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||qc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case rf.MemberExpression:h=c&&(c.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,h,void 0,function(){m.if_(m.notNull(h),function(){f&&1!==f&&m.addEnsureSafeAssignContext(h),a.computed?(i=m.nextId(),m.recurse(a.property,i),m.getStringValue(i),m.addEnsureSafeMemberName(i),f&&1!==f&&m.if_(m.not(m.computedMember(h,i)),m.lazyAssign(m.computedMember(h,i),"{}")),k=m.ensureSafeObject(m.computedMember(h,i)),m.assign(b,k),c&&(c.computed=!0,c.name=i)):(ac(a.property.name),f&&1!==f&&m.if_(m.not(m.nonComputedMember(h,a.property.name)),m.lazyAssign(m.nonComputedMember(h,a.property.name),"{}")),k=m.nonComputedMember(h,a.property.name),(m.state.expensiveChecks||qc(a.property.name))&&(k=m.ensureSafeObject(k)),m.assign(b,k),c&&(c.computed=!1,c.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!f);break;case rf.CallExpression:b=b||this.nextId(),a.filter?(i=m.filter(a.callee.name),j=[],d(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),j.push(b)}),k=i+"("+j.join(",")+")",m.assign(b,k),e(b)):(i=m.nextId(),h={},j=[],m.recurse(a.callee,i,h,function(){m.if_(m.notNull(i),function(){m.addEnsureSafeFunction(i),d(a.arguments,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(m.ensureSafeObject(a))})}),h.name?(m.state.expensiveChecks||m.addEnsureSafeObject(h.context),k=m.member(h.context,h.name,h.computed)+"("+j.join(",")+")"):k=i+"("+j.join(",")+")",k=m.ensureSafeObject(k),m.assign(b,k)},function(){m.assign(b,"undefined")}),e(b)}));break;case rf.AssignmentExpression:if(i=this.nextId(),h={},!kc(a.left))throw kf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,void 0,h,function(){m.if_(m.notNull(h.context),function(){m.recurse(a.right,i),m.addEnsureSafeObject(m.member(h.context,h.name,h.computed)),m.addEnsureSafeAssignContext(h.context),k=m.member(h.context,h.name,h.computed)+a.operator+i,m.assign(b,k),e(b||k)})},1);break;case rf.ArrayExpression:j=[],d(a.elements,function(a){m.recurse(a,m.nextId(),void 0,function(a){j.push(a)})}),k="["+j.join(",")+"]",this.assign(b,k),e(k);break;case rf.ObjectExpression:j=[],l=!1,d(a.properties,function(a){a.computed&&(l=!0)}),l?(b=b||this.nextId(),this.assign(b,"{}"),d(a.properties,function(a){a.computed?(h=m.nextId(),m.recurse(a.key,h)):h=a.key.type===rf.Identifier?a.key.name:""+a.key.value,i=m.nextId(),m.recurse(a.value,i),m.assign(m.member(b,h,a.computed),i)})):(d(a.properties,function(b){m.recurse(b.value,a.constant?void 0:m.nextId(),void 0,function(a){j.push(m.escape(b.key.type===rf.Identifier?b.key.name:""+b.key.value)+":"+a)})}),k="{"+j.join(",")+"}",this.assign(b,k)),e(b||k);break;case rf.ThisExpression:this.assign(b,"s"),e("s");break;case rf.LocalsExpression:this.assign(b,"l"),e("l");break;case rf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){return a?(this.current().body.push(a,"=",b,";"),a):void 0},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(a===!0)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var c=/[$_a-zA-Z][$_a-zA-Z0-9]*/,d=/[^$_a-zA-Z0-9]/g;return c.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(v(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(w(a))return a.toString();if(a===!0)return"true";if(a===!1)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw kf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},pc.prototype={compile:function(a,b){var c=this,e=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,ic(e,c.$filter);var f,g;(f=lc(e))&&(g=this.recurse(f));var h,i=jc(e.body);i&&(h=[],d(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];d(e.body,function(a){j.push(c.recurse(a.expression))});var k=0===e.body.length?n:1===e.body.length?j[0]:function(a,b){var c;return d(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=mc(e),k.constant=nc(e),k},recurse:function(a,b,c){var e,f,g,h=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case rf.Literal:return this.value(a.value,b);case rf.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,b);case rf.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,b);case rf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case rf.Identifier:return ac(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||qc(a.name),b,c,h.expression);case rf.MemberExpression:return e=this.recurse(a.object,!1,!!c),a.computed||(ac(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,b,c,h.expression):this.nonComputedMember(e,f,h.expensiveChecks,b,c,h.expression);case rf.CallExpression:return g=[],d(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,c,d,e){for(var h=[],i=0;i":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,c,d,e){return function(f,g,h,i){var j=g&&a in g?g:f;d&&1!==d&&j&&!j[a]&&(j[a]={});var k=j?j[a]:void 0;return b&&cc(k,e),c?{context:j,name:a,value:k}:k}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=bc(j),ac(j,e),d&&1!==d&&(ec(l),l&&!l[j]&&(l[j]={})),k=l[j],cc(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,c,d,e,f){return function(g,h,i,j){var k=a(g,h,i,j);e&&1!==e&&(ec(k),k&&!k[b]&&(k[b]={}));var l=null!=k?k[b]:void 0;return(c||qc(b))&&cc(l,f),d?{context:k,name:b,value:l}:l}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var sf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new rf(a,c),this.astCompiler=c.csp?new pc(this.ast,b):new oc(this.ast,b)};sf.prototype={constructor:sf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var tf=Object.prototype.valueOf,uf=b("$sce"),vf={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},wf=b("$compile"),xf=a.document.createElement("a"),yf=Hc(a.location.href);Kc.$inject=["$document"],Mc.$inject=["$provide"];var zf=22,Af=".",Bf="0";Rc.$inject=["$locale"],Sc.$inject=["$locale"];var Cf={yyyy:Xc("FullYear",4,0,!1,!0),yy:Xc("FullYear",2,0,!0,!0),y:Xc("FullYear",1,0,!1,!0),MMMM:Yc("Month"),MMM:Yc("Month",!0),MM:Xc("Month",2,1),M:Xc("Month",1,1),LLLL:Yc("Month",!1,!0),dd:Xc("Date",2),d:Xc("Date",1),HH:Xc("Hours",2),H:Xc("Hours",1),hh:Xc("Hours",2,-12),h:Xc("Hours",1,-12),mm:Xc("Minutes",2),m:Xc("Minutes",1),ss:Xc("Seconds",2),s:Xc("Seconds",1),sss:Xc("Milliseconds",3),EEEE:Yc("Day"),EEE:Yc("Day",!0),a:bd,Z:Zc,ww:ad(2),w:ad(1),G:cd,GG:cd,GGG:cd,GGGG:dd},Df=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ef=/^\-?\d+$/;ed.$inject=["$locale"];var Ff=p(Gd),Gf=p(Hd);id.$inject=["$parse"];var Hf=p({restrict:"E",compile:function(a,b){return b.href||b.xlinkHref?void 0:function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Rd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),If={};d(Ae,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=qb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),If[d]=function(){return{restrict:"A",priority:100,link:e}}}}),d(Ce,function(a,b){If[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(Dd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),d(["src","srcset","href"],function(a){var b=qb("ng-"+a);If[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Rd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(Kd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Jf={$addControl:n,$$renameControl:kd,$removeControl:n,$setValidity:n,$setDirty:n,$setPristine:n,$setSubmitted:n},Kf="ng-submitted";ld.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Lf=function(a){return["$timeout","$parse",function(b,c){function d(a){return""===a?c('this[""]').assign:c(a).assign||n}var e={name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:ld,compile:function(c,e){c.addClass(tg).addClass(rg);var f=e.name?"name":a&&e.ngForm?"ngForm":!1;return{pre:function(a,c,e,g){var h=g[0];if(!("action"in e)){var i=function(b){a.$apply(function(){h.$commitViewValue(),h.$setSubmitted()}),b.preventDefault()};ne(c[0],"submit",i),c.on("$destroy",function(){b(function(){oe(c[0],"submit",i)},0,!1)})}var k=g[1]||h.$$parentForm;k.$addControl(h);var l=f?d(h.$name):n;f&&(l(a,h),e.$observe(f,function(b){h.$name!==b&&(l(a,void 0),h.$$parentForm.$$renameControl(h,b),(l=d(h.$name))(a,h))})),c.on("$destroy",function(){h.$$parentForm.$removeControl(h),l(a,void 0),j(h,Jf)})}}}};return e}]},Mf=Lf(),Nf=Lf(!0),Of=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Pf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Qf=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Rf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Sf=/^(\d{4,})-(\d{2})-(\d{2})$/,Tf=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Uf=/^(\d{4,})-W(\d\d)$/,Vf=/^(\d{4,})-(\d\d)$/,Wf=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xf="keydown wheel mousedown",Yf=oa();d("date,datetime-local,month,time,week".split(","),function(a){Yf[a]=!0});var Zf={text:nd,date:rd("date",Sf,qd(Sf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":rd("datetimelocal",Tf,qd(Tf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:rd("time",Wf,qd(Wf,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:rd("week",Uf,pd,"yyyy-Www"),month:rd("month",Vf,qd(Vf,["yyyy","MM"]),"yyyy-MM"),number:td,url:ud,email:vd,radio:wd,checkbox:yd,hidden:n,button:n,submit:n,reset:n,file:n},$f=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Zf[Gd(g.type)]||Zf.text)(e,f,g,h[0],b,a,c,d)}}}}],_f=/^(true|false|\d+)$/,ag=function(){return{restrict:"A",priority:100,compile:function(a,b){return _f.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},bg=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=r(a)?"":a})}}}}],cg=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=r(a)?"":a})}}}}],dg=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],eg=p({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),fg=zd("",!0),gg=zd("Odd",0),hg=zd("Even",1),ig=jd({compile:function(a,b){b.$set("ngCloak",void 0),a.removeClass("ng-cloak")}}),jg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],kg={},lg={blur:!0,focus:!0};d("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=qb("ng-"+a);kg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};lg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var mg=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.$$createComment("end ngIf",e.ngIf),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=na(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],ng=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ud.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!s(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],og=["$compile",function(b){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){return Rd.call(d[0]).match(/SVG/)?(d.empty(),void b(Aa(f.template,a.document).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),void b(d.contents())(c))}}}],pg=jd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),qg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,c,e){var f=b.attr(c.$attr.ngList)||", ",g="false"!==c.ngTrim,h=g?Yd(f):f,i=function(a){if(!r(a)){var b=[];return a&&d(a.split(h),function(a){a&&b.push(g?Yd(a):a)}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Wd(a)?a.join(f):void 0}),e.$isEmpty=function(a){return!a||!a.length}}}},rg="ng-valid",sg="ng-invalid",tg="ng-pristine",ug="ng-dirty",vg="ng-untouched",wg="ng-touched",xg="ng-pending",yg="ng-empty",zg="ng-not-empty",Ag=b("ngModel"),Bg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,c,e,f,g,h,i,j,k){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=k(c.name||"",!1)(a),this.$$parentForm=Jf;var l,m=f(c.ngModel),o=m.assign,p=m,q=o,t=null,u=this;this.$$setOptions=function(a){if(u.$options=a,a&&a.getterSetter){var b=f(c.ngModel+"()"),d=f(c.ngModel+"($$$p)");p=function(a){var c=m(a);return y(c)&&(c=b(a)),c},q=function(a,b){y(m(a))?d(a,{$$$p:b}):o(a,b)}}else if(!m.assign)throw Ag("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,Y(e))},this.$render=n,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a},this.$$updateEmptyClasses=function(a){u.$isEmpty(a)?(g.removeClass(e,zg),g.addClass(e,yg)):(g.removeClass(e,yg),g.addClass(e,zg))};var v=0;Ad({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:g}),this.$setPristine=function(){u.$dirty=!1,u.$pristine=!0,g.removeClass(e,ug),g.addClass(e,tg)},this.$setDirty=function(){u.$dirty=!0,u.$pristine=!1,g.removeClass(e,tg),g.addClass(e,ug),u.$$parentForm.$setDirty()},this.$setUntouched=function(){u.$touched=!1,u.$untouched=!0,g.setClass(e,vg,wg)},this.$setTouched=function(){u.$touched=!0,u.$untouched=!1,g.setClass(e,wg,vg)},this.$rollbackViewValue=function(){h.cancel(t),u.$viewValue=u.$$lastCommittedViewValue,u.$render()},this.$validate=function(){if(!w(u.$modelValue)||!isNaN(u.$modelValue)){var a=u.$$lastCommittedViewValue,b=u.$$rawModelValue,c=u.$valid,d=u.$modelValue,e=u.$options&&u.$options.allowInvalid;u.$$runValidators(b,a,function(a){e||c===a||(u.$modelValue=a?b:void 0,u.$modelValue!==d&&u.$$writeModelToScope())})}},this.$$runValidators=function(a,b,c){function e(){var a=u.$$parserName||"parse";return r(l)?(h(a,null),!0):(l||(d(u.$validators,function(a,b){h(b,null)}),d(u.$asyncValidators,function(a,b){h(b,null)})),h(a,l),l)}function f(){var c=!0;return d(u.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),c?!0:(d(u.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var c=[],e=!0;d(u.$asyncValidators,function(d,f){var g=d(a,b);if(!G(g))throw Ag("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",g);h(f,void 0),c.push(g.then(function(){h(f,!0)},function(){e=!1,h(f,!1)}))}),c.length?j.all(c).then(function(){i(e)},n):i(!0)}function h(a,b){k===v&&u.$setValidity(a,b)}function i(a){k===v&&c(a)}v++;var k=v;return e()&&f()?void g():void i(!1)},this.$commitViewValue=function(){var a=u.$viewValue;h.cancel(t),(u.$$lastCommittedViewValue!==a||""===a&&u.$$hasNativeValidators)&&(u.$$updateEmptyClasses(a),u.$$lastCommittedViewValue=a,u.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){u.$modelValue!==f&&u.$$writeModelToScope()}var c=u.$$lastCommittedViewValue,d=c;if(l=r(d)?void 0:!0)for(var e=0;ef;f++){var i=a===c?f:c[f],j=a[i],k=x(j,i),l=q(j,k);if(b.push(l),h[2]||h[1]){var m=s(d,k);b.push(m)}if(h[4]){var n=u(d,k);b.push(n)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],f=g(c),h=f.length,i=0;h>i;i++){var j=c===f?i:f[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new e(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Ud.copy(a.viewValue):a.viewValue}}}}}function h(a,c,f,h){function k(a,b){var c=i.cloneNode(!1);b.appendChild(c),l(a,c)}function l(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function m(){var a=x&&o.readValue();if(x)for(var b=x.items.length-1;b>=0;b--){var d=x.items[b];Ra(d.group?d.element.parentNode:d.element)}x=y.getOptions();var e={};if(v&&c.prepend(n),x.items.forEach(function(a){var b;s(a.group)?(b=e[a.group],b||(b=j.cloneNode(!1),z.appendChild(b),b.label=a.group,e[a.group]=b),k(a,b)):k(a,z)}),c[0].appendChild(z),p.$render(),!p.$isEmpty(a)){var f=o.readValue(),g=y.trackBy||q;(g?O(a,f):a===f)||(p.$setViewValue(f),p.$render())}}for(var n,o=h[0],p=h[1],q=f.multiple,r=0,t=c.children(),u=t.length;u>r;r++)if(""===t[r].value){n=t.eq(r);break}var v=!!n,w=Ld(i.cloneNode(!1));w.val("?");var x,y=g(f.ngOptions,c,a),z=e[0].createDocumentFragment(),A=function(){v||c.prepend(n),c.val(""),n.prop("selected",!0),n.attr("selected",!0)},B=function(){v||n.remove()},C=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},D=function(){w.remove()};q?(p.$isEmpty=function(a){return!a||0===a.length},o.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&(b.element.selected=!0)})},o.readValue=function(){var a=c.val()||[],b=[];return d(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&a.$watchCollection(function(){return Wd(p.$viewValue)?p.$viewValue.map(function(a){return y.getTrackByValue(a)}):void 0},function(){p.$render()})):(o.writeValue=function(a){var b=x.getOptionFromViewValue(a);b?(c[0].value!==b.selectValue&&(D(),B(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(D(),A()):(B(),C())},o.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(B(),D(),x.getViewValueFromOption(a)):null},y.trackBy&&a.$watch(function(){return y.getTrackByValue(p.$viewValue)},function(){p.$render()})),v?(n.remove(),b(n)(a),n.removeClass("ng-scope")):n=Ld(i.cloneNode(!1)),c.empty(),m(),a.$watchCollection(y.getWatchables,m)}var i=a.document.createElement("option"),j=a.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=n},post:h}}}],Jg=["$locale","$interpolate","$log",function(a,b,c){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),o=i.offset||0,p=g.$eval(m)||{},q={},s=b.startSymbol(),t=b.endSymbol(),u=s+l+"-"+o+t,v=Ud.noop;d(i,function(a,b){var c=f.exec(b);if(c){var d=(c[1]?"-":"")+Gd(c[2]);p[d]=h.attr(i.$attr[b])}}),d(p,function(a,c){q[c]=b(a.replace(e,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in p||(d=a.pluralCat(d-o)),d!==k&&!(e&&w(k)&&isNaN(k))){v();var f=q[d];r(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=n,j()):v=g.$watch(f,j),k=d}})}}}],Kg=["$parse","$animate","$compile",function(a,e,f){var g="$$NG_REMOVED",h=b("ngRepeat"),i=function(a,b,c,d,e,f,g){a[c]=d,e&&(a[e]=f),a.$index=b,a.$first=0===b,a.$last=b===g-1,a.$middle=!(a.$first||a.$last),a.$odd=!(a.$even=0===(1&b))},j=function(a){return a.clone[0]},k=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(b,l){var m=l.ngRepeat,n=f.$$createComment("end ngRepeat",m),o=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!o)throw h("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var p=o[1],q=o[2],r=o[3],s=o[4];if(o=p.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!o)throw h("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var t=o[3]||o[1],u=o[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw h("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",r);var v,w,x,y,z={$id:Za};return s?v=a(s):(x=function(a,b){return Za(b)},y=function(a){return a}),function(a,b,f,l,o){v&&(w=function(b,c,d){return u&&(z[u]=b),z[t]=c,z.$index=d,v(a,z)});var p=oa();a.$watchCollection(q,function(f){var l,q,s,v,z,A,B,C,D,E,F,G,H=b[0],I=oa();if(r&&(a[r]=f),c(f))D=f,C=w||x;else{C=w||y,D=[];for(var J in f)Fd.call(f,J)&&"$"!==J.charAt(0)&&D.push(J)}for(v=D.length,F=new Array(v),l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],B=C(z,A,l),p[B])E=p[B],delete p[B],I[B]=E,F[l]=E;else{if(I[B])throw d(F,function(a){a&&a.scope&&(p[a.id]=a)}),h("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,B,A);F[l]={id:B,scope:void 0,clone:void 0},I[B]=!0}for(var K in p){if(E=p[K],G=na(E.clone),e.leave(G),G[0].parentNode)for(l=0,q=G.length;q>l;l++)G[l][g]=!0;E.scope.$destroy()}for(l=0;v>l;l++)if(z=f===D?l:D[l],A=f[z],E=F[l],E.scope){s=H;do s=s.nextSibling;while(s&&s[g]);j(E)!=s&&e.move(na(E.clone),null,H),H=k(E),i(E.scope,l,t,A,u,z,v)}else o(function(a,b){E.scope=b;var c=n.cloneNode(!1);a[a.length++]=c,e.enter(a,null,H),H=c,E.clone=a,I[E.id]=E,i(E.scope,l,t,A,u,z,v)});p=I})}}}}],Lg="ng-hide",Mg="ng-hide-animate",Ng=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Lg,{tempClasses:Mg})})}}}],Og=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Lg,{tempClasses:Mg})})}}}],Pg=jd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&d(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Qg=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,e,f,g){var h=f.ngSwitch||f.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var e,f;for(e=0,f=k.length;f>e;++e)a.cancel(k[e]);for(k.length=0,e=0,f=l.length;f>e;++e){var h=na(j[e].clone);l[e].$destroy();var n=k[e]=a.leave(h);n.then(m(k,e))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&d(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Rg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Sg=jd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Tg=b("ngTransclude"),Ug=jd({restrict:"EAC",link:function(a,b,c,d,e){function f(a){a.length&&(b.empty(),b.append(a))}if(c.ngTransclude===c.$attr.ngTransclude&&(c.ngTransclude=""),!e)throw Tg("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(b));var g=c.ngTransclude||c.ngTranscludeSlot;e(f,null,g)}}),Vg=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Wg={$setViewValue:n,$render:n},Xg=["$element","$scope",function(b,c){var d=this,e=new $a;d.ngModelCtrl=Wg,d.unknownOption=Ld(a.document.createElement("option")),d.renderUnknownOption=function(a){var c="? "+Za(a)+" ?";d.unknownOption.val(c),b.prepend(d.unknownOption),b.val(c)},c.$on("$destroy",function(){d.renderUnknownOption=n}),d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()},d.readValue=function(){return d.removeUnknownOption(),b.val()},d.writeValue=function(a){d.hasOption(a)?(d.removeUnknownOption(),b.val(a),""===a&&d.emptyOption.prop("selected",!0)):null==a&&d.emptyOption?(d.removeUnknownOption(),b.val("")):d.renderUnknownOption(a)},d.addOption=function(a,b){if(b[0].nodeType!==he){la(a,'"option value"'),""===a&&(d.emptyOption=b);var c=e.get(a)||0;e.put(a,c+1),d.ngModelCtrl.$render(),Cd(b)}},d.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(d.emptyOption=void 0)):e.put(a,b-1))},d.hasOption=function(a){return!!e.get(a)},d.registerOption=function(a,b,c,e,f){if(e){var g;c.$observe("value",function(a){s(g)&&d.removeOption(g),g=a,d.addOption(a,b)})}else f?a.$watch(f,function(a,e){c.$set("value",a),e!==a&&d.removeOption(e),d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value),d.ngModelCtrl.$render()})}}],Yg=function(){function a(a,b,c,e){var f=e[1];if(f){var g=e[0];if(g.ngModelCtrl=f,b.on("change",function(){a.$apply(function(){f.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return d(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);d(b.find("option"),function(a){a.selected=s(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==f.$viewValue||O(h,f.$viewValue)||(h=qa(f.$viewValue),f.$render()),i=f.$viewValue}),f.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Xg,priority:1,link:{pre:a,post:b}}},Zg=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(s(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],$g=p({restrict:"E",terminal:!1}),_g=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},ah=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){if(v(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw b("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",g,a,Y(c));f=a||void 0,e.$validate()}),e.$validators.pattern=function(a,b){return e.$isEmpty(b)||r(f)||f.test(b)}}}}},bh=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=l(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return 0>e||d.$isEmpty(b)||b.length<=e}}}}},ch=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=l(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};return a.angular.bootstrap?void a.console:(ia(),ta(Ud),Ud.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function c(a,c){var d=c;void 0===d&&(d=Math.min(b(a),3));var e=Math.pow(10,d),f=(a*e|0)%e;return{v:d,f:f}}var d={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var e=0|a,f=c(a,b);return 1==e&&0==f.v?d.ONE:d.OTHER}})}]),void Ld(a.document).ready(function(){da(a.document,ea)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,b,c,d){var f="?"===d?d:null,g="*"===d?d:null;return e.push({name:c,optional:!!f}),b=b||"",""+(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;g>f;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s,r||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}d[f.resolveAs||"$resolve"]=g,h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(){var a=!1;this.$get=["$$sanitizeUri",function(c){return a&&b.extend(x,v),function(a){var b=[];return g(a,j(b,function(a,b){return!/^unsafe:/.test(c(a,b))})),b.join("")}}],this.enableSvg=function(c){return b.isDefined(c)?(a=c,this):a}}function e(a){var c=[],d=j(c,b.noop);return d.chars(a),c.join("")}function f(a,c){var d,e={},f=a.split(",");for(d=0;dc;c++){var e=a[c];b[e.name]=e.value}return b}function i(a){return a.replace(/&/g,"&").replace(n,function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1);return"&#"+(1024*(b-55296)+(c-56320)+65536)+";"}).replace(o,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(//g,">")}function j(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f){a=b.lowercase(a),!d&&w[a]&&(d=a),d||x[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),h="img"===a&&"src"===g||"background"===g;B[g]!==!0||y[g]===!0&&!c(d,h)||(e(" "),e(f),e('="'),e(i(d)),e('"'))}),e(">"))},end:function(a){a=b.lowercase(a),d||x[a]!==!0||p[a]===!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}function k(a){if(a.nodeType===Node.ELEMENT_NODE)for(var b=a.attributes,c=0,d=b.length;d>c;c++){var e=b[c],f=e.name.toLowerCase();("xmlns:ns1"===f||0===f.indexOf("ns1:"))&&(a.removeAttributeNode(e),c--,d--)}var g=a.firstChild;g&&k(g),g=a.nextSibling,g&&k(g)}var l,m=b.$$minErr("$sanitize"),n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/([^\#-~ |!])/g,p=f("area,br,col,hr,img,wbr"),q=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),r=f("rp,rt"),s=b.extend({},r,q),t=b.extend({},q,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),u=b.extend({},r,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),v=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),x=b.extend({},p,t,u,s),y=f("background,cite,href,longdesc,src,xlink:href"),z=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),B=b.extend({},y,A,z);!function(a){var b;if(!a.document||!a.document.implementation)throw m("noinert","Can't create an inert html document");b=a.document.implementation.createHTMLDocument("inert");var c=b.documentElement||b.getDocumentElement(),d=c.getElementsByTagName("body");if(1===d.length)l=d[0];else{var e=b.createElement("html");l=b.createElement("body"),e.appendChild(l),b.appendChild(e)}}(a),b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i,f=b.$$minErr("linky"),g=b.isString;return function(h,i,j){function k(a){a&&q.push(e(a))}function l(a,c){var d;if(q.push("'),k(c),q.push("")}if(null==h||""===h)return h;if(!g(h))throw f("notstring","Expected string but received: {0}",h);for(var m,n,o,p=h,q=[];m=p.match(c);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),o=m.index,k(p.substr(0,o)),l(n,m[0].replace(d,"")),p=p.substring(o+m[0].length);return k(p),a(q.join(""))}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return b.lowercase(a.nodeName||a[0]&&a[0].nodeName)}function e(a,c){var d=!1,e=!1;this.ngClickOverrideEnabled=function(f){return b.isDefined(f)?(f&&!e&&(e=!0,h.$$moduleName="ngTouch",c.directive("ngClick",h),a.decorator("ngClickDirective",["$delegate",function(a){if(d)a.shift();else for(var b=a.length-1;b>=0;){if("ngTouch"===a[b].$$moduleName){a.splice(b,1);break}b--}return a}])),d=f,this):d},this.$get=function(){return{ngClickOverrideEnabled:function(){return d}}}}function f(a,c,d){g.directive(a,["$parse","$swipe",function(e,f){var g=75,h=.3,i=30;return function(j,k,l){function m(a){if(!n)return!1;var b=Math.abs(a.y-n.y),d=(a.x-n.x)*c;return o&&g>b&&d>0&&d>i&&h>b/d}var n,o,p=e(l[a]),q=["touch"];b.isDefined(l.ngSwipeDisableMouse)||q.push("mouse"),f.bind(k,{start:function(a,b){n=a,o=!0},cancel:function(a){o=!1},end:function(a,b){m(a)&&j.$apply(function(){k.triggerHandler(d),p(j,{$event:b})})}},q)}}])}var g=b.module("ngTouch",[]);g.provider("$touch",e),e.$inject=["$provide","$compileProvider"],g.factory("$swipe",[function(){function a(a){var b=a.originalEvent||a,c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||c[0];return{x:d.clientX,y:d.clientY}}function c(a,c){var d=[];return b.forEach(a,function(a){var b=e[a][c];b&&d.push(b)}),d.join(" ")}var d=10,e={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(b,e,f){var g,h,i,j,k=!1;f=f||["mouse","touch"],b.on(c(f,"start"),function(b){i=a(b),k=!0,g=0,h=0,j=i,e.start&&e.start(i,b)});var l=c(f,"cancel");l&&b.on(l,function(a){k=!1,e.cancel&&e.cancel(a)}),b.on(c(f,"move"),function(b){if(k&&i){var c=a(b);if(g+=Math.abs(c.x-j.x),h+=Math.abs(c.y-j.y),j=c,!(d>g&&d>h))return h>g?(k=!1,void(e.cancel&&e.cancel(b))):(b.preventDefault(),void(e.move&&e.move(c,b)))}}),b.on(c(f,"end"),function(b){k&&(k=!1,e.end&&e.end(a(b),b))})}}}]);var h=["$parse","$timeout","$rootElement",function(a,c,e){function f(a,b,c,d){return Math.abs(a-c)p)){var b=a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,e=b[0].clientY;1>c&&1>e||m&&m[0]===c&&m[1]===e||(m&&(m=null),"label"===d(a.target)&&(m=[c,e]),g(l,c,e)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur&&a.target.blur()))}}function i(a){var b=a.touches&&a.touches.length?a.touches:[a],d=b[0].clientX,e=b[0].clientY;l.push(d,e),c(function(){for(var a=0;ac&&o>t&&(j(r,s),g&&g.blur(),b.isDefined(e.disabled)&&e.disabled!==!1||d.triggerHandler("click",[a])),f()}),d.onclick=function(a){},d.on("click",function(a,b){c.$apply(function(){l(c,{$event:b||a})})}),d.on("mousedown",function(a){d.addClass(r)}),d.on("mousemove mouseup",function(a){d.removeClass(r)})}}];f("ngSwipeLeft",-1,"swipeleft"),f("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ab-base64",[]).constant("base64",function(){var a={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lookup:null,ie:/MSIE /.test(navigator.userAgent),ieo:/MSIE [67]/.test(navigator.userAgent),encode:function(b){var c,d,e,f,g=a.toUtf8(b),h=-1,i=g.length,j=[,,,];if(a.ie){for(c=[];++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c.push(a.alphabet.charAt(j[0]),a.alphabet.charAt(j[1]),a.alphabet.charAt(j[2]),a.alphabet.charAt(j[3]));return c.join("")}for(c="";++h>2,j[1]=(3&d)<<4|e>>4,isNaN(e)?j[2]=j[3]=64:(f=g[++h],j[2]=(15&e)<<2|f>>6,j[3]=isNaN(f)?64:63&f),c+=a.alphabet[j[0]]+a.alphabet[j[1]]+a.alphabet[j[2]]+a.alphabet[j[3]];return c},decode:function(b){if(b=b.replace(/\s/g,""),b.length%4)throw new Error("InvalidLengthError: decode failed: The string to be decoded is not the correct length for a base64 encoded string.");if(/[^A-Za-z0-9+\/=\s]/g.test(b))throw new Error("InvalidCharacterError: decode failed: The string contains characters invalid in a base64 encoded string.");var c,d=a.fromUtf8(b),e=0,f=d.length;if(a.ieo){for(c=[];f>e;)d[e]<128?c.push(String.fromCharCode(d[e++])):d[e]>191&&d[e]<224?c.push(String.fromCharCode((31&d[e++])<<6|63&d[e++])):c.push(String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]));return c.join("")}for(c="";f>e;)c+=d[e]<128?String.fromCharCode(d[e++]):d[e]>191&&d[e]<224?String.fromCharCode((31&d[e++])<<6|63&d[e++]):String.fromCharCode((15&d[e++])<<12|(63&d[e++])<<6|63&d[e++]);return c},toUtf8:function(a){var b,c=-1,d=a.length,e=[];if(/^[\x00-\x7f]*$/.test(a))for(;++cb?e.push(b):2048>b?e.push(b>>6|192,63&b|128):e.push(b>>12|224,b>>6&63|128,63&b|128);return e},fromUtf8:function(b){var c,d=-1,e=[],f=[,,,];if(!a.lookup){for(c=a.alphabet.length,a.lookup={};++d>4),f[2]=a.lookup[b.charAt(++d)],64!==f[2])&&(e.push((15&f[1])<<4|f[2]>>2),f[3]=a.lookup[b.charAt(++d)],64!==f[3]);)e.push((3&f[2])<<6|f[3]);return e}},b={decode:function(b){b=b.replace(/-/g,"+").replace(/_/g,"/"); +var c=b.length%4;if(c){if(1===c)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");b+=new Array(5-c).join("=")}return a.decode(b)},encode:function(b){var c=a.encode(b);return c.replace(/\+/g,"-").replace(/\//g,"_").split("=",1)[0]}};return{decode:a.decode,encode:a.encode,urldecode:b.decode,urlencode:b.encode}}()),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
    ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){ +switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
    "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
    '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
    ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n, +content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
    "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
    ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0), +null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
    \n \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
    ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
    \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'
    \n \n
    \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
    \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
    ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      
    \n \n :\n \n :\n \n
      
    \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')});var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(a){function b(a,b,c,d,e,f,g){return a=a+(b&c|~b&d)+e+g,(a<>>32-f)+b}function c(a,b,c,d,e,f,g){return a=a+(b&d|c&~d)+e+g,(a<>>32-f)+b}function d(a,b,c,d,e,f,g){return a=a+(b^c^d)+e+g,(a<>>32-f)+b}function e(a,b,c,d,e,f,g){return a=a+(c^(b|~d))+e+g,(a<>>32-f)+b}for(var f=CryptoJS,g=f.lib,h=g.WordArray,i=g.Hasher,g=f.algo,j=[],k=0;64>k;k++)j[k]=4294967296*a.abs(a.sin(k+1))|0;g=g.MD5=i.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,f){for(var g=0;16>g;g++){var h=f+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var g=this._hash.words,h=a[f+0],i=a[f+1],k=a[f+2],l=a[f+3],m=a[f+4],n=a[f+5],o=a[f+6],p=a[f+7],q=a[f+8],r=a[f+9],s=a[f+10],t=a[f+11],u=a[f+12],v=a[f+13],w=a[f+14],x=a[f+15],y=g[0],z=g[1],A=g[2],B=g[3],y=b(y,z,A,B,h,7,j[0]),B=b(B,y,z,A,i,12,j[1]),A=b(A,B,y,z,k,17,j[2]),z=b(z,A,B,y,l,22,j[3]),y=b(y,z,A,B,m,7,j[4]),B=b(B,y,z,A,n,12,j[5]),A=b(A,B,y,z,o,17,j[6]),z=b(z,A,B,y,p,22,j[7]),y=b(y,z,A,B,q,7,j[8]),B=b(B,y,z,A,r,12,j[9]),A=b(A,B,y,z,s,17,j[10]),z=b(z,A,B,y,t,22,j[11]),y=b(y,z,A,B,u,7,j[12]),B=b(B,y,z,A,v,12,j[13]),A=b(A,B,y,z,w,17,j[14]),z=b(z,A,B,y,x,22,j[15]),y=c(y,z,A,B,i,5,j[16]),B=c(B,y,z,A,o,9,j[17]),A=c(A,B,y,z,t,14,j[18]),z=c(z,A,B,y,h,20,j[19]),y=c(y,z,A,B,n,5,j[20]),B=c(B,y,z,A,s,9,j[21]),A=c(A,B,y,z,x,14,j[22]),z=c(z,A,B,y,m,20,j[23]),y=c(y,z,A,B,r,5,j[24]),B=c(B,y,z,A,w,9,j[25]),A=c(A,B,y,z,l,14,j[26]),z=c(z,A,B,y,q,20,j[27]),y=c(y,z,A,B,v,5,j[28]),B=c(B,y,z,A,k,9,j[29]),A=c(A,B,y,z,p,14,j[30]),z=c(z,A,B,y,u,20,j[31]),y=d(y,z,A,B,n,4,j[32]),B=d(B,y,z,A,q,11,j[33]),A=d(A,B,y,z,t,16,j[34]),z=d(z,A,B,y,w,23,j[35]),y=d(y,z,A,B,i,4,j[36]),B=d(B,y,z,A,m,11,j[37]),A=d(A,B,y,z,p,16,j[38]),z=d(z,A,B,y,s,23,j[39]),y=d(y,z,A,B,v,4,j[40]),B=d(B,y,z,A,h,11,j[41]),A=d(A,B,y,z,l,16,j[42]),z=d(z,A,B,y,o,23,j[43]),y=d(y,z,A,B,r,4,j[44]),B=d(B,y,z,A,u,11,j[45]),A=d(A,B,y,z,x,16,j[46]),z=d(z,A,B,y,k,23,j[47]),y=e(y,z,A,B,h,6,j[48]),B=e(B,y,z,A,p,10,j[49]),A=e(A,B,y,z,w,15,j[50]),z=e(z,A,B,y,n,21,j[51]),y=e(y,z,A,B,u,6,j[52]),B=e(B,y,z,A,l,10,j[53]),A=e(A,B,y,z,s,15,j[54]),z=e(z,A,B,y,i,21,j[55]),y=e(y,z,A,B,q,6,j[56]),B=e(B,y,z,A,x,10,j[57]),A=e(A,B,y,z,o,15,j[58]),z=e(z,A,B,y,v,21,j[59]),y=e(y,z,A,B,m,6,j[60]),B=e(B,y,z,A,t,10,j[61]),A=e(A,B,y,z,k,15,j[62]),z=e(z,A,B,y,r,21,j[63]);g[0]=g[0]+y|0,g[1]=g[1]+z|0,g[2]=g[2]+A|0,g[3]=g[3]+B|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);for(c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),b.sigBytes=4*(c.length+1),this._process(),b=this._hash,c=b.words,d=0;4>d;d++)e=c[d],c[d]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return b},clone:function(){var a=i.clone.call(this);return a._hash=this._hash.clone(),a}}),f.MD5=i._createHelper(g),f.HmacMD5=i._createHmacHelper(g)}(Math);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;a>e;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535e;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-8*(c%4),b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this); +return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;b>d;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;a>d;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-8*(d%4);return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;b>i;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+((f&g|~f&h)+1518500249):40>j?k+((f^g^h)+1859775393):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}(),function(){angular.module("creditCardInput",[]).provider("creditCardInput",function(){var a,b,c,d;return a="amex",d="visa",c="master",b="discover",this.setCardClasses=function(e){return a=e.americanExpress||"amex",d=e.visa||"visa",c=e.masterCard||"master",b=e.discoverCard||"discover"},this.$get=function(){return{americanExpressClass:a,visaClass:d,masterCardClass:c,discoverCardClass:b,cardClasses:[a,d,c,b].join(" ")}},this}).directive("type",["creditCardInput",function(a){return{require:"?ngModel",link:function(b,c,d,e){var f,g,h,i,j,k,l,m,n;return k=d.ngType||d.type,!e||"credit card"!==k&&"cvc"!==k?void 0:"cvc"===k?(c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(g(e.$viewValue))})}),g=function(a){var b;return b=null!=a?a.replace(/([^\d])*/g,"").slice(0,4):void 0,e.$setValidity("minlength",b.length>=3||e.$isEmpty(b)),b},e.$parsers.push(g)):(i=c.parent(),c.on("blur keyup change",function(a){return b.$apply(function(){var a;if(a=c.val())return e.$setViewValue(a),c.val(j(e.$viewValue))})}),l=function(b){var c,d;return n(b),i.hasClass(a.americanExpressClass)?null!=(c=b.replace(/([^\d])*/g,"").slice(0,15))?c:"":null!=(d=b.replace(/([^\d])*/g,"").slice(0,16))?d:""},e.$parsers.push(l),j=function(b){var c,d,g,h,j;return b?(c=b.replace(/([^\d\s])*/g,""),d=new RegExp("^(34|37)"),j=new RegExp("^4"),h=new RegExp("^5[1-5]"),g=new RegExp("^60"),c.length<2&&i.removeClass(a.cardClasses),2===c.length&&i.addClass(function(){switch(!1){case!d.test(c):return a.americanExpressClass;case!j.test(c):return a.visaClass;case!h.test(c):return a.masterCardClass;case!g.test(c):return a.discoverCardClass}}()),d.test(c)?f(c):m(c)):void e.$setPristine()},m=function(a){return" "===a[14]&&a.length>18?a.slice(0,19):5!==a.length&&10!==a.length&&15!==a.length||" "===a[a.length-1]?6!==a.length&&11!==a.length&&16!==a.length||" "===a[a.length-2]?7!==a.length&&12!==a.length&&17!==a.length||" "===a[a.length-3]?8!==a.length&&13!==a.length&&18!==a.length||" "===a[a.length-4]?9!==a.length&&14!==a.length&&19!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},f=function(a){return a.length>16?a.slice(0,17):5!==a.length&&12!==a.length||" "===a[a.length-1]?6!==a.length&&13!==a.length||" "===a[a.length-2]?7!==a.length&&14!==a.length||" "===a[a.length-3]?8!==a.length&&15!==a.length||" "===a[a.length-4]?9!==a.length&&16!==a.length||" "===a[a.length-5]?h(a):a.slice(0,-5)+" "+a.slice(a.length-5):a.slice(0,-4)+" "+a.slice(a.length-4):a.slice(0,-3)+" "+a.slice(a.length-3):a.slice(0,-2)+" "+a.slice(a.length-2):a.slice(0,-1)+" "+a[a.length-1]},h=function(a){return" "===a[a.length-1]?a.slice(0,-1):a},n=function(a){var b,c;return b=[[0,2,4,6,8,1,3,5,7,9],[0,1,2,3,4,5,6,7,8,9]],c=0,a.replace(/\D+/g,"").replace(/[\d]/g,function(a,d,e){return c+=b[e.length-d&1][parseInt(a,10)]}),e.$setValidity("mod10",!!(c%10===0&&c>0)||e.$isEmpty(a))})}}}])}.call(this),function(){var a=angular.module("toggle-switch",["ng"]);a.provider("toggleSwitchConfig",[function(){this.onLabel="On",this.offLabel="Off",this.knobLabel=" ";var a=this;this.$get=function(){return{onLabel:a.onLabel,offLabel:a.offLabel,knobLabel:a.knobLabel}}}]),a.directive("toggleSwitch",["toggleSwitchConfig",function(a){return{restrict:"EA",replace:!0,require:"ngModel",scope:{disabled:"@",onLabel:"@",offLabel:"@",knobLabel:"@"},template:'',compile:function(b,c){return c.onLabel||(c.onLabel=a.onLabel),c.offLabel||(c.offLabel=a.offLabel),c.knobLabel||(c.knobLabel=a.knobLabel),this.link},link:function(a,b,c,d){var e=32;b.on("click",function(){a.$apply(a.toggle)}),b.on("keydown",function(b){var c=b.which?b.which:b.keyCode;c===e&&a.$apply(a.toggle)}),d.$formatters.push(function(a){return a}),d.$parsers.push(function(a){return a}),d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)}),d.$render=function(){a.model=d.$viewValue},a.toggle=function(){a.disabled||(a.model=!a.model,d.$setViewValue(a.model))}}}}])}(),function(a){"use strict";a.module("uuid4",[]).factory("uuid4",function(){var a=function(a){return Math.pow(2,a)},b=(a(4),a(6)),c=a(8),d=a(12),e=(a(14),a(16)),f=a(32),g=(a(40),a(48),function(a,b){return Math.floor(Math.random()*(b-a+1))+a}),h=function(){return g(0,b-1)},i=function(){return g(0,c-1)},j=function(){return g(0,d-1)},k=function(){return g(0,e-1)},l=function(){return g(0,f-1)},m=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},n=function(a,b,c){a=String(a),c=c?c:"0";for(var d=b-a.length;d>0;d>>>=1,c+=c)1&d&&(a=c+a);return a},o=function(a,b,c,d,e,f){var g=n(a.toString(16),8)+"-"+n(b.toString(16),4)+"-"+n(c.toString(16),4)+"-"+n(d.toString(16),2)+n(e.toString(16),2)+"-"+n(f.toString(16),12);return g};return{generate:function(){return o(l(),k(),16384|j(),128|h(),i(),m())},validate:function(a){var b=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return b.test(a)}}})}(angular),angular.module("angular.css.injector",[]).provider("cssInjector",["$interpolateProvider",function(a){function b(b,d,e){var f,g=angular.element(document.getElementsByTagName("head")[0]);d.$on("$locationChangeStart",function(){c===!0&&k()});var h=function(){void 0===f&&(f=e.scope())},i=function(c){if(h(),void 0===f.injectedStylesheets)f.injectedStylesheets=[],g.append(b("")(f));else for(var d in f.injectedStylesheets)if(f.injectedStylesheets[d].href==c)return;f.injectedStylesheets.push({href:c})},j=function(a){if(h(),f.injectedStylesheets)for(var b=0;b0}})}(),function(){angular.module("leodido.luhn",[]).service("luhn",function(){var a=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]];this.check=function(b){if(!b)return!1;for(var c=b.length,d=0,e=0;c--;)e+=a[d][parseInt(b.charAt(c),10)],d^=1;return 0===e%10&&e>0}})}(),function(a,b,c){"object"==typeof exports?module.exports=exports=b(require("./core"),require("./x64-core"),require("./lib-typedarrays"),require("./enc-utf16"),require("./enc-base64"),require("./md5"),require("./sha1"),require("./sha256"),require("./sha224"),require("./sha512"),require("./sha384"),require("./sha3"),require("./ripemd160"),require("./hmac"),require("./pbkdf2"),require("./evpkdf"),require("./cipher-core"),require("./mode-cfb"),require("./mode-ctr"),require("./mode-ctr-gladman"),require("./mode-ofb"),require("./mode-ecb"),require("./pad-ansix923"),require("./pad-iso10126"),require("./pad-iso97971"),require("./pad-zeropadding"),require("./pad-nopadding"),require("./format-hex"),require("./aes"),require("./tripledes"),require("./rc4"),require("./rabbit"),require("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],b):a.CryptoJS=b(a.CryptoJS)}(this,function(a){return a}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.ES6Promise=b()}(this,function(){"use strict";function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){U=a}function d(a){V=a}function e(){return function(){return process.nextTick(j)}}function f(){return function(){T(j)}}function g(){var a=0,b=new Y(j),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function h(){var a=new MessageChannel;return a.port1.onmessage=j,function(){return a.port2.postMessage(0)}}function i(){var a=setTimeout;return function(){return a(j,1)}}function j(){for(var a=0;S>a;a+=2){var b=_[a],c=_[a+1];b(c),_[a]=void 0,_[a+1]=void 0}S=0}function k(){try{var a=require,b=a("vertx");return T=b.runOnLoop||b.runOnContext,f()}catch(c){return i()}}function l(a,b){var c=arguments,d=this,e=new this.constructor(n);void 0===e[ba]&&G(e);var f=d._state;return f?!function(){var a=c[f-1];V(function(){return D(f,e,a,d._result)})}():z(d,e,a,b),e}function m(a){var b=this;if(a&&"object"==typeof a&&a.constructor===b)return a;var c=new b(n);return v(c,a),c}function n(){}function o(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function q(a){try{return a.then}catch(b){return fa.error=b,fa}}function r(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function s(a,b,c){V(function(a){var d=!1,e=r(c,b,function(c){d||(d=!0,b!==c?v(a,c):x(a,c))},function(b){d||(d=!0,y(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,y(a,e))},a)}function t(a,b){b._state===da?x(a,b._result):b._state===ea?y(a,b._result):z(b,void 0,function(b){return v(a,b)},function(b){return y(a,b)})}function u(a,c,d){c.constructor===a.constructor&&d===l&&c.constructor.resolve===m?t(a,c):d===fa?y(a,fa.error):void 0===d?x(a,c):b(d)?s(a,c,d):x(a,c)}function v(b,c){b===c?y(b,o()):a(c)?u(b,c,q(c)):x(b,c)}function w(a){a._onerror&&a._onerror(a._result),A(a)}function x(a,b){a._state===ca&&(a._result=b,a._state=da,0!==a._subscribers.length&&V(A,a))}function y(a,b){a._state===ca&&(a._state=ea,a._result=b,V(w,a))}function z(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+da]=c,e[f+ea]=d,0===f&&a._state&&V(A,a)}function A(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;gf;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})}function L(a){var b=this,c=new b(n);return y(c,a),c}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function O(a){this[ba]=F(),this._result=this._state=void 0,this._subscribers=[],n!==a&&("function"!=typeof a&&M(),this instanceof O?E(this,a):N())}function P(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(b){throw new Error("polyfill failed because global object is unavailable in this environment")}var c=a.Promise;if(c){var d=null;try{d=Object.prototype.toString.call(c.resolve())}catch(b){}if("[object Promise]"===d&&!c.cast)return}a.Promise=O}var Q=void 0;Q=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var R=Q,S=0,T=void 0,U=void 0,V=function(a,b){_[S]=a,_[S+1]=b,S+=2,2===S&&(U?U(j):aa())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,_=new Array(1e3),aa=void 0;aa=Z?e():Y?g():$?h():void 0===W&&"function"==typeof require?k():i();var ba=Math.random().toString(36).substring(16),ca=void 0,da=1,ea=2,fa=new B,ga=new B,ha=0;return H.prototype._enumerate=function(){for(var a=this.length,b=this._input,c=0;this._state===ca&&a>c;c++)this._eachEntry(b[c],c)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor,d=c.resolve;if(d===m){var e=q(a);if(e===l&&a._state!==ca)this._settledAt(a._state,b,a._result);else if("function"!=typeof e)this._remaining--,this._result[b]=a;else if(c===O){var f=new c(n);u(f,a,e),this._willSettleAt(f,b)}else this._willSettleAt(new c(function(b){return b(a)}),b)}else this._willSettleAt(d(a),b)},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===ca&&(this._remaining--,a===ea?y(d,c):this._result[b]=c),0===this._remaining&&x(d,this._result)},H.prototype._willSettleAt=function(a,b){var c=this;z(a,void 0,function(a){return c._settledAt(da,b,a)},function(a){return c._settledAt(ea,b,a)})},O.all=J,O.race=K,O.resolve=m,O.reject=L,O._setScheduler=c,O._setAsap=d,O._asap=V,O.prototype={constructor:O,then:l,"catch":function(a){return this.then(null,a)}},P(),O.polyfill=P,O.Promise=O,O}),function(){var a,b,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=angular.module("maha.countries",[]),b.provider("Countries",a=function(){function a(){this.countriesList=[],this.priorityList=[],this.$get=function(){var a,d;return a=this.countriesList,d=this.priorityList,{getCountryByCode:function(b){return a[b]},getCountries:function(){var e,f,g,h,i,j;if(b=[],0===d.length){j=[];for(e in a)g=a[e],j.push([e,g]);return j}for(h=0,i=d.length;i>h;h++)f=d[h],b.push([f,a[f]]);for(e in a)g=a[e],c.call(d,e)<0&&b.push([e,g]);return b},setCountries:function(b){a=b}}}}return a.prototype.setCountriesList=function(a){return this.countriesList=a},a.prototype.setPriorityList=function(a){return this.priorityList=a},a}())}.call(this),function(){angular.module("maha.countries").config(["CountriesProvider",function(a){a.setCountriesList({AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AC:"Ascension Island",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius, and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",IC:"Canary Islands",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",EA:"Ceuta and Melilla",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CP:"Clipperton Island",CC:"Cocos [Keeling] Islands",CO:"Colombia",KM:"Comoros",CG:"Congo - Brazzaville",CD:"Congo - Kinshasa",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d’Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DG:"Diego Garcia",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",EU:"European Union",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",HN:"Honduras",HK:"Hong Kong SAR China",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macau SAR China",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar [Burma]",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",QO:"Outlying Oceania",PK:"Pakistan",PW:"Palau",PS:"Palestinian Territories",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn Islands",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"São Tomé and Príncipe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",CS:"Serbia and Montenegro",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TA:"Tristan da Cunha",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UM:"U.S. Minor Outlying Islands",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican City",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"})}])}.call(this),function(a,b){"object"==typeof exports?module.exports=exports=b():"function"==typeof define&&define.amd?define([],b):a.CryptoJS=b()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<>>6-i%4*2,l=j|k;g[h>>>2]|=l<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){ +var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.lengthq;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.lengthk;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<o?m^=1<a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<>>32-z,p=y<>>32-z;else var o=y<>>64-z,p=x<>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.pad.NoPadding={pad:function(){},unpad:function(){}},function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b); +},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0>>0?1:0)|0,this._b=b[7]>>>0>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a}),function(){function a(a,b){var c=a.split("."),d=ta;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){function c(){}c.prototype=b.prototype,a.ha=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.ma=function(a,c,d){for(var e=Array(arguments.length-2),f=2;fb?1:b>a?-1:0}function g(a){var b,c=[],d=0;for(b in a)c[d++]=a[b];return c}function h(a,b){this.b=a,this.a={};for(var c=0;c=0?(a=a.substring(b),a=a.replace(Sa,""),b=a.search(Ra),b>=0&&(a=a.substring(0,b))):a="",a}function D(a){return 2>a.length?!1:ea(Va,a)}function E(a){return ea(Ta,a)?G(a,La):G(a,Ja)}function F(a){var b=E(a.toString());d(a),a.a(b)}function G(a,b){for(var d,e=new c,f=a.length,g=0;f>g;++g)d=a.charAt(g),d=b[d.toUpperCase()],null!=d&&e.a(d);return e.toString()}function H(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ia}function I(a,b,c){if(0==o(b,2)&&m(b,5)){var d=p(b,5);if(0e;++e){c=a[e];var f=q(c,3);if((0==f||0==b.search(o(c,3,f-1)))&&(f=new RegExp(o(c,1)),ea(f,b)))return c}return null}function P(a,b,c,d){var e=p(b,2),f=new RegExp(o(b,1)),g=p(b,5),h="";return 2==c&&null!=d&&0g;g++){d=c[g];var h=S(a,d);if(m(h,23)){if(0==e.search(o(h,23))){c=d;break a}}else if(-1!=R(e,h)){c=d;break a}}c=null}return c}function X(a){return a=Ha[a],null==a?"ZZ":a[0]}function Y(a,b){var c=S(a,b);if(null==c)throw"Invalid region code: "+b;return p(c,10)}function Z(a,b){return ea(a,b)?0:0==b.search(a)?3:2}function $(a){var b=eb,c=L(a);return a=p(a,1),a in Ha?(b=J(b,a,X(a)),b=o(b,1),b=p(b,3),Z(b,c)):1}function _(a,b){var c=a.toString();if(0==c.length||"0"==c.charAt(0))return 0;for(var d,e=c.length,f=1;3>=f&&e>=f;++f)if(d=parseInt(c.substring(0,f),10),d in Ha)return b.a(c.substring(f)),d;return 0}function aa(a,b,e,f,g){if(0==a.length)return 0;a=new c(a);var h;null!=b&&(h=o(b,11)),null==h&&(h="NonMatch");var i=a.toString();if(0==i.length)h=20;else if(Oa.test(i))i=i.replace(Oa,""),d(a),a.a(E(i)),h=1;else{if(i=new RegExp(h),F(a),h=a.toString(),0==h.search(i)){var i=h.match(i)[0].length,j=h.substring(i).match(Pa);j&&null!=j[1]&&0=a.b.length)throw"Phone number too short after IDD";if(e=_(a,e),0!=e)return r(g,1,e),e;throw"Invalid country calling code"}if(null!=b&&(h=p(b,10),i=""+h,j=a.toString(),0==j.lastIndexOf(i,0))){var k=new c(j.substring(i.length)),j=o(b,1),i=new RegExp(p(j,2));if(ba(k,b,null),b=k.toString(),j=p(j,3),!ea(i,a.toString())&&ea(i,b)||3==Z(j,a.toString()))return e.a(b),f&&r(g,6,10),r(g,1,h),h}return r(g,1,0),0}function ba(a,b,c){var d=a.toString(),e=d.length,f=o(b,15);if(0!=e&&null!=f&&0!=f.length&&(f=new RegExp("^(?:"+f+")"),e=f.exec(d))){var g,h=RegExp;g=o(b,1),g=p(g,2),h=new h(g),g=ea(h,d);var i=e.length-1;b=o(b,16),null==b||0==b.length||null==e[i]||0==e[i].length?(!g||ea(h,d.substring(e[0].length)))&&(null!=c&&i>0&&null!=e[i]&&c.a(e[1]),a.b=""+d.substring(e[0].length)):(d=d.replace(f,b),(!g||ea(h,d))&&(null!=c&&i>0&&c.a(e[1]),a.b=""+d))}}function ca(a,b){var c=eb;if(!H(b)&&00){var i=h+15;if("+"==b.charAt(i)){var j=b.indexOf(";",i);j>0?g.a(b.substring(i,j)):g.a(b.substring(i))}i=b.indexOf("tel:"),g.a(b.substring(i>=0?i+4:0,h))}else g.a(C(b));if(h=g.toString(),i=h.indexOf(";isub="),i>0&&(d(g),g.a(h.substring(0,i))),!D(g.toString()))throw"The string supplied did not seem to be a phone number";if(h=g.toString(),!(H(e)||null!=h&&0=0&&D(b.substring(0,i)))for(var j=b.match(Ua),k=j.length,l=1;k>l;++l)if(null!=j[l]&&0b.b.length)throw"The string supplied is too short to be a phone number";if(null!=i&&(a=new c,e=new c(b.toString()),ba(e,i,a),g=e.toString(),i=o(i,1),i=p(i,3),2!=Z(i,g)&&(b=e,f&&r(h,7,a.toString()))),f=b.toString(),a=f.length,2>a)throw"The string supplied is too short to be a phone number";if(a>17)throw"The string supplied is too long to be a phone number";if(1c;++c){var e=a.f[c],f=p(e,1);if(a.v==f)return!1;var g;g=a;var h=e,i=p(h,1);if(-1!=i.indexOf("|"))g=!1;else{i=i.replace(ab,"\\d"),i=i.replace(bb,"\\d"),d(g.m);var j;j=g;var h=p(h,2),k="999999999999999".match(i)[0];k.lengthf;++f){var g=a.f[f];0==q(g,3)?c.push(a.f[f]):(g=o(g,3,Math.min(d,q(g,3)-1)),0==b.search(g)&&c.push(a.f[f]))}a.f=c}function ja(a,b){a.i.a(b);var c=b;if(Pa.test(c)||1==a.i.b.length&&Na.test(c)){var e,c=b;"+"==c?(e=c,a.u.a(c)):(e=Ja[c],a.u.a(e),a.a.a(e)),b=e}else a.j=!1,a.ga=!0;if(!a.j){if(!a.ga)if(qa(a)){if(ra(a))return ka(a)}else if(0d;++d){var e=a.f[d],f=p(e,1);if(new RegExp("^(?:"+f+")$").test(b))return a.$=db.test(o(e,4)),b=b.replace(new RegExp(f,"g"),o(e,2)),ma(a,b)}return""}function ma(a,b){var c=a.b.b.length;return a.$&&c>0&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function na(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0e;++e){var f,g=c[e];(f=!m(a.g,12)||a.o||o(g,6))||(f=p(g,4),f=0==f.length||$a.test(f)),f&&(f=p(g,2),cb.test(f)&&a.f.push(g))}return ia(a,b),b=la(a),00){for(var d="",e=0;c>e;e++)d=sa(a,b.charAt(e));return a.j?ma(a,d):a.i.toString()}return a.b.toString()}function pa(a){var b,c=a.a.toString(),e=0;return 1!=o(a.g,10)?b=!1:(b=a.a.toString(),b="1"==b.charAt(0)&&"0"!=b.charAt(1)&&"1"!=b.charAt(1)),b?(e=1,a.b.a("1").a(" "),a.o=!0):m(a.g,15)&&(b=new RegExp("^(?:"+o(a.g,15)+")"),b=c.match(b),null!=b&&null!=b[0]&&0c?Math.max(0,a.length+c):c,"string"==typeof a)return"string"==typeof b&&1==b.length?a.indexOf(b,c):-1;for(;c=g?f=e:(d=d.substring(0,g),d=G(d,Ja),0==d.length?f=e:(i=i.clone(),s(i,4),d=[i],i=p(c,1),e=L(c),i in Ha?(f=J(f,i,X(i)),g="",g=O(d,e),null==g?g=e:(d=g.clone(),g=p(g,4),0f;++f)e=c,e.ea=ja(e,a.charAt(f)),e=e.ea;return e})}(),!function(a){a.module("cwill747.phonenumber",[]).directive("phoneNumber",["$log",function(a){function b(a){return a?a.replace(/([^0-9|+])/g,""):a}function c(b,c){var d=b;try{d=phoneUtils.formatAsTyped(b,c)}catch(e){a.debug(e)}return d}return{restrict:"A",require:"?ngModel",scope:{countryCode:"=",nonFormatted:"=?"},controllerAs:"",controller:function(){this.countryCode=this.countryCode||"us"},link:function(d,e,f,g){function h(a){return g.$isEmpty(a)?a:c(b(a),d.countryCode)}function i(a){if(g.$isEmpty(a))return d.nonFormatted="",a;var c=j(a);if(c===a)return a;var e=l.selectionStart,f=l.selectionEnd+c.length-a.length;return a.lengthc.length+1&&(e-=c.length-a.length),g.$setViewValue(c),g.$render(),l.setSelectionRange(e,f),b(c)}function j(a){var e=b(a);d.nonFormatted=e;var f="";return f=e&&e.length>1?c(e,d.countryCode):e,f.trim()}function k(b){var c=!1;try{c=phoneUtils.isValidNumberForRegion(b,d.countryCode)}catch(e){a.debug(e)}var f=g.$isEmpty(b)||c;return g.$setValidity("phoneNumber",f),b}var l=e[0];d.$watch("countryCode",function(){g.$modelValue=g.$viewValue+" "}),g.$formatters.push(h),g.$formatters.push(k),g.$parsers.push(i),g.$parsers.push(k)}}}])}(angular); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css new file mode 100644 index 0000000..61d7d29 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/main.88dcea2c.css @@ -0,0 +1,8 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}*,:after,:before,input[type=search]{box-sizing:border-box}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-timing-function:ease;transition-duration:.35s;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;cursor:pointer;text-decoration:none}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-content,.popover{background-clip:padding-box}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-25%)}.modal.in .modal-dialog{transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;text-align:left;text-align:start;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format('embedded-opentype'),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format('woff2'),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format('woff'),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format('truetype'),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.loading,.loadingbackground{position:fixed;top:0;left:0}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.carousel,.nav,.pagination,.panel-title a{cursor:pointer}body{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;background-color:#d6d6d6;padding:0}*,a :focus{outline:0}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{background-color:#FFF}.app-body{display:none}.container-fluid{padding-top:15px;padding-bottom:15px}.list-group-item:first-child,.list-group-item:last-child{border-radius:0}.marginless-listgroup{margin-bottom:0}.list-group-item{padding:15px;overflow:auto}.modal-list-group-item{padding:10px 5px;box-sizing:content-box}.channel-list-container,.text-list-container{padding-left:5px;padding-right:5px}.list-value{font-weight:400;color:#595959;padding-top:0;border:0;text-align:right}.channel-list-container{height:40px;line-height:40px}.left-aligned-list-value-label{float:left;height:100%;text-align:left}.mp-version,.right-aligned-list-value-label{float:right}.mp-version,.poweredByMOLPay{height:20px}.left-label{font-weight:200;color:#ababab;text-align:left;width:100%}.larger-text{font-size:40px;font-weight:700}.proceed-row{margin-left:20px;margin-right:20px}.credit-disclaimer{padding:5px;font-weight:200;color:#595959;font-size:small}.close-button,.proceed-button{color:#FFF;border:0;margin-bottom:0;padding:10px 15px;width:100%;font-weight:700}.proceed-button{background-color:#72529b;font-size:larger;border-radius:4px}button[disabled],html input[disabled]{opacity:.4;-moz-opacity:.4;background-color:gray}.close-button{background-color:#72529b;border-radius:4px}.molpay-disclaimer-container{padding:15px}.mp-version{color:#818285;font-size:8px;display:table;font-weight:700}.mp-version span{display:table-cell;vertical-align:bottom}.modal-body{font-size:larger;text-align:center}.loading{z-index:999;height:2em;overflow:show;margin:auto;bottom:0;right:0}.loading-text,.loading:before,.loadingbackground{height:100%;width:100%;display:block}.loadingbackground{content:'';background-color:#000;filter:alpha(opacity=60);opacity:.6;-moz-opacity:.8}.fa-spinner:before{color:#fff}.loading-text{position:relative;z-index:999;top:10px;left:0;color:#FFF}.new-credit-card-switch,.new-credit-card-switch .knob,.new-credit-card-switch span{height:28px;min-height:28px}.channel-logo{max-height:40px}.creditcard-form{margin-top:10px}.split{padding:0;border-width:0;display:flex}.split-cvv{width:40%}.split-exp{width:60%}.card-number-input{border-width:0;text-align:right;max-width:160px}.cvv-input,.exp-input{border-width:0;text-align:right;width:50%}.channel-list-modal-body{max-height:calc(100vh - 105px);min-height:480px;min-height:80vw;overflow-y:auto}.country-list-modal-body{max-height:calc(100vh - 185px);min-height:480px;min-height:80vw;overflow-y:auto}.search-bar{margin-bottom:0}.search-icon{float:right;margin-right:10px;margin-top:-24px;position:relative;z-index:2}.modal-header{text-align:center}.bcard-form{margin-top:10px}.new-credit-card-form{position:relative;display:block;padding-left:15px;padding-top:5px;padding-bottom:5px;border:0;margin-bottom:-1px;min-height:44px}.new-card-label{position:absolute;margin-top:5px;font-weight:200;color:#595959}.new-credit-card-switch{margin-left:80px;position:relative;border:0;border-radius:4px}.new-credit-card-switch .switch-left{background:#72529b;min-height:28px;height:28px}.new-credit-card-switch .switch-right{color:#333;background:#f0f0f0;min-height:28px;height:28px}.new-credit-card-switch .knob{background:#FFF;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.billing{text-align:left;width:90%}.bcard-point-label{padding-bottom:0;margin-bottom:0;border-bottom:0}.bcard-point{border-top:0}.notes{border:0;padding-bottom:0}.barcode-container{width:100%;padding-top:15px;padding-left:10px;padding-right:10px;text-align:center}.receipt-logo{height:70px}.pull-right{max-width:70%}.credit-card-input{max-width:160px}@media screen and (min-width:320px){.container{width:auto}}.list-group-item-sandboxed{background-color:#ddd;padding:5px}.list-group-item-sandboxed a,.list-group-item-sandboxed input,.list-group-item-sandboxed span{padding:5px;float:left;color:#000;font-size:14px}.list-group-item-sandboxed input{max-width:40%}.btn-group-sandboxed{float:right}.btn-group-sandboxed label{color:#595959;background-color:#fff;border-color:#ddd}.btn-group-sandboxed .btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#72529b;border-color:#72529b} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css new file mode 100644 index 0000000..53ffbeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/molpay-mobile-xdk-www/styles/vendor.34eb91d2.css @@ -0,0 +1 @@ +.toggle-switch,.toggle-switch span{cursor:pointer;display:inline-block}.toggle-switch{border:1px solid;text-align:left;overflow:hidden;line-height:8px;min-width:100px}.toggle-switch.disabled>div>span.knob{background:#AAA}.toggle-switch span{float:left;height:100%;line-height:20px;padding:4px;text-align:center;width:33%;white-space:nowrap;box-sizing:border-box;-o-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.toggle-switch>div{position:relative;width:150%}.toggle-switch .knob{background:#f5f5f5;border-left:1px solid #ccc;border-right:1px solid #ccc;width:34%;z-index:100}.toggle-switch .switch-on{left:0}.toggle-switch .switch-off{left:-50%}.toggle-switch .switch-left,.toggle-switch .switch-right{z-index:1}.toggle-switch .switch-left{color:#fff;background:#005fcc}.toggle-switch .switch-right{color:#333;background:#f0f0f0}.toggle-switch-animate{transition:left .5s;-o-transition:left .5s;-moz-transition:left .5s;-webkit-transition:left .5s} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..d609f8b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,117 @@ +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + hide: function (eventname) { + exec(null, null, "InAppBrowser", "hide", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/test/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/test/tests.js new file mode 100644 index 0000000..09a1793 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/test/tests.js @@ -0,0 +1,64 @@ +cordova.define("cordova-plugin-x-toast.tests", function(require, exports, module) { +exports.defineAutoTests = function() { + + var fail = function (done) { + expect(true).toBe(false); + done(); + }, + succeed = function (done) { + expect(true).toBe(true); + done(); + }; + + describe('Plugin availability', function () { + it("window.plugins.toast should exist", function() { + expect(window.plugins.toast).toBeDefined(); + }); + }); + + describe('API functions', function () { + it("should define show", function() { + expect(window.plugins.toast.show).toBeDefined(); + }); + + it("should define showWithOptions", function() { + expect(window.plugins.toast.showWithOptions).toBeDefined(); + }); + + it("should define optionsBuilder", function() { + expect(window.plugins.toast.optionsBuilder).toBeDefined(); + }); + + it("should define showShortTop", function() { + expect(window.plugins.toast.showShortTop).toBeDefined(); + }); + + it("should define showShortCenter", function() { + expect(window.plugins.toast.showShortCenter).toBeDefined(); + }); + + it("should define showShortBottom", function() { + expect(window.plugins.toast.showShortBottom).toBeDefined(); + }); + + it("should define showLongTop", function() { + expect(window.plugins.toast.showLongTop).toBeDefined(); + }); + + it("should define showLongCenter", function() { + expect(window.plugins.toast.showLongCenter).toBeDefined(); + }); + + it("should define showLongBottom", function() { + expect(window.plugins.toast.showLongBottom).toBeDefined(); + }); + }); + + describe('Invalid usage', function () { + it("should fail due to an invalid position", function(done) { + window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); + }); + }); +}; + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/www/Toast.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/www/Toast.js new file mode 100644 index 0000000..685c677 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-plugin-x-toast/www/Toast.js @@ -0,0 +1,101 @@ +cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { +function Toast() { +} + +Toast.prototype.optionsBuilder = function () { + + // defaults + var message = null; + var duration = "short"; + var position = "center"; + var addPixelsY = 0; + + return { + withMessage: function(m) { + message = m.toString(); + return this; + }, + + withDuration: function(d) { + duration = d.toString(); + return this; + }, + + withPosition: function(p) { + position = p; + return this; + }, + + withAddPixelsY: function(y) { + addPixelsY = y; + return this; + }, + + build: function() { + return { + message: message, + duration: duration, + position: position, + addPixelsY: addPixelsY + }; + } + }; +}; + + +Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { + options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); + options.message = options.message.toString(); + cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); +}; + +Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { + this.showWithOptions( + this.optionsBuilder() + .withMessage(message) + .withDuration(duration) + .withPosition(position) + .build(), + successCallback, + errorCallback); +}; + +Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { + this.show(message, "short", "top", successCallback, errorCallback); +}; + +Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { + this.show(message, "short", "center", successCallback, errorCallback); +}; + +Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { + this.show(message, "short", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { + this.show(message, "long", "top", successCallback, errorCallback); +}; + +Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { + this.show(message, "long", "center", successCallback, errorCallback); +}; + +Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { + this.show(message, "long", "bottom", successCallback, errorCallback); +}; + +Toast.prototype.hide = function (successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, "Toast", "hide", []); +}; + +Toast.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.toast = new Toast(); + return window.plugins.toast; +}; + +cordova.addConstructor(Toast.install); +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js new file mode 100644 index 0000000..7596c6d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/cordova-save-image-gallery/www/saveImageGallery.js @@ -0,0 +1,183 @@ +cordova.define("cordova-save-image-gallery.saveImageGallery", function(require, exports, module) { +/** + * @file saveImageGallery PhoneGap/Cordova plugin + * @author Alejandro Gómez + * @author Tommy-Carlos Williams + * @author Simba Zhang + * @author StefanoMagrassi + * @copyright Alejandro Gómez - 2016. All rights reserved. + * @license MIT + */ + +var exec = require('cordova/exec'); + +// Consts +var SERVICE = 'SaveImageGallery'; +var SAVE_BASE64_IMAGE_ACTION = 'saveImageDataToLibrary'; +var REMOVE_IMAGE_ACTION = 'removeImageFromLibrary'; +var DEFAULTS = {prefix: 'img_', mediaScanner: true, format: 'JPG', quality: 100}; + + +var ImageSaver = function () { + +}; + + +/** + * Constants. + */ +ImageSaver.FORMAT_JPG = 'jpg'; +ImageSaver.FORMAT_PNG = 'png'; + +/** + * Saves base64 data as image. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Base64 img. + * prefix: String + * format: 'JPG' or 'PNG' - defaults to 'JPG' + * mediaScanner: BOOLEAN. If true, the image will be created in the temporal directory. Otherwise the image will + * be created in the photo album. - defaults to true + * quality: FLOAT (from 0 to 100). - defaults to 100 + * @param {function} [success] + * @param {function} [fail] + * @return The path of the file. + */ + +ImageSaver.prototype.saveBase64Image = function (options, success, fail) { + var actionArgs = prepareSaveBase64Args(options); + + return exec(ok(success), error(fail), SERVICE, SAVE_BASE64_IMAGE_ACTION, actionArgs); +}; + +/** + * Remove an image from a given path. + * @public + * @param {string} [options] + * JSON information of the image: + * data: Image location. + * @param {function} [success] + * @param {function} [fail] + * @return + */ + +ImageSaver.prototype.removeImage = function (options, success, fail) { + var actionArgs = prepareRemoveImageArgs(options); + + return exec(ok(success), error(fail), SERVICE, REMOVE_IMAGE_ACTION, actionArgs); +}; + +/** + * Gets success callback if it is defined and not null. + * Otherwise returns a simple console.log. + * @private + * @param {[function|undefined|null]} success + * @return {function} + */ +function ok(success) { + if (typeof success !== 'function') { + return console.log; + } + + return success; +} + +/** + * Gets fail callback if it is defined and not null. + * Otherwise returns a simple console.error. + * @private + * @param {[function|undefined|null]} fail + * @return {function} + */ +function error(fail) { + if (typeof fail !== 'function') { + return console.error; + } + + return fail; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [filePath] + */ +function prepareRemoveImageArgs(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace('file://', '').replace('file:/', '/'); + args.push(options.data); + + return args; +} + +/** + * Prepares parameters to pass to Service's Action.
    + * Sort options value in order to match "arguments" proto. + * @private + * @param {object} options - Options object + * @return {array} Arguments array. The elements will be ordered: [base64String, filePrefix, mediaScannerEnabled, format, quality] + */ +function prepareSaveBase64Args(options) { + var args = []; + + // checking options + if (!options) { + options = {}; + } + + // preparing data information + if (!options.data) { + options.data = ''; + } + // preparing base64 string + options.data = options.data.replace(/data:image\/png;base64,/, '').replace(/data:image\/jpeg;base64,/, '').replace( + /data:image\/jpg;base64,/, ''); + args.push(options.data); + + // preparing prefix + if (!options.prefix) { + options.prefix = DEFAULTS.prefix; + } + args.push(options.prefix); + + // preparing mediaScanner + if (options.mediaScanner === undefined || options.mediaScanner === null) { + options.mediaScanner = DEFAULTS.mediaScanner; + } + args.push(options.mediaScanner); + + // preparing format + if (!options.format) { + options.format = DEFAULTS.format; + } + args.push(options.format); + + // preparing quality + if (!options.quality || (!isNaN(options.quality) && options.quality <= 0)) { + options.quality = DEFAULTS.quality; + } + args.push(options.quality); + + return args; +} + + +window.ImageSaver = ImageSaver; +window.imageSaver = new ImageSaver(); +module.exports = new ImageSaver(); + +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js new file mode 100644 index 0000000..59d3f90 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/ios/www/plugins/molpay-mobile-xdk-cordova/molpay.js @@ -0,0 +1,3 @@ +cordova.define("molpay-mobile-xdk-cordova.MOLPay", function(require, exports, module) { +function MOLPay(){window.open=cordova.InAppBrowser.open}Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var a=this.length-1;a>=0;a--)this[a]&&this[a].parentElement&&this[a].parentElement.removeChild(this[a])};var isInternalDebugging=!1,moduleId="molpay-mobile-xdk-cordova",wrapperVersion="0",molpaySdkUrl="molpay-mobile-xdk-www/index.html",mpopenmolpaywindow="mpopenmolpaywindow://",mptransactionresults="mptransactionresults://",mprunscriptonpopup="mprunscriptonpopup://",mpcloseallwindows="mpcloseallwindows://",mppinstructioncapture="mppinstructioncapture://",molpayresulturl="MOLPay/result.php",molpaynbepayurl="MOLPay/nbepay.php",b4results='"msgType":"B4"',c6results='"msgType":"C6"',molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!1,hideFrame=function(a){a.style.visibility="hidden",a.style.position="absolute",a.style.width="0px",a.style.height="0px"},showFrame=function(a){a.style.visibility="visible",a.style.position="absolute",a.style.width="100%",a.style.height="100%"},postMolpayResultHandler=function(a){var b=a;if(b){var c=new RegExp(""),h=d.match(e);if(d&&h&&f.exec(d)&&g.exec(d))for(var i=h.length-1;i>=0;i--)b=f.exec(d).index,c=g.exec(d).index,d=d.substring(0,b)+""+d.substring(c+1);return d};b=e(b);var f,g;if(f=new RegExp(b4results),f.test(b)&&(g=JSON.parse(b))){var h=g.tranID;h&&mainUiFrame.contentWindow.transactionRequestWithTransactionId(h)}}},createBankUiWindow=function(a){var b="data:text/html;base64,"+a;bankUiWindow=window.open(b,"_blank","location=no,hardwareback=no,disallowoverscroll=yes,toolbarposition=top,transitionstyle=crossdissolve");var c=function(a){mainUiFrame.contentWindow.transactionRequest(),bankUiWindow.removeEventListener("exit",c)};bankUiWindow.addEventListener("exit",c);var d=function(a){var b;b=new RegExp(molpaynbepayurl),a&&b.test(a.url)&&(bankUiWindow.executeScript({code:"window.open = function (open) { return function (url, name, features) { window.location = url ; return window; }; } (window.open);"},function(a){}),bankUiWindow.executeScript({code:"window.close = function () { window.location.assign(window.location); };"},function(a){}))};bankUiWindow.addEventListener("loadstop",d);var e=function(a){var b;if(mainUiFrame.contentWindow.nativeWebRequestUrlUpdates({requestPath:a.url}),b=new RegExp(molpaynbepayurl),a&&b.test(a.url))var c=10,d=0,f=setInterval(function(){g()},1e3),g=function(){d++,d>c?clearInterval(f):bankUiWindow.executeScript({code:"document.body.innerHTML"},function(a){var b=a[0],c=new RegExp(b4results);c.test(b)&&(postMolpayResultHandler(b),bankUiWindow.removeEventListener("loadstart",e),bankUiWindow.close(),clearInterval(f))})}};bankUiWindow.addEventListener("loadstart",e)},inAppCallback=function(a){function b(){window.plugins.toast.showWithOptions({message:"Image saved success!",duration:1e3,position:"bottom"})}function c(){window.plugins.toast.showWithOptions({message:"Image saved fail!",duration:1e3,position:"bottom"})}function d(){var a=cordova.plugins.permissions;c();var b=function(){c()};a.requestPermission(a.WRITE_EXTERNAL_STORAGE,function(a){a.hasPermission?k():b()},b)}var e,f;if(a&&a.indexOf(mpopenmolpaywindow)>-1)f=new RegExp(mpopenmolpaywindow,"g"),e=a.replace(f,""),e&&e.length>0&&createBankUiWindow(e);else if(a&&a.indexOf(mpcloseallwindows)>-1)bankUiWindow.close();else if(a&&a.indexOf(mptransactionresults)>-1){if(f=new RegExp(mptransactionresults,"g"),e=a.replace(f,""),e&&e.length>0){var g=window.atob(e),h=JSON.stringify(JSON.parse(g));transactionResultCallback(h),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame.remove()}}else if(a&&a.indexOf(mppinstructioncapture)>-1){f=new RegExp(mppinstructioncapture,"g"),e=a.replace(f,"");var i=JSON.parse(atob(e)),j={data:i.base64ImageUrlData,prefix:i.filename,format:"PNG",quality:100,mediaScanner:!0};window.imageSaver.saveBase64Image(j,function(a){b()},d);var k=function(){window.imageSaver.saveBase64Image(j,function(a){b()},function(a){c()})}}if(a&&a.indexOf(mprunscriptonpopup)>-1&&(f=new RegExp(mprunscriptonpopup,"g"),e=a.replace(f,""),e&&e.length>0)){var l=window.atob(e);bankUiWindow.executeScript({code:l},function(a){})}},testCredentialsCallback=function(a,b){testMerchantCredentialsCallback(a,b),isClosingMolpay&&(molpayDiv.innerHTML="",isClosingMolpay=!1),molpayChannelRequestFrame&&molpayChannelRequestFrame.remove()},exec=require("cordova/exec");MOLPay.prototype.startMolpay=function(a,b){isClosingMolpay=!1;try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayDiv=document.getElementById("molpay"),molpayDiv.style.width="100%",molpayDiv.style.padding="0px",molpayDiv.style.border="0px",mainUiFrame=document.createElement("iframe");var d=function(a){mainUiFrame.contentWindow.updateSdkData(JSON.stringify(molpayPaymentDetails),inAppCallback),mainUiFrame.removeEventListener("load",d)};mainUiFrame.style.border="0px",mainUiFrame.style.padding="0px",mainUiFrame.style.width="100%",mainUiFrame.style.height="100%",mainUiFrame.id="mainUiFrame",mainUiFrame.allowScriptAccess="always",mainUiFrame.setAttribute("src",molpaySdkUrl),molpayDiv.appendChild(mainUiFrame),mainUiFrame.addEventListener("load",d)},MOLPay.prototype.transactionRequest=function(a,b){try{molpayPaymentDetails=JSON.parse(a)}catch(c){molpayPaymentDetails=a}molpayPaymentDetails.module_id=moduleId,molpayPaymentDetails.wrapper_version=wrapperVersion,transactionResultCallback=b,molpayTransactionRequestFrame=document.createElement("iframe");var d=function(a){molpayTransactionRequestFrame.contentWindow.updateSdkData(molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame.removeEventListener("load",d)};molpayTransactionRequestFrame.id="molpayTransactionRequestFrame",molpayTransactionRequestFrame.allowScriptAccess="always",molpayTransactionRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document.body.appendChild(molpayTransactionRequestFrame),molpayTransactionRequestFrame.addEventListener("load",d)},MOLPay.prototype.closeMolpay=function(){mainUiFrame.contentWindow.closemolpay()},MOLPay.prototype.testMerchantCredentials=function(a,b){b&&(testMerchantCredentialsCallback=b),molpayChannelRequestFrame=document.createElement("iframe");var c=function(b){molpayChannelRequestFrame.contentWindow.testMerchantCredentials(a,testCredentialsCallback),molpayChannelRequestFrame.removeEventListener("load",c)};molpayChannelRequestFrame.allowScriptAccess="always",molpayChannelRequestFrame.setAttribute("src",molpaySdkUrl),hideFrame(molpayChannelRequestFrame),document.body.appendChild(molpayChannelRequestFrame),molpayChannelRequestFrame.addEventListener("load",c)};var molpay=new MOLPay;module.exports=molpay; +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/platforms.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/platforms.json new file mode 100644 index 0000000..bcd3246 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/platforms.json @@ -0,0 +1,4 @@ +{ + "ios": "4.3.1", + "android": "6.1.2" +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/android.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/android.json new file mode 100644 index 0000000..87ec39c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/android.json @@ -0,0 +1,34 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": {} + }, + "installed_plugins": { + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "molpay-mobile-xdk-cordova": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + } + }, + "dependent_plugins": { + "cordova-plugin-android-permissions": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "cordova-plugin-inappbrowser": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "cordova-plugin-privacyscreen": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "cordova-plugin-x-toast": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + }, + "cordova-save-image-gallery": { + "PACKAGE_NAME": "molpay.mobile.xdk.example" + } + } +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/README.md new file mode 100644 index 0000000..0f0f162 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/README.md @@ -0,0 +1,88 @@ +Android permission Cordova plugin +======== + +This plugin is designed for supporting Android new permissions checking mechanism. + +Since Android 6.0, the Android permissions checking mechanism has been changed. In the past, the permissions were granted by users when they decide to install the app. Now, the permissions should be granted by a user when he/she is using the app. + +For old Android plugins you (developers) are using may not support this new mechanism or already stop updating. So either to find a new plugin to solving this problem, nor trying to add the mechanism in the old plugin. If you don't want to do those, you can try this plugin. + +Installation +-------- + +```bash +cordova plugin add cordova-plugin-android-permissions@0.10.0 +``` + +※ Support Android SDK >= 14 + +Usage +-------- + +### API + +```javascript +var permissions = cordova.plugins.permissions; +permissions.hasPermission(permission, successCallback, errorCallback); +permissions.requestPermission(permission, successCallback, errorCallback); +permissions.requestPermissions(permissions, successCallback, errorCallback); +``` + +#### Deprecated API - still work now, will not support in the future. +```javascript +permissions.hasPermission(successCallback, errorCallback, permission); +permissions.requestPermission(successCallback, errorCallback, permission); +``` + +### Permission Name + +Following the Android design. See [Manifest.permission](http://developer.android.com/intl/zh-tw/reference/android/Manifest.permission.html). +```javascript +// Example +permissions.ACCESS_COARSE_LOCATION +permissions.CAMERA +permissions.GET_ACCOUNTS +permissions.READ_CONTACTS +permissions.READ_CALENDAR +... +``` + +Example +-------- + +```javascript +var permissions = cordova.plugins.permissions; +permissions.hasPermission(permissions.CAMERA, checkPermissionCallback, null); + +function checkPermissionCallback(status) { + if(!status.hasPermission) { + var errorCallback = function() { + console.warn('Camera permission is not turned on'); + } + + permissions.requestPermission( + permissions.CAMERA, + function(status) { + if(!status.hasPermission) errorCallback(); + }, + errorCallback); + } +} +``` + +License +-------- + + Copyright (C) 2016 Jason Yang + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/package.json new file mode 100644 index 0000000..003fe57 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/package.json @@ -0,0 +1,31 @@ +{ + "name": "cordova-plugin-android-permissions", + "version": "0.10.0", + "description": "Android 6.0 permissions check.", + "cordova": { + "id": "cordova-plugin-android-permissions", + "platforms": [ + "android" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/NeoLSN/cordova-plugin-android-permission.git" + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android" + ], + "engines": [ + { + "name": "cordova", + "version": ">=5.0.0" + } + ], + "author": "Jason Yang", + "license": "BSD", + "bugs": { + "url": "https://github.com/NeoLSN/cordova-plugin-android-permission/issues" + }, + "homepage": "https://github.com/NeoLSN/cordova-plugin-android-permission#readme" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/plugin.xml new file mode 100644 index 0000000..1c45413 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/plugin.xml @@ -0,0 +1,32 @@ + + + + Permissions + + Android permissions support library. + + Jason Yang + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/src/android/com/android/plugins/Permissions.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/src/android/com/android/plugins/Permissions.java new file mode 100644 index 0000000..64d3213 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/src/android/com/android/plugins/Permissions.java @@ -0,0 +1,156 @@ +package com.android.plugins; + +import android.os.Build; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Created by JasonYang on 2016/3/11. + */ +public class Permissions extends CordovaPlugin { + + private static final String ACTION_HAS_PERMISSION = "hasPermission"; + private static final String ACTION_REQUEST_PERMISSION = "requestPermission"; + private static final String ACTION_REQUEST_PERMISSIONS = "requestPermissions"; + + private static final int REQUEST_CODE_ENABLE_PERMISSION = 55433; + + private static final String KEY_ERROR = "error"; + private static final String KEY_MESSAGE = "message"; + + private CallbackContext permissionsCallback; + + @Override + public boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException { + if (ACTION_HAS_PERMISSION.equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + hasPermissionAction(callbackContext, args); + } + }); + return true; + } else if (ACTION_REQUEST_PERMISSION.equals(action) || ACTION_REQUEST_PERMISSIONS.equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try { + requestPermissionAction(callbackContext, args); + } catch (Exception e) { + e.printStackTrace(); + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "Request permission has been denied."); + callbackContext.error(returnObj); + permissionsCallback = null; + } + } + }); + return true; + } + return false; + } + + @Override + public void onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) throws JSONException { + if (permissionsCallback == null) { + return; + } + + JSONObject returnObj = new JSONObject(); + if (permissions != null && permissions.length > 0) { + //Call hasPermission again to verify + boolean hasAllPermissions = hasAllPermissions(permissions); + addProperty(returnObj, ACTION_HAS_PERMISSION, hasAllPermissions); + permissionsCallback.success(returnObj); + } else { + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "Unknown error."); + permissionsCallback.error(returnObj); + } + permissionsCallback = null; + } + + private void hasPermissionAction(CallbackContext callbackContext, JSONArray permission) { + if (permission == null || permission.length() == 0 || permission.length() > 1) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_HAS_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "One time one permission only."); + callbackContext.error(returnObj); + } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else { + try { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, cordova.hasPermission(permission.getString(0))); + callbackContext.success(returnObj); + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + + private void requestPermissionAction(CallbackContext callbackContext, JSONArray permissions) throws Exception { + if (permissions == null || permissions.length() == 0) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, KEY_ERROR, ACTION_REQUEST_PERMISSION); + addProperty(returnObj, KEY_MESSAGE, "At least one permission."); + callbackContext.error(returnObj); + } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else if (hasAllPermissions(permissions)) { + JSONObject returnObj = new JSONObject(); + addProperty(returnObj, ACTION_HAS_PERMISSION, true); + callbackContext.success(returnObj); + } else { + permissionsCallback = callbackContext; + String[] permissionArray = getPermissions(permissions); + cordova.requestPermissions(this, REQUEST_CODE_ENABLE_PERMISSION, permissionArray); + } + } + + private String[] getPermissions(JSONArray permissions) { + String[] stringArray = new String[permissions.length()]; + for (int i = 0; i < permissions.length(); i++) { + try { + stringArray[i] = permissions.getString(i); + } catch (JSONException ignored) { + //Believe exception only occurs when adding duplicate keys, so just ignore it + } + } + return stringArray; + } + + private boolean hasAllPermissions(JSONArray permissions) throws JSONException { + return hasAllPermissions(getPermissions(permissions)); + } + + private boolean hasAllPermissions(String[] permissions) throws JSONException { + + for (String permission : permissions) { + if(!cordova.hasPermission(permission)) { + return false; + } + } + + return true; + } + + private void addProperty(JSONObject obj, String key, Object value) { + try { + if (value == null) { + obj.put(key, JSONObject.NULL); + } else { + obj.put(key, value); + } + } catch (JSONException ignored) { + //Believe exception only occurs when adding duplicate keys, so just ignore it + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/www/permissions.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/www/permissions.js new file mode 100644 index 0000000..b59b838 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-android-permissions/www/permissions.js @@ -0,0 +1,187 @@ +var permissionsName = 'Permissions'; + +function Permissions() { + + this.ACCESS_CHECKIN_PROPERTIES = 'android.permission.ACCESS_CHECKIN_PROPERTIES'; + this.ACCESS_COARSE_LOCATION = 'android.permission.ACCESS_COARSE_LOCATION'; + this.ACCESS_FINE_LOCATION = 'android.permission.ACCESS_FINE_LOCATION'; + this.ACCESS_LOCATION_EXTRA_COMMANDS = 'android.permission.ACCESS_LOCATION_EXTRA_COMMANDS'; + this.ACCESS_MOCK_LOCATION = 'android.permission.ACCESS_MOCK_LOCATION'; + this.ACCESS_NETWORK_STATE = 'android.permission.ACCESS_NETWORK_STATE'; + this.ACCESS_SURFACE_FLINGER = 'android.permission.ACCESS_SURFACE_FLINGER'; + this.ACCESS_WIFI_STATE = 'android.permission.ACCESS_WIFI_STATE'; + this.ACCOUNT_MANAGER = 'android.permission.ACCOUNT_MANAGER'; + this.ADD_VOICEMAIL = 'com.android.voicemail.permission.ADD_VOICEMAIL'; + this.AUTHENTICATE_ACCOUNTS = 'android.permission.AUTHENTICATE_ACCOUNTS'; + this.BATTERY_STATS = 'android.permission.BATTERY_STATS'; + this.BIND_ACCESSIBILITY_SERVICE = 'android.permission.BIND_ACCESSIBILITY_SERVICE'; + this.BIND_APPWIDGET = 'android.permission.BIND_APPWIDGET'; + this.BIND_CARRIER_MESSAGING_SERVICE = 'android.permission.BIND_CARRIER_MESSAGING_SERVICE'; + this.BIND_DEVICE_ADMIN = 'android.permission.BIND_DEVICE_ADMIN'; + this.BIND_DREAM_SERVICE = 'android.permission.BIND_DREAM_SERVICE'; + this.BIND_INPUT_METHOD = 'android.permission.BIND_INPUT_METHOD'; + this.BIND_NFC_SERVICE = 'android.permission.BIND_NFC_SERVICE'; + this.BIND_NOTIFICATION_LISTENER_SERVICE = 'android.permission.BIND_NOTIFICATION_LISTENER_SERVICE'; + this.BIND_PRINT_SERVICE = 'android.permission.BIND_PRINT_SERVICE'; + this.BIND_REMOTEVIEWS = 'android.permission.BIND_REMOTEVIEWS'; + this.BIND_TEXT_SERVICE = 'android.permission.BIND_TEXT_SERVICE'; + this.BIND_TV_INPUT = 'android.permission.BIND_TV_INPUT'; + this.BIND_VOICE_INTERACTION = 'android.permission.BIND_VOICE_INTERACTION'; + this.BIND_VPN_SERVICE = 'android.permission.BIND_VPN_SERVICE'; + this.BIND_WALLPAPER = 'android.permission.BIND_WALLPAPER'; + this.BLUETOOTH = 'android.permission.BLUETOOTH'; + this.BLUETOOTH_ADMIN = 'android.permission.BLUETOOTH_ADMIN'; + this.BLUETOOTH_PRIVILEGED = 'android.permission.BLUETOOTH_PRIVILEGED'; + this.BODY_SENSORS = 'android.permission.BODY_SENSORS'; + this.BRICK = 'android.permission.BRICK'; + this.BROADCAST_PACKAGE_REMOVED = 'android.permission.BROADCAST_PACKAGE_REMOVED'; + this.BROADCAST_SMS = 'android.permission.BROADCAST_SMS'; + this.BROADCAST_STICKY = 'android.permission.BROADCAST_STICKY'; + this.BROADCAST_WAP_PUSH = 'android.permission.BROADCAST_WAP_PUSH'; + this.CALL_PHONE = 'android.permission.CALL_PHONE'; + this.CALL_PRIVILEGED = 'android.permission.CALL_PRIVILEGED'; + this.CAMERA = 'android.permission.CAMERA'; + this.CAPTURE_AUDIO_OUTPUT = 'android.permission.CAPTURE_AUDIO_OUTPUT'; + this.CAPTURE_SECURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_SECURE_VIDEO_OUTPUT'; + this.CAPTURE_VIDEO_OUTPUT = 'android.permission.CAPTURE_VIDEO_OUTPUT'; + this.CHANGE_COMPONENT_ENABLED_STATE = 'android.permission.CHANGE_COMPONENT_ENABLED_STATE'; + this.CHANGE_CONFIGURATION = 'android.permission.CHANGE_CONFIGURATION'; + this.CHANGE_NETWORK_STATE = 'android.permission.CHANGE_NETWORK_STATE'; + this.CHANGE_WIFI_MULTICAST_STATE = 'android.permission.CHANGE_WIFI_MULTICAST_STATE'; + this.CHANGE_WIFI_STATE = 'android.permission.CHANGE_WIFI_STATE'; + this.CLEAR_APP_CACHE = 'android.permission.CLEAR_APP_CACHE'; + this.CLEAR_APP_USER_DATA = 'android.permission.CLEAR_APP_USER_DATA'; + this.CONTROL_LOCATION_UPDATES = 'android.permission.CONTROL_LOCATION_UPDATES'; + this.DELETE_CACHE_FILES = 'android.permission.DELETE_CACHE_FILES'; + this.DELETE_PACKAGES = 'android.permission.DELETE_PACKAGES'; + this.DEVICE_POWER = 'android.permission.DEVICE_POWER'; + this.DIAGNOSTIC = 'android.permission.DIAGNOSTIC'; + this.DISABLE_KEYGUARD = 'android.permission.DISABLE_KEYGUARD'; + this.DUMP = 'android.permission.DUMP'; + this.EXPAND_STATUS_BAR = 'android.permission.EXPAND_STATUS_BAR'; + this.FACTORY_TEST = 'android.permission.FACTORY_TEST'; + this.FLASHLIGHT = 'android.permission.FLASHLIGHT'; + this.FORCE_BACK = 'android.permission.FORCE_BACK'; + this.GET_ACCOUNTS = 'android.permission.GET_ACCOUNTS'; + this.GET_PACKAGE_SIZE = 'android.permission.GET_PACKAGE_SIZE'; + this.GET_TASKS = 'android.permission.GET_TASKS'; + this.GET_TOP_ACTIVITY_INFO = 'android.permission.GET_TOP_ACTIVITY_INFO'; + this.GLOBAL_SEARCH = 'android.permission.GLOBAL_SEARCH'; + this.HARDWARE_TEST = 'android.permission.HARDWARE_TEST'; + this.INJECT_EVENTS = 'android.permission.INJECT_EVENTS'; + this.INSTALL_LOCATION_PROVIDER = 'android.permission.INSTALL_LOCATION_PROVIDER'; + this.INSTALL_PACKAGES = 'android.permission.INSTALL_PACKAGES'; + this.INSTALL_SHORTCUT = 'com.android.launcher.permission.INSTALL_SHORTCUT'; + this.INTERNAL_SYSTEM_WINDOW = 'android.permission.INTERNAL_SYSTEM_WINDOW'; + this.INTERNET = 'android.permission.INTERNET'; + this.KILL_BACKGROUND_PROCESSES = 'android.permission.KILL_BACKGROUND_PROCESSES'; + this.LOCATION_HARDWARE = 'android.permission.LOCATION_HARDWARE'; + this.MANAGE_ACCOUNTS = 'android.permission.MANAGE_ACCOUNTS'; + this.MANAGE_APP_TOKENS = 'android.permission.MANAGE_APP_TOKENS'; + this.MANAGE_DOCUMENTS = 'android.permission.MANAGE_DOCUMENTS'; + this.MASTER_CLEAR = 'android.permission.MASTER_CLEAR'; + this.MEDIA_CONTENT_CONTROL = 'android.permission.MEDIA_CONTENT_CONTROL'; + this.MODIFY_AUDIO_SETTINGS = 'android.permission.MODIFY_AUDIO_SETTINGS'; + this.MODIFY_PHONE_STATE = 'android.permission.MODIFY_PHONE_STATE'; + this.MOUNT_FORMAT_FILESYSTEMS = 'android.permission.MOUNT_FORMAT_FILESYSTEMS'; + this.MOUNT_UNMOUNT_FILESYSTEMS = 'android.permission.MOUNT_UNMOUNT_FILESYSTEMS'; + this.NFC = 'android.permission.NFC'; + this.PERSISTENT_ACTIVITY = 'android.permission.PERSISTENT_ACTIVITY'; + this.PROCESS_OUTGOING_CALLS = 'android.permission.PROCESS_OUTGOING_CALLS'; + this.READ_CALENDAR = 'android.permission.READ_CALENDAR'; + this.READ_CALL_LOG = 'android.permission.READ_CALL_LOG'; + this.READ_CONTACTS = 'android.permission.READ_CONTACTS'; + this.READ_EXTERNAL_STORAGE = 'android.permission.READ_EXTERNAL_STORAGE'; + this.READ_FRAME_BUFFER = 'android.permission.READ_FRAME_BUFFER'; + this.READ_HISTORY_BOOKMARKS = 'com.android.browser.permission.READ_HISTORY_BOOKMARKS'; + this.READ_INPUT_STATE = 'android.permission.READ_INPUT_STATE'; + this.READ_LOGS = 'android.permission.READ_LOGS'; + this.READ_PHONE_STATE = 'android.permission.READ_PHONE_STATE'; + this.READ_PROFILE = 'android.permission.READ_PROFILE'; + this.READ_SMS = 'android.permission.READ_SMS'; + this.READ_SOCIAL_STREAM = 'android.permission.READ_SOCIAL_STREAM'; + this.READ_SYNC_SETTINGS = 'android.permission.READ_SYNC_SETTINGS'; + this.READ_SYNC_STATS = 'android.permission.READ_SYNC_STATS'; + this.READ_USER_DICTIONARY = 'android.permission.READ_USER_DICTIONARY'; + this.READ_VOICEMAIL = 'com.android.voicemail.permission.READ_VOICEMAIL'; + this.REBOOT = 'android.permission.REBOOT'; + this.RECEIVE_BOOT_COMPLETED = 'android.permission.RECEIVE_BOOT_COMPLETED'; + this.RECEIVE_MMS = 'android.permission.RECEIVE_MMS'; + this.RECEIVE_SMS = 'android.permission.RECEIVE_SMS'; + this.RECEIVE_WAP_PUSH = 'android.permission.RECEIVE_WAP_PUSH'; + this.RECORD_AUDIO = 'android.permission.RECORD_AUDIO'; + this.REORDER_TASKS = 'android.permission.REORDER_TASKS'; + this.RESTART_PACKAGES = 'android.permission.RESTART_PACKAGES'; + this.SEND_RESPOND_VIA_MESSAGE = 'android.permission.SEND_RESPOND_VIA_MESSAGE'; + this.SEND_SMS = 'android.permission.SEND_SMS'; + this.SET_ACTIVITY_WATCHER = 'android.permission.SET_ACTIVITY_WATCHER'; + this.SET_ALARM = 'com.android.alarm.permission.SET_ALARM'; + this.SET_ALWAYS_FINISH = 'android.permission.SET_ALWAYS_FINISH'; + this.SET_ANIMATION_SCALE = 'android.permission.SET_ANIMATION_SCALE'; + this.SET_DEBUG_APP = 'android.permission.SET_DEBUG_APP'; + this.SET_ORIENTATION = 'android.permission.SET_ORIENTATION'; + this.SET_POINTER_SPEED = 'android.permission.SET_POINTER_SPEED'; + this.SET_PREFERRED_APPLICATIONS = 'android.permission.SET_PREFERRED_APPLICATIONS'; + this.SET_PROCESS_LIMIT = 'android.permission.SET_PROCESS_LIMIT'; + this.SET_TIME = 'android.permission.SET_TIME'; + this.SET_TIME_ZONE = 'android.permission.SET_TIME_ZONE'; + this.SET_WALLPAPER = 'android.permission.SET_WALLPAPER'; + this.SET_WALLPAPER_HINTS = 'android.permission.SET_WALLPAPER_HINTS'; + this.SIGNAL_PERSISTENT_PROCESSES = 'android.permission.SIGNAL_PERSISTENT_PROCESSES'; + this.STATUS_BAR = 'android.permission.STATUS_BAR'; + this.SUBSCRIBED_FEEDS_READ = 'android.permission.SUBSCRIBED_FEEDS_READ'; + this.SUBSCRIBED_FEEDS_WRITE = 'android.permission.SUBSCRIBED_FEEDS_WRITE'; + this.SYSTEM_ALERT_WINDOW = 'android.permission.SYSTEM_ALERT_WINDOW'; + this.TRANSMIT_IR = 'android.permission.TRANSMIT_IR'; + this.UNINSTALL_SHORTCUT = 'com.android.launcher.permission.UNINSTALL_SHORTCUT'; + this.UPDATE_DEVICE_STATS = 'android.permission.UPDATE_DEVICE_STATS'; + this.USE_CREDENTIALS = 'android.permission.USE_CREDENTIALS'; + this.USE_SIP = 'android.permission.USE_SIP'; + this.VIBRATE = 'android.permission.VIBRATE'; + this.WAKE_LOCK = 'android.permission.WAKE_LOCK'; + this.WRITE_APN_SETTINGS = 'android.permission.WRITE_APN_SETTINGS'; + this.WRITE_CALENDAR = 'android.permission.WRITE_CALENDAR'; + this.WRITE_CALL_LOG = 'android.permission.WRITE_CALL_LOG'; + this.WRITE_CONTACTS = 'android.permission.WRITE_CONTACTS'; + this.WRITE_EXTERNAL_STORAGE = 'android.permission.WRITE_EXTERNAL_STORAGE'; + this.WRITE_GSERVICES = 'android.permission.WRITE_GSERVICES'; + this.WRITE_HISTORY_BOOKMARKS = 'com.android.browser.permission.WRITE_HISTORY_BOOKMARKS'; + this.WRITE_PROFILE = 'android.permission.WRITE_PROFILE'; + this.WRITE_SECURE_SETTINGS = 'android.permission.WRITE_SECURE_SETTINGS'; + this.WRITE_SETTINGS = 'android.permission.WRITE_SETTINGS'; + this.WRITE_SMS = 'android.permission.WRITE_SMS'; + this.WRITE_SOCIAL_STREAM = 'android.permission.WRITE_SOCIAL_STREAM'; + this.WRITE_SYNC_SETTINGS = 'android.permission.WRITE_SYNC_SETTINGS'; + this.WRITE_USER_DICTIONARY = 'android.permission.WRITE_USER_DICTIONARY'; + this.WRITE_VOICEMAIL = 'com.android.voicemail.permission.WRITE_VOICEMAIL'; +} + +function deprecated(name) { + console.warn("Calling cordova.plugins.permissions." + name + " with the successCallback as first argument is deprecated"); + console.warn("The new signature is '" + name + "(permission, successCallback, errorCallback)'"); +} + +Permissions.prototype = { + hasPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("hasPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'hasPermission', [permission]); + }, + requestPermission: function(permission, successCallback, errorCallback) { + if (typeof permission === "function") { + deprecated("requestPermission"); + successCallback = arguments[0]; + errorCallback = arguments[1]; + permission = arguments[2]; + } + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermission', [permission]); + }, + requestPermissions: function(permissions, successCallback, errorCallback) { + cordova.exec(successCallback, errorCallback, permissionsName, 'requestPermissions', permissions); + } +}; +module.exports = new Permissions(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md new file mode 100644 index 0000000..39378f2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/CONTRIBUTING.md @@ -0,0 +1,64 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! + +The notes on [Commit Workflow](https://github.com/apache/cordova-coho/blob/master/docs/committer-workflow.md#commit-workflow) can be helpful even if you are not a committer. + +## Running plugin tests + +* clone and install [cordova-plugin-test-framework](https://github.com/apache/cordova-plugin-test-framework) +``` +git clone git@github.com:apache/cordova-plugin-test-framework.git +``` +* edit ```cordova-plugin-test-framework/www/assets/index.html``` and add the following line +``` + +``` +* create test project +``` +cordova create plugintest +cd plugintest +cordova platform add android +cordova plugin add ../cordova-plugin-inappbrowser +cordova plugin add ../cordova-plugin-inappbrowser/tests +cordova plugin add ../cordova-plugin-test-framework +``` +* edit ```config.xml``` and replace `````` with `````` +* run application +``` +cordova run +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/LICENSE new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/NOTICE new file mode 100644 index 0000000..8ec56a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md new file mode 100644 index 0000000..4e05309 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/README.md @@ -0,0 +1,709 @@ +--- +title: Inappbrowser +description: Open an in-app browser window. +--- + + +|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-inappbrowser)| + +# cordova-plugin-inappbrowser + +You can show helpful articles, videos, and web resources inside of your app. Users can view web pages without leaving your app. + +> To get a few ideas, check out the [sample](#sample) at the bottom of this page or go straight to the [reference](#reference) content. + +This plugin provides a web browser view that displays when calling `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + +The `cordova.InAppBrowser.open()` function is defined to be a drop-in replacement +for the `window.open()` function. Existing `window.open()` calls can use the +InAppBrowser window, by replacing window.open: + + window.open = cordova.InAppBrowser.open; + +The InAppBrowser window behaves like a standard web browser, +and can't access Cordova APIs. For this reason, the InAppBrowser is recommended +if you need to load third-party (untrusted) content, instead of loading that +into the main Cordova webview. The InAppBrowser is not subject to the +whitelist, nor is opening links in the system browser. + +The InAppBrowser provides by default its own GUI controls for the user (back, +forward, done). + +For backwards compatibility, this plugin also hooks `window.open`. +However, the plugin-installed hook of `window.open` can have unintended side +effects (especially if this plugin is included only as a dependency of another +plugin). The hook of `window.open` will be removed in a future major release. +Until the hook is removed from the plugin, apps can manually restore the default +behaviour: + + delete window.open // Reverts the call back to it's prototype's default + +Although `window.open` is in the global scope, InAppBrowser is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + +Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20InAppBrowser%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + + +## Reference +## Installation + + cordova plugin add cordova-plugin-inappbrowser + +If you want all page loads in your app to go through the InAppBrowser, you can +simply hook `window.open` during initialization. For example: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + +## cordova.InAppBrowser.open + +Opens a URL in a new `InAppBrowser` instance, the current browser +instance, or the system browser. + + var ref = cordova.InAppBrowser.open(url, target, options); + +- __ref__: Reference to the `InAppBrowser` window when the target is set to `'_blank'`. _(InAppBrowser)_ + +- __url__: The URL to load _(String)_. Call `encodeURI()` on this if the URL contains Unicode characters. + +- __target__: The target in which to load the URL, an optional parameter that defaults to `_self`. _(String)_ + + - `_self`: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the `InAppBrowser`. + - `_blank`: Opens in the `InAppBrowser`. + - `_system`: Opens in the system's web browser. + +- __options__: Options for the `InAppBrowser`. Optional, defaulting to: `location=yes`. _(String)_ + + The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive. All platforms support the value below: + + - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off. + + Android only: + + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened + - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __zoom__: set to `yes` to show Android browser's zoom controls, set to `no` to hide them. Default value is `yes`. + - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. + - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). + - __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)). + - __useWideViewPort__: Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is `no`, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is `yes` and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to `yes`). + + iOS only: + + - __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself. + - __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property. + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened + - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`) + - __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`). + - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). + - __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`) + - __keyboardDisplayRequiresUserAction__: Set to `yes` or `no` to open the keyboard when form elements receive focus via JavaScript's `focus()` call (defaults to `yes`). + - __suppressesIncrementalRendering__: Set to `yes` or `no` to wait until all new view content is received before being rendered (defaults to `no`). + - __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`). + - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`). + - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window. + + Windows only: + + - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. + - __fullscreen__: set to `yes` to create the browser control without a border around it. Please note that if __location=no__ is also specified, there will be no control presented to user to close IAB window. + - __hardwareback__: works the same way as on Android platform. + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- Firefox OS +- iOS +- OSX +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + +### Firefox OS Quirks + +As plugin doesn't enforce any design there is a need to add some CSS rules if +opened with `target='_blank'`. The rules might look like these + +``` css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### OSX Quirks + +At the moment the only supported target in OSX is `_system`. + +`_blank` and `_self` targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated. + +### Windows Quirks + +Windows 8.0, 8.1 and Windows Phone 8.1 don't support remote urls to be opened in the Cordova WebView so remote urls are always showed in the system's web browser if opened with `target='_self'`. + +On Windows 10 if the URL is NOT in the white list and is opened with `target='_self'` it will be showed in the system's web browser instead of InAppBrowser popup. + +Similar to Firefox OS IAB window visual behaviour can be overridden via `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` CSS classes + +### Browser Quirks + +- Plugin is implemented via iframe, + +- Navigation history (`back` and `forward` buttons in LocationBar) is not implemented. + +## InAppBrowser + +The object returned from a call to `cordova.InAppBrowser.open` when the target is set to `'_blank'`. + +### Methods + +- addEventListener +- removeEventListener +- close +- show +- hide +- executeScript +- insertCSS + +## InAppBrowser.addEventListener + +> Adds a listener for an event from the `InAppBrowser`. (Only available when the target is set to `'_blank'`) + + ref.addEventListener(eventname, callback); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +- __eventname__: the event to listen for _(String)_ + + - __loadstart__: event fires when the `InAppBrowser` starts to load a URL. + - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL. + - __loaderror__: event fires when the `InAppBrowser` encounters an error when loading a URL. + - __exit__: event fires when the `InAppBrowser` window is closed. + +- __callback__: the function that executes when the event fires. The function is passed an `InAppBrowserEvent` object as a parameter. + +## Example + +```javascript + +var inAppBrowserRef; + +function showHelp(url) { + + var target = "_blank"; + + var options = "location=yes,hidden=yes"; + + inAppBrowserRef = cordova.InAppBrowser.open(url, target, options); + + inAppBrowserRef.addEventListener('loadstart', loadStartCallBack); + + inAppBrowserRef.addEventListener('loadstop', loadStopCallBack); + + inAppBrowserRef.addEventListener('loaderror', loadErrorCallBack); + +} + +function loadStartCallBack() { + + $('#status-message').text("loading please wait ..."); + +} + +function loadStopCallBack() { + + if (inAppBrowserRef != undefined) { + + inAppBrowserRef.insertCSS({ code: "body{font-size: 25px;" }); + + $('#status-message').text(""); + + inAppBrowserRef.show(); + } + +} + +function loadErrorCallBack(params) { + + $('#status-message').text(""); + + var scriptErrorMesssage = + "alert('Sorry we cannot open that page. Message from the server is : " + + params.message + "');" + + inAppBrowserRef.executeScript({ code: scriptErrorMesssage }, executeScriptCallBack); + + inAppBrowserRef.close(); + + inAppBrowserRef = undefined; + +} + +function executeScriptCallBack(params) { + + if (params[0] == null) { + + $('#status-message').text( + "Sorry we couldn't open that page. Message from the server is : '" + + params.message + "'"); + } + +} + +``` + +### InAppBrowserEvent Properties + +- __type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, or `exit`. _(String)_ + +- __url__: the URL that was loaded. _(String)_ + +- __code__: the error code, only in the case of `loaderror`. _(Number)_ + +- __message__: the error message, only in the case of `loaderror`. _(String)_ + + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Browser Quirks + +`loadstart` and `loaderror` events are not being fired. + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + +## InAppBrowser.removeEventListener + +> Removes a listener for an event from the `InAppBrowser`. (Only available when the target is set to `'_blank'`) + + ref.removeEventListener(eventname, callback); + +- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_ + +- __eventname__: the event to stop listening for. _(String)_ + + - __loadstart__: event fires when the `InAppBrowser` starts to load a URL. + - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL. + - __loaderror__: event fires when the `InAppBrowser` encounters an error loading a URL. + - __exit__: event fires when the `InAppBrowser` window is closed. + +- __callback__: the function to execute when the event fires. +The function is passed an `InAppBrowserEvent` object. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + +## InAppBrowser.close + +> Closes the `InAppBrowser` window. + + ref.close(); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +### Supported Platforms + +- Amazon Fire OS +- Android +- Firefox OS +- iOS +- Windows 8 and 8.1 +- Windows Phone 7 and 8 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + +## InAppBrowser.show + +> Displays an InAppBrowser window that was opened hidden. Calling this has no effect if the InAppBrowser was already visible. + + ref.show(); + +- __ref__: reference to the InAppBrowser window (`InAppBrowser`) + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + +## InAppBrowser.hide + +> Hides the InAppBrowser window. Calling this has no effect if the InAppBrowser was already hidden. + + ref.hide(); + +- __ref__: reference to the InAppBrowser window (`InAppBrowser`) + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank'); + // some time later... + ref.hide(); + +## InAppBrowser.executeScript + +> Injects JavaScript code into the `InAppBrowser` window. (Only available when the target is set to `'_blank'`) + + ref.executeScript(details, callback); + +- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_ + +- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_ + - __file__: URL of the script to inject. + - __code__: Text of the script to inject. + +- __callback__: the function that executes after the JavaScript code is injected. + - If the injected script is of type `code`, the callback executes + with a single parameter, which is the return value of the + script, wrapped in an `Array`. For multi-line scripts, this is + the return value of the last statement, or the last expression + evaluated. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows 8 and 8.1 +- Browser + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + +### Browser Quirks + +- only __code__ key is supported. + +### Windows Quirks + +Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) the invoked script can return only string values, otherwise the parameter, passed to __callback__ will be `[null]`. + +## InAppBrowser.insertCSS + +> Injects CSS into the `InAppBrowser` window. (Only available when the target is set to `'_blank'`) + + ref.insertCSS(details, callback); + +- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_ + +- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_ + - __file__: URL of the stylesheet to inject. + - __code__: Text of the stylesheet to inject. + +- __callback__: the function that executes after the CSS is injected. + +### Supported Platforms + +- Amazon Fire OS +- Android +- iOS +- Windows + +### Quick Example + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); +__ + +## Sample: Show help pages with an InAppBrowser + +You can use this plugin to show helpful documentation pages within your app. Users can view online help documents and then close them without leaving the app. + +Here's a few snippets that show how you do this. + +* [Give users a way to ask for help](#give). +* [Load a help page](#load). +* [Let users know that you're getting their page ready](#let). +* [Show the help page](#show). +* [Handle page errors](#handle). + +### Give users a way to ask for help + +There's lots of ways to do this in your app. A drop down list is a simple way to do that. + +```html + + + +``` + +Gather the users choice in the ``onDeviceReady`` function of the page and then send an appropriate URL to a helper function in some shared library file. Our helper function is named ``showHelp()`` and we'll write that function next. + +```javascript + +$('#help-select').on('change', function (e) { + + var url; + + switch (this.value) { + + case "article": + url = "https://cordova.apache.org/docs/en/latest/" + + "reference/cordova-plugin-inappbrowser/index.html"; + break; + + case "video": + url = "https://youtu.be/F-GlVrTaeH0"; + break; + + case "search": + url = "https://www.google.com/#q=inAppBrowser+plugin"; + break; + } + + showHelp(url); + +}); + +``` + +### Load a help page + +We'll use the ``open`` function to load the help page. We're setting the ``hidden`` property to ``yes`` so that we can show the browser only after the page content has loaded. That way, users don't see a blank browser while they wait for content to appear. When the ``loadstop`` event is raised, we'll know when the content has loaded. We'll handle that event shortly. + +```javascript + +function showHelp(url) { + + var target = "_blank"; + + var options = "location=yes,hidden=yes"; + + inAppBrowserRef = cordova.InAppBrowser.open(url, target, options); + + inAppBrowserRef.addEventListener('loadstart', loadStartCallBack); + + inAppBrowserRef.addEventListener('loadstop', loadStopCallBack); + + inAppBrowserRef.addEventListener('loaderror', loadErrorCallBack); + +} + +``` + +### Let users know that you're getting their page ready + +Because the browser doesn't immediately appear, we can use the ``loadstart`` event to show a status message, progress bar, or other indicator. This assures users that content is on the way. + +```javascript + +function loadStartCallBack() { + + $('#status-message').text("loading please wait ..."); + +} + +``` + +### Show the help page + +When the ``loadstopcallback`` event is raised, we know that the content has loaded and we can make the browser visible. This sort of trick can create the impression of better performance. The truth is that whether you show the browser before content loads or not, the load times are exactly the same. + +```javascript + +function loadStopCallBack() { + + if (inAppBrowserRef != undefined) { + + inAppBrowserRef.insertCSS({ code: "body{font-size: 25px;" }); + + $('#status-message').text(""); + + inAppBrowserRef.show(); + } + +} + +``` +You might have noticed the call to the ``insertCSS`` function. This serves no particular purpose in our scenario. But it gives you an idea of why you might use it. In this case, we're just making sure that the font size of your pages have a certain size. You can use this function to insert any CSS style elements. You can even point to a CSS file in your project. + +### Handle page errors + +Sometimes a page no longer exists, a script error occurs, or a user lacks permission to view the resource. How or if you handle that situation is completely up to you and your design. You can let the browser show that message or you can present it in another way. + +We'll try to show that error in a message box. We can do that by injecting a script that calls the ``alert`` function. That said, this won't work in browsers on Windows devices so we'll have to look at the parameter of the ``executeScript`` callback function to see if our attempt worked. If it didn't work out for us, we'll just show the error message in a ``
    `` on the page. + +```javascript + +function loadErrorCallBack(params) { + + $('#status-message').text(""); + + var scriptErrorMesssage = + "alert('Sorry we cannot open that page. Message from the server is : " + + params.message + "');" + + inAppBrowserRef.executeScript({ code: scriptErrorMesssage }, executeScriptCallBack); + + inAppBrowserRef.close(); + + inAppBrowserRef = undefined; + +} + +function executeScriptCallBack(params) { + + if (params[0] == null) { + + $('#status-message').text( + "Sorry we couldn't open that page. Message from the server is : '" + + params.message + "'"); + } + +} + +``` + +## More Usage Info + +### Local Urls ( source is in the app package ) +``` +var iab = cordova.InAppBrowser; + +iab.open('local-url.html'); // loads in the Cordova WebView +iab.open('local-url.html', '_self'); // loads in the Cordova WebView +iab.open('local-url.html', '_system'); // Security error: system browser, but url will not load (iOS) +iab.open('local-url.html', '_blank'); // loads in the InAppBrowser +iab.open('local-url.html', 'random_string'); // loads in the InAppBrowser +iab.open('local-url.html', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar + +``` + + + +### Whitelisted Content + +``` +var iab = cordova.InAppBrowser; + +iab.open('http://whitelisted-url.com'); // loads in the Cordova WebView +iab.open('http://whitelisted-url.com', '_self'); // loads in the Cordova WebView +iab.open('http://whitelisted-url.com', '_system'); // loads in the system browser +iab.open('http://whitelisted-url.com', '_blank'); // loads in the InAppBrowser +iab.open('http://whitelisted-url.com', 'random_string'); // loads in the InAppBrowser + +iab.open('http://whitelisted-url.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar + +``` + +### Urls that are not white-listed + +``` +var iab = cordova.InAppBrowser; + +iab.open('http://url-that-fails-whitelist.com'); // loads in the InAppBrowser +iab.open('http://url-that-fails-whitelist.com', '_self'); // loads in the InAppBrowser +iab.open('http://url-that-fails-whitelist.com', '_system'); // loads in the system browser +iab.open('http://url-that-fails-whitelist.com', '_blank'); // loads in the InAppBrowser +iab.open('http://url-that-fails-whitelist.com', 'random_string'); // loads in the InAppBrowser +iab.open('http://url-that-fails-whitelist.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar + +``` diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md new file mode 100644 index 0000000..9f3ddb0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/RELEASENOTES.md @@ -0,0 +1,637 @@ + +# Release Notes + +### 1.7.0 (Feb 28, 2017) +* [CB-12366](https://issues.apache.org/jira/browse/CB-12366) **iOS:** Reduce `tmpWindow` level to prevent overlapping statusbar +* [CB-12364](https://issues.apache.org/jira/browse/CB-12364) **Windows:** `Inappbrowser` inject file manual tests are not working +* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-9148](https://issues.apache.org/jira/browse/CB-9148) **Android:** Add Support for `input[type=file]` File Chooser +* [CB-11136](https://issues.apache.org/jira/browse/CB-11136) (ios) Fix `InAppBrowser` when closing with `WKWebView` +* [CB-10799](https://issues.apache.org/jira/browse/CB-10799) **iOS:** fix toolbar is shown in incorrect position when in-call status bar + +### 1.6.1 (Dec 14, 2016) +* [CB-12237](https://issues.apache.org/jira/browse/CB-12237) - Update version in package.json to correct 1.6.1-dev +* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) - Fixed RELEASENOTES for cordova-plugin-inappbrowser +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed Windows 8.1 build badges +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Incremented plugin version. + +### 1.6.0 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.6.0 +* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort +* add option useWidthViewPort +* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. +* fix(close button): Set correct content description +* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* Increment plugin minor version because of new hide feature +* removed duplicate hide method in ios source and add jasmine test cases +* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) +* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException +* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." +* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 1.5.1 (Dec 07, 2016) +* [CB-7608](https://issues.apache.org/jira/browse/CB-7608) (android) document useWidthViewPort +* add option useWidthViewPort +* [CB-12184](https://issues.apache.org/jira/browse/CB-12184) executeScript leads to a null pointer on exception on Android. +* fix(close button): Set correct content description +* [CB-9274](https://issues.apache.org/jira/browse/CB-9274) Adds missing methods to InAppBrowser to allow compilation for Amazon FireOS. +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* Increment plugin minor version because of new hide feature +* removed duplicate hide method in ios source and add jasmine test cases +* [CB-8467](https://issues.apache.org/jira/browse/CB-8467) +* [CB-12010](https://issues.apache.org/jira/browse/CB-12010) (android) Catch FileUriExposedException +* [CB-11955](https://issues.apache.org/jira/browse/CB-11955) Added Initial OSX platform support +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been signed and submitted to secretary@apache.org." +* [CB-11694](https://issues.apache.org/jira/browse/CB-11694) Android: Set hadwareBackButton value according option in cordova.InAppBrowser.open +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Updated version and RELEASENOTES.md for release 1.5.0 +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Closing invalid pull request: close #28 +* Closing invalid pull request: close #78 +* Add intent scheme to be handled by OS +* Plugin uses Android Log class and not Cordova LOG class +* Adding links to guide content and reference content at the top of the readme file Github: close #163 +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Browser Platform: wrong height of webview with location=yes +* Size and position in browser platform +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) inAppBrowser for Windows Platform: wrong height of webview with location=yes +* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? +* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while InAppBrowser is opened, closes the app too in addition to closing InAppBrowser +* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on iOS 9 +* Closing stale pull request: close #152 +* fix some calls which used api level 16 +* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page +* doc: do not use `with` in JS samples +* Closing stale pull request: close #90 +* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (ios) Fixed presentation style +* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about InAppBrowser object +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for ios +* Add badges for paramedic builds on Jenkins +* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan +* Add pull request template. +* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to package.json +* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md +* [CB-11091](https://issues.apache.org/jira/browse/CB-11091) Incremented plugin version. +* Updated version and RELEASENOTES.md for release 1.4.0 +* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for iOS upload. This closes #139 +* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) : NoSuchMethodError in InAppBrowser plugin +* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons +* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins +* Fixes [CB-10607](https://issues.apache.org/jira/browse/CB-10607) +* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Incremented plugin version. +* [CB-10557](https://issues.apache.org/jira/browse/CB-10557) Updated version and RELEASENOTES.md for release 1.3.0 +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android +* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue +* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android +* chore: edit package.json license to match SPDX id +* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS +* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android +* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android +* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Incremented plugin version. +* [CB-10505](https://issues.apache.org/jira/browse/CB-10505) Updated version and RELEASENOTES.md for release 1.2.1 +* handle app store urls in system browser +* Added missing plugin dependency for manual tests +* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows +* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance +* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android +* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin +* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin +* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) Re-adding onPageStarted to re-add LOAD_START, even though it's in the wrong place +* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Incremented plugin version. +* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Updated version and RELEASENOTES.md for release 1.2.0 +* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in WebViewClient class +* Fix lint warnings +* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve InAppBrowser toolbar look and feel on Windows +* Using modulemapper +* Open a new window on the browser platform +* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Incremented plugin version. +* [CB-10187](https://issues.apache.org/jira/browse/CB-10187) Updated version and RELEASENOTES.md for release 1.1.1 +* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 +* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 +* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 +* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) linked issues in RELEASENOTES.md +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated version and RELEASENOTES.md for release 1.1.0 +* removed r prefix from tags +* weak ref type was wrong +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated RELEASENOTES to be newest to oldest +* Close #91 +* Close #85 +* Invoke webview if using local file +* Fixed zIndex issue on Windows 8, 8.1 where InAppBrowser opens behind default app. +* fix async self usage +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser executeScript crash on Windows if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on Windows +* InAppBrowser, iOS: Setting setStatusBarStyle to -1 causes CGContextSaveGState. +* Fix crash on browser window close (https://issues.apache.org/jira/browse/CB-9167) +* Close #113 +* add JIRA issue tracker link +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed javaDoc errors.. This closes #119 +* Actually fixing the contribute link. +* Fixing contribute link. +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default window.open behavior on Ripple +* Close #114 +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on Windows +* remove travis-ci +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser zoomControls are always set to true +* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Incremented plugin version. +* [CB-9202](https://issues.apache.org/jira/browse/CB-9202) updated repo url to github mirror in package.json +* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Updated version and RELEASENOTES.md for release 1.0.1 +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version in package.json for release 1.0.0 +* Revert "CB-8858 Incremented plugin version." +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version. +* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version and RELEASENOTES.md for release 1.0.0 +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* Keep external android pages in a single tab. (close #61) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` +* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Incremented plugin version. +* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.6.0 +* Add missing license header for src/ubuntu/InAppBrowser_escapeScript.js +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement inject* functions +* ubuntu: port to oxide +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) Update to work with whilelist plugins in Cordova 4.x +* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Incremented plugin version. +* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Updated version and RELEASENOTES.md for release 0.5.4 +* Amazon specific changes: Removed reference to closebuttoncaption according to https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-inappbrowser.git;a=commit;h=50a78baf22843b0df96ccb4ca83a45bd9ef3fc39 +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after InAppBrowser closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add locationBar support to InAppBrowser windows platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) InAppBrowser loadstart/loadstop events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix InAppBrowser injectScriptFile for Windows 8.1 / Windows Phone 8.1 +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) InAppBrowser local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) Alert is not supported in InAppBrowser on Windows platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention deviceready in plugin docs +* Dropping trailing whitespace +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to closebuttoncaption +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* Incremented plugin version. +* Updated version and RELEASENOTES.md for release 0.5.3 +* Amazon Specific changes: Added logs and corrected indentation according to 81161ebe668a14f87e1ef4b57f2d300a609b9a8b +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Clean plugin.xml +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Incremented plugin version. +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Updated version and RELEASENOTES.md for release 0.5.2 +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) - Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android +* Add just a bit more logging +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework +* phonegap events supported for _blank target +* inappbrowser _blank target position is fixed +* amazon-fireos related changes. +* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Incremented plugin version. +* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Updated version and RELEASENOTES.md for release 0.5.1 +* ubuntu: support qt 5.2 +* CB-7249cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* update InAppBrowserProxy.js +* app needs to be privileged +* CB-6127lisa7cordova-plugin-consolecordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ +* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Incremented plugin version. +* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Updated version and RELEASENOTES.md for release 0.5.0 +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 +* Clean up whitespace (mainly due to no newline at eof warning) +* after code review +* default parameter added +* doc updated +* console.log removed +* back/forward buttons added, iframe has no border +* not forcing the look of the inAppBrowserWrap and buttons +* Adding permission info +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* documentation translation: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Add necessary capability so the plugin works on its own +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 +* Fixed use of iOS 6 deprecated methods +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation +* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Incremented plugin version on dev branch. +* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Updated version and RELEASENOTES.md for release 0.4.0 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460) Update license headers +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324) Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* await async calls, resolve warnings +* Make InAppBrowser work with embedded files, using system behavior +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402) [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422) [windows8] use cordova/exec/proxy +* [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Document clearcache and clearsessioncache for ios +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617) Add clearcache and clearsessioncache options to iOS (like Android) +* refactoring fixed +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support +* Doc update: event name and example param (closes #31) +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253) Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212) iOS: fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 +* Tweak RELEASENOTES.md (missed a bug fix in last release) +* Incremented plugin version on dev branch. +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218) Update docs for BB10 +* Updated version and RELEASENOTES.md for release 0.3.3 +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix inappbrowser install failure on case-sensitive filesystems. +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Updating the plugin.xml with the new Dialog class +* fix for [CB-5534](https://issues.apache.org/jira/browse/CB-5534) +* Add NOTICE file +* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Incremented plugin version on dev branch. +* Add NOTICE file +* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 0.3.2 +* Validate that callbackId is correctly formed +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) - Move js-module so it is not loaded on unsupported platforms +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Incremented plugin version on dev branch. +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 +* Removed some iOS6 Deprecations +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser +* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.3.1 +* Add missing import for previous commit +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* WTF? ubuntu got automerged twice +* add ubuntu platform +* Adding CC-A-2.5 Notice for Assets, modifying plugins to use resources +* Adding the buttons +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Add missing import +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756) Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Delete stale test/ directory +* Remove _alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done +* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Incremented plugin version on dev branch. +* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Updated version and RELEASENOTES.md for release 0.3.0 +* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Add a comment explaining why we set MIME only for file: +* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Android - Add MIME type to Intent when opening file:/// URLs +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Update license comment formatting of doc/index.md +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc.index.md for InAppBrowser plugin +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs +* [CB-5594](https://issues.apache.org/jira/browse/CB-5594) Add disallowoverscroll option. +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Rename "toolbarbarpostion" -> "toolbarposition" +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Fixed the positioning and autoresizing for certain rotation scenarios. +* [CB-5595](https://issues.apache.org/jira/browse/CB-5595) Add toolbarposition=top option. +* Apply [CB-5193](https://issues.apache.org/jira/browse/CB-5193) to InAppBrowser +* [CB-5593](https://issues.apache.org/jira/browse/CB-5593) iOS: Make InAppBrowser localizable +* [CB-5591](https://issues.apache.org/jira/browse/CB-5591) Change window.escape to encodeURIComponent +* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Incremented plugin version on dev branch. +* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Updated version and RELEASENOTES.md for release 0.2.5 +* Remove merge conflict tag +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException +* add ubuntu platform +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' +* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) +* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) Updated version and RELEASENOTES.md for release 0.2.4 +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128) added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Updated version and RELEASENOTES.md for release 0.2.2 +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788) Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* CB-4864, [CB-4865](https://issues.apache.org/jira/browse/CB-4865) Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. +* Add empty CHANGELOG.md +* [CB-4586](https://issues.apache.org/jira/browse/CB-4586) Making loadUrl run on the UI thread for close dialog to stop the WebView error +* [Windows8] add support for Windows 8 ( limited ) +* [CB-3616](https://issues.apache.org/jira/browse/CB-3616) Change option name to "clearcache" to match original proposal +* add "clearallcache" and "clearsessioncache" option to InAppbrowser +* [CB-4595](https://issues.apache.org/jira/browse/CB-4595) updated version +* [CB-4417](https://issues.apache.org/jira/browse/CB-4417) Move cordova-plugin-inappbrowser to its own Java package. +* updated Readme, namespace and name tag +* [plugin.xml] standardizing license + meta +* [license] adding apache license file +* [CB-4399](https://issues.apache.org/jira/browse/CB-4399) removed blackberry entry in plugin xml. Installation of plugin interferes with natively supported childbrowser functionality. To support additional inappbrowser features, see [CB-4467.](https://issues.apache.org/jira/browse/CB-4467.) +* updating plugin.xml with registry data +* [CB-4368](https://issues.apache.org/jira/browse/CB-4368) Explicit CoreGraphics.framework dependency should be specified for some core plugins + +### 1.5.0 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Add intent scheme to be handled by OS +* Plugin uses `Android Log class` and not `Cordova LOG class` +* Adding links to guide content and reference content at the top of the readme file Github: close #163 +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Browser**: wrong height of webview with `location=yes` +* Size and position in browser platform +* [CB-10973](https://issues.apache.org/jira/browse/CB-10973) **Windows**: wrong height of webview with `location=yes` +* [CB-11013](https://issues.apache.org/jira/browse/CB-11013) IAB enabling background play of YouTube videos? +* [CB-10467](https://issues.apache.org/jira/browse/CB-10467) Hardware back button, while `InAppBrowser` is opened, closes the app too in addition to closing `InAppBrowser` +* [CB-11178](https://issues.apache.org/jira/browse/CB-11178) allow to open other apps on **iOS 9** +* fix some calls which used api level 16 +* [CB-5402](https://issues.apache.org/jira/browse/CB-5402) added extra content from wiki page +* [CB-2063](https://issues.apache.org/jira/browse/CB-2063) (**ios**) Fixed presentation style +* [CB-11012](https://issues.apache.org/jira/browse/CB-11012) added some clarifications about `InAppBrowser` object +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom `inappbrowser` user agent for **ios** +* Add badges for paramedic builds on Jenkins +* [CB-11381](https://issues.apache.org/jira/browse/CB-11381) android: Does not pass sonarqube scan +* Add pull request template. +* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine requirements to `package.json` +* [CB-110003](https://issues.apache.org/jira/browse/CB-110003) Adding samples to Readme. +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md + +### 1.4.0 (Apr 15, 2016) +* [CB-7679](https://issues.apache.org/jira/browse/CB-7679) add fix for **iOS** upload. +* [CB-10944](https://issues.apache.org/jira/browse/CB-10944) `NoSuchMethodError` in `InAppBrowser` plugin +* [CB-10937](https://issues.apache.org/jira/browse/CB-10937) fix stretched icons +* [CB-10760](https://issues.apache.org/jira/browse/CB-10760) Fixing README for display on Cordova website +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins + +### 1.3.0 (Feb 09, 2016) +* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Set custom inappbrowser user agent for android +* [CB-10538](https://issues.apache.org/jira/browse/CB-10538) cordova-plugin-inappbrowser timeout issue +* [CB-10395](https://issues.apache.org/jira/browse/CB-10395) InAppBrowser's WebView not storing cookies reliable on Android +* Edit package.json license to match SPDX id +* [CB-10305](https://issues.apache.org/jira/browse/CB-10305) Gray bar appears in the wrong place on iOS +* [CB-7786](https://issues.apache.org/jira/browse/CB-7786) Support mediaPlaybackRequiresUserAction on Android +* [CB-7500](https://issues.apache.org/jira/browse/CB-7500) executeScript with callback kills/blurs inAppBrowser window on Android + +### 1.2.1 (Feb 02, 2016) +* [CB-10407](https://issues.apache.org/jira/browse/CB-10407) InAppBrowser not firing loadstart event on android +* [CB-10428](https://issues.apache.org/jira/browse/CB-10428) Fix syntax error when browserifying inAppBrowser plugin +* handle app store urls in system browser +* [CB-6702](https://issues.apache.org/jira/browse/CB-6702) InAppBrowser hangs when opening more than one instance +* [CB-10456](https://issues.apache.org/jira/browse/CB-10456) InAppBrowser is not closed if I close it programmatically on Android +* [CB-10451](https://issues.apache.org/jira/browse/CB-10451) InAppBrowser: loadstart event is not triggered on Windows +* [CB-10452](https://issues.apache.org/jira/browse/CB-10452) InAppBrowser: 'exit' event is not triggered on Windows +* [CB-10454](https://issues.apache.org/jira/browse/CB-10454) InAppBrowser: 'loaderror' event does not have code and message on Windows +* [CB-10450](https://issues.apache.org/jira/browse/CB-10450) InAppBrowser: Unable to get property 'canGoBack' of undefined on Windows +* [CB-10441](https://issues.apache.org/jira/browse/CB-10441) Add auto tests for InAppBrowser plugin + +### 1.2.0 (Jan 15, 2016) +* [CB-8180](https://issues.apache.org/jira/browse/CB-8180) Changing methods of interception in `WebViewClient` class +* [CB-10009](https://issues.apache.org/jira/browse/CB-10009) Improve `InAppBrowser` toolbar look and feel on **Windows** +* Open a new window on the **Browser** platform + +### 1.1.1 (Dec 10, 2015) + +* [CB-9445](https://issues.apache.org/jira/browse/CB-9445) Improves executeScript callbacks on iOS +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version. +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - re-fix: backwards compatible with cordova-ios < 4.0 +* [CB-8534](https://issues.apache.org/jira/browse/CB-8534) Allow plugins to respond to onReceivedHttpAuthRequest. This closes #82 +* [CB-3750](https://issues.apache.org/jira/browse/CB-3750) Fixes spinner on iOS. This closes #89 +* [CB-7696](https://issues.apache.org/jira/browse/CB-7696) Document target=_self behavior for Windows +* [CB-10040](https://issues.apache.org/jira/browse/CB-10040) - Compile Error in InAppBrowser Plugin for iOS - No known instance method for selector 'URLIsWhitelisted:' + +### 1.1.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Invoke webview if using local file +* Fixed `zIndex` issue on **Windows 8**, **8.188 where InAppBrowser opens behind default app. +* fix `async` self usage +* [CB-9150](https://issues.apache.org/jira/browse/CB-9150) Fix InAppBrowser `executeScript` crash on **Windows** if no data returned +* [CB-10008](https://issues.apache.org/jira/browse/CB-10008) Fix InAppBrowser popup layout on **Windows** +* Setting `setStatusBarStyle` to `-1` causes `CGContextSaveGState`. +* [CB-9167](https://issues.apache.org/jira/browse/CB-9167) Fix crash on **browser** window close +* [CB-9799](https://issues.apache.org/jira/browse/CB-9799) Fixed `javaDoc` errors. +* Fixing contribute link. +* [CB-9760](https://issues.apache.org/jira/browse/CB-9760) InAppBrowser: fallback to default `window.open` behavior on **Ripple** +* [CB-9378](https://issues.apache.org/jira/browse/CB-9378) Fix InAppBrowser not taking whole screen on **Windows** +* [CB-9158](https://issues.apache.org/jira/browse/CB-9158) - InAppBrowser `zoomControls` are always set to true + +### 1.0.1 (Jun 17, 2015) +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* fix npm md issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-7689](https://issues.apache.org/jira/browse/CB-7689) Adds insertCSS support for windows platform +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - (prefix) InAppBrowser should take into account the status bar +* [CB-8635](https://issues.apache.org/jira/browse/CB-8635) Improves UX on windows platform +* [CB-8661](https://issues.apache.org/jira/browse/CB-8661) Return executed script result on Windows +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and browser specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8432](https://issues.apache.org/jira/browse/CB-8432) Correct styles for browser wrapper to display it correctly on some pages +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) - Update InAppBrowser to support both cordova-ios 4.0.x and 3.x (closes #93) +* [CB-7961](https://issues.apache.org/jira/browse/CB-7961) Add cordova-plugin-inappbrowser support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* Update docs for Android zoom=no option +* Added option to disable/enable zoom controls +* updated docs, set hardwareback default to true +* Add a hardwareback option to allow for the hardware back button to go back. +* [CB-8570](https://issues.apache.org/jira/browse/CB-8570) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* Keep external android pages in a single tab. (close #61) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Add a clobber for `cordova.InAppBrowser.open` (close #80) +* [CB-8444](https://issues.apache.org/jira/browse/CB-8444) Don't clobber `window.open` - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`) - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`) - Add tests to use `window.open` via manual replace with new symbol - Update docs to deprecate plugin clobber of `window.open` + +### 0.6.0 (Feb 04, 2015) +* [CB-8270](https://issues.apache.org/jira/browse/CB-8270) ios: Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString` +* ubuntu: implement `inject*` functions +* ubuntu: port to oxide +* [CB-7897](https://issues.apache.org/jira/browse/CB-7897) ios, android: Update to work with whilelist plugins in Cordova 4.x + +### 0.5.4 (Dec 02, 2014) +* [CB-7784](https://issues.apache.org/jira/browse/CB-7784) Exit event is not fired after `InAppBrowser` closing +* [CB-7697](https://issues.apache.org/jira/browse/CB-7697) Add `locationBar` support to `InAppBrowser` **Windows** platform version +* [CB-7690](https://issues.apache.org/jira/browse/CB-7690) `InAppBrowser` `loadstart/loadstop` events issues +* [CB-7695](https://issues.apache.org/jira/browse/CB-7695) Fix `InAppBrowser` `injectScriptFile` for **Windows 8.1** / **Windows Phone 8.1** +* [CB-7692](https://issues.apache.org/jira/browse/CB-7692) `InAppBrowser` local url opening bug in 8.1 +* [CB-7688](https://issues.apache.org/jira/browse/CB-7688) `Alert` is not supported in `InAppBrowser` on **Windows** platform +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* [CB-7876](https://issues.apache.org/jira/browse/CB-7876) change test target to avoid undesired redirects +* [CB-7712](https://issues.apache.org/jira/browse/CB-7712) remove references to `closebuttoncaption` +* [CB-7850](https://issues.apache.org/jira/browse/CB-7850) clarify role of whitelist +* [CB-7720](https://issues.apache.org/jira/browse/CB-7720) check if event is null since OK string from success callback was removed +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser + +### 0.5.3 (Oct 03, 2014) +* Windows implementation fixes and improvements +* zIndex fixed +* renamed InAppBrowser back to inappbrowser for case sensitive operating systems +* Update french translation +* Update doc to add Windows 8 +* Update windows proxy to be both compatible with windows 8 and 8.1 +* Rename windows81 by windows8 in src directory +* Append Windows 8.1 platform configuration in plugin.xml +* Append Windows 8.1 proxy using x-ms-webview + +### 0.5.2 (Sep 17, 2014) +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7490](https://issues.apache.org/jira/browse/CB-7490) Fixes InAppBrowser manual tests crash on windows platform +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-inappbrowser documentation translation: cordova-plugin-inappbrowser +* [CB-7424](https://issues.apache.org/jira/browse/CB-7424) Wrong docs: anchor tags are not supported by the InAppBrowser +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) clarify that anchor1 doesn't exist +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) more fixup of tests on Android +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) fix up the tests for Android +* Add just a bit more logging +* [CB-7133](https://issues.apache.org/jira/browse/CB-7133) port inappbrowser to plugin-test-framework +* phonegap events supported for \_blank target +* inappbrowser \_blank target position is fixed +* amazon-fireos related changes. + +### 0.5.1 (Aug 06, 2014) +* ubuntu: support qt 5.2 +* **FFOS** update InAppBrowserProxy.js +* **FFOS** app needs to be privileged +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-6769](https://issues.apache.org/jira/browse/CB-6769) ios: Fix statusbar color reset wasn't working on iOS7+ + +### 0.5.0 (Jun 05, 2014) +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and rench Translations added. Github close #23 +* Clean up whitespace (mainly due to no newline at eof warning) +* Adding permission info +* [CB-6806](https://issues.apache.org/jira/browse/CB-6806) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Add necessary capability so the plugin works on its own +* [CB-6474](https://issues.apache.org/jira/browse/CB-6474) InAppBrowser. Add data urls support to WP8 +* [CB-6482](https://issues.apache.org/jira/browse/CB-6482) InAppBrowser calls incorrect callback on WP8 +* Fixed use of iOS 6 deprecated methods +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360) - improvement: feature detection instead of iOS version detection +* [CB-5649](https://issues.apache.org/jira/browse/CB-5649) - InAppBrowser overrides App's orientation +* refactoring fixed +* [CB-6396](https://issues.apache.org/jira/browse/CB-6396) [Firefox OS] Adding basic support + +### 0.4.0 (Apr 17, 2014) +* [CB-6360](https://issues.apache.org/jira/browse/CB-6360): [ios] Fix for crash on iOS < 6.0 (closes #37) +* [CB-3324](https://issues.apache.org/jira/browse/CB-3324): [WP8] Add support for back-button inappbrowser [WP8] if there is no history -> InAppBrowser is closed +* [WP] await async calls, resolve warnings +* [WP] Make InAppBrowser work with embedded files, using system behavior +* [CB-6402](https://issues.apache.org/jira/browse/CB-6402): [WP8] pass empty string instead of null for [optional] windowFeatures string +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6389](https://issues.apache.org/jira/browse/CB-6389) [CB-3617](https://issues.apache.org/jira/browse/CB-3617): Add clearcache and clearsessioncache options to iOS (like Android) +* Doc update: event name and example param (closes #31) +* [CB-6253](https://issues.apache.org/jira/browse/CB-6253): [WP] Add Network Capability to WMAppManifest.xml +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit +* [CB-6218](https://issues.apache.org/jira/browse/CB-6218): Update docs for BB10 +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers + +### 0.3.3 (Mar 5, 2014) +* [CB-5534](https://issues.apache.org/jira/browse/CB-5534) Fix video/audio does not stop playing when browser is closed +* [CB-6172](https://issues.apache.org/jira/browse/CB-6172) Fix broken install on case-sensitive file-systems + +### 0.3.2 (Feb 26, 2014) +* Validate that callbackId is correctly formed +* [CB-6035](https://issues.apache.org/jira/browse/CB-6035) Move js-module so it is not loaded on unsupported platforms +* Removed some iOS6 Deprecations + +### 0.3.1 (Feb 05, 2014) +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Didn't test on ICS or lower, getDrawable isn't supported until Jellybean +* add ubuntu platform +* Adding drawables to the inAppBrowser. This doesn't look quite right, but it's a HUGE improvement over the previous settings +* [CB-5756](https://issues.apache.org/jira/browse/CB-5756): Android: Use WebView.evaluateJavascript for script injection on Android 4.4+ +* Remove alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user. +* [CB-5733](https://issues.apache.org/jira/browse/CB-5733) Fix IAB.close() not working if called before show() animation is done + +### 0.2.5 (Dec 4, 2013) +* Remove merge conflict tag +* [CB-4724](https://issues.apache.org/jira/browse/CB-4724) fixed UriFormatException +* add ubuntu platform +* [CB-3420](https://issues.apache.org/jira/browse/CB-3420) WP feature hidden=yes implemented +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for inappbrowser plugin +* [CB-4995](https://issues.apache.org/jira/browse/CB-4995) Fix crash when WebView is quickly opened then closed. +* [CB-4930](https://issues.apache.org/jira/browse/CB-4930) - iOS - InAppBrowser should take into account the status bar +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Updated version and RELEASENOTES.md for release 0.2.3 +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) - Run IAB methods on the UI thread. +* [CB-4858](https://issues.apache.org/jira/browse/CB-4858) Convert relative URLs to absolute URLs in JS +* [CB-3747](https://issues.apache.org/jira/browse/CB-3747) Fix back button having different dismiss logic from the close button. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Expose closeDialog() as a public function and make it safe to call multiple times. +* [CB-5021](https://issues.apache.org/jira/browse/CB-5021) Make it safe to call close() multiple times + +### 0.2.3 (Oct 9, 2013) +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. +* [CB-4926](https://issues.apache.org/jira/browse/CB-4926) Fixes inappbrowser plugin loading for windows8 + +### 0.2.2 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4788](https://issues.apache.org/jira/browse/CB-4788): Modified the onJsPrompt to warn against Cordova calls +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core references +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser +* [CB-4864](https://issues.apache.org/jira/browse/CB-4864), [CB-4865](https://issues.apache.org/jira/browse/CB-4865): Minor improvements to InAppBrowser +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4792](https://issues.apache.org/jira/browse/CB-4792) Added keepCallback to the show function. +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/README.md new file mode 100644 index 0000000..2ee92f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Dieses Plugin bietet eine Web-Browser-Ansicht, die beim Aufruf von `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Die `cordova.InAppBrowser.open()` Funktion ist definiert als Ersatz für die `window.open()` Funktion. InAppBrowser Fenster, können vorhandene `window.open()` Aufrufe durch window.open ersetzen: + + window.open = cordova.InAppBrowser.open; + + +Das InAppBrowser-Fenster verhält sich wie einen standard-Webbrowser und Cordova APIs kann nicht zugegriffen werden kann. Aus diesem Grund empfiehlt sich die InAppBrowser Wenn Sie von Drittanbietern (nicht vertrauenswürdige) Inhalte, statt zu laden, die in den wichtigsten Cordova Webview laden müssen. Die InAppBrowser unterliegt nicht der weißen Liste, noch ist Links in der Systembrowser öffnen. + +Die InAppBrowser bietet standardmäßig eine eigene GUI-Steuerelemente für den Benutzer (zurück, vor, erledigt). + +Für rückwärts Kompatibilität, dieses Plugin auch `window.open` Haken. Jedoch kann der Plugin installiert Haken der `window.open` haben unbeabsichtigte Nebenwirkungen (vor allem, wenn dieses Plugin nur als eine Abhängigkeit von einem anderen Plugin enthalten ist). Der Haken der `window.open` wird in einer zukünftigen Version entfernt. Bis der Haken aus dem Plugin entfernt wird, können die Vorgabe von apps manuell wiederherstellen: + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` im globalen Gültigkeitsbereich ist zwar InAppBrowser nicht verfügbar bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Wenn Sie alle Seite Lasten in Ihrer Anwendung durch die InAppBrowser gehen möchten, können Sie einfach `window.open` während der Initialisierung Haken. Zum Beispiel: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Öffnet eine URL in eine neue `InAppBrowser`-Instanz, die aktuelle Browserinstanz oder der Systembrowser. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **Ref**: Bezugnahme auf das `InAppBrowser` Fenster. *(InAppBrowser)* + + * **URL**: die URL um den *(String)* zu laden. Rufen Sie `encodeURI()` auf, wenn die URL Unicode-Zeichen enthält. + + * **target**: das Ziel in welchem die URL geladen werden soll. Standardmäßig entspricht dieser Wert `_self` . *(String)* + + * `_self`: Öffnet sich in der Cordova WebView wenn der URL in der Whitelist ist, andernfalls es öffnet sich in der`InAppBrowser`. + * `_blank`: Öffnet den`InAppBrowser`. + * `_system`: Öffnet in den System-Web-Browser. + + * **options**: Optionen für die `InAppBrowser` . Optional, säumige an: `location=yes` . *(String)* + + Die `options` Zeichenfolge muss keine Leerstelle enthalten, und jede Funktion Name/Wert-Paare müssen durch ein Komma getrennt werden. Featurenamen Groß-/Kleinschreibung. Alle Plattformen unterstützen die anderen Werte: + + * **location**: Legen Sie auf `yes` oder `no` , machen die `InAppBrowser` der Adressleiste ein- oder ausschalten. + + Nur Android: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **zoom**: Legen Sie auf `yes` zu zeigen Android Browser-Zoom-Steuerelementen, die auf `no` festlegen, um sie zu verbergen. Standardwert ist `yes`. + * **hardwareback**: auf `yes` festlegen, um die Zurück-Taste verwenden, um die `InAppBrowser`Geschichte rückwärts navigieren. Wenn es keine vorherige Seite, wird der `InAppBrowser` geschlossen. Der Standardwert ist `yes`, so dass Sie es auf `no` festlegen müssen, wenn Sie die Schaltfläche "zurück", die InAppBrowser einfach zu schließen möchten. + + iOS nur: + + * **closebuttoncaption**: Legen Sie auf eine Zeichenfolge als Beschriftung der **fertig** -Schaltfläche verwenden. Beachten Sie, dass Sie diesen Wert selbst zu lokalisieren müssen. + * **disallowoverscroll**: Legen Sie auf `yes` oder `no` (Standard ist `no` ). Aktiviert/deaktiviert die UIWebViewBounce-Eigenschaft. + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **toolbar**: Legen Sie auf `yes` oder `no` Aktivieren Sie die Symbolleiste ein- oder Ausschalten für InAppBrowser (Standard:`yes`) + * **enableViewportScale**: Legen Sie auf `yes` oder `no` , Viewport Skalierung durch ein Meta-Tag (standardmäßig zu verhindern`no`). + * **mediaPlaybackRequiresUserAction**: Legen Sie auf `yes` oder `no` , HTML5 audio oder video von automatisches Abspielen (standardmäßig zu verhindern`no`). + * **allowInlineMediaPlayback**: Legen Sie auf `yes` oder `no` Inline-HTML5-Media-Wiedergabe, Darstellung im Browser-Fenster, sondern in eine gerätespezifische Wiedergabe-Schnittstelle ermöglichen. Des HTML `video` Element muss auch die `webkit-playsinline` Attribut (Standard:`no`) + * **keyboardDisplayRequiresUserAction**: Legen Sie auf `yes` oder `no` um die Tastatur zu öffnen, wenn Formularelemente Fokus per JavaScript erhalten `focus()` Anruf (Standard:`yes`). + * **suppressesIncrementalRendering**: Legen Sie auf `yes` oder `no` zu warten, bis alle neuen anzeigen-Inhalte empfangen wird, bevor Sie wiedergegeben wird (standardmäßig`no`). + * **presentationstyle**: Legen Sie auf `pagesheet` , `formsheet` oder `fullscreen` [Präsentationsstil](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (standardmäßig fest`fullscreen`). + * **transitionstyle**: Legen Sie auf `fliphorizontal` , `crossdissolve` oder `coververtical` [Übergangsstil](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (standardmäßig fest`coververtical`). + * **toolbarposition**: Legen Sie auf `top` oder `bottom` (Standard ist `bottom` ). Bewirkt, dass die Symbolleiste am oberen oder unteren Rand des Fensters sein. + + Nur Windows: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **fullscreen**: auf `yes` festlegen, um das WebBrowser-Steuerelement ohne Rahmen drumherum zu erstellen. Bitte beachten Sie, dass bei **location=no** wird auch angegeben, gibt es keine Kontrolle, die Benutzer zum IAB-Fenster schließen. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Macken + +Als Plugin jedes Design erzwingen nicht besteht die Notwendigkeit, einige CSS-Regeln hinzuzufügen, wenn bei `target='_blank'`. Die Regeln könnte wie diese aussehen. + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows-Eigenheiten + +Ähnlich wie Firefox OS IAB Fenster visuelle Verhalten kann überschrieben werden, über `InAppBrowserWrap`/`InAppBrowserWrapFullscreen` -CSS-Klassen + +### Browser-Eigenheiten + + * Plugin wird per Iframe implementiert, + + * Navigationsverlauf (Schaltflächen`zurück` und `Vorwärts` in LocationBar) ist nicht implementiert. + +## InAppBrowser + +Bei einem Aufruf von `cordova.InAppBrowser.open` zurückgegebene Objekt.. + +### Methoden + + * addEventListener + * removeEventListener + * Schließen + * Karte + * executeScript + * insertCSS + +## addEventListener + +> Fügt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn der `InAppBrowser` ein Fehler auftritt, wenn Sie eine URL zu laden. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion, die ausgeführt wird, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` -Objekt als Parameter. + +### InAppBrowserEvent Eigenschaften + + * **Typ**: Eventname, entweder `loadstart` , `loadstop` , `loaderror` , oder `exit` . *(String)* + + * **URL**: die URL, die geladen wurde. *(String)* + + * **Code**: der Fehler-Code, nur im Fall von `loaderror` . *(Anzahl)* + + * **Nachricht**: die Fehlermeldung angezeigt, nur im Fall von `loaderror` . *(String)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Browser-Eigenheiten + +`loadstart` und `loaderror` Ereignisse werden nicht ausgelöst wird. + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Entfernt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **EventName**: das Ereignis zu warten. *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn die `InAppBrowser` trifft einen Fehler beim Laden einer URLs. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + + * **Rückruf**: die Funktion ausgeführt, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` Objekt. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Schließen + +> Schließt die `InAppBrowser` Fenster. + + ref.close(); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 und 8.1 + * Windows Phone 7 und 8 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Karte + +> Zeigt ein InAppBrowser-Fenster, das geöffnet wurde, versteckt. Aufrufen, dies hat keine Auswirkungen, wenn die InAppBrowser schon sichtbar war. + + ref.show(); + + + * **Ref**: Verweis auf die (InAppBrowser) Fenster`InAppBrowser`) + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Fügt JavaScript-Code in das `InAppBrowser` Fenster + + ref.executeScript(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Skripts zu injizieren. + * **Code**: Text des Skripts zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem der JavaScript-Code injiziert wird. + + * Wenn das eingefügte Skript vom Typ ist `code` , der Rückruf führt mit einen einzelnen Parameter, der der Rückgabewert des Skripts ist, umwickelt ein `Array` . Bei Multi-Line-Skripten ist der Rückgabewert von der letzten Anweisung oder den letzten Ausdruck ausgewertet. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows 8 und 8.1 + * Browser + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Browser-Eigenheiten + + * **code** -Schlüssel wird unterstützt. + +### Windows-Eigenheiten + +Aufgrund der [MSDN-Dokumentation](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) das aufgerufene Skript kehren nur Zeichenfolgenwerte, andernfalls des Parameters, an **Rückruf** übergeben werden `[null]`. + +## insertCSS + +> Injiziert CSS in der `InAppBrowser` Fenster. + + ref.insertCSS(details, callback); + + + * **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + + * **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Stylesheets zu injizieren. + * **Code**: Text des Stylesheets zu injizieren. + + * **Rückruf**: die Funktion, die ausgeführt wird, nachdem die CSS injiziert wird. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/index.md new file mode 100644 index 0000000..d2b29d5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/de/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Dieses Plugin bietet eine Web-Browser-Ansicht, die beim Aufruf von `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Die `cordova.InAppBrowser.open()` Funktion ist definiert als Ersatz für die `window.open()` Funktion. InAppBrowser Fenster, können vorhandene `window.open()` Aufrufe durch window.open ersetzen: + + window.open = cordova.InAppBrowser.open; + + +Das InAppBrowser-Fenster verhält sich wie einen standard-Webbrowser und Cordova APIs kann nicht zugegriffen werden kann. Aus diesem Grund empfiehlt sich die InAppBrowser Wenn Sie von Drittanbietern (nicht vertrauenswürdige) Inhalte, statt zu laden, die in den wichtigsten Cordova Webview laden müssen. Die InAppBrowser unterliegt nicht der weißen Liste, noch ist Links in der Systembrowser öffnen. + +Die InAppBrowser bietet standardmäßig eine eigene GUI-Steuerelemente für den Benutzer (zurück, vor, erledigt). + +Für rückwärts Kompatibilität, dieses Plugin auch `window.open` Haken. Jedoch kann der Plugin installiert Haken der `window.open` haben unbeabsichtigte Nebenwirkungen (vor allem, wenn dieses Plugin nur als eine Abhängigkeit von einem anderen Plugin enthalten ist). Der Haken der `window.open` wird in einer zukünftigen Version entfernt. Bis der Haken aus dem Plugin entfernt wird, können die Vorgabe von apps manuell wiederherstellen: + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` im globalen Gültigkeitsbereich ist zwar InAppBrowser nicht verfügbar bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Wenn Sie alle Seite Lasten in Ihrer Anwendung durch die InAppBrowser gehen möchten, können Sie einfach `window.open` während der Initialisierung Haken. Zum Beispiel: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Öffnet eine URL in eine neue `InAppBrowser`-Instanz, die aktuelle Browserinstanz oder der Systembrowser. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **Ref**: Bezugnahme auf das `InAppBrowser` Fenster. *(InAppBrowser)* + +* **URL**: die URL um den *(String)* zu laden. Rufen Sie `encodeURI()` auf, wenn die URL Unicode-Zeichen enthält. + +* **target**: das Ziel in welchem die URL geladen werden soll. Standardmäßig entspricht dieser Wert `_self` . *(String)* + + * `_self`: Öffnet sich in der Cordova WebView wenn der URL in der Whitelist ist, andernfalls es öffnet sich in der`InAppBrowser`. + * `_blank`: Öffnet den`InAppBrowser`. + * `_system`: Öffnet in den System-Web-Browser. + +* **options**: Optionen für die `InAppBrowser` . Optional, säumige an: `location=yes` . *(String)* + + Die `options` Zeichenfolge muss keine Leerstelle enthalten, und jede Funktion Name/Wert-Paare müssen durch ein Komma getrennt werden. Featurenamen Groß-/Kleinschreibung. Alle Plattformen unterstützen die anderen Werte: + + * **location**: Legen Sie auf `yes` oder `no` , machen die `InAppBrowser` der Adressleiste ein- oder ausschalten. + + Nur Android: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + + iOS nur: + + * **closebuttoncaption**: Legen Sie auf eine Zeichenfolge als Beschriftung der **fertig** -Schaltfläche verwenden. Beachten Sie, dass Sie diesen Wert selbst zu lokalisieren müssen. + * **disallowoverscroll**: Legen Sie auf `yes` oder `no` (Standard ist `no` ). Aktiviert/deaktiviert die UIWebViewBounce-Eigenschaft. + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + * **clearcache**: Legen Sie auf `yes` , der Browser ist Cookiecache gelöscht, bevor das neue Fenster geöffnet wird + * **clearsessioncache**: Legen Sie auf `yes` zu der Session Cookie Cache gelöscht, bevor das neue Fenster geöffnet wird + * **toolbar**: Legen Sie auf `yes` oder `no` Aktivieren Sie die Symbolleiste ein- oder Ausschalten für InAppBrowser (Standard:`yes`) + * **enableViewportScale**: Legen Sie auf `yes` oder `no` , Viewport Skalierung durch ein Meta-Tag (standardmäßig zu verhindern`no`). + * **mediaPlaybackRequiresUserAction**: Legen Sie auf `yes` oder `no` , HTML5 audio oder video von automatisches Abspielen (standardmäßig zu verhindern`no`). + * **allowInlineMediaPlayback**: Legen Sie auf `yes` oder `no` Inline-HTML5-Media-Wiedergabe, Darstellung im Browser-Fenster, sondern in eine gerätespezifische Wiedergabe-Schnittstelle ermöglichen. Des HTML `video` Element muss auch die `webkit-playsinline` Attribut (Standard:`no`) + * **keyboardDisplayRequiresUserAction**: Legen Sie auf `yes` oder `no` um die Tastatur zu öffnen, wenn Formularelemente Fokus per JavaScript erhalten `focus()` Anruf (Standard:`yes`). + * **suppressesIncrementalRendering**: Legen Sie auf `yes` oder `no` zu warten, bis alle neuen anzeigen-Inhalte empfangen wird, bevor Sie wiedergegeben wird (standardmäßig`no`). + * **presentationstyle**: Legen Sie auf `pagesheet` , `formsheet` oder `fullscreen` [Präsentationsstil][1] (standardmäßig fest`fullscreen`). + * **transitionstyle**: Legen Sie auf `fliphorizontal` , `crossdissolve` oder `coververtical` [Übergangsstil][2] (standardmäßig fest`coververtical`). + * **toolbarposition**: Legen Sie auf `top` oder `bottom` (Standard ist `bottom` ). Bewirkt, dass die Symbolleiste am oberen oder unteren Rand des Fensters sein. + + Nur Windows: + + * **hidden**: Legen Sie auf `yes` um den Browser zu erstellen und laden Sie die Seite, aber nicht zeigen. Das Loadstop-Ereignis wird ausgelöst, wenn der Ladevorgang abgeschlossen ist. Weglassen oder auf `no` (Standard), den Browser öffnen und laden normalerweise zu haben. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Macken + +Als Plugin jedes Design erzwingen nicht besteht die Notwendigkeit, einige CSS-Regeln hinzuzufügen, wenn bei `target='_blank'`. Die Regeln könnte wie diese aussehen. + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +Bei einem Aufruf von `cordova.InAppBrowser.open` zurückgegebene Objekt.. + +### Methoden + +* addEventListener +* removeEventListener +* Schließen +* Karte +* executeScript +* insertCSS + +## addEventListener + +> Fügt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +* **EventName**: das Ereignis zu warten *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn der `InAppBrowser` ein Fehler auftritt, wenn Sie eine URL zu laden. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + +* **Rückruf**: die Funktion, die ausgeführt wird, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` -Objekt als Parameter. + +### InAppBrowserEvent Eigenschaften + +* **Typ**: Eventname, entweder `loadstart` , `loadstop` , `loaderror` , oder `exit` . *(String)* + +* **URL**: die URL, die geladen wurde. *(String)* + +* **Code**: der Fehler-Code, nur im Fall von `loaderror` . *(Anzahl)* + +* **Nachricht**: die Fehlermeldung angezeigt, nur im Fall von `loaderror` . *(String)* + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Entfernt einen Listener für eine Veranstaltung aus der`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + +* **EventName**: das Ereignis zu warten. *(String)* + + * **Loadstart**: Ereignis wird ausgelöst, wenn die `InAppBrowser` beginnt, eine URL zu laden. + * **Loadstop**: Ereignis wird ausgelöst, wenn der `InAppBrowser` beendet ist, eine URL laden. + * **LoadError**: Ereignis wird ausgelöst, wenn die `InAppBrowser` trifft einen Fehler beim Laden einer URLs. + * **Ausfahrt**: Ereignis wird ausgelöst, wenn das `InAppBrowser` -Fenster wird geschlossen. + +* **Rückruf**: die Funktion ausgeführt, wenn das Ereignis ausgelöst wird. Die Funktion übergeben wird ein `InAppBrowserEvent` Objekt. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Schließen + +> Schließt die `InAppBrowser` Fenster. + + ref.close(); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 und 8.1 +* Windows Phone 7 und 8 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Karte + +> Zeigt ein InAppBrowser-Fenster, das geöffnet wurde, versteckt. Aufrufen, dies hat keine Auswirkungen, wenn die InAppBrowser schon sichtbar war. + + ref.show(); + + +* **Ref**: Verweis auf die (InAppBrowser) Fenster`InAppBrowser`) + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Fügt JavaScript-Code in das `InAppBrowser` Fenster + + ref.executeScript(details, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster. *(InAppBrowser)* + +* **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Skripts zu injizieren. + * **Code**: Text des Skripts zu injizieren. + +* **Rückruf**: die Funktion, die ausgeführt wird, nachdem der JavaScript-Code injiziert wird. + + * Wenn das eingefügte Skript vom Typ ist `code` , der Rückruf führt mit einen einzelnen Parameter, der der Rückgabewert des Skripts ist, umwickelt ein `Array` . Bei Multi-Line-Skripten ist der Rückgabewert von der letzten Anweisung oder den letzten Ausdruck ausgewertet. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS +* Windows 8 und 8.1 + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Injiziert CSS in der `InAppBrowser` Fenster. + + ref.insertCSS(details, callback); + + +* **Ref**: Bezugnahme auf die `InAppBrowser` Fenster *(InAppBrowser)* + +* **InjectDetails**: Informationen über das Skript ausgeführt, angeben, entweder ein `file` oder `code` Schlüssel. *(Objekt)* + + * **Datei**: URL des Stylesheets zu injizieren. + * **Code**: Text des Stylesheets zu injizieren. + +* **Rückruf**: die Funktion, die ausgeführt wird, nachdem die CSS injiziert wird. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* iOS + +### Kurzes Beispiel + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/README.md new file mode 100644 index 0000000..811439a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Este plugin proporciona una vista de navegador web que se muestra cuando se llama a `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +El `cordova.InAppBrowser.open()` función se define como un reemplazo de sobreponer para la función `window.Open ()`. Llamadas existentes `window.Open ()` pueden utilizar la ventana InAppBrowser, mediante la sustitución de window.open: + + window.open = cordova.InAppBrowser.open; + + +La ventana de InAppBrowser se comporta como un navegador web estándar y no puede acceder a Cordova APIs. Por este motivo, se recomienda la InAppBrowser si necesita cargar contenido de terceros (confianza), en lugar de que cargar en el principal webview Cordova. El InAppBrowser no está sujeta a la lista blanca, ni va a abrir enlaces en el navegador del sistema. + +El InAppBrowser proporciona por defecto sus propios controles GUI para el usuario (atras, adelante, hacer). + +Para atrás compatibilidad, este plugin también ganchos `window.open`. Sin embargo, el gancho de `window.open` plugin instalado puede tener efectos secundarios no deseados (especialmente si este plugin está incluido únicamente como una dependencia de otro plugin). El gancho de `window.open` se quitará en una versión futura de principal. Hasta que el gancho se ha extraído el plugin, aplicaciones pueden restaurar manualmente el comportamiento por defecto: + + delete window.open // Reverts the call back to it's prototype's default + + +Aunque `window.open` es en el ámbito global, InAppBrowser no está disponible hasta después del evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalación + + cordova plugin add cordova-plugin-inappbrowser + + +Si quieres todas las cargas de página en su aplicación para ir a través de la InAppBrowser, simplemente puedes conectar `window.open` durante la inicialización. Por ejemplo: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Se abre una dirección URL en una nueva instancia de `InAppBrowser`, en la instancia actual del navegador o el navegador del sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: referencia a la `InAppBrowser` ventana. *(InAppBrowser)* + + * **url**: el URL para cargar *(String)*. Llame a `encodeURI()` en esto si la URL contiene caracteres Unicode. + + * **target**: el objetivo en el que se carga la URL, un parámetro opcional que se utiliza de forma predeterminada `_self`. *(String)* + + * `_self`: se abre en el Cordova WebView si la URL está en la lista blanca, de lo contrario se abre en el `InAppBrowser`. + * `_blank`: abre en el `InAppBrowser`. + * `_system`: se abre en el navegador del sistema. + + * **options**: opciones para el `InAppBrowser`. Opcional, contumaz a: `location=yes`. *(String)* + + La cadena de `options` no debe contener ningún espacio en blanco, y los pares de nombre y valor de cada característica deben estar separados por una coma. Los nombres de función son minúsculas. Todas las plataformas admiten el valor siguiente: + + * **location**: se establece en `yes` o `no` para activar o desactivar la barra de ubicación de la `InAppBrowser`. + + Sólo Android: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **zoom**: establezca en `sí` para mostrar los controles de zoom del navegador de Android, a `no` para ocultarlas. El valor predeterminado es `sí`. + * **hardwareback**: se establece en `sí` para utilizar el botón back de hardware para navegar hacia atrás a través de la historia de la `InAppBrowser`. Si no hay ninguna página anterior, se cerrará el `InAppBrowser` . El valor predeterminado es `sí`, por lo que se debe establecer en `no` si desea que el botón back para simplemente cerrar el InAppBrowser. + + Sólo iOS: + + * **closebuttoncaption**: establecer una cadena para usar como título del botón **hecho** . Tenga en cuenta que necesitas localizar este valor por sí mismo. + * **disallowoverscroll**: A `yes` o `no` (valor por defecto es `no` ). Activa/desactiva la propiedad UIWebViewBounce. + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **barra de herramientas**: a `yes` o `no` para activar la barra de herramientas on u off para el InAppBrowser (por defecto`yes`) + * **enableViewportScale**: Set a `yes` o `no` para evitar viewport escalar a través de una etiqueta meta (por defecto a `no`). + * **mediaPlaybackRequiresUserAction**: Set a `yes` o `no` para evitar HTML5 audio o vídeo de reproducción automática (por defecto a `no`). + * **allowInlineMediaPlayback**: A `yes` o `no` para permitir la reproducción de los medios de comunicación en línea HTML5, mostrando en la ventana del navegador en lugar de una interfaz específica del dispositivo de reproducción. Elemento `video` de HTML también debe incluir el atributo de `webkit-playsinline` (por defecto a `no`) + * **keyboardDisplayRequiresUserAction**: se establece en `yes` o `no` para abrir el teclado cuando elementos de formulario reciben el foco mediante llamada de JavaScript de `focus()` (por defecto a `yes`). + * **suppressesIncrementalRendering**: se establece en `yes` o `no` para esperar hasta que todos los nuevos contenidos de vista se recibieron antes de ser prestados (por defecto a `no`). + * **presentationstyle**: se establece en `pagesheet`, `formsheet` o `fullscreen` para definir el [estilo de la presentación](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (por defecto a `fullscreen`). + * **transitionstyle**: se establece en `fliphorizontal`, `crossdissolve` o `coververtical` para definir el [estilo de transición](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (por defecto `coververtical`). + * **toolbarposition**: A `top` o `bottom` (valor por defecto es `bottom` ). Hace que la barra de herramientas en la parte superior o inferior de la ventana. + + Sólo Windows: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **fullscreen**: se establece en `sí` para crear el control del navegador sin un borde alrededor de él. Por favor tenga en cuenta que si **location=no** también se especifica, no habrá ningún control presentado al usuario para cerrar la ventana IAB. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS rarezas + +Como plugin no cumplir cualquier diseño es necesario añadir algunas reglas CSS si abre con `target = '_blank'`. Las reglas pueden parecerse a estos + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows rarezas + +Similar al comportamiento visual de la ventana de Firefox OS IAB puede anularse mediante `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` clases CSS + +### Navegador rarezas + + * Plugin se implementa mediante iframe, + + * Historial de navegación (botones`atrás` y `adelante` en LocationBar) no está implementado. + +## InAppBrowser + +El objeto devuelto desde una llamada a `cordova.InAppBrowser.open`. + +### Métodos + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Añade un detector para un evento de la `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **eventName**: el evento para escuchar *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` encuentra un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función que se ejecuta cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent` como un parámetro. + +### InAppBrowserEvent propiedades + + * **type**: eventname, `loadstart`, `loadstop`, `loaderror` o `exit`. *(String)* + + * **url**: la URL que se cargó. *(String)* + + * **code**: el código de error, sólo en el caso de `loaderror`. *(Número)* + + * **message**: el mensaje de error, sólo en el caso de `loaderror`. *(String)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Navegador rarezas + +eventos `loadstart` y `loaderror` no son alimentados. + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Elimina un detector para un evento de la `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **eventName**: dejar de escuchar para el evento. *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` se encuentra con un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + + * **callback**: la función a ejecutar cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent`. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Cierra la ventana de `InAppBrowser`. + + ref.close(); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +### Plataformas soportadas + + * Amazon fire OS + * Android + * Firefox OS + * iOS + * Windows 8 y 8.1 + * Windows Phone 7 y 8 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Muestra una ventana InAppBrowser que abrió sus puertas ocultada. Esto no tiene efecto si el InAppBrowser ya era visible. + + ref.show(); + + + * **ref**: referencia a la (ventana) InAppBrowser`InAppBrowser`) + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inyecta código JavaScript en la ventana de `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL del script para inyectar. + * **code**: texto de la escritura para inyectar. + + * **devolución de llamada**: la función que se ejecuta después de inyecta el código JavaScript. + + * Si el script inyectado es del tipo de `code`, la devolución de llamada se ejecuta con un solo parámetro, que es el valor devuelto del guión, envuelto en una `Array`. Para scripts multilíneas, este es el valor devuelto de la última declaración, o la última expresión evaluada. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows 8 y 8.1 + * Explorador + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Navegador rarezas + + * sólo **code** es compatible. + +### Windows rarezas + +Debido a la [documentación MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) el script invocado puede devolver únicamente valores de cadena, de lo contrario el parámetro, pasa al **callback** será `[null]`. + +## insertCSS + +> Inyecta CSS en la ventana de `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + + * **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL de la hoja de estilos para inyectar. + * **code**: texto de la hoja de estilos para inyectar. + + * **callback**: la función que se ejecuta después de inyectar el CSS. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * iOS + * Windows + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/index.md new file mode 100644 index 0000000..fc5b7b1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/es/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Este plugin proporciona una vista de navegador web que se muestra cuando se llama a `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +El `cordova.InAppBrowser.open()` función se define como un reemplazo de sobreponer para la función `window.Open ()`. Llamadas existentes `window.Open ()` pueden utilizar la ventana InAppBrowser, mediante la sustitución de window.open: + + window.open = cordova.InAppBrowser.open; + + +La ventana de InAppBrowser se comporta como un navegador web estándar y no puede acceder a Cordova APIs. Por este motivo, se recomienda la InAppBrowser si necesita cargar contenido de terceros (confianza), en lugar de que cargar en el principal webview Cordova. El InAppBrowser no está sujeta a la lista blanca, ni va a abrir enlaces en el navegador del sistema. + +El InAppBrowser proporciona por defecto sus propios controles GUI para el usuario (atras, adelante, hacer). + +Para atrás compatibilidad, este plugin también ganchos `window.open`. Sin embargo, el gancho de `window.open` plugin instalado puede tener efectos secundarios no deseados (especialmente si este plugin está incluido únicamente como una dependencia de otro plugin). El gancho de `window.open` se quitará en una versión futura de principal. Hasta que el gancho se ha extraído el plugin, aplicaciones pueden restaurar manualmente el comportamiento por defecto: + + delete window.open // Reverts the call back to it's prototype's default + + +Aunque `window.open` es en el ámbito global, InAppBrowser no está disponible hasta después del evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalación + + cordova plugin add cordova-plugin-inappbrowser + + +Si quieres todas las cargas de página en su aplicación para ir a través de la InAppBrowser, simplemente puedes conectar `window.open` durante la inicialización. Por ejemplo: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Se abre una dirección URL en una nueva instancia de `InAppBrowser`, en la instancia actual del navegador o el navegador del sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: referencia a la `InAppBrowser` ventana. *(InAppBrowser)* + +* **url**: el URL para cargar *(String)*. Llame a `encodeURI()` en esto si la URL contiene caracteres Unicode. + +* **target**: el objetivo en el que se carga la URL, un parámetro opcional que se utiliza de forma predeterminada `_self`. *(String)* + + * `_self`: se abre en el Cordova WebView si la URL está en la lista blanca, de lo contrario se abre en el `InAppBrowser`. + * `_blank`: abre en el `InAppBrowser`. + * `_system`: se abre en el navegador del sistema. + +* **options**: opciones para el `InAppBrowser`. Opcional, contumaz a: `location=yes`. *(String)* + + La cadena de `options` no debe contener ningún espacio en blanco, y los pares de nombre y valor de cada característica deben estar separados por una coma. Los nombres de función son minúsculas. Todas las plataformas admiten el valor siguiente: + + * **location**: se establece en `yes` o `no` para activar o desactivar la barra de ubicación de la `InAppBrowser`. + + Sólo Android: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o establecer en `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + + Sólo iOS: + + * **closebuttoncaption**: establecer una cadena para usar como título del botón **hecho** . Tenga en cuenta que necesitas localizar este valor por sí mismo. + * **disallowoverscroll**: A `yes` o `no` (valor por defecto es `no` ). Activa/desactiva la propiedad UIWebViewBounce. + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + * **clearcache**: a `yes` para que el navegador es caché de galleta despejado antes de que se abra la nueva ventana + * **clearsessioncache**: a `yes` que la caché de cookie de sesión despejado antes de que se abra la nueva ventana + * **barra de herramientas**: a `yes` o `no` para activar la barra de herramientas on u off para el InAppBrowser (por defecto`yes`) + * **enableViewportScale**: Set a `yes` o `no` para evitar viewport escalar a través de una etiqueta meta (por defecto a `no`). + * **mediaPlaybackRequiresUserAction**: Set a `yes` o `no` para evitar HTML5 audio o vídeo de reproducción automática (por defecto a `no`). + * **allowInlineMediaPlayback**: A `yes` o `no` para permitir la reproducción de los medios de comunicación en línea HTML5, mostrando en la ventana del navegador en lugar de una interfaz específica del dispositivo de reproducción. Elemento `video` de HTML también debe incluir el atributo de `webkit-playsinline` (por defecto a `no`) + * **keyboardDisplayRequiresUserAction**: se establece en `yes` o `no` para abrir el teclado cuando elementos de formulario reciben el foco mediante llamada de JavaScript de `focus()` (por defecto a `yes`). + * **suppressesIncrementalRendering**: se establece en `yes` o `no` para esperar hasta que todos los nuevos contenidos de vista se recibieron antes de ser prestados (por defecto a `no`). + * **presentationstyle**: se establece en `pagesheet`, `formsheet` o `fullscreen` para definir el [estilo de la presentación][1] (por defecto a `fullscreen`). + * **transitionstyle**: se establece en `fliphorizontal`, `crossdissolve` o `coververtical` para definir el [estilo de transición][2] (por defecto `coververtical`). + * **toolbarposition**: A `top` o `bottom` (valor por defecto es `bottom` ). Hace que la barra de herramientas en la parte superior o inferior de la ventana. + + Sólo Windows: + + * **oculta**: a `yes` para crear el navegador y cargar la página, pero no lo demuestra. El evento loadstop se desencadena cuando termine la carga. Omitir o a `no` (por defecto) para que el navegador abra y carga normalmente. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS rarezas + +Como plugin no cumplir cualquier diseño es necesario añadir algunas reglas CSS si abre con `target = '_blank'`. Las reglas pueden parecerse a estos + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +El objeto devuelto desde una llamada a `cordova.InAppBrowser.open`. + +### Métodos + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Añade un detector para un evento de la `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +* **eventName**: el evento para escuchar *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` encuentra un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + +* **callback**: la función que se ejecuta cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent` como un parámetro. + +### InAppBrowserEvent propiedades + +* **type**: eventname, `loadstart`, `loadstop`, `loaderror` o `exit`. *(String)* + +* **url**: la URL que se cargó. *(String)* + +* **code**: el código de error, sólo en el caso de `loaderror`. *(Número)* + +* **message**: el mensaje de error, sólo en el caso de `loaderror`. *(String)* + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Elimina un detector para un evento de la `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + +* **eventName**: dejar de escuchar para el evento. *(String)* + + * **loadstart**: evento se desencadena cuando el `InAppBrowser` comienza a cargar una dirección URL. + * **loadstop**: evento desencadena cuando los acabados `InAppBrowser` cargar una dirección URL. + * **loaderror**: evento se desencadena cuando el `InAppBrowser` se encuentra con un error al cargar una dirección URL. + * **exit**: evento se desencadena cuando se cierra la ventana de `InAppBrowser`. + +* **callback**: la función a ejecutar cuando se desencadene el evento. La función se pasa un objeto `InAppBrowserEvent`. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Cierra la ventana de `InAppBrowser`. + + ref.close(); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +### Plataformas soportadas + +* Amazon fire OS +* Android +* Firefox OS +* iOS +* Windows 8 y 8.1 +* Windows Phone 7 y 8 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Muestra una ventana InAppBrowser que abrió sus puertas ocultada. Esto no tiene efecto si el InAppBrowser ya era visible. + + ref.show(); + + +* **ref**: referencia a la (ventana) InAppBrowser`InAppBrowser`) + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inyecta código JavaScript en la ventana de `InAppBrowser` + + ref.executeScript(details, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser`. *(InAppBrowser)* + +* **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL del script para inyectar. + * **code**: texto de la escritura para inyectar. + +* **devolución de llamada**: la función que se ejecuta después de inyecta el código JavaScript. + + * Si el script inyectado es del tipo de `code`, la devolución de llamada se ejecuta con un solo parámetro, que es el valor devuelto del guión, envuelto en una `Array`. Para scripts multilíneas, este es el valor devuelto de la última declaración, o la última expresión evaluada. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS +* Windows 8 y 8.1 + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Inyecta CSS en la ventana de `InAppBrowser`. + + ref.insertCSS(details, callback); + + +* **ref**: referencia a la ventana de `InAppBrowser` *(InAppBrowser)* + +* **injectDetails**: detalles de la secuencia de comandos para ejecutar, o especificar un `file` o `code` clave. *(Objeto)* + + * **file**: URL de la hoja de estilos para inyectar. + * **code**: texto de la hoja de estilos para inyectar. + +* **callback**: la función que se ejecuta después de inyectar el CSS. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* iOS + +### Ejemplo rápido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/README.md new file mode 100644 index 0000000..73812fe --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Ce module fournit une vue de navigateur web qui s'affiche lorsque vous appelez `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Le `cordova.InAppBrowser.open()` fonction est définie pour être un remplacement rapide de la fonction `window.open()`. Les appels existants `window.open()` peuvent utiliser la fenêtre de InAppBrowser, en remplaçant window.open : + + window.open = cordova.InAppBrowser.open; + + +La fenêtre de InAppBrowser se comporte comme un navigateur web standard et ne peut pas accéder aux APIs Cordova. Pour cette raison, le InAppBrowser est recommandé si vous devez charger le contenu de tiers (non approuvé), au lieu de chargement que dans le principaux webview Cordova. Le InAppBrowser n'est pas soumis à la liste blanche, ni s'ouvre les liens dans le navigateur de système. + +Le InAppBrowser fournit par défaut ses propres contrôles de GUI pour l'utilisateur (arrière, avant, fait). + +Pour vers l'arrière la compatibilité, ce plugin crochets également `window.open`. Cependant, le plugin installé crochet de `window.open` peut avoir des effets secondaires involontaires (surtout si ce plugin est inclus uniquement comme une dépendance d'un autre plugin). Le crochet de `window.open` sera supprimé dans une future version majeure. Jusqu'à ce que le crochet est supprimé de la plugin, apps peuvent restaurer manuellement le comportement par défaut : + + delete window.open // Reverts the call back to it's prototype's default + + +Bien que `window.open` est dans la portée globale, InAppBrowser n'est pas disponible jusqu'à ce qu'après l'événement `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Si vous souhaitez que toutes les charges de la page dans votre application de passer par le InAppBrowser, vous pouvez simplement accrocher `window.open` pendant l'initialisation. Par exemple : + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Ouvre une URL dans une nouvelle instance de `InAppBrowser`, l'instance de navigateur actuelle ou dans l'Explorateur du système. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **url** : l'URL à charger *(String)*. À encoder au préalable via `encodeURI()` si celle-ci contient des caractères Unicode. + + * **target** : la cible du chargement de l'URL, ce paramètre est optionnel, sa valeur par défaut est `_self`. *(String)* + + * `_self` : dirige le chargement vers la WebView Cordova si l'URL figure dans la liste blanche, sinon dans une fenêtre `InAppBrowser`. + * `_blank` : dirige le chargement vers une fenêtre `InAppBrowser`. + * `_system` : dirige le chargement vers le navigateur Web du système. + + * **options** : permet de personnaliser la fenêtre `InAppBrowser`. Paramètre facultatif dont la valeur par défaut est `location=yes`. *(String)* + + La chaîne `options` ne doit contenir aucun caractère vide, chaque paire nom/valeur représentant une fonctionnalité doit être séparée de la précédente par une virgule. Les noms de fonctionnalités sont sensibles à la casse. Toutes les plates-formes prennent en charge la valeur ci-dessous : + + * **location** : régler à `yes` ou `no` afin d'afficher ou masquer la barre d'adresse de la fenêtre `InAppBrowser`. + + Android uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **zoom**: la valeur `yes` pour afficher les commandes de zoom du navigateur Android, affectez `no` de les cacher. Valeur par défaut est `yes`. + * **hardwareback**: utilisez le bouton de retour de matériel pour naviguer vers l'arrière à travers l'histoire de `InAppBrowser`de la valeur `Oui` . S'il n'y a aucune page précédente, `InAppBrowser` fermera. La valeur par défaut est `yes`, alors vous devez le définir à `no` si vous souhaitez que le bouton back de simplement fermer la InAppBrowser. + + iOS uniquement : + + * **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même. + * **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce. + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`) + * **enableViewportScale**: la valeur `yes` ou `no` pour empêcher la fenêtre de mise à l'échelle par une balise meta (par défaut,`no`). + * **mediaPlaybackRequiresUserAction**: la valeur `yes` ou `no` pour empêcher le HTML5 audio ou vidéo de la lecture automatique (par défaut,`no`). + * **allowInlineMediaPlayback**: la valeur `yes` ou `no` pour permettre la lecture du média en ligne HTML5, affichage dans la fenêtre du navigateur plutôt que d'une interface de lecture spécifique au périphérique. L'HTML `video` élément doit également inclure la `webkit-playsinline` attribut (par défaut,`no`) + * **keyboardDisplayRequiresUserAction**: la valeur `yes` ou `no` pour ouvrir le clavier lorsque les éléments reçoivent le focus par l'intermédiaire de JavaScript `focus()` appel (par défaut,`yes`). + * **suppressesIncrementalRendering**: la valeur `yes` ou `no` d'attendre que toutes les nouveautés de vue sont reçue avant d'être restitué (par défaut,`no`). + * **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (par défaut,`fullscreen`). + * **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (par défaut,`coververtical`). + * **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre. + + Windows uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **fullscreen**: défini à `yes` pour créer le contrôle de navigateur sans bordure autour d'elle. Veuillez noter que si **location=no** est également spécifiée, il n'y n'aura aucun contrôle a présenté à l'utilisateur de fermer la fenêtre du CCI. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Quirks + +Comme plugin n'est pas appliquer n'importe quelle conception il est nécessaire d'ajouter quelques règles CSS si ouvert avec `target= _blank`. Les règles pourraient ressembler à ces + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Bizarreries de Windows + +Semblable à un comportement visuel fenêtre Firefox OS CCI peut être substituée par l'intermédiaire de `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` des classes CSS + +### Bizarreries navigateur + + * Plugin est implémentée via iframe, + + * Historique de navigation (boutons`back` et `forward` dans LocationBar) n'est pas implémentée. + +## InAppBrowser + +L'objet retourné par un appel à `cordova.InAppBrowser.open`. + +### Méthodes + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Ajoute un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement à écouter *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Propriétés de InAppBrowserEvent + + * **type** : le nom de l'évènement, soit `loadstart`, `loadstop`, `loaderror` ou `exit`. *(String)* + + * **url** : l'URL ayant été chargée. *(String)* + + * **code** : le code d'erreur, seulement pour `loaderror`. *(Number)* + + * **message** : un message d'erreur, seulement pour `loaderror`. *(String)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Bizarreries navigateur + +les événements `loadstart` et `loaderror` ne sont pas déclenchés. + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Supprime un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **eventname** : l'évènement pour lequel arrêter l'écoute. *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + + * **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Ferme la fenêtre `InAppBrowser`. + + ref.close(); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 et 8.1 + * Windows Phone 7 et 8 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Affiche une fenêtre InAppBrowser qui a été ouverte cachée. Appeler cette méthode n'a aucun effet si la fenêtre en question est déjà visible. + + ref.show(); + + + * **Réf**: référence à la fenêtre () InAppBrowser`InAppBrowser`) + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Injecte du code JavaScript dans la fenêtre `InAppBrowser` + + ref.executeScript(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL du script à injecter. + * **code** : texte du script à injecter. + + * **callback** : une fonction exécutée après l'injection du code JavaScript. + + * Si le script injecté est de type `code`, un seul paramètre est transmis à la fonction callback, correspondant à la valeur de retour du script enveloppée dans un `Array`. Pour les scripts multilignes, il s'agit de la valeur renvoyée par la dernière instruction ou la dernière expression évaluée. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows 8 et 8.1 + * Navigateur + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Bizarreries navigateur + + * clef de **code** uniquement est pris en charge. + +### Bizarreries de Windows + +En raison de la [documentation MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) le script appelé peut retourner uniquement les valeurs de chaîne, sinon le paramètre, passé au **rappel** sera `[null]`. + +## insertCSS + +> Injecte des règles CSS dans la fenêtre `InAppBrowser`. + + ref.insertCSS(details, callback); + + + * **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + + * **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL de la feuille de style à injecter. + * **code** : contenu de la feuille de style à injecter. + + * **callback** : une fonction exécutée après l'injection du fichier CSS. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Exemple court + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/index.md new file mode 100644 index 0000000..4f22d13 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/fr/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Ce module fournit une vue de navigateur web qui s'affiche lorsque vous appelez `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Le `cordova.InAppBrowser.open()` fonction est définie pour être un remplacement rapide de la fonction `window.open()`. Les appels existants `window.open()` peuvent utiliser la fenêtre de InAppBrowser, en remplaçant window.open : + + window.open = cordova.InAppBrowser.open; + + +La fenêtre de InAppBrowser se comporte comme un navigateur web standard et ne peut pas accéder aux APIs Cordova. Pour cette raison, le InAppBrowser est recommandé si vous devez charger le contenu de tiers (non approuvé), au lieu de chargement que dans le principaux webview Cordova. Le InAppBrowser n'est pas soumis à la liste blanche, ni s'ouvre les liens dans le navigateur de système. + +Le InAppBrowser fournit par défaut ses propres contrôles de GUI pour l'utilisateur (arrière, avant, fait). + +Pour vers l'arrière la compatibilité, ce plugin crochets également `window.open`. Cependant, le plugin installé crochet de `window.open` peut avoir des effets secondaires involontaires (surtout si ce plugin est inclus uniquement comme une dépendance d'un autre plugin). Le crochet de `window.open` sera supprimé dans une future version majeure. Jusqu'à ce que le crochet est supprimé de la plugin, apps peuvent restaurer manuellement le comportement par défaut : + + delete window.open // Reverts the call back to it's prototype's default + + +Bien que `window.open` est dans la portée globale, InAppBrowser n'est pas disponible jusqu'à ce qu'après l'événement `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installation + + cordova plugin add cordova-plugin-inappbrowser + + +Si vous souhaitez que toutes les charges de la page dans votre application de passer par le InAppBrowser, vous pouvez simplement accrocher `window.open` pendant l'initialisation. Par exemple : + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Ouvre une URL dans une nouvelle instance de `InAppBrowser`, l'instance de navigateur actuelle ou dans l'Explorateur du système. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **url** : l'URL à charger *(String)*. À encoder au préalable via `encodeURI()` si celle-ci contient des caractères Unicode. + +* **target** : la cible du chargement de l'URL, ce paramètre est optionnel, sa valeur par défaut est `_self`. *(String)* + + * `_self` : dirige le chargement vers la WebView Cordova si l'URL figure dans la liste blanche, sinon dans une fenêtre `InAppBrowser`. + * `_blank` : dirige le chargement vers une fenêtre `InAppBrowser`. + * `_system` : dirige le chargement vers le navigateur Web du système. + +* **options** : permet de personnaliser la fenêtre `InAppBrowser`. Paramètre facultatif dont la valeur par défaut est `location=yes`. *(String)* + + La chaîne `options` ne doit contenir aucun caractère vide, chaque paire nom/valeur représentant une fonctionnalité doit être séparée de la précédente par une virgule. Les noms de fonctionnalités sont sensibles à la casse. Toutes les plates-formes prennent en charge la valeur ci-dessous : + + * **location** : régler à `yes` ou `no` afin d'afficher ou masquer la barre d'adresse de la fenêtre `InAppBrowser`. + + Android uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + + iOS uniquement : + + * **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même. + * **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce. + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + * **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre + * **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre + * **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`) + * **enableViewportScale**: la valeur `yes` ou `no` pour empêcher la fenêtre de mise à l'échelle par une balise meta (par défaut,`no`). + * **mediaPlaybackRequiresUserAction**: la valeur `yes` ou `no` pour empêcher le HTML5 audio ou vidéo de la lecture automatique (par défaut,`no`). + * **allowInlineMediaPlayback**: la valeur `yes` ou `no` pour permettre la lecture du média en ligne HTML5, affichage dans la fenêtre du navigateur plutôt que d'une interface de lecture spécifique au périphérique. L'HTML `video` élément doit également inclure la `webkit-playsinline` attribut (par défaut,`no`) + * **keyboardDisplayRequiresUserAction**: la valeur `yes` ou `no` pour ouvrir le clavier lorsque les éléments reçoivent le focus par l'intermédiaire de JavaScript `focus()` appel (par défaut,`yes`). + * **suppressesIncrementalRendering**: la valeur `yes` ou `no` d'attendre que toutes les nouveautés de vue sont reçue avant d'être restitué (par défaut,`no`). + * **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation][1] (par défaut,`fullscreen`). + * **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition][2] (par défaut,`coververtical`). + * **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre. + + Windows uniquement : + + * **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS Quirks + +Comme plugin n'est pas appliquer n'importe quelle conception il est nécessaire d'ajouter quelques règles CSS si ouvert avec `target= _blank`. Les règles pourraient ressembler à ces + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +L'objet retourné par un appel à `cordova.InAppBrowser.open`. + +### Méthodes + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Ajoute un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **eventname** : l'évènement à écouter *(String)* + + * **loadstart** : évènement déclenché lorsque le chargement d'une URL débute dans la fenêtre `InAppBrowser`. + * **loadstop** : évènement déclenché lorsque la fenêtre `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **exit** : évènement déclenché lorsque la fenêtre `InAppBrowser` est fermée. + +* **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Propriétés de InAppBrowserEvent + +* **type** : le nom de l'évènement, soit `loadstart`, `loadstop`, `loaderror` ou `exit`. *(String)* + +* **url** : l'URL ayant été chargée. *(String)* + +* **code** : le code d'erreur, seulement pour `loaderror`. *(Number)* + +* **message** : un message d'erreur, seulement pour `loaderror`. *(String)* + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Supprime un écouteur pour un évènement de la fenêtre `InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref** : référence à la fenêtre `InAppBrowser`. *(InAppBrowser)* + +* **eventname** : l'évènement pour lequel arrêter l'écoute. *(String)* + + * **loadstart**: événement déclenche quand le `InAppBrowser` commence à charger une URL. + * **loadstop**: événement déclenche lorsque la `InAppBrowser` finit de charger une URL. + * **loaderror** : évènement déclenché si la fenêtre `InAppBrowser` rencontre une erreur lors du chargement d'une URL. + * **sortie**: événement déclenche quand le `InAppBrowser` fenêtre est fermée. + +* **callback** : la fonction à exécuter lorsque l'évènement se déclenche. Un objet `InAppBrowserEvent` lui est transmis comme paramètre. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Ferme la fenêtre `InAppBrowser`. + + ref.close(); + + +* **Réf**: référence à la `InAppBrowser` fenêtre *(InAppBrowser)* + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 et 8.1 +* Windows Phone 7 et 8 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Affiche une fenêtre InAppBrowser qui a été ouverte cachée. Appeler cette méthode n'a aucun effet si la fenêtre en question est déjà visible. + + ref.show(); + + +* **Réf**: référence à la fenêtre () InAppBrowser`InAppBrowser`) + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Injecte du code JavaScript dans la fenêtre `InAppBrowser` + + ref.executeScript(details, callback); + + +* **Réf**: référence à la `InAppBrowser` fenêtre. *(InAppBrowser)* + +* **injectDetails** : détails du script à exécuter, requérant une propriété `file` ou `code`. *(Object)* + + * **file** : URL du script à injecter. + * **code** : texte du script à injecter. + +* **callback** : une fonction exécutée après l'injection du code JavaScript. + + * Si le script injecté est de type `code`, un seul paramètre est transmis à la fonction callback, correspondant à la valeur de retour du script enveloppée dans un `Array`. Pour les scripts multilignes, il s'agit de la valeur renvoyée par la dernière instruction ou la dernière expression évaluée. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS +* Windows 8 et 8.1 + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Injecte des règles CSS dans la fenêtre `InAppBrowser`. + + ref.insertCSS(details, callback); + + +* **Réf**: référence à la `InAppBrowser` fenêtre *(InAppBrowser)* + +* **injectDetails**: Détails du script à exécuter, spécifiant soit un `file` ou `code` clés. *(Objet)* + + * **file** : URL de la feuille de style à injecter. + * **code** : contenu de la feuille de style à injecter. + +* **callback** : une fonction exécutée après l'injection du fichier CSS. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* iOS + +### Petit exemple + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/README.md new file mode 100644 index 0000000..4e06888 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open(): + + window.open = cordova.InAppBrowser.open; + + +La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema. + +La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto). + +Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito: + + delete window.open // Reverts the call back to it's prototype's default + + +Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installazione + + cordova plugin add cordova-plugin-inappbrowser + + +Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode. + + * **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)* + + * `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`. + * `_blank`: Apre il`InAppBrowser`. + * `_system`: Si apre nel browser web del sistema. + + * **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)* + + Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito: + + * **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off. + + Solo su Android: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **zoom**: impostare su `yes` per mostrare i controlli di zoom del browser Android, impostata su `no` per nasconderli. Valore predefinito è `yes`. + * **hardwareback**: impostare `yes` per utilizzare il pulsante Indietro hardware per spostarsi all'indietro tra il `InAppBrowser`di storia. Se esiste una pagina precedente, si chiuderà il `InAppBrowser` . Il valore predefinito è `yes`, quindi è necessario impostare a `no` , se si desidera che il pulsante indietro per chiudere semplicemente il InAppBrowser. + + solo iOS: + + * **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso. + * **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce. + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`) + * **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`). + * **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`). + * **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`) + * **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`). + * **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`). + * **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (default`fullscreen`). + * **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (default`coververtical`). + * **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra. + + Solo per Windows: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **fullscreen**: impostata su `yes` per creare il controllo browser senza un bordo attorno ad esso. Siete pregati di notare che se **location=no** viene specificato, non ci sarà nessun controllo presentato all'utente per chiudere la finestra IAB. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS stranezze + +Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Stranezze di Windows + +Simile al comportamento visivo finestra di Firefox OS IAB può essere sottoposto a override tramite `inAppBrowserWrap`/ classi CSS`inAppBrowserWrapFullscreen` + +### Stranezze browser + + * Plugin viene implementato tramite iframe, + + * Cronologia di navigazione (pulsanti`indietro` e `Avanti` in LocationBar) non è implementato. + +## InAppBrowser + +L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`. + +### Metodi + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> Aggiunge un listener per un evento dal`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **EventName**: l'evento per l'ascolto *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro. + +### Proprietà InAppBrowserEvent + + * **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)* + + * **URL**: l'URL che è stato caricato. *(String)* + + * **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)* + + * **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Stranezze browser + +eventi `onloadstart` e `loaderror` non sono stati licenziati. + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Rimuove un listener per un evento dal`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **EventName**: interrompere l'attesa per l'evento. *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + + * **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Chiude la `InAppBrowser` finestra. + + ref.close(); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * Firefox OS + * iOS + * Windows 8 e 8.1 + * Windows Phone 7 e 8 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile. + + ref.show(); + + + * **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`) + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inserisce il codice JavaScript nella `InAppBrowser` finestra + + ref.executeScript(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL dello script da iniettare. + * **codice**: testo dello script da iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato. + + * Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows 8 e 8.1 + * Browser + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Stranezze browser + + * è supportato solo il **code** chiave. + +### Stranezze di Windows + +A causa di [documenti MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) lo script richiamato può restituire solo i valori di stringa, altrimenti il parametro, passato al **callback** sarà `[null]`. + +## insertCSS + +> Inietta CSS nella `InAppBrowser` finestra. + + ref.insertCSS(details, callback); + + + * **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + + * **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL del foglio di stile per iniettare. + * **codice**: testo del foglio di stile per iniettare. + + * **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * iOS + * Windows + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/index.md new file mode 100644 index 0000000..7365462 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/it/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open(): + + window.open = cordova.InAppBrowser.open; + + +La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema. + +La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto). + +Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito: + + delete window.open // Reverts the call back to it's prototype's default + + +Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Installazione + + cordova plugin add cordova-plugin-inappbrowser + + +Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode. + +* **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)* + + * `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`. + * `_blank`: Apre il`InAppBrowser`. + * `_system`: Si apre nel browser web del sistema. + +* **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)* + + Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito: + + * **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off. + + Solo su Android: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + + solo iOS: + + * **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso. + * **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce. + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + * **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra + * **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra + * **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`) + * **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`). + * **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`). + * **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`) + * **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`). + * **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`). + * **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione][1] (default`fullscreen`). + * **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione][2] (default`coververtical`). + * **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra. + + Solo per Windows: + + * **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS stranezze + +Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`. + +### Metodi + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Aggiunge un listener per un evento dal`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +* **EventName**: l'evento per l'ascolto *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + +* **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro. + +### Proprietà InAppBrowserEvent + +* **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)* + +* **URL**: l'URL che è stato caricato. *(String)* + +* **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)* + +* **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)* + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Rimuove un listener per un evento dal`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **EventName**: interrompere l'attesa per l'evento. *(String)* + + * **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL. + * **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL. + * **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL. + * **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa. + +* **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Chiude la `InAppBrowser` finestra. + + ref.close(); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* Firefox OS +* iOS +* Windows 8 e 8.1 +* Windows Phone 7 e 8 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile. + + ref.show(); + + +* **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`) + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Inserisce il codice JavaScript nella `InAppBrowser` finestra + + ref.executeScript(details, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)* + +* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL dello script da iniettare. + * **codice**: testo dello script da iniettare. + +* **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato. + + * Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS +* Windows 8 e 8.1 + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Inietta CSS nella `InAppBrowser` finestra. + + ref.insertCSS(details, callback); + + +* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)* + +* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)* + + * **file**: URL del foglio di stile per iniettare. + * **codice**: testo del foglio di stile per iniettare. + +* **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* iOS + +### Esempio rapido + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/README.md new file mode 100644 index 0000000..40f631b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +このプラグインは `コルドバを呼び出すときに表示される web ブラウザーのビューを提供します。InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`コルドバ。InAppBrowser.open()` `window.open()` 関数との交換を定義する関数。 既存の `window.open()` 呼び出しは、window.open を置き換えることによって InAppBrowser ウィンドウを使用できます。 + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser ウィンドウは標準的な web ブラウザーのように動作し、コルドバ Api にアクセスできません。 この理由から、InAppBrowser お勧めする場合はメインのコルドバの webview を読み込むのではなくサード パーティ (信頼されていない) コンテンツをロードする必要があります。 InAppBrowser、ホワイト リストの対象ではないも、システムのブラウザーでリンクを開くです。 + +InAppBrowser を提供しますデフォルトで GUI コントロール (戻る、進む、行う)。 + +後方互換性、このプラグインは、また `window.open` をフックのため。 ただし、`window.open` のプラグイン インストール フックを持つことができます意図しない副作用 (特に場合は、このプラグインは別のプラグインの依存関係としてのみ含まれています)。 `window.open` のフックは、将来のメジャー リリースで削除されます。 プラグインから、フックが削除されるまでアプリはデフォルトの動作を手動で復元できます。 + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` はグローバル スコープでは、InAppBrowser は、`deviceready` イベントの後まで利用できません。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## インストール + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser を通過するアプリですべてのページの読み込みをする場合は初期化中に `window.open` を単にフックできます。たとえば。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +新しい `InAppBrowser` インスタンスを現在のブラウザー インスタンスまたはシステムのブラウザーで URL を開きます。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。 + + * **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)* + + * `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`. + * `_blank`: で開きます、`InAppBrowser`. + * `_system`: システムの web ブラウザーで開きます。 + + * **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)* + + `options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。 + + * **場所**: に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。 + + アンドロイドのみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **zoom**:`yes`Android ブラウザーのズーム コントロールの表示を`no`に設定すると、それらを非表示に設定します。 既定値は`yes`. + * **hardwareback**: `InAppBrowser`の履歴を後方に移動するのにハードウェアの戻るボタンを使用して`yes`に設定します。 前のページがない場合は、 `InAppBrowser`が終了します。 既定値は`はい`、ため場合は、単に、InAppBrowser を閉じる戻るボタン`なし`を設定する必要があります。 + + iOS のみ: + + * **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。 + * **disallowoverscroll**: に設定されている `yes` または `no` (既定値は `no` )。/UIWebViewBounce プロパティをオフにします。 + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **ツールバー**: に設定されている `yes` または `no` InAppBrowser (デフォルトのツールバーのオンまたはオフを有効にするには`yes`) + * **enableViewportScale**: に設定されている `yes` または `no` を (デフォルトではメタタグを介してスケーリング ビューポートを防ぐために`no`). + * **mediaPlaybackRequiresUserAction**: に設定されている `yes` または `no` を HTML5 オーディオまたはビデオを自動再生 (初期設定から防ぐために`no`). + * **allowInlineMediaPlayback**: に設定されている `yes` または `no` ラインで HTML5 メディア再生には、デバイス固有再生インターフェイスではなく、ブラウザー ウィンドウ内に表示するようにします。 HTML の `video` 要素を含める必要がありますまた、 `webkit-playsinline` 属性 (デフォルトは`no`) + * **keyboardDisplayRequiresUserAction**: に設定されている `yes` または `no` をフォーム要素の JavaScript を介してフォーカスを受け取るときに、キーボードを開く `focus()` コール (デフォルトは`yes`). + * **suppressesIncrementalRendering**: に設定されている `yes` または `no` (デフォルトでは表示される前にビューのすべての新しいコンテンツを受信するまで待機するには`no`). + * **presentationstyle**: に設定されている `pagesheet` 、 `formsheet` または `fullscreen` (デフォルトでは、[プレゼンテーション スタイル](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)を設定するには`fullscreen`). + * **transitionstyle**: に設定されている `fliphorizontal` 、 `crossdissolve` または `coververtical` (デフォルトでは、[トランジションのスタイル](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)を設定するには`coververtical`). + * **toolbarposition**: に設定されている `top` または `bottom` (既定値は `bottom` )。上部またはウィンドウの下部にツールバーが発生します。 + + Windows のみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **fullscreen**: 周りに境界線なしブラウザー コントロールを作成する`[yes]`に設定します。 その場合に注意してください**location=no**指定また、IAB ウィンドウを閉じるためにユーザーに提示はコントロールされます。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * ブラックベリー 10 + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS 癖 + +開かれた場合にいくつかの CSS ルールを追加する必要があるプラグインは任意のデザインを適用しないと `target ='_blank'`。これらのような規則になります。 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows の癖 + +`InAppBrowserWrap`経由で Firefox OS IAB ウィンドウの視覚的動作に似ていますをオーバーライドできます/`inAppBrowserWrapFullscreen` CSS クラス + +### ブラウザーの癖 + + * Iframe を介してプラグインを実装します。 + + * ナビゲーション履歴 (LocationBar の`進む`と`戻る`ボタン) は実装されていません。 + +## InAppBrowser + +`コルドバへの呼び出しから返されるオブジェクト。InAppBrowser.open`. + +### メソッド + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> イベントのリスナーを追加します、`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **eventname**: *(文字列)*をリッスンするイベント + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。 + +### InAppBrowserEvent プロパティ + + * **タイプ**: eventname どちらか `loadstart` 、 `loadstop` 、 `loaderror` 、または `exit` 。*(文字列)* + + * **url**: URL が読み込まれました。*(文字列)* + + * **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)* + + * **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### ブラウザーの癖 + +`loadstart` `loaderror`イベントが発生していません。 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> イベントのリスナーを削除します、`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **eventname**: イベントのリッスンを停止します。*(文字列)* + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + + * **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 閉じる、 `InAppBrowser` ウィンドウ。 + + ref.close(); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * Firefox の OS + * iOS + * Windows 8 および 8.1 + * Windows Phone 7 と 8 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。 + + ref.show(); + + + * **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`) + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ + + ref.executeScript(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: スクリプトの URL を注入します。 + * **コード**: スクリプトのテキストを挿入します。 + + * **コールバック**: JavaScript コードを注入した後に実行される関数。 + + * 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows 8 および 8.1 + * ブラウザー + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### ブラウザーの癖 + + * **code**キーのみをサポートします。 + +### Windows の癖 + +[MSDN ドキュメント](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)のため呼び出されたスクリプト パラメーターを返す文字列値のみそれ以外の場合は、**コールバック**に渡される`[null]`になります. + +## insertCSS + +> CSS に注入する、 `InAppBrowser` ウィンドウ。 + + ref.insertCSS(details, callback); + + + * **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + + * **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: 注入するスタイル シートの URL。 + * **コード**: 注入するスタイル シートのテキスト。 + + * **コールバック**: CSS の注入後に実行される関数。 + +### サポートされているプラットフォーム + + * アマゾン火 OS + * アンドロイド + * iOS + * Windows + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/index.md new file mode 100644 index 0000000..a1b6854 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ja/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +このプラグインは `コルドバを呼び出すときに表示される web ブラウザーのビューを提供します。InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`コルドバ。InAppBrowser.open()` `window.open()` 関数との交換を定義する関数。 既存の `window.open()` 呼び出しは、window.open を置き換えることによって InAppBrowser ウィンドウを使用できます。 + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser ウィンドウは標準的な web ブラウザーのように動作し、コルドバ Api にアクセスできません。 この理由から、InAppBrowser お勧めする場合はメインのコルドバの webview を読み込むのではなくサード パーティ (信頼されていない) コンテンツをロードする必要があります。 InAppBrowser、ホワイト リストの対象ではないも、システムのブラウザーでリンクを開くです。 + +InAppBrowser を提供しますデフォルトで GUI コントロール (戻る、進む、行う)。 + +後方互換性、このプラグインは、また `window.open` をフックのため。 ただし、`window.open` のプラグイン インストール フックを持つことができます意図しない副作用 (特に場合は、このプラグインは別のプラグインの依存関係としてのみ含まれています)。 `window.open` のフックは、将来のメジャー リリースで削除されます。 プラグインから、フックが削除されるまでアプリはデフォルトの動作を手動で復元できます。 + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` はグローバル スコープでは、InAppBrowser は、`deviceready` イベントの後まで利用できません。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## インストール + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser を通過するアプリですべてのページの読み込みをする場合は初期化中に `window.open` を単にフックできます。たとえば。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +新しい `InAppBrowser` インスタンスを現在のブラウザー インスタンスまたはシステムのブラウザーで URL を開きます。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。 + +* **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)* + + * `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`. + * `_blank`: で開きます、`InAppBrowser`. + * `_system`: システムの web ブラウザーで開きます。 + +* **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)* + + `options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。 + + * **場所**: に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。 + + アンドロイドのみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + + iOS のみ: + + * **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。 + * **disallowoverscroll**: に設定されている `yes` または `no` (既定値は `no` )。/UIWebViewBounce プロパティをオフにします。 + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + * **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に + * **clearsessioncache**: に設定されている `yes` はセッション cookie のキャッシュをオフにすると、新しいウィンドウが開く前に + * **ツールバー**: に設定されている `yes` または `no` InAppBrowser (デフォルトのツールバーのオンまたはオフを有効にするには`yes`) + * **enableViewportScale**: に設定されている `yes` または `no` を (デフォルトではメタタグを介してスケーリング ビューポートを防ぐために`no`). + * **mediaPlaybackRequiresUserAction**: に設定されている `yes` または `no` を HTML5 オーディオまたはビデオを自動再生 (初期設定から防ぐために`no`). + * **allowInlineMediaPlayback**: に設定されている `yes` または `no` ラインで HTML5 メディア再生には、デバイス固有再生インターフェイスではなく、ブラウザー ウィンドウ内に表示するようにします。 HTML の `video` 要素を含める必要がありますまた、 `webkit-playsinline` 属性 (デフォルトは`no`) + * **keyboardDisplayRequiresUserAction**: に設定されている `yes` または `no` をフォーム要素の JavaScript を介してフォーカスを受け取るときに、キーボードを開く `focus()` コール (デフォルトは`yes`). + * **suppressesIncrementalRendering**: に設定されている `yes` または `no` (デフォルトでは表示される前にビューのすべての新しいコンテンツを受信するまで待機するには`no`). + * **presentationstyle**: に設定されている `pagesheet` 、 `formsheet` または `fullscreen` (デフォルトでは、[プレゼンテーション スタイル][1]を設定するには`fullscreen`). + * **transitionstyle**: に設定されている `fliphorizontal` 、 `crossdissolve` または `coververtical` (デフォルトでは、[トランジションのスタイル][2]を設定するには`coververtical`). + * **toolbarposition**: に設定されている `top` または `bottom` (既定値は `bottom` )。上部またはウィンドウの下部にツールバーが発生します。 + + Windows のみ: + + * **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常読み込みブラウザーを持っています。 + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* Firefox の OS +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS 癖 + +開かれた場合にいくつかの CSS ルールを追加する必要があるプラグインは任意のデザインを適用しないと `target ='_blank'`。これらのような規則になります。 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +`コルドバへの呼び出しから返されるオブジェクト。InAppBrowser.open`. + +### メソッド + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> イベントのリスナーを追加します、`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +* **eventname**: *(文字列)*をリッスンするイベント + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + +* **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。 + +### InAppBrowserEvent プロパティ + +* **タイプ**: eventname どちらか `loadstart` 、 `loadstop` 、 `loaderror` 、または `exit` 。*(文字列)* + +* **url**: URL が読み込まれました。*(文字列)* + +* **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)* + +* **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)* + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> イベントのリスナーを削除します、`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **eventname**: イベントのリッスンを停止します。*(文字列)* + + * ****: イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。 + * **loadstop**: イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。 + * **loaderror**: イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。 + * **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。 + +* **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 閉じる、 `InAppBrowser` ウィンドウ。 + + ref.close(); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* Firefox の OS +* iOS +* Windows 8 および 8.1 +* Windows Phone 7 と 8 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。 + + ref.show(); + + +* **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`) + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ + + ref.executeScript(details, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)* + +* **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: スクリプトの URL を注入します。 + * **コード**: スクリプトのテキストを挿入します。 + +* **コールバック**: JavaScript コードを注入した後に実行される関数。 + + * 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS +* Windows 8 および 8.1 + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> CSS に注入する、 `InAppBrowser` ウィンドウ。 + + ref.insertCSS(details, callback); + + +* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)* + +* **injectDetails**: 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)* + + * **ファイル**: 注入するスタイル シートの URL。 + * **コード**: 注入するスタイル シートのテキスト。 + +* **コールバック**: CSS の注入後に実行される関数。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* iOS + +### 簡単な例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/README.md new file mode 100644 index 0000000..13511ad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +이 플러그인 `코르도바를 호출할 때 표시 하는 웹 브라우저 보기를 제공 합니다.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`코르도바입니다.InAppBrowser.open()` 함수 `window.open ()` 함수에 대 한 대체품 정의 됩니다. 기존의 `window.open ()` 호출 window.open을 대체 하 여 InAppBrowser 윈도우를 사용할 수 있습니다. + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 창 표준 웹 브라우저 처럼 동작 및 코르도바 Api에 액세스할 수 없습니다. 이 이유는 InAppBrowser는 것이 좋습니다는 주요 코르도바 webview로 로드 하는 대신 제 3 자 (신뢰할 수 없는) 콘텐츠를 로드 해야 할 경우. InAppBrowser는 허용 될 수도 시스템 브라우저에서 링크를 여는. + +사용자에 대 한 자체 GUI 컨트롤에서 기본적으로 제공 된 InAppBrowser (뒤로, 앞으로, 완료). + +대 한 뒤 호환성,이 플러그인도 `window.open` 후크. 그러나, `window.open`의 플러그인 설치 후크를 가질 수 있습니다 의도 하지 않은 부작용 (특히 경우이 플러그인이 다른 플러그인 종속성 으로만 포함). `window.open` 후크 주요 릴리스에서 제거 됩니다. 후크 플러그인에서 제거 될 때까지 애플 리 케이 션 수 있습니다 수동으로 기본 동작을 복원 하 게 됩니다. + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` 전역 범위에 있지만 InAppBrowser 제공 되지 않습니다 때까지 `deviceready` 이벤트 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 설치 + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser를 통해가 서 당신의 애플 리 케이 션에서 모든 페이지를 로드 하려는 경우 초기화 하는 동안 `window.open` 간단 하 게 연결할 수 있습니다. 예를 들어: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +새 `InAppBrowser` 인스턴스, 현재 브라우저 인스턴스 또는 시스템 브라우저에서 URL을 엽니다. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **url**: *(문자열)를*로드 하는 URL. 전화 `encodeURI()` 이 경우에는 URL 유니코드 문자를 포함 합니다. + + * **대상**: 대상 URL, 기본적으로 선택적 매개 변수를 로드 하는 `_self` . *(문자열)* + + * `_self`: URL 화이트 리스트에 있으면 코르도바 WebView에서 열리고, 그렇지 않으면 열에`InAppBrowser`. + * `_blank`: 준공에`InAppBrowser`. + * `_system`: 시스템의 웹 브라우저에서 엽니다. + + * **옵션**: 옵션은 `InAppBrowser` . 선택적, 디폴트에: `location=yes` . *(문자열)* + + `options`문자열 텅 빈 어떤 스페이스 포함 해서는 안 그리고 쉼표 각 기능의 이름/값 쌍을 구분 합니다. 기능 이름은 대/소문자입니다. 모든 플랫폼 지원 아래 값: + + * **위치**: 설정 `yes` 또는 `no` 설정 하는 `InAppBrowser` 의 위치 표시줄 켜거나 끕니다. + + 안 드 로이드만: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **zoom/축소**: `네` 안 드 로이드 브라우저의 확대/축소 컨트롤을 표시, 그들을 숨길 수 `없는` 로 설정으로 설정. 기본값은 `네`. + * **hardwareback**: 하드웨어 뒤로 버튼을 사용 하 여 `InAppBrowser`의 역사를 통해 뒤로 이동 하려면 `예` 로 설정. 이전 페이지 없음이 있는 경우에, `InAppBrowser` 닫힙니다. 기본 값 이므로 `yes`, 뒤로 버튼을 간단 하 게는 InAppBrowser를 하려면 `no` 로 설정 해야 합니다. + + iOS만: + + * **closebuttoncaption**: **수행** 하는 단추의 캡션으로 사용할 문자열을 설정 합니다. 참고 직접이 값을 지역화 해야 합니다. + * **disallowoverscroll**: 설정 `yes` 또는 `no` (기본값은 `no` ). 회전 온/오프 UIWebViewBounce 속성입니다. + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **도구 모음**: 설정 `yes` 또는 `no` InAppBrowser (기본값:에 대 한 도구 모음 온 / 오프를 돌기 위하여`yes`) + * **enableViewportScale**: 설정 `yes` 또는 `no` 뷰포트 메타 태그 (기본값:를 통해 확장을 방지 하기 위해`no`). + * **mediaPlaybackRequiresUserAction**: 설정 `yes` 또는 `no` HTML5 오디오 또는 비디오 자동 재생 (기본값에서에서 방지 하기 위해`no`). + * **allowInlineMediaPlayback**: 설정 `yes` 또는 `no` 인라인 HTML5 미디어 재생, 장치 전용 재생 인터페이스 보다는 브라우저 창 내에서 표시할 수 있도록 합니다. HTML의 `video` 요소가 포함 되어야 합니다는 `webkit-playsinline` 특성 (기본값:`no`) + * **keyboardDisplayRequiresUserAction**: 설정 `yes` 또는 `no` 양식 요소는 자바 스크립트를 통해 포커스를 받을 때 키보드를 열고 `focus()` 전화 (기본값:`yes`). + * **suppressesIncrementalRendering**: 설정 `yes` 또는 `no` (기본값을 렌더링 하기 전에 모든 새로운 보기 콘텐츠를 받을 때까지 기다려야`no`). + * **presentationstyle**: 설정 `pagesheet` , `formsheet` 또는 `fullscreen` [프레 젠 테이 션 스타일](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (기본값을 설정 하려면`fullscreen`). + * **transitionstyle**: 설정 `fliphorizontal` , `crossdissolve` 또는 `coververtical` [전환 스타일](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (기본값을 설정 하려면`coververtical`). + * **toolbarposition**: 설정 `top` 또는 `bottom` (기본값은 `bottom` ). 위쪽 또는 아래쪽 창에 도구 모음을 발생 합니다. + + Windows에만 해당: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **fullscreen**: 주위 테두리 없이 브라우저 컨트롤을 만드는 `yes` 를 설정. 참고로 만약 **location=no** 지정, 통제 내 사 창 닫기를 사용자에 게 표시 될 것입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * 블랙베리 10 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 예를 들어 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 파이어 폭스 OS 단점 + +플러그인 어떤 디자인을 적용 하지 않는 경우 열 일부 CSS의 규칙을 추가할 필요가 있다 `target='_blank'`. 이 같이 규칙 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### 윈도우 특수 + +파이어 폭스 OS 내 사 창 시각적 행동 비슷한 `inAppBrowserWrap`통해 재정의할 수 /`inAppBrowserWrapFullscreen` CSS 클래스 + +### 브라우저 만지면 + + * 플러그인은 iframe을 통해 구현 + + * 탐색 기록 (LocationBar에서`뒤로` 및 `앞으로` 단추)은 구현 되지 않습니다. + +## InAppBrowser + +`Cordova에 대 한 호출에서 반환 하는 개체.InAppBrowser.open`. + +### 메서드 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 이벤트에 대 한 수신기를 추가 합니다`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **eventname**: *(문자열)를* 수신 하도록 이벤트 + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL을 로드할 때 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 될 때 실행 되는 함수. 함수는 전달 된 `InAppBrowserEvent` 개체를 매개 변수로 합니다. + +### InAppBrowserEvent 속성 + + * **유형**: eventname, 중 `loadstart` , `loadstop` , `loaderror` , 또는 `exit` . *(문자열)* + + * **url**: URL 로드 된. *(문자열)* + + * **코드**: 오류 코드의 경우에만 `loaderror` . *(수)* + + * **메시지**: 오류 메시지의 경우에만 `loaderror` . *(문자열)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 브라우저 만지면 + +`loadstart` 및 `loaderror` 이벤트 해 고는 되 고. + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 이벤트에 대 한 수신기를 제거 합니다`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **eventname**: 이벤트 수신 대기를 중지 합니다. *(문자열)* + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL 로드 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + + * **콜백**: 이벤트가 발생 하면 실행할 함수. 함수는 전달 된 `InAppBrowserEvent` 개체. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 종료는 `InAppBrowser` 창. + + ref.close(); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * Firefox 운영 체제 + * iOS + * 윈도우 8과 8.1 + * Windows Phone 7과 8 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 숨겨진 열은 한 InAppBrowser 창을 표시 합니다. 전화는 InAppBrowser가 이미 보이는 경우는 효과가 없습니다. + + ref.show(); + + + * **ref**: InAppBrowser 창 (참조`InAppBrowser`) + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 에 자바 스크립트 코드를 삽입는 `InAppBrowser` 창 + + ref.executeScript(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스크립트의 URL. + * **코드**: 스크립트 텍스트를 삽입 합니다. + + * **콜백**: 자바 스크립트 코드를 주입 후 실행 기능. + + * 삽입 된 스크립트 유형의 경우 `code` , 스크립트의 반환 값은 단일 매개 변수는 콜백 실행에 싸여 있는 `Array` . 여러 줄 스크립트에 대 한 마지막 문 또는 평가 마지막 식의 반환 값입니다. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 8과 8.1 + * 브라우저 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 브라우저 만지면 + + * **code** 키만 지원 됩니다. + +### 윈도우 특수 + +[MSDN 문서](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) 인해 호출된 스크립트 반환할 수 있습니다 문자열 값만 그렇지 않으면 매개 변수, **콜백** 전달 `[null]` 될 것입니다.. + +## insertCSS + +> 주사로 CSS는 `InAppBrowser` 창. + + ref.insertCSS(details, callback); + + + * **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + + * **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스타일 시트의 URL. + * **코드**: 삽입 하는 스타일 시트의 텍스트. + + * **콜백**: CSS 주입 후 실행 기능. + +### 지원 되는 플랫폼 + + * 아마존 화재 운영 체제 + * 안 드 로이드 + * iOS + * 윈도우 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/index.md new file mode 100644 index 0000000..d1b3ddb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ko/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +이 플러그인 `코르도바를 호출할 때 표시 하는 웹 브라우저 보기를 제공 합니다.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`코르도바입니다.InAppBrowser.open()` 함수 `window.open ()` 함수에 대 한 대체품 정의 됩니다. 기존의 `window.open ()` 호출 window.open을 대체 하 여 InAppBrowser 윈도우를 사용할 수 있습니다. + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 창 표준 웹 브라우저 처럼 동작 및 코르도바 Api에 액세스할 수 없습니다. 이 이유는 InAppBrowser는 것이 좋습니다는 주요 코르도바 webview로 로드 하는 대신 제 3 자 (신뢰할 수 없는) 콘텐츠를 로드 해야 할 경우. InAppBrowser는 허용 될 수도 시스템 브라우저에서 링크를 여는. + +사용자에 대 한 자체 GUI 컨트롤에서 기본적으로 제공 된 InAppBrowser (뒤로, 앞으로, 완료). + +대 한 뒤 호환성,이 플러그인도 `window.open` 후크. 그러나, `window.open`의 플러그인 설치 후크를 가질 수 있습니다 의도 하지 않은 부작용 (특히 경우이 플러그인이 다른 플러그인 종속성 으로만 포함). `window.open` 후크 주요 릴리스에서 제거 됩니다. 후크 플러그인에서 제거 될 때까지 애플 리 케이 션 수 있습니다 수동으로 기본 동작을 복원 하 게 됩니다. + + delete window.open // Reverts the call back to it's prototype's default + + +`window.open` 전역 범위에 있지만 InAppBrowser 제공 되지 않습니다 때까지 `deviceready` 이벤트 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 설치 + + cordova plugin add cordova-plugin-inappbrowser + + +InAppBrowser를 통해가 서 당신의 애플 리 케이 션에서 모든 페이지를 로드 하려는 경우 초기화 하는 동안 `window.open` 간단 하 게 연결할 수 있습니다. 예를 들어: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +새 `InAppBrowser` 인스턴스, 현재 브라우저 인스턴스 또는 시스템 브라우저에서 URL을 엽니다. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **url**: *(문자열)를*로드 하는 URL. 전화 `encodeURI()` 이 경우에는 URL 유니코드 문자를 포함 합니다. + +* **대상**: 대상 URL, 기본적으로 선택적 매개 변수를 로드 하는 `_self` . *(문자열)* + + * `_self`: URL 화이트 리스트에 있으면 코르도바 WebView에서 열리고, 그렇지 않으면 열에`InAppBrowser`. + * `_blank`: 준공에`InAppBrowser`. + * `_system`: 시스템의 웹 브라우저에서 엽니다. + +* **옵션**: 옵션은 `InAppBrowser` . 선택적, 디폴트에: `location=yes` . *(문자열)* + + `options`문자열 텅 빈 어떤 스페이스 포함 해서는 안 그리고 쉼표 각 기능의 이름/값 쌍을 구분 합니다. 기능 이름은 대/소문자입니다. 모든 플랫폼 지원 아래 값: + + * **위치**: 설정 `yes` 또는 `no` 설정 하는 `InAppBrowser` 의 위치 표시줄 켜거나 끕니다. + + 안 드 로이드만: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + + iOS만: + + * **closebuttoncaption**: **수행** 하는 단추의 캡션으로 사용할 문자열을 설정 합니다. 참고 직접이 값을 지역화 해야 합니다. + * **disallowoverscroll**: 설정 `yes` 또는 `no` (기본값은 `no` ). 회전 온/오프 UIWebViewBounce 속성입니다. + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + * **clearcache**: 설정 `yes` 브라우저를 쿠키 캐시 삭제 하기 전에 새 창이 열립니다 + * **clearsessioncache**: 설정 `yes` 세션 쿠키 캐시를 삭제 하기 전에 새 창이 열립니다 + * **도구 모음**: 설정 `yes` 또는 `no` InAppBrowser (기본값:에 대 한 도구 모음 온 / 오프를 돌기 위하여`yes`) + * **enableViewportScale**: 설정 `yes` 또는 `no` 뷰포트 메타 태그 (기본값:를 통해 확장을 방지 하기 위해`no`). + * **mediaPlaybackRequiresUserAction**: 설정 `yes` 또는 `no` HTML5 오디오 또는 비디오 자동 재생 (기본값에서에서 방지 하기 위해`no`). + * **allowInlineMediaPlayback**: 설정 `yes` 또는 `no` 인라인 HTML5 미디어 재생, 장치 전용 재생 인터페이스 보다는 브라우저 창 내에서 표시할 수 있도록 합니다. HTML의 `video` 요소가 포함 되어야 합니다는 `webkit-playsinline` 특성 (기본값:`no`) + * **keyboardDisplayRequiresUserAction**: 설정 `yes` 또는 `no` 양식 요소는 자바 스크립트를 통해 포커스를 받을 때 키보드를 열고 `focus()` 전화 (기본값:`yes`). + * **suppressesIncrementalRendering**: 설정 `yes` 또는 `no` (기본값을 렌더링 하기 전에 모든 새로운 보기 콘텐츠를 받을 때까지 기다려야`no`). + * **presentationstyle**: 설정 `pagesheet` , `formsheet` 또는 `fullscreen` [프레 젠 테이 션 스타일][1] (기본값을 설정 하려면`fullscreen`). + * **transitionstyle**: 설정 `fliphorizontal` , `crossdissolve` 또는 `coververtical` [전환 스타일][2] (기본값을 설정 하려면`coververtical`). + * **toolbarposition**: 설정 `top` 또는 `bottom` (기본값은 `bottom` ). 위쪽 또는 아래쪽 창에 도구 모음을 발생 합니다. + + Windows에만 해당: + + * **숨겨진**: 설정 `yes` 브라우저를 만들 페이지를 로드 하면, 하지만 그것을 보여주지. Loadstop 이벤트는 로드가 완료 되 면 발생 합니다. 생략 하거나 설정 `no` (기본값) 브라우저 열고 정상적으로 로드 해야 합니다. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* Firefox 운영 체제 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 예를 들어 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 파이어 폭스 OS 단점 + +플러그인 어떤 디자인을 적용 하지 않는 경우 열 일부 CSS의 규칙을 추가할 필요가 있다 `target='_blank'`. 이 같이 규칙 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +`Cordova에 대 한 호출에서 반환 하는 개체.InAppBrowser.open`. + +### 메서드 + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> 이벤트에 대 한 수신기를 추가 합니다`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +* **eventname**: *(문자열)를* 수신 하도록 이벤트 + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL을 로드할 때 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + +* **콜백**: 이벤트가 발생 될 때 실행 되는 함수. 함수는 전달 된 `InAppBrowserEvent` 개체를 매개 변수로 합니다. + +### InAppBrowserEvent 속성 + +* **유형**: eventname, 중 `loadstart` , `loadstop` , `loaderror` , 또는 `exit` . *(문자열)* + +* **url**: URL 로드 된. *(문자열)* + +* **코드**: 오류 코드의 경우에만 `loaderror` . *(수)* + +* **메시지**: 오류 메시지의 경우에만 `loaderror` . *(문자열)* + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 이벤트에 대 한 수신기를 제거 합니다`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **eventname**: 이벤트 수신 대기를 중지 합니다. *(문자열)* + + * **loadstart**: 이벤트 발생 때는 `InAppBrowser` URL 로드를 시작 합니다. + * **loadstop**: 이벤트가 발생 시기는 `InAppBrowser` URL 로드 완료. + * **loaderror**: 이벤트 발생 때는 `InAppBrowser` URL 로드 오류가 발생 합니다. + * **종료**: 이벤트가 발생 시기는 `InAppBrowser` 창이 닫힙니다. + +* **콜백**: 이벤트가 발생 하면 실행할 함수. 함수는 전달 된 `InAppBrowserEvent` 개체. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 종료는 `InAppBrowser` 창. + + ref.close(); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* Firefox 운영 체제 +* iOS +* 윈도우 8과 8.1 +* Windows Phone 7과 8 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 숨겨진 열은 한 InAppBrowser 창을 표시 합니다. 전화는 InAppBrowser가 이미 보이는 경우는 효과가 없습니다. + + ref.show(); + + +* **ref**: InAppBrowser 창 (참조`InAppBrowser`) + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 에 자바 스크립트 코드를 삽입는 `InAppBrowser` 창 + + ref.executeScript(details, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창. *(InAppBrowser)* + +* **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스크립트의 URL. + * **코드**: 스크립트 텍스트를 삽입 합니다. + +* **콜백**: 자바 스크립트 코드를 주입 후 실행 기능. + + * 삽입 된 스크립트 유형의 경우 `code` , 스크립트의 반환 값은 단일 매개 변수는 콜백 실행에 싸여 있는 `Array` . 여러 줄 스크립트에 대 한 마지막 문 또는 평가 마지막 식의 반환 값입니다. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS +* 윈도우 8과 8.1 + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> 주사로 CSS는 `InAppBrowser` 창. + + ref.insertCSS(details, callback); + + +* **심판**:에 대 한 참조는 `InAppBrowser` 창 *(InAppBrowser)* + +* **injectDetails**: 스크립트 실행의 세부 사항 중 하나를 지정 하는 `file` 또는 `code` 키. *(개체)* + + * **파일**: 삽입 하는 스타일 시트의 URL. + * **코드**: 삽입 하는 스타일 시트의 텍스트. + +* **콜백**: CSS 주입 후 실행 기능. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* iOS + +### 빠른 예제 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/README.md new file mode 100644 index 0000000..5ff58ad --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +Plugin daje widok przeglądarki sieci web, które są wyświetlane podczas wywoływania `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` funkcja jest definiowana jako zamiennik dla funkcji `window.open()`. Istniejące wywołania `window.open()` służy okno InAppBrowser, zastępując window.open: + + window.open = cordova.InAppBrowser.open; + + +Okna InAppBrowser zachowuje się jak standardowe przeglądarki i nie ma dostępu do API Cordova. Z tego powodu zaleca się InAppBrowser jeśli ty potrzebować wobec ciężar (niezaufanej) treści osób trzecich, a nie że wczytywanie głównym webview Cordova. InAppBrowser nie jest biała, ani nie jest otwieranie linków w przeglądarce systemu. + +InAppBrowser zawiera domyślnie kontrole GUI dla użytkownika (tył, przód, zrobić). + +Do tyłu zgodności, ten plugin również haki `window.open`. Jednak może mieć zainstalowane wtyczki haka `window.open` niezamierzone skutki uboczne (zwłaszcza, jeśli ten plugin jest włączone tylko jako część innej wtyczki). Hak `window.open` zostaną usunięte w przyszłej wersji głównych. Dopóki hak jest usuwany z wtyczki, aplikacje można ręcznie przywrócić domyślne zachowanie: + + delete window.open // Reverts the call back to it's prototype's default + + +Chociaż `window.open` w globalnym zasięgu, InAppBrowser nie jest dostępne dopiero po zdarzeniu `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalacja + + cordova plugin add cordova-plugin-inappbrowser + + +Jeśli chcesz wszystko stronica ładunki w swojej aplikacji, aby przejść przez InAppBrowser, można po prostu podłączyć `window.open` podczas inicjowania. Na przykład: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Otwiera URL w nowe wystąpienie `InAppBrowser`, bieżące wystąpienie przeglądarki lub przeglądarki systemu. + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **adres**: adres URL do ładowania *(ciąg)*. Wywołanie `encodeURI()` na to, czy adres URL zawiera znaki Unicode. + + * **miejsce docelowe**: miejsce docelowe, w którym wobec ciężar ten URL parametr opcjonalny, który domyślnie `_self` . *(String)* + + * `_self`: Otwiera w Cordova WebView, jeśli adres URL jest na białej liście, inaczej ono otwiera w`InAppBrowser`. + * `_blank`: Otwiera w`InAppBrowser`. + * `_system`: Otwiera w przeglądarce internetowej systemu. + + * **Opcje**: opcje dla `InAppBrowser` . Opcjonalnie, nie stawiła się: `location=yes` . *(String)* + + `options`Ciąg nie może zawierać żadnych spacji, i pary nazwa/wartość każdej funkcji muszą być oddzielone przecinkami. Nazwy funkcji jest rozróżniana. Wszystkich platform obsługuje wartości poniżej: + + * **Lokalizacja**: zestaw `yes` lub `no` Aby włączyć `InAppBrowser` na pasek lub wyłączyć. + + Android: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **zoom**: `yes` aby pokazać formantami powiększania Android przeglądarka, ustawiona na `nie` aby je ukryć. Wartość domyślna to `tak`. + * **hardwareback**: zestaw do `yes` , aby użyć przycisk Wstecz sprzętu do nawigacji wstecz historii `InAppBrowser`. Jeśli nie ma żadnej poprzedniej strony, `InAppBrowser` zostanie zamknięta. Wartością domyślną jest `yes`, więc należy ustawić ją na `no` jeśli chcesz przycisk Wstecz, aby po prostu zamknąć InAppBrowser. + + tylko iOS: + + * **closebuttoncaption**: aby użyć jak **zrobić** przycisk Podpis ustawiona na ciąg. Należy pamiętać, że trzeba zlokalizować tę wartość siebie. + * **disallowoverscroll**: zestaw `yes` lub `no` (domyślnie `no` ). Włącza/wyłącza właściwość UIWebViewBounce. + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **pasek narzędzi**: zestaw `yes` lub `no` Aby włączyć pasek narzędzi lub wyłączyć dla InAppBrowser (domyślnie`yes`) + * **enableViewportScale**: zestaw `yes` lub `no` Aby zapobiec rzutni skalowanie za pomocą tagu meta (domyślnie`no`). + * **mediaPlaybackRequiresUserAction**: zestaw `yes` lub `no` Aby zapobiec HTML5 audio lub wideo z Autoodtwarzanie (domyślnie`no`). + * **allowInlineMediaPlayback**: zestaw `yes` lub `no` Aby w linii HTML5 odtwarzanie, wyświetlanie w oknie przeglądarki, a nie interfejs odtwarzanie specyficzne dla urządzenia. HTML `video` również musi zawierać element `webkit-playsinline` atrybut (domyślnie`no`) + * **keyboardDisplayRequiresUserAction**: zestaw `yes` lub `no` Aby otworzyć klawiaturę ekranową, gdy elementy formularza ostrości za pomocą JavaScript `focus()` połączenia (domyślnie`yes`). + * **suppressesIncrementalRendering**: zestaw `yes` lub `no` czekać, aż wszystkie nowe widok zawartości jest otrzymane przed renderowany (domyślnie`no`). + * **presentationstyle**: zestaw `pagesheet` , `formsheet` lub `fullscreen` Aby ustawić [styl prezentacji](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (domyślnie`fullscreen`). + * **transitionstyle**: zestaw `fliphorizontal` , `crossdissolve` lub `coververtical` Aby ustawić [styl przejścia](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (domyślnie`coververtical`). + * **toolbarposition**: zestaw `top` lub `bottom` (domyślnie `bottom` ). Powoduje, że pasek ma być na górze lub na dole okna. + + Windows tylko: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **fullscreen**: zestaw do `yes` , aby utworzyć formant przeglądarki bez obramowania wokół niego. Należy pamiętać, że jeśli **location=no** również jest określony, nie będzie żadnej kontroli przedstawione do użytkownika, aby zamknąć okno IAB. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS dziwactwa + +Jak plugin nie wymuszać każdy projekt to trzeba dodać pewne reguły CSS jeśli otwarty z `target = "_blank"`. Zasady może wyglądać jak te + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows dziwactwa + +Podobne do Firefox OS IAB okno wizualne zachowanie może być zastąpiona przez `inAppBrowserWrap`/`inAppBrowserWrapFullscreen` klas CSS + +### Quirks przeglądarki + + * Plugin jest realizowane za pośrednictwem iframe, + + * Historia nawigacji (przyciski`wstecz` i `do przodu` w LocationBar) nie jest zaimplementowana. + +## InAppBrowser + +Obiekt zwrócony z wywołania `cordova.InAppBrowser.open`. + +### Metody + + * metody addEventListener + * removeEventListener + * Zamknij + * Pokaż + * executeScript + * insertCSS + +## metody addEventListener + +> Dodaje detektor zdarzenia z`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **EventName**: zdarzenie słuchać *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd podczas ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja, która wykonuje, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu jako parametr. + +### Właściwości InAppBrowserEvent + + * **Typ**: eventname, albo `loadstart` , `loadstop` , `loaderror` , lub `exit` . *(String)* + + * **adres**: adres URL, który został załadowany. *(String)* + + * **Kod**: kod błędu, tylko w przypadku `loaderror` . *(Liczba)* + + * **wiadomość**: komunikat o błędzie, tylko w przypadku `loaderror` . *(String)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Quirks przeglądarki + +wydarzenia `loadstart` i `loaderror` nie są być opalane. + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Usuwa detektor zdarzenia z`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **EventName**: zdarzenie przestanie słuchać. *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + + * **wywołania zwrotnego**: funkcja do wykonania, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Zamknij + +> Zamyka `InAppBrowser` okna. + + ref.close(); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * Firefox OS + * iOS + * Windows 8 i 8.1 + * Windows Phone 7 i 8 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Pokaż + +> Wyświetla InAppBrowser okno, który został otwarty ukryte. Zawód ten jest ignorowany, jeśli InAppBrowser już był widoczny. + + ref.show(); + + + * **ref**: odwołanie do InAppBrowser (okno`InAppBrowser`) + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Wstrzykuje kod JavaScript w `InAppBrowser` okna + + ref.executeScript(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: adres URL skryptu, aby wstrzyknąć. + * **Kod**: tekst skryptu, aby wstrzyknąć. + + * **wywołania zwrotnego**: funkcja, która wykonuje po kod JavaScript jest wstrzykiwany. + + * Jeśli taki skrypt jest typu `code` , wykonuje wywołanie zwrotne z pojedynczym parametrem, który jest wartość zwracana przez skrypt, owinięte w `Array` . Dla wielu linii skrypty to wartość zwracana ostatniej instrukcja, lub ostatni wyrażenie oceniane. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows 8 i 8.1 + * Przeglądarka + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### Quirks przeglądarki + + * obsługiwany jest tylko **code** klucza. + +### Windows dziwactwa + +Ze względu na [MSDN dokumenty](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) wywołany skrypt może zwracać tylko wartości ciągów, inaczej parametr, przekazywany do **wywołania zwrotnego** będzie `[null]`. + +## insertCSS + +> Wstrzykuje CSS w `InAppBrowser` okna. + + ref.insertCSS(details, callback); + + + * **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + + * **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: URL arkusza stylów do wsuwania. + * **Kod**: tekst z arkusza stylów do wstrzykiwania. + + * **wywołania zwrotnego**: funkcja, która wykonuje po CSS jest wstrzykiwany. + +### Obsługiwane platformy + + * Amazon Fire OS + * Android + * iOS + * Windows + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/index.md new file mode 100644 index 0000000..dff9bf0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/pl/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +Plugin daje widok przeglądarki sieci web, które są wyświetlane podczas wywoływania `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` funkcja jest definiowana jako zamiennik dla funkcji `window.open()`. Istniejące wywołania `window.open()` służy okno InAppBrowser, zastępując window.open: + + window.open = cordova.InAppBrowser.open; + + +Okna InAppBrowser zachowuje się jak standardowe przeglądarki i nie ma dostępu do API Cordova. Z tego powodu zaleca się InAppBrowser jeśli ty potrzebować wobec ciężar (niezaufanej) treści osób trzecich, a nie że wczytywanie głównym webview Cordova. InAppBrowser nie jest biała, ani nie jest otwieranie linków w przeglądarce systemu. + +InAppBrowser zawiera domyślnie kontrole GUI dla użytkownika (tył, przód, zrobić). + +Do tyłu zgodności, ten plugin również haki `window.open`. Jednak może mieć zainstalowane wtyczki haka `window.open` niezamierzone skutki uboczne (zwłaszcza, jeśli ten plugin jest włączone tylko jako część innej wtyczki). Hak `window.open` zostaną usunięte w przyszłej wersji głównych. Dopóki hak jest usuwany z wtyczki, aplikacje można ręcznie przywrócić domyślne zachowanie: + + delete window.open // Reverts the call back to it's prototype's default + + +Chociaż `window.open` w globalnym zasięgu, InAppBrowser nie jest dostępne dopiero po zdarzeniu `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## Instalacja + + cordova plugin add cordova-plugin-inappbrowser + + +Jeśli chcesz wszystko stronica ładunki w swojej aplikacji, aby przejść przez InAppBrowser, można po prostu podłączyć `window.open` podczas inicjowania. Na przykład: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +Otwiera URL w nowe wystąpienie `InAppBrowser`, bieżące wystąpienie przeglądarki lub przeglądarki systemu. + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **adres**: adres URL do ładowania *(ciąg)*. Wywołanie `encodeURI()` na to, czy adres URL zawiera znaki Unicode. + +* **miejsce docelowe**: miejsce docelowe, w którym wobec ciężar ten URL parametr opcjonalny, który domyślnie `_self` . *(String)* + + * `_self`: Otwiera w Cordova WebView, jeśli adres URL jest na białej liście, inaczej ono otwiera w`InAppBrowser`. + * `_blank`: Otwiera w`InAppBrowser`. + * `_system`: Otwiera w przeglądarce internetowej systemu. + +* **Opcje**: opcje dla `InAppBrowser` . Opcjonalnie, nie stawiła się: `location=yes` . *(String)* + + `options`Ciąg nie może zawierać żadnych spacji, i pary nazwa/wartość każdej funkcji muszą być oddzielone przecinkami. Nazwy funkcji jest rozróżniana. Wszystkich platform obsługuje wartości poniżej: + + * **Lokalizacja**: zestaw `yes` lub `no` Aby włączyć `InAppBrowser` na pasek lub wyłączyć. + + Android: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + + tylko iOS: + + * **closebuttoncaption**: aby użyć jak **zrobić** przycisk Podpis ustawiona na ciąg. Należy pamiętać, że trzeba zlokalizować tę wartość siebie. + * **disallowoverscroll**: zestaw `yes` lub `no` (domyślnie `no` ). Włącza/wyłącza właściwość UIWebViewBounce. + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + * **ClearCache**: zestaw `yes` do przeglądarki w pamięci podręcznej plików cookie wyczyszczone zanim otworzy się nowe okno + * **clearsessioncache**: zestaw `yes` mieć w pamięci podręcznej plików cookie sesji wyczyszczone zanim otworzy się nowe okno + * **pasek narzędzi**: zestaw `yes` lub `no` Aby włączyć pasek narzędzi lub wyłączyć dla InAppBrowser (domyślnie`yes`) + * **enableViewportScale**: zestaw `yes` lub `no` Aby zapobiec rzutni skalowanie za pomocą tagu meta (domyślnie`no`). + * **mediaPlaybackRequiresUserAction**: zestaw `yes` lub `no` Aby zapobiec HTML5 audio lub wideo z Autoodtwarzanie (domyślnie`no`). + * **allowInlineMediaPlayback**: zestaw `yes` lub `no` Aby w linii HTML5 odtwarzanie, wyświetlanie w oknie przeglądarki, a nie interfejs odtwarzanie specyficzne dla urządzenia. HTML `video` również musi zawierać element `webkit-playsinline` atrybut (domyślnie`no`) + * **keyboardDisplayRequiresUserAction**: zestaw `yes` lub `no` Aby otworzyć klawiaturę ekranową, gdy elementy formularza ostrości za pomocą JavaScript `focus()` połączenia (domyślnie`yes`). + * **suppressesIncrementalRendering**: zestaw `yes` lub `no` czekać, aż wszystkie nowe widok zawartości jest otrzymane przed renderowany (domyślnie`no`). + * **presentationstyle**: zestaw `pagesheet` , `formsheet` lub `fullscreen` Aby ustawić [styl prezentacji][1] (domyślnie`fullscreen`). + * **transitionstyle**: zestaw `fliphorizontal` , `crossdissolve` lub `coververtical` Aby ustawić [styl przejścia][2] (domyślnie`coververtical`). + * **toolbarposition**: zestaw `top` lub `bottom` (domyślnie `bottom` ). Powoduje, że pasek ma być na górze lub na dole okna. + + Windows tylko: + + * **ukryte**: zestaw `yes` do stworzenia przeglądarki i ładowania strony, ale nie pokazuje go. Loadstop zdarzenie fires po zakończeniu ładowania. Pominąć lub zestaw `no` (domyślnie) do przeglądarki otworzyć i załadować normalnie. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Firefox OS dziwactwa + +Jak plugin nie wymuszać każdy projekt to trzeba dodać pewne reguły CSS jeśli otwarty z `target = "_blank"`. Zasady może wyglądać jak te + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +Obiekt zwrócony z wywołania `cordova.InAppBrowser.open`. + +### Metody + +* metody addEventListener +* removeEventListener +* Zamknij +* Pokaż +* executeScript +* insertCSS + +## metody addEventListener + +> Dodaje detektor zdarzenia z`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +* **EventName**: zdarzenie słuchać *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd podczas ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + +* **wywołania zwrotnego**: funkcja, która wykonuje, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu jako parametr. + +### Właściwości InAppBrowserEvent + +* **Typ**: eventname, albo `loadstart` , `loadstop` , `loaderror` , lub `exit` . *(String)* + +* **adres**: adres URL, który został załadowany. *(String)* + +* **Kod**: kod błędu, tylko w przypadku `loaderror` . *(Liczba)* + +* **wiadomość**: komunikat o błędzie, tylko w przypadku `loaderror` . *(String)* + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> Usuwa detektor zdarzenia z`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **EventName**: zdarzenie przestanie słuchać. *(String)* + + * **loadstart**: zdarzenie gdy odpalam `InAppBrowser` zaczyna się ładować adresu URL. + * **loadstop**: zdarzenie gdy odpalam `InAppBrowser` zakończeniu ładowania adresu URL. + * **LoadError**: zdarzenie odpala gdy `InAppBrowser` napotka błąd ładowania adresu URL. + * **wyjście**: zdarzenie gdy odpalam `InAppBrowser` okno jest zamknięte. + +* **wywołania zwrotnego**: funkcja do wykonania, gdy zdarzenie. Funkcja jest przekazywany `InAppBrowserEvent` obiektu. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## Zamknij + +> Zamyka `InAppBrowser` okna. + + ref.close(); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 i 8.1 +* Windows Phone 7 i 8 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## Pokaż + +> Wyświetla InAppBrowser okno, który został otwarty ukryte. Zawód ten jest ignorowany, jeśli InAppBrowser już był widoczny. + + ref.show(); + + +* **ref**: odwołanie do InAppBrowser (okno`InAppBrowser`) + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Wstrzykuje kod JavaScript w `InAppBrowser` okna + + ref.executeScript(details, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna. *(InAppBrowser)* + +* **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: adres URL skryptu, aby wstrzyknąć. + * **Kod**: tekst skryptu, aby wstrzyknąć. + +* **wywołania zwrotnego**: funkcja, która wykonuje po kod JavaScript jest wstrzykiwany. + + * Jeśli taki skrypt jest typu `code` , wykonuje wywołanie zwrotne z pojedynczym parametrem, który jest wartość zwracana przez skrypt, owinięte w `Array` . Dla wielu linii skrypty to wartość zwracana ostatniej instrukcja, lub ostatni wyrażenie oceniane. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS +* Windows 8 i 8.1 + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Wstrzykuje CSS w `InAppBrowser` okna. + + ref.insertCSS(details, callback); + + +* **ref**: odniesienie do `InAppBrowser` okna *(InAppBrowser)* + +* **injectDetails**: Szczegóły dotyczące skryptu, określając albo `file` lub `code` klucz. *(Obiekt)* + + * **plik**: URL arkusza stylów do wsuwania. + * **Kod**: tekst z arkusza stylów do wstrzykiwania. + +* **wywołania zwrotnego**: funkcja, która wykonuje po CSS jest wstrzykiwany. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* iOS + +### Szybki przykład + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ru/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ru/index.md new file mode 100644 index 0000000..3b4e967 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/ru/index.md @@ -0,0 +1,330 @@ + + +# cordova-plugin-inappbrowser + +Этот плагин обеспечивает представление веб-браузера, что показывает при вызове`window.open()`. + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + + +**Примечание**: InAppBrowser окно ведет себя как стандартный веб-браузер и не может доступ API Cordova. + +## Установка + + cordova plugin add cordova-plugin-inappbrowser + + +## window.open + +Открывает URL-адрес в новом `InAppBrowser` например, текущий экземпляр браузера или браузера системы. + + var ref = window.open(url, target, options); + + +* **ссылка**: ссылка для `InAppBrowser` окно. *(InAppBrowser)* + +* **URL**: URL-адрес для загрузки *(String)*. Вызвать `encodeURI()` на это, если URL-адрес содержит символы Unicode. + +* **Цель**: цель для загрузки URL-адреса, необязательный параметр, по умолчанию `_self` . *(Строка)* + + * `_self`: Открывается в Cordova WebView, если URL-адрес в белый список, в противном случае он открывается в`InAppBrowser`. + * `_blank`: Открывает в`InAppBrowser`. + * `_system`: Открывается в веб-браузера системы. + +* **опции**: параметры для `InAppBrowser` . Необязательный параметр, виновная в: `location=yes` . *(Строка)* + + `options`Строка не должна содержать каких-либо пустое пространство, и каждая функция пар имя/значение должны быть разделены запятой. Функция имена нечувствительны к регистру. Все платформы поддерживают исходное значение: + + * **Расположение**: равным `yes` или `no` превратить `InAppBrowser` в адресную строку или выключить. + + Только андроид: + + * **closebuttoncaption**: задайте строку для использования в качестве заголовка кнопки **сделали** . + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + * **ClearCache**: набор `yes` иметь браузера куки кэш очищен перед открытием нового окна + * **clearsessioncache**: значение `yes` иметь кэш cookie сеанса очищается перед открытием нового окна + + только iOS: + + * **closebuttoncaption**: задайте строку для использования в качестве заголовка кнопки **сделали** . Обратите внимание, что вам нужно самостоятельно локализовать это значение. + * **disallowoverscroll**: значение `yes` или `no` (по умолчанию `no` ). Включает/отключает свойство UIWebViewBounce. + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + * **ClearCache**: набор `yes` иметь браузера куки кэш очищен перед открытием нового окна + * **clearsessioncache**: значение `yes` иметь кэш cookie сеанса очищается перед открытием нового окна + * **панели инструментов**: набор `yes` или `no` для включения панели инструментов или выключить InAppBrowser (по умолчанию`yes`) + * **enableViewportScale**: значение `yes` или `no` для предотвращения просмотра, масштабирования через тег meta (по умолчанию`no`). + * **mediaPlaybackRequiresUserAction**: значение `yes` или `no` для предотвращения HTML5 аудио или видео от Автовоспроизведение (по умолчанию`no`). + * **allowInlineMediaPlayback**: значение `yes` или `no` чтобы разрешить воспроизведение мультимедиа HTML5 в строки, отображения в окне браузера, а не конкретного устройства воспроизведения интерфейс. HTML `video` элемент должен также включать `webkit-playsinline` атрибут (по умолчанию`no`) + * **keyboardDisplayRequiresUserAction**: значение `yes` или `no` чтобы открыть клавиатуру, когда формы элементы получают фокус через JavaScript в `focus()` вызов (по умолчанию`yes`). + * **suppressesIncrementalRendering**: значение `yes` или `no` ждать, пока все новое содержание представление получено до визуализации (по умолчанию`no`). + * **presentationstyle**: набор `pagesheet` , `formsheet` или `fullscreen` чтобы задать [стиль презентации][1] (по умолчанию`fullscreen`). + * **transitionstyle**: набор `fliphorizontal` , `crossdissolve` или `coververtical` чтобы задать [стиль перехода][2] (по умолчанию`coververtical`). + * **toolbarposition**: значение `top` или `bottom` (по умолчанию `bottom` ). Вызывает панели инструментов, чтобы быть в верхней или нижней части окна. + + Windows только: + + * **скрытые**: значение `yes` для создания браузера и загрузки страницы, но не показать его. Событие loadstop возникает, когда загрузка завершена. Опустить или набор `no` (по умолчанию), чтобы браузер открыть и загрузить нормально. + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### Особенности Firefox OS + +Как плагин не применять любой дизайн есть необходимость добавить некоторые правила CSS, если открыт с `target='_blank'` . Правила может выглядеть как эти + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## Внутренний браузер + +Объект, возвращаемый из вызова`window.open`. + +### Методы + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> Добавляет прослушиватель для события от`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ссылка**: ссылка для `InAppBrowser` окно *(InAppBrowser)* + +* **EventName**: событие для прослушивания *(String)* + + * **loadstart**: событие возникает, когда `InAppBrowser` начинает для загрузки URL-адреса. + * **loadstop**: событие возникает, когда `InAppBrowser` завершит загрузку URL-адреса. + * **loaderror**: событие возникает, когда `InAppBrowser` обнаруживает ошибку при загрузке URL-адреса. + * **выход**: возникает событие, когда `InAppBrowser` окно закрыто. + +* **обратного вызова**: функция, которая выполняется, когда возникает событие. Функция передается `InAppBrowserEvent` объект в качестве параметра. + +### InAppBrowserEvent свойства + +* **тип**: eventname, либо `loadstart` , `loadstop` , `loaderror` , или `exit` . *(Строка)* + +* **URL**: URL-адрес, который был загружен. *(Строка)* + +* **код**: код ошибки, только в случае `loaderror` . *(Число)* + +* **сообщение**: сообщение об ошибке, только в случае `loaderror` . *(Строка)* + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## метод removeEventListener + +> Удаляет прослушиватель для события от`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ссылка**: ссылка для `InAppBrowser` окно. *(InAppBrowser)* + +* **EventName**: событие прекратить прослушивание. *(Строка)* + + * **loadstart**: событие возникает, когда `InAppBrowser` начинает для загрузки URL-адреса. + * **loadstop**: событие возникает, когда `InAppBrowser` завершит загрузку URL-адреса. + * **loaderror**: событие возникает, когда `InAppBrowser` обнаруживает ошибку загрузки URL-адреса. + * **выход**: возникает событие, когда `InAppBrowser` окно закрывается. + +* **обратного вызова**: функция, выполняемая когда это событие наступает. Функция передается `InAppBrowserEvent` объект. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> Закрывает `InAppBrowser` окно. + + Ref.Close(); + + +* **ссылка**: ссылка на `InAppBrowser` окно *(InAppBrowser)* + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows 8 и 8.1 +* Windows Phone 7 и 8 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> Отображается окно InAppBrowser, был открыт скрытые. Вызов это не имеет эффекта при InAppBrowser уже был виден. + + Ref.Show(); + + +* **ссылка**: ссылка на окно (InAppBrowser`InAppBrowser`) + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> Вставляет код JavaScript в `InAppBrowser` окно + + ref.executeScript(details, callback); + + +* **ссылка**: ссылка на `InAppBrowser` окно. *(InAppBrowser)* + +* **injectDetails**: подробности сценария для запуска, указав либо `file` или `code` ключ. *(Объект)* + + * **файл**: URL-адрес сценария вставки. + * **код**: текст сценария для вставки. + +* **обратного вызова**: функция, которая выполняет после вводят JavaScript-код. + + * Если введенный скрипт имеет тип `code` , обратный вызов выполняется с одним параметром, который является возвращаемое значение сценария, завернутые в `Array` . Для многострочных сценариев это возвращаемое значение последнего оператора, или последнее вычисленное выражение. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS +* Windows 8 и 8.1 + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> Внедряет CSS в `InAppBrowser` окно. + + ref.insertCSS(details, callback); + + +* **ссылка**: ссылка на `InAppBrowser` окно *(InAppBrowser)* + +* **injectDetails**: детали сценария для запуска, указав либо `file` или `code` ключ. *(Объект)* + + * **файл**: URL-адрес таблицы стилей для вставки. + * **код**: текст таблицы стилей для вставки. + +* **обратного вызова**: функция, которая выполняет после вводят CSS. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* iOS + +### Краткий пример + + var ref = window.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/README.md new file mode 100644 index 0000000..7d33d89 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/README.md @@ -0,0 +1,388 @@ + + +# cordova-plugin-inappbrowser + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg)](https://travis-ci.org/apache/cordova-plugin-inappbrowser) + +這個外掛程式提供了一個 web 瀏覽器視圖,顯示在調用 `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` 函數被定義為一個臨時替代 `window.open ()` 函數。 現有 `window.open ()` 調用,可以通過替換 window.open 使用 InAppBrowser 視窗: + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 視窗像一個標準的 web 瀏覽器中,並且無法訪問科爾多瓦 Api。 為此,建議 InAppBrowser 如果您需要載入協力廠商 (不可信) 的內容,而不是載入,進入主要的科爾多瓦 web 視圖。 InAppBrowser 是不受白名單中,也不在系統瀏覽器中打開的連結。 + +InAppBrowser 預設情況下它自己的 GUI 控制項為使用者提供 (後退、 前進、 完成)。 + +為向後相容性,此外掛程式還鉤 `window.open`。 然而,`window.open` 外掛程式安裝鉤子可以有副作用 (尤其是如果這個外掛程式是只列為另一個外掛程式的依賴項)。 在未來的主要發行版本中,將刪除 `window.open` 鉤。 一直至從該外掛程式鉤子後,應用程式可以手動還原預設行為: + + delete window.open // Reverts the call back to it's prototype's default + + +雖然 `window.open` 在全球範圍內,InAppBrowser 不可用直到 `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 安裝 + + cordova plugin add cordova-plugin-inappbrowser + + +如果您希望所有頁面載入中您的應用程式要通過 InAppBrowser,你可以簡單地在初始化過程中鉤 `window.open`。舉個例子: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +在新的 `InAppBrowser` 實例,當前的瀏覽器實例或系統瀏覽器中打開的 URL。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **url**: 要載入*(字串)*的 URL。調用 `encodeURI()` 這個如果 URL 包含 Unicode 字元。 + + * **target**: 目標在其中載入的 URL,可選參數,預設值為 `_self` 。*(字串)* + + * `_self`: 打開在科爾多瓦 web 視圖如果 URL 是在白名單中,否則它在打開`InAppBrowser`. + * `_blank`: 在打開`InAppBrowser`. + * `_system`: 在該系統的 web 瀏覽器中打開。 + + * **options**: 選項為 `InAppBrowser` 。可選,拖欠到: `location=yes` 。*(字串)* + + `options`字串必須不包含任何空白的空間,和必須用逗號分隔每個功能的名稱/值對。 功能名稱區分大小寫。 所有平臺都支援下面的值: + + * **location**: 設置為 `yes` 或 `no` ,打開 `InAppBrowser` 的位置欄打開或關閉。 + + Android 系統只有: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **zoom**: 設置為`yes`,顯示 Android 瀏覽器的縮放控制項,設置為`no`,以隱藏它們。 `預設值是`. + * **hardwareback**: 設置為`yes`要使用硬體後退按鈕通過`InAppBrowser`的歷史向後導航。 如果沒有前一頁, `InAppBrowser`將會關閉。 預設值是的`yes`所以你必須將其設置為`no`,如果你想要的後退按鈕,只需關閉 InAppBrowser。 + + 只有 iOS: + + * **closebuttoncaption**: 設置為一個字串,以用作**做**按鈕的標題。請注意您需要對此值進行當地語系化你自己。 + * **disallowoverscroll**: 將設置為 `yes` 或 `no` (預設值是 `no` )。打開/關閉的 UIWebViewBounce 屬性。 + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **toolbar**: 設置為 `yes` 或 `no` ,為 InAppBrowser (預設為打開或關閉工具列`yes`) + * **enableViewportScale**: 將設置為 `yes` 或 `no` ,防止通過 meta 標記 (預設為縮放的視區`no`). + * **mediaPlaybackRequiresUserAction**: 將設置為 `yes` 或 `no` ,防止 HTML5 音訊或視頻從 autoplaying (預設為`no`). + * **allowInlineMediaPlayback**: 將設置為 `yes` 或 `no` ,讓線在 HTML5 播放媒體,在瀏覽器視窗中,而不是特定于設備播放介面內顯示。 HTML 的 `video` 元素還必須包括 `webkit-playsinline` 屬性 (預設為`no`) + * **keyboardDisplayRequiresUserAction**: 將設置為 `yes` 或 `no` 時,要打開鍵盤表單元素接收焦點通過 JavaScript 的 `focus()` 調用 (預設為`yes`). + * **suppressesIncrementalRendering**: 將設置為 `yes` 或 `no` 等待,直到所有新查看的內容正在呈現 (預設為前收到`no`). + * **presentationstyle**: 將設置為 `pagesheet` , `formsheet` 或 `fullscreen` 來設置[演示文稿樣式](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)(預設為`fullscreen`). + * **transitionstyle**: 將設置為 `fliphorizontal` , `crossdissolve` 或 `coververtical` 設置[過渡樣式](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)(預設為`coververtical`). + * **toolbarposition**: 將設置為 `top` 或 `bottom` (預設值是 `bottom` )。使工具列,則在頂部或底部的視窗。 + + 僅限 Windows: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **fullscreen**: 設置為`yes`,以創建無邊框的瀏覽器控制項。 請注意,如果**location=no**同時指定,則將呈現給使用者到密切 IAB 視窗沒有控制。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 黑莓 10 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 火狐瀏覽器作業系統的怪癖 + +外掛程式不會強制任何設計是需要添加一些 CSS 規則,如果打開與 `target=_blank`。規則 》 可能看起來像這些 + +```css +.inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); +} +.inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; +} +.inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); +} +.inAppBrowserWrap menu li.disabled { + color: #777; +} +``` + +### Windows 的怪癖 + +類似于 Firefox OS IAB 視窗視覺行為可以重寫通過`inAppBrowserWrap`/`inAppBrowserWrapFullscreen`的 CSS 類 + +### 瀏覽器的怪癖 + + * 外掛程式是通過 iframe,執行 + + * 未實現導航歷史記錄 (在 LocationBar 的`回顧`與`展望`按鈕)。 + +## InAppBrowser + +對 `科爾多瓦的調用返回的物件。InAppBrowser.open`. + +### 方法 + + * addEventListener + * removeEventListener + * close + * show + * executeScript + * insertCSS + +## addEventListener + +> 為事件添加一個攔截器`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **eventname**: 事件偵聽*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 載入 URL 時遇到錯誤。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 執行時觸發該事件的函數。該函數通過 `InAppBrowserEvent` 物件作為參數。 + +### InAppBrowserEvent 屬性 + + * **type**: eventname,或者 `loadstart` , `loadstop` , `loaderror` ,或 `exit` 。*(字串)* + + * **url**: 已載入的 URL。*(字串)* + + * **code**: 僅中的情況的錯誤代碼 `loaderror` 。*(人數)* + + * **message**: 該錯誤訊息,只有在的情況下 `loaderror` 。*(字串)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 瀏覽器的怪癖 + +`loadstart`和`loaderror`的事件不會被觸發。 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 移除的事件攔截器`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **eventname**: 要停止偵聽的事件。*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 遇到錯誤載入一個 URL。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + + * **callback**: 要在事件觸發時執行的函數。該函數通過 `InAppBrowserEvent` 物件。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 關閉 `InAppBrowser` 視窗。 + + ref.close(); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * 火狐瀏覽器作業系統 + * iOS + * Windows 8 和 8.1 + * Windows Phone 7 和 8 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 顯示打開了隱藏的 InAppBrowser 視窗。調用這沒有任何影響,如果 InAppBrowser 是已經可見。 + + ref.show(); + + + * **ref**: InAppBrowser 視窗 (參考`InAppBrowser`) + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 注入到 JavaScript 代碼 `InAppBrowser` 視窗 + + ref.executeScript(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **檔**: 腳本的 URL 來注入。 + * **代碼**: 要注入腳本的文本。 + + * **回檔**: 執行後注入的 JavaScript 代碼的函數。 + + * 如果插入的腳本的類型 `code` ,回檔執行使用單個參數,這是該腳本的傳回值,裹在 `Array` 。 對於多行腳本,這是最後一條語句或最後計算的運算式的傳回值。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows 8 和 8.1 + * 瀏覽器 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +### 瀏覽器的怪癖 + + * 只有**code**關鍵被支援。 + +### Windows 的怪癖 + +由於[MSDN 文檔](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx)調用的腳本可以返回唯一字串值,否則該參數,傳遞給**回檔**將是`[null]`. + +## insertCSS + +> 注入到 CSS `InAppBrowser` 視窗。 + + ref.insertCSS(details, callback); + + + * **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + + * **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **file**: 樣式表的 URL 來注入。 + * **code**: 文本樣式表的注入。 + + * **callback**: 在 CSS 注射後執行的函數。 + +### 支援的平臺 + + * 亞馬遜火 OS + * Android 系統 + * iOS + * Windows + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/index.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/index.md new file mode 100644 index 0000000..c12c046 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/doc/zh/index.md @@ -0,0 +1,357 @@ + + +# cordova-plugin-inappbrowser + +這個外掛程式提供了一個 web 瀏覽器視圖,顯示在調用 `cordova.InAppBrowser.open()`. + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + + +`cordova.InAppBrowser.open()` 函數被定義為一個臨時替代 `window.open ()` 函數。 現有 `window.open ()` 調用,可以通過替換 window.open 使用 InAppBrowser 視窗: + + window.open = cordova.InAppBrowser.open; + + +InAppBrowser 視窗像一個標準的 web 瀏覽器中,並且無法訪問科爾多瓦 Api。 為此,建議 InAppBrowser 如果您需要載入協力廠商 (不可信) 的內容,而不是載入,進入主要的科爾多瓦 web 視圖。 InAppBrowser 是不受白名單中,也不在系統瀏覽器中打開的連結。 + +InAppBrowser 預設情況下它自己的 GUI 控制項為使用者提供 (後退、 前進、 完成)。 + +為向後相容性,此外掛程式還鉤 `window.open`。 然而,`window.open` 外掛程式安裝鉤子可以有副作用 (尤其是如果這個外掛程式是只列為另一個外掛程式的依賴項)。 在未來的主要發行版本中,將刪除 `window.open` 鉤。 一直至從該外掛程式鉤子後,應用程式可以手動還原預設行為: + + delete window.open // Reverts the call back to it's prototype's default + + +雖然 `window.open` 在全球範圍內,InAppBrowser 不可用直到 `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log("window.open works well"); + } + + +## 安裝 + + cordova plugin add cordova-plugin-inappbrowser + + +如果您希望所有頁面載入中您的應用程式要通過 InAppBrowser,你可以簡單地在初始化過程中鉤 `window.open`。舉個例子: + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + window.open = cordova.InAppBrowser.open; + } + + +## cordova.InAppBrowser.open + +在新的 `InAppBrowser` 實例,當前的瀏覽器實例或系統瀏覽器中打開的 URL。 + + var ref = cordova.InAppBrowser.open(url, target, options); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **url**: 要載入*(字串)*的 URL。調用 `encodeURI()` 這個如果 URL 包含 Unicode 字元。 + +* **target**: 目標在其中載入的 URL,可選參數,預設值為 `_self` 。*(字串)* + + * `_self`: 打開在科爾多瓦 web 視圖如果 URL 是在白名單中,否則它在打開`InAppBrowser`. + * `_blank`: 在打開`InAppBrowser`. + * `_system`: 在該系統的 web 瀏覽器中打開。 + +* **options**: 選項為 `InAppBrowser` 。可選,拖欠到: `location=yes` 。*(字串)* + + `options`字串必須不包含任何空白的空間,和必須用逗號分隔每個功能的名稱/值對。 功能名稱區分大小寫。 所有平臺都支援下面的值: + + * **location**: 設置為 `yes` 或 `no` ,打開 `InAppBrowser` 的位置欄打開或關閉。 + + Android 系統只有: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + + 只有 iOS: + + * **closebuttoncaption**: 設置為一個字串,以用作**做**按鈕的標題。請注意您需要對此值進行當地語系化你自己。 + * **disallowoverscroll**: 將設置為 `yes` 或 `no` (預設值是 `no` )。打開/關閉的 UIWebViewBounce 屬性。 + * **hidden**: 將設置為 `yes` ,創建瀏覽器和載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或設置為 `no` (預設值),有的瀏覽器打開,然後以正常方式載入。 + * **clearcache**: 將設置為 `yes` 有瀏覽器的 cookie 清除緩存之前打開新視窗 + * **clearsessioncache**: 將設置為 `yes` 有會話 cookie 緩存清除之前打開新視窗 + * **toolbar**: 設置為 `yes` 或 `no` ,為 InAppBrowser (預設為打開或關閉工具列`yes`) + * **enableViewportScale**: 將設置為 `yes` 或 `no` ,防止通過 meta 標記 (預設為縮放的視區`no`). + * **mediaPlaybackRequiresUserAction**: 將設置為 `yes` 或 `no` ,防止 HTML5 音訊或視頻從 autoplaying (預設為`no`). + * **allowInlineMediaPlayback**: 將設置為 `yes` 或 `no` ,讓線在 HTML5 播放媒體,在瀏覽器視窗中,而不是特定于設備播放介面內顯示。 HTML 的 `video` 元素還必須包括 `webkit-playsinline` 屬性 (預設為`no`) + * **keyboardDisplayRequiresUserAction**: 將設置為 `yes` 或 `no` 時,要打開鍵盤表單元素接收焦點通過 JavaScript 的 `focus()` 調用 (預設為`yes`). + * **suppressesIncrementalRendering**: 將設置為 `yes` 或 `no` 等待,直到所有新查看的內容正在呈現 (預設為前收到`no`). + * **presentationstyle**: 將設置為 `pagesheet` , `formsheet` 或 `fullscreen` 來設置[演示文稿樣式][1](預設為`fullscreen`). + * **transitionstyle**: 將設置為 `fliphorizontal` , `crossdissolve` 或 `coververtical` 設置[過渡樣式][2](預設為`coververtical`). + * **toolbarposition**: 將設置為 `top` 或 `bottom` (預設值是 `bottom` )。使工具列,則在頂部或底部的視窗。 + + 僅限 Windows: + + * **hidden**: 將設置為 `yes` ,創建瀏覽器並載入頁面,但不是顯示它。 載入完成時,將觸發 loadstop 事件。 省略或被設置為 `no` (預設值),有的瀏覽器打開,以正常方式載入。 + + [1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle + [2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* 火狐瀏覽器的作業系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes'); + + +### 火狐瀏覽器作業系統的怪癖 + +外掛程式不會強制任何設計是需要添加一些 CSS 規則,如果打開與 `target=_blank`。規則 》 可能看起來像這些 + + css + .inAppBrowserWrap { + background-color: rgba(0,0,0,0.75); + color: rgba(235,235,235,1.0); + } + .inAppBrowserWrap menu { + overflow: auto; + list-style-type: none; + padding-left: 0; + } + .inAppBrowserWrap menu li { + font-size: 25px; + height: 25px; + float: left; + margin: 0 10px; + padding: 3px 10px; + text-decoration: none; + color: #ccc; + display: block; + background: rgba(30,30,30,0.50); + } + .inAppBrowserWrap menu li.disabled { + color: #777; + } + + +## InAppBrowser + +對 `科爾多瓦的調用返回的物件。InAppBrowser.open`. + +### 方法 + +* addEventListener +* removeEventListener +* close +* show +* executeScript +* insertCSS + +## addEventListener + +> 為事件添加一個攔截器`InAppBrowser`. + + ref.addEventListener(eventname, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +* **eventname**: 事件偵聽*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 載入 URL 時遇到錯誤。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + +* **callback**: 執行時觸發該事件的函數。該函數通過 `InAppBrowserEvent` 物件作為參數。 + +### InAppBrowserEvent 屬性 + +* **type**: eventname,或者 `loadstart` , `loadstop` , `loaderror` ,或 `exit` 。*(字串)* + +* **url**: 已載入的 URL。*(字串)* + +* **code**: 僅中的情況的錯誤代碼 `loaderror` 。*(人數)* + +* **message**: 該錯誤訊息,只有在的情況下 `loaderror` 。*(字串)* + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstart', function(event) { alert(event.url); }); + + +## removeEventListener + +> 移除的事件攔截器`InAppBrowser`. + + ref.removeEventListener(eventname, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **eventname**: 要停止偵聽的事件。*(字串)* + + * **loadstart**: 當觸發事件 `InAppBrowser` 開始載入一個 URL。 + * **loadstop**: 當觸發事件 `InAppBrowser` 完成載入一個 URL。 + * **loaderror**: 當觸發事件 `InAppBrowser` 遇到錯誤載入一個 URL。 + * **exit**: 當觸發事件 `InAppBrowser` 關閉視窗。 + +* **callback**: 要在事件觸發時執行的函數。該函數通過 `InAppBrowserEvent` 物件。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + var myCallback = function(event) { alert(event.url); } + ref.addEventListener('loadstart', myCallback); + ref.removeEventListener('loadstart', myCallback); + + +## close + +> 關閉 `InAppBrowser` 視窗。 + + ref.close(); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 火狐瀏覽器的作業系統 +* iOS +* Windows 8 和 8.1 +* Windows Phone 7 和 8 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.close(); + + +## show + +> 顯示打開了隱藏的 InAppBrowser 視窗。調用這沒有任何影響,如果 InAppBrowser 是已經可見。 + + ref.show(); + + +* **ref**: InAppBrowser 視窗 (參考`InAppBrowser`) + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes'); + // some time later... + ref.show(); + + +## executeScript + +> 注入到 JavaScript 代碼 `InAppBrowser` 視窗 + + ref.executeScript(details, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗。*() InAppBrowser* + +* **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **檔**: 腳本的 URL 來注入。 + * **代碼**: 要注入腳本的文本。 + +* **回檔**: 執行後注入的 JavaScript 代碼的函數。 + + * 如果插入的腳本的類型 `code` ,回檔執行使用單個參數,這是該腳本的傳回值,裹在 `Array` 。 對於多行腳本,這是最後一條語句或最後計算的運算式的傳回值。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS +* Windows 8 和 8.1 + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.executeScript({file: "myscript.js"}); + }); + + +## insertCSS + +> 注入到 CSS `InAppBrowser` 視窗。 + + ref.insertCSS(details, callback); + + +* **ref**: 參考 `InAppBrowser` 視窗*(InAppBrowser)* + +* **injectDetails**: 要運行的腳本的詳細資訊或指定 `file` 或 `code` 的關鍵。*(物件)* + + * **file**: 樣式表的 URL 來注入。 + * **code**: 文本樣式表的注入。 + +* **callback**: 在 CSS 注射後執行的函數。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* iOS + +### 快速的示例 + + var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.insertCSS({file: "mystyles.css"}); + }); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json new file mode 100644 index 0000000..a62b083 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/package.json @@ -0,0 +1,62 @@ +{ + "name": "cordova-plugin-inappbrowser", + "version": "1.7.0", + "description": "Cordova InAppBrowser Plugin", + "types": "./types/index.d.ts", + "cordova": { + "id": "cordova-plugin-inappbrowser", + "platforms": [ + "android", + "amazon-fireos", + "ubuntu", + "ios", + "osx", + "wp7", + "wp8", + "windows8", + "windows", + "firefoxos" + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/apache/cordova-plugin-inappbrowser" + }, + "keywords": [ + "cordova", + "in", + "app", + "browser", + "inappbrowser", + "ecosystem:cordova", + "cordova-android", + "cordova-amazon-fireos", + "cordova-ubuntu", + "cordova-ios", + "cordova-osx", + "cordova-wp7", + "cordova-wp8", + "cordova-windows8", + "cordova-windows", + "cordova-firefoxos" + ], + "scripts": { + "test": "npm run jshint", + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" + }, + "engines": { + "cordovaDependencies": { + "0.2.3": { + "cordova": ">=3.1.0" + }, + "2.0.0": { + "cordova": ">100" + } + } + }, + "author": "Apache Software Foundation", + "license": "Apache-2.0", + "devDependencies": { + "jshint": "^2.6.0" + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml new file mode 100644 index 0000000..19e8f47 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/plugin.xml @@ -0,0 +1,243 @@ + + + + + + InAppBrowser + Cordova InAppBrowser Plugin + Apache 2.0 + cordova,in,app,browser,inappbrowser + https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git + https://issues.apache.org/jira/browse/CB/component/12320641 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java new file mode 100644 index 0000000..c5d6f66 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppBrowser.java @@ -0,0 +1,879 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.annotation.SuppressLint; +import org.apache.cordova.inappbrowser.InAppBrowserDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.Log; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import com.amazon.android.webkit.AmazonWebChromeClient; +import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; +import com.amazon.android.webkit.AmazonJsPromptResult; +import com.amazon.android.webkit.AmazonWebSettings; +import com.amazon.android.webkit.AmazonWebStorage; +import com.amazon.android.webkit.AmazonWebView; +import com.amazon.android.webkit.AmazonWebViewClient; +import com.amazon.android.webkit.AmazonCookieManager; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.Config; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.apache.cordova.CordovaActivity; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.HashMap; +import java.util.StringTokenizer; + +@SuppressLint("SetJavaScriptEnabled") +public class InAppBrowser extends CordovaPlugin { + + private static final String NULL = "null"; + protected static final String LOG_TAG = "InAppBrowser"; + private static final String SELF = "_self"; + private static final String SYSTEM = "_system"; + // private static final String BLANK = "_blank"; + private static final String EXIT_EVENT = "exit"; + private static final String LOCATION = "location"; + private static final String HIDDEN = "hidden"; + private static final String ZOOM = "zoom"; + private static final String LOAD_START_EVENT = "loadstart"; + private static final String LOAD_STOP_EVENT = "loadstop"; + private static final String LOAD_ERROR_EVENT = "loaderror"; + private static final String CLEAR_ALL_CACHE = "clearcache"; + private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; + private static final String HARDWARE_BACK_BUTTON = "hardwareback"; + + private InAppBrowserDialog dialog; + private AmazonWebView inAppWebView; + private EditText edittext; + private CallbackContext callbackContext; + private boolean showLocationBar = true; + private boolean showZoomControls = true; + private boolean openWindowHidden = false; + private boolean clearAllCache= false; + private boolean clearSessionCache=false; + private boolean hadwareBackButton=true; + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackId The callback id used when calling back into JavaScript. + * @return A PluginResult object with a status and message. + */ + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("open")) { + this.callbackContext = callbackContext; + final String url = args.getString(0); + String t = args.optString(1); + if (t == null || t.equals("") || t.equals(NULL)) { + t = SELF; + } + final String target = t; + final HashMap features = parseFeature(args.optString(2)); + + Log.d(LOG_TAG, "target = " + target); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + String result = ""; + // SELF + if (SELF.equals(target)) { + Log.d(LOG_TAG, "in self"); + // load in webview + if (url.startsWith("file://") || url.startsWith("javascript:") + || Config.isUrlWhiteListed(url)) { + Log.d(LOG_TAG, "loading in webview"); + webView.loadUrl(url); + } + //Load the dialer + else if (url.startsWith(AmazonWebView.SCHEME_TEL)) + { + try { + Log.d(LOG_TAG, "loading in dialer"); + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + // load in InAppBrowser + else { + Log.d(LOG_TAG, "loading in InAppBrowser"); + result = showWebPage(url, features); + } + } + // SYSTEM + else if (SYSTEM.equals(target)) { + Log.d(LOG_TAG, "in system"); + result = openExternal(url); + } + // BLANK - or anything else + else { + Log.d(LOG_TAG, "in blank"); + result = showWebPage(url, features); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + } + }); + } + else if (action.equals("close")) { + closeDialog(); + } + else if (action.equals("injectScriptCode")) { + String jsWrapper = null; + if (args.getBoolean(1)) { + jsWrapper = String.format("prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')", callbackContext.getCallbackId()); + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectScriptFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleCode")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("show")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.show(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else if (action.equals("hide")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.hide(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else { + return false; + } + return true; + } + + /** + * Called when the view navigates. + */ + @Override + public void onReset() { + closeDialog(); + } + + /** + * Called by AccelBroker when listener is to be shut down. + * Stop listener. + */ + public void onDestroy() { + closeDialog(); + } + + /** + * Inject an object (script or style) into the InAppBrowser AmazonWebView. + * + * This is a helper method for the inject{Script|Style}{Code|File} API calls, which + * provides a consistent method for injecting JavaScript code into the document. + * + * If a wrapper string is supplied, then the source string will be JSON-encoded (adding + * quotes) and wrapped using string formatting. (The wrapper string should have a single + * '%s' marker) + * + * @param source The source object (filename or script/style text) to inject into + * the document. + * @param jsWrapper A JavaScript string to wrap the source string in, so that the object + * is properly injected, or null if the source string is JavaScript text + * which should be executed directly. + */ + private void injectDeferredObject(String source, String jsWrapper) { + final String scriptToInject; + if (jsWrapper != null) { + org.json.JSONArray jsonEsc = new org.json.JSONArray(); + jsonEsc.put(source); + String jsonRepr = jsonEsc.toString(); + String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); + scriptToInject = String.format(jsWrapper, jsonSourceString); + } else { + scriptToInject = source; + } + final String finalScriptToInject = scriptToInject; + this.cordova.getActivity().runOnUiThread(new Runnable() { + @SuppressLint("NewApi") + @Override + public void run() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // This action will have the side-effect of blurring the currently focused element + inAppWebView.loadUrl("javascript:" + finalScriptToInject); + } /*else { + inAppWebView.evaluateJavascript(finalScriptToInject, null); + }*/ + } + }); + } + + /** + * Put the list of features into a hash map + * + * @param optString + * @return + */ + private HashMap parseFeature(String optString) { + if (optString.equals(NULL)) { + return null; + } else { + HashMap map = new HashMap(); + StringTokenizer features = new StringTokenizer(optString, ","); + StringTokenizer option; + while(features.hasMoreElements()) { + option = new StringTokenizer(features.nextToken(), "="); + if (option.hasMoreElements()) { + String key = option.nextToken(); + Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + map.put(key, value); + } + } + return map; + } + } + + /** + * Display a new browser with the specified URL. + * + * @param url The url to load. + * @param usePhoneGap Load url in PhoneGap webview + * @return "" if ok, or error message. + */ + public String openExternal(String url) { + try { + Intent intent = null; + intent = new Intent(Intent.ACTION_VIEW); + // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". + // Adding the MIME type to http: URLs causes them to not be handled by the downloader. + Uri uri = Uri.parse(url); + if ("file".equals(uri.getScheme())) { + intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); + } else { + intent.setData(uri); + } + this.cordova.getActivity().startActivity(intent); + return ""; + } catch (android.content.ActivityNotFoundException e) { + Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); + return e.toString(); + } + } + + /** + * Closes the dialog + */ + public void closeDialog() { + final AmazonWebView childView = this.inAppWebView; + // The JS protects against multiple calls, so this should happen only when + // closeDialog() is called by other native code. + if (childView == null) { + return; + } + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + childView.setWebViewClient(new AmazonWebViewClient() { + // NB: wait for about:blank before dismissing + public void onPageFinished(AmazonWebView view, String url) { + if (dialog != null) { + dialog.dismiss(); + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread + // other than your app's UI thread, it can cause unexpected results." + // http://developer.android.com/guide/webapps/migrating.html#Threads + childView.loadUrl("about:blank"); + } + }); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", EXIT_EVENT); + sendUpdate(obj, false); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + /** + * Checks to see if it is possible to go back one page in history, then does so. + */ + public void goBack() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (InAppBrowser.this.inAppWebView.canGoBack()) { + InAppBrowser.this.inAppWebView.goBack(); + } + } + }); + } + + /** + * Can the web browser go back? + * @return boolean + */ + public boolean canGoBack() { + return this.inAppWebView.canGoBack(); + } + + /** + * Has the user set the hardware back button to go back + * @return boolean + */ + public boolean hardwareBack() { + return hadwareBackButton; + } + + /** + * Checks to see if it is possible to go forward one page in history, then does so. + */ + private void goForward() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (InAppBrowser.this.inAppWebView.canGoForward()) { + InAppBrowser.this.inAppWebView.goForward(); + } + } + }); + } + + /** + * Navigate to the new page + * + * @param url to load + */ + private void navigate(final String url) { + InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (!url.startsWith("http") && !url.startsWith("file:")) { + InAppBrowser.this.inAppWebView.loadUrl("http://" + url); + } else { + InAppBrowser.this.inAppWebView.loadUrl(url); + } + InAppBrowser.this.inAppWebView.requestFocus(); + } + }); + } + + + /** + * Should we show the location bar? + * + * @return boolean + */ + private boolean getShowLocationBar() { + return this.showLocationBar; + } + + /** + * Should we show the zoom controls? + * + * @return boolean + */ + private boolean getShowZoomControls() { + return this.showZoomControls; + } + + private InAppBrowser getInAppBrowser(){ + return this; + } + + /** + * Display a new browser with the specified URL. + * + * @param url The url to load. + * @param jsonObject + */ + public String showWebPage(final String url, HashMap features) { + // Determine if we should hide the location bar. + showLocationBar = true; + showZoomControls = true; + openWindowHidden = false; + if (features != null) { + Boolean show = features.get(LOCATION); + if (show != null) { + showLocationBar = show.booleanValue(); + } + Boolean zoom = features.get(ZOOM); + if (zoom != null) { + showZoomControls = zoom.booleanValue(); + } + Boolean hidden = features.get(HIDDEN); + if (hidden != null) { + openWindowHidden = hidden.booleanValue(); + } + Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); + if (hardwareBack != null) { + hadwareBackButton = hardwareBack.booleanValue(); + } + Boolean cache = features.get(CLEAR_ALL_CACHE); + if (cache != null) { + clearAllCache = cache.booleanValue(); + } else { + cache = features.get(CLEAR_SESSION_CACHE); + if (cache != null) { + clearSessionCache = cache.booleanValue(); + } + } + } + + final CordovaWebView thatWebView = this.webView; + + // Create dialog in new thread + Runnable runnable = new Runnable() { + /** + * Convert our DIP units to Pixels + * + * @return int + */ + private int dpToPixels(int dipValue) { + int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() + ); + + return value; + } + + @SuppressLint("NewApi") + public void run() { + // Let's create the main dialog + dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); + dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setCancelable(true); + dialog.setInAppBroswer(getInAppBrowser()); + + // Main container layout + LinearLayout main = new LinearLayout(cordova.getActivity()); + main.setOrientation(LinearLayout.VERTICAL); + + // Toolbar layout + RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); + //Please, no more black! + toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); + toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); + toolbar.setHorizontalGravity(Gravity.LEFT); + toolbar.setVerticalGravity(Gravity.TOP); + + // Action Button Container layout + RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); + actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + actionButtonContainer.setHorizontalGravity(Gravity.LEFT); + actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); + actionButtonContainer.setId(1); + + // Back button + Button back = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); + back.setLayoutParams(backLayoutParams); + back.setContentDescription("Back Button"); + back.setId(2); + Resources activityRes = cordova.getActivity().getResources(); + int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); + Drawable backIcon = activityRes.getDrawable(backResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + back.setBackgroundDrawable(backIcon); + } + else + { + back.setBackground(backIcon); + } + + back.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goBack(); + } + }); + + // Forward button + Button forward = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); + forward.setLayoutParams(forwardLayoutParams); + forward.setContentDescription("Forward Button"); + forward.setId(3); + int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); + Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + forward.setBackgroundDrawable(fwdIcon); + } + else + { + forward.setBackground(fwdIcon); + } + forward.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goForward(); + } + }); + + // Edit Text Box + edittext = new EditText(cordova.getActivity()); + RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); + textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); + edittext.setLayoutParams(textLayoutParams); + edittext.setId(4); + edittext.setSingleLine(true); + edittext.setText(url); + edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + edittext.setImeOptions(EditorInfo.IME_ACTION_GO); + edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE + edittext.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + navigate(edittext.getText().toString()); + return true; + } + return false; + } + }); + + // Close/Done button + Button close = new Button(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + forward.setContentDescription("Close Button"); + close.setId(5); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) + { + close.setBackgroundDrawable(closeIcon); + } + else + { + close.setBackground(closeIcon); + } + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + // WebView + inAppWebView = new AmazonWebView(cordova.getActivity()); + + CordovaActivity app = (CordovaActivity) cordova.getActivity(); + cordova.getFactory().initializeWebView(inAppWebView, 0x00FF00, false, null); + + inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView)); + AmazonWebViewClient client = new InAppBrowserClient(thatWebView, edittext); + inAppWebView.setWebViewClient(client); + AmazonWebSettings settings = inAppWebView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setBuiltInZoomControls(getShowZoomControls()); + settings.setPluginState(com.amazon.android.webkit.AmazonWebSettings.PluginState.ON); + + //Toggle whether this is enabled or not! + Bundle appSettings = cordova.getActivity().getIntent().getExtras(); + boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); + if (enableDatabase) { + String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); + settings.setDatabasePath(databasePath); + settings.setDatabaseEnabled(true); + } + settings.setDomStorageEnabled(true); + + if (clearAllCache) { + AmazonCookieManager.getInstance().removeAllCookie(); + } else if (clearSessionCache) { + AmazonCookieManager.getInstance().removeSessionCookie(); + } + + inAppWebView.loadUrl(url); + inAppWebView.setId(6); + inAppWebView.getSettings().setLoadWithOverviewMode(true); + inAppWebView.getSettings().setUseWideViewPort(true); + inAppWebView.requestFocus(); + inAppWebView.requestFocusFromTouch(); + + // Add the back and forward buttons to our action button container layout + actionButtonContainer.addView(back); + actionButtonContainer.addView(forward); + + // Add the views to our toolbar + toolbar.addView(actionButtonContainer); + toolbar.addView(edittext); + toolbar.addView(close); + + // Don't add the toolbar if its been disabled + if (getShowLocationBar()) { + // Add our toolbar to our main view/layout + main.addView(toolbar); + } + + // Add our webview to our main view/layout + main.addView(inAppWebView); + + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); + lp.copyFrom(dialog.getWindow().getAttributes()); + lp.width = WindowManager.LayoutParams.MATCH_PARENT; + lp.height = WindowManager.LayoutParams.MATCH_PARENT; + + dialog.setContentView(main); + dialog.show(); + dialog.getWindow().setAttributes(lp); + // the goal of openhidden is to load the url and not display it + // Show() needs to be called to cause the URL to be loaded + if(openWindowHidden) { + dialog.hide(); + } + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + return ""; + } + + /** + * Create a new plugin success result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + */ + private void sendUpdate(JSONObject obj, boolean keepCallback) { + sendUpdate(obj, keepCallback, PluginResult.Status.OK); + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + * @param status the status code to return to the JavaScript environment + */ + private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { + if (callbackContext != null) { + PluginResult result = new PluginResult(status, obj); + result.setKeepCallback(keepCallback); + callbackContext.sendPluginResult(result); + if (!keepCallback) { + callbackContext = null; + } + } + } + + /** + * The webview client receives notifications about appView + */ + public class InAppBrowserClient extends AmazonWebViewClient { + EditText edittext; + CordovaWebView webView; + + /** + * Constructor. + * + * @param mContext + * @param edittext + */ + public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { + this.webView = webView; + this.edittext = mEditText; + } + + /** + * Notify the host application that a page has started loading. + * + * @param view The webview initiating the callback. + * @param url The url of the page. + */ + @Override + public void onPageStarted(AmazonWebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String newloc = ""; + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { + newloc = url; + } + // If dialing phone (tel:5551212) + else if (url.startsWith(AmazonWebView.SCHEME_TEL)) { + try { + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + + else if (url.startsWith("geo:") || url.startsWith(AmazonWebView.SCHEME_MAILTO) || url.startsWith("market:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); + } + } + // If sms:5551212?body=This is the message + else if (url.startsWith("sms:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + + // Get address + String address = null; + int parmIndex = url.indexOf('?'); + if (parmIndex == -1) { + address = url.substring(4); + } + else { + address = url.substring(4, parmIndex); + + // If body, then set sms body + Uri uri = Uri.parse(url); + String query = uri.getQuery(); + if (query != null) { + if (query.startsWith("body=")) { + intent.putExtra("sms_body", query.substring(5)); + } + } + } + intent.setData(Uri.parse("sms:" + address)); + intent.putExtra("address", address); + intent.setType("vnd.android-dir/mms-sms"); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); + } + } + else { + newloc = "http://" + url; + } + + if (!newloc.equals(edittext.getText().toString())) { + edittext.setText(newloc); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_START_EVENT); + obj.put("url", newloc); + + sendUpdate(obj, true); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + public void onPageFinished(AmazonWebView view, String url) { + super.onPageFinished(view, url); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_STOP_EVENT); + obj.put("url", url); + + sendUpdate(obj, true); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + + public void onReceivedError(AmazonWebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_ERROR_EVENT); + obj.put("url", failingUrl); + obj.put("code", errorCode); + obj.put("message", description); + + sendUpdate(obj, true, PluginResult.Status.ERROR); + } catch (JSONException ex) { + Log.d(LOG_TAG, "Should never happen"); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java new file mode 100644 index 0000000..37cf101 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/amazon/InAppChromeClient.java @@ -0,0 +1,146 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; + +import com.amazon.android.webkit.AmazonWebChromeClient; +import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback; +import com.amazon.android.webkit.AmazonJsPromptResult; +import com.amazon.android.webkit.AmazonWebStorage; +import com.amazon.android.webkit.AmazonWebView; +import com.amazon.android.webkit.AmazonWebViewClient; + +public class InAppChromeClient extends AmazonWebChromeClient { + + private CordovaWebView webView; + private String LOG_TAG = "InAppChromeClient"; + private long MAX_QUOTA = 100 * 1024 * 1024; + + public InAppChromeClient(CordovaWebView webView) { + super(); + this.webView = webView; + } + /** + * Handle database quota exceeded notification. + * + * @param url + * @param databaseIdentifier + * @param currentQuota + * @param estimatedSize + * @param totalUsedQuota + * @param quotaUpdater + */ + @Override + public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, + long totalUsedQuota, AmazonWebStorage.QuotaUpdater quotaUpdater) + { + LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); + + if (estimatedSize < MAX_QUOTA) + { + //increase for 1Mb + long newQuota = estimatedSize; + LOG.d(LOG_TAG, "calling quotaUpdater.updateQuota newQuota: %d", newQuota); + quotaUpdater.updateQuota(newQuota); + } + else + { + // Set the quota to whatever it is and force an error + // TODO: get docs on how to handle this properly + quotaUpdater.updateQuota(currentQuota); + } + } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * The prompt bridge provided for the InAppBrowser is capable of executing any + * oustanding callback belonging to the InAppBrowser plugin. Care has been + * taken that other callbacks cannot be triggered, and that no other code + * execution is possible. + * + * To trigger the bridge, the prompt default value should be of the form: + * + * gap-iab:// + * + * where is the string id of the callback to trigger (something + * like "InAppBrowser0123456789") + * + * If present, the prompt message is expected to be a JSON-encoded value to + * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. + * + * @param view + * @param url + * @param message + * @param defaultValue + * @param result + */ + @Override + public boolean onJsPrompt(AmazonWebView view, String url, String message, String defaultValue, AmazonJsPromptResult result) { + // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. + if (defaultValue != null && defaultValue.startsWith("gap")) { + if(defaultValue.startsWith("gap-iab://")) { + PluginResult scriptResult; + String scriptCallbackId = defaultValue.substring(10); + if (scriptCallbackId.startsWith("InAppBrowser")) { + if(message == null || message.length() == 0) { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); + } else { + try { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); + } catch(JSONException e) { + scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); + } + } + this.webView.sendPluginResult(scriptResult, scriptCallbackId); + result.confirm(""); + return true; + } + } + else + { + // Anything else with a gap: prefix should get this message + LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); + result.cancel(); + return true; + } + } + return false; + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java new file mode 100644 index 0000000..c10617e --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowser.java @@ -0,0 +1,1114 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.Intent; +import android.provider.Browser; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.text.InputType; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import android.webkit.CookieManager; +import android.webkit.CookieSyncManager; +import android.webkit.HttpAuthHandler; +import android.webkit.ValueCallback; +import android.webkit.WebChromeClient; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.EditText; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.Config; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaHttpAuthHandler; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginManager; +import org.apache.cordova.PluginResult; +import org.json.JSONException; +import org.json.JSONObject; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.StringTokenizer; + +@SuppressLint("SetJavaScriptEnabled") +public class InAppBrowser extends CordovaPlugin { + + private static final String NULL = "null"; + protected static final String LOG_TAG = "InAppBrowser"; + private static final String SELF = "_self"; + private static final String SYSTEM = "_system"; + private static final String EXIT_EVENT = "exit"; + private static final String LOCATION = "location"; + private static final String ZOOM = "zoom"; + private static final String HIDDEN = "hidden"; + private static final String LOAD_START_EVENT = "loadstart"; + private static final String LOAD_STOP_EVENT = "loadstop"; + private static final String LOAD_ERROR_EVENT = "loaderror"; + private static final String CLEAR_ALL_CACHE = "clearcache"; + private static final String CLEAR_SESSION_CACHE = "clearsessioncache"; + private static final String HARDWARE_BACK_BUTTON = "hardwareback"; + private static final String MEDIA_PLAYBACK_REQUIRES_USER_ACTION = "mediaPlaybackRequiresUserAction"; + private static final String SHOULD_PAUSE = "shouldPauseOnSuspend"; + private static final Boolean DEFAULT_HARDWARE_BACK = true; + private static final String USER_WIDE_VIEW_PORT = "useWideViewPort"; + + private InAppBrowserDialog dialog; + private WebView inAppWebView; + private EditText edittext; + private CallbackContext callbackContext; + private boolean showLocationBar = true; + private boolean showZoomControls = true; + private boolean openWindowHidden = false; + private boolean clearAllCache = false; + private boolean clearSessionCache = false; + private boolean hadwareBackButton = true; + private boolean mediaPlaybackRequiresUserGesture = false; + private boolean shouldPauseInAppBrowser = false; + private boolean useWideViewPort = true; + private ValueCallback mUploadCallback; + private ValueCallback mUploadCallbackLollipop; + private final static int FILECHOOSER_REQUESTCODE = 1; + private final static int FILECHOOSER_REQUESTCODE_LOLLIPOP = 2; + + /** + * Executes the request and returns PluginResult. + * + * @param action the action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext the callbackContext used when calling back into JavaScript. + * @return A PluginResult object with a status and message. + */ + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("open")) { + this.callbackContext = callbackContext; + final String url = args.getString(0); + String t = args.optString(1); + if (t == null || t.equals("") || t.equals(NULL)) { + t = SELF; + } + final String target = t; + final HashMap features = parseFeature(args.optString(2)); + + LOG.d(LOG_TAG, "target = " + target); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + String result = ""; + // SELF + if (SELF.equals(target)) { + LOG.d(LOG_TAG, "in self"); + /* This code exists for compatibility between 3.x and 4.x versions of Cordova. + * Previously the Config class had a static method, isUrlWhitelisted(). That + * responsibility has been moved to the plugins, with an aggregating method in + * PluginManager. + */ + Boolean shouldAllowNavigation = null; + if (url.startsWith("javascript:")) { + shouldAllowNavigation = true; + } + if (shouldAllowNavigation == null) { + try { + Method iuw = Config.class.getMethod("isUrlWhiteListed", String.class); + shouldAllowNavigation = (Boolean)iuw.invoke(null, url); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + if (shouldAllowNavigation == null) { + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + PluginManager pm = (PluginManager)gpm.invoke(webView); + Method san = pm.getClass().getMethod("shouldAllowNavigation", String.class); + shouldAllowNavigation = (Boolean)san.invoke(pm, url); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + // load in webview + if (Boolean.TRUE.equals(shouldAllowNavigation)) { + LOG.d(LOG_TAG, "loading in webview"); + webView.loadUrl(url); + } + //Load the dialer + else if (url.startsWith(WebView.SCHEME_TEL)) + { + try { + LOG.d(LOG_TAG, "loading in dialer"); + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } + // load in InAppBrowser + else { + LOG.d(LOG_TAG, "loading in InAppBrowser"); + result = showWebPage(url, features); + } + } + // SYSTEM + else if (SYSTEM.equals(target)) { + LOG.d(LOG_TAG, "in system"); + result = openExternal(url); + } + // BLANK - or anything else + else { + LOG.d(LOG_TAG, "in blank"); + result = showWebPage(url, features); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, result); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + } + }); + } + else if (action.equals("close")) { + closeDialog(); + } + else if (action.equals("injectScriptCode")) { + String jsWrapper = null; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(){prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')})()", callbackContext.getCallbackId()); + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectScriptFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('script'); c.src = %%s; c.onload = function() { prompt('', 'gap-iab://%s'); }; d.body.appendChild(c); })(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('script'); c.src = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleCode")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('style'); c.innerHTML = %%s; d.body.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('style'); c.innerHTML = %s; d.body.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("injectStyleFile")) { + String jsWrapper; + if (args.getBoolean(1)) { + jsWrapper = String.format("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%s; d.head.appendChild(c); prompt('', 'gap-iab://%s');})(document)", callbackContext.getCallbackId()); + } else { + jsWrapper = "(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %s; d.head.appendChild(c); })(document)"; + } + injectDeferredObject(args.getString(0), jsWrapper); + } + else if (action.equals("show")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.show(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else if (action.equals("hide")) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + dialog.hide(); + } + }); + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); + pluginResult.setKeepCallback(true); + this.callbackContext.sendPluginResult(pluginResult); + } + else { + return false; + } + return true; + } + + /** + * Called when the view navigates. + */ + @Override + public void onReset() { + closeDialog(); + } + + /** + * Called when the system is about to start resuming a previous activity. + */ + @Override + public void onPause(boolean multitasking) { + if (shouldPauseInAppBrowser) { + inAppWebView.onPause(); + } + } + + /** + * Called when the activity will start interacting with the user. + */ + @Override + public void onResume(boolean multitasking) { + if (shouldPauseInAppBrowser) { + inAppWebView.onResume(); + } + } + + /** + * Called by AccelBroker when listener is to be shut down. + * Stop listener. + */ + public void onDestroy() { + closeDialog(); + } + + /** + * Inject an object (script or style) into the InAppBrowser WebView. + * + * This is a helper method for the inject{Script|Style}{Code|File} API calls, which + * provides a consistent method for injecting JavaScript code into the document. + * + * If a wrapper string is supplied, then the source string will be JSON-encoded (adding + * quotes) and wrapped using string formatting. (The wrapper string should have a single + * '%s' marker) + * + * @param source The source object (filename or script/style text) to inject into + * the document. + * @param jsWrapper A JavaScript string to wrap the source string in, so that the object + * is properly injected, or null if the source string is JavaScript text + * which should be executed directly. + */ + private void injectDeferredObject(String source, String jsWrapper) { + if (inAppWebView!=null) { + String scriptToInject; + if (jsWrapper != null) { + org.json.JSONArray jsonEsc = new org.json.JSONArray(); + jsonEsc.put(source); + String jsonRepr = jsonEsc.toString(); + String jsonSourceString = jsonRepr.substring(1, jsonRepr.length()-1); + scriptToInject = String.format(jsWrapper, jsonSourceString); + } else { + scriptToInject = source; + } + final String finalScriptToInject = scriptToInject; + this.cordova.getActivity().runOnUiThread(new Runnable() { + @SuppressLint("NewApi") + @Override + public void run() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // This action will have the side-effect of blurring the currently focused element + inAppWebView.loadUrl("javascript:" + finalScriptToInject); + } else { + inAppWebView.evaluateJavascript(finalScriptToInject, null); + } + } + }); + } else { + LOG.d(LOG_TAG, "Can't inject code into the system browser"); + } + } + + /** + * Put the list of features into a hash map + * + * @param optString + * @return + */ + private HashMap parseFeature(String optString) { + if (optString.equals(NULL)) { + return null; + } else { + HashMap map = new HashMap(); + StringTokenizer features = new StringTokenizer(optString, ","); + StringTokenizer option; + while(features.hasMoreElements()) { + option = new StringTokenizer(features.nextToken(), "="); + if (option.hasMoreElements()) { + String key = option.nextToken(); + Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; + map.put(key, value); + } + } + return map; + } + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @return "" if ok, or error message. + */ + public String openExternal(String url) { + try { + Intent intent = null; + intent = new Intent(Intent.ACTION_VIEW); + // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent". + // Adding the MIME type to http: URLs causes them to not be handled by the downloader. + Uri uri = Uri.parse(url); + if ("file".equals(uri.getScheme())) { + intent.setDataAndType(uri, webView.getResourceApi().getMimeType(uri)); + } else { + intent.setData(uri); + } + intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName()); + this.cordova.getActivity().startActivity(intent); + return ""; + // not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it + } catch (java.lang.RuntimeException e) { + LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString()); + return e.toString(); + } + } + + /** + * Closes the dialog + */ + public void closeDialog() { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + final WebView childView = inAppWebView; + // The JS protects against multiple calls, so this should happen only when + // closeDialog() is called by other native code. + if (childView == null) { + return; + } + + childView.setWebViewClient(new WebViewClient() { + // NB: wait for about:blank before dismissing + public void onPageFinished(WebView view, String url) { + if (dialog != null) { + dialog.dismiss(); + dialog = null; + } + } + }); + // NB: From SDK 19: "If you call methods on WebView from any thread + // other than your app's UI thread, it can cause unexpected results." + // http://developer.android.com/guide/webapps/migrating.html#Threads + childView.loadUrl("about:blank"); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", EXIT_EVENT); + sendUpdate(obj, false); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + }); + } + + /** + * Checks to see if it is possible to go back one page in history, then does so. + */ + public void goBack() { + if (this.inAppWebView.canGoBack()) { + this.inAppWebView.goBack(); + } + } + + /** + * Can the web browser go back? + * @return boolean + */ + public boolean canGoBack() { + return this.inAppWebView.canGoBack(); + } + + /** + * Has the user set the hardware back button to go back + * @return boolean + */ + public boolean hardwareBack() { + return hadwareBackButton; + } + + /** + * Checks to see if it is possible to go forward one page in history, then does so. + */ + private void goForward() { + if (this.inAppWebView.canGoForward()) { + this.inAppWebView.goForward(); + } + } + + /** + * Navigate to the new page + * + * @param url to load + */ + private void navigate(String url) { + InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0); + + if (!url.startsWith("http") && !url.startsWith("file:")) { + this.inAppWebView.loadUrl("http://" + url); + } else { + this.inAppWebView.loadUrl(url); + } + this.inAppWebView.requestFocus(); + } + + + /** + * Should we show the location bar? + * + * @return boolean + */ + private boolean getShowLocationBar() { + return this.showLocationBar; + } + + private InAppBrowser getInAppBrowser(){ + return this; + } + + /** + * Display a new browser with the specified URL. + * + * @param url the url to load. + * @param features jsonObject + */ + public String showWebPage(final String url, HashMap features) { + // Determine if we should hide the location bar. + showLocationBar = true; + showZoomControls = true; + openWindowHidden = false; + mediaPlaybackRequiresUserGesture = false; + + if (features != null) { + Boolean show = features.get(LOCATION); + if (show != null) { + showLocationBar = show.booleanValue(); + } + Boolean zoom = features.get(ZOOM); + if (zoom != null) { + showZoomControls = zoom.booleanValue(); + } + Boolean hidden = features.get(HIDDEN); + if (hidden != null) { + openWindowHidden = hidden.booleanValue(); + } + Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); + if (hardwareBack != null) { + hadwareBackButton = hardwareBack.booleanValue(); + } else { + hadwareBackButton = DEFAULT_HARDWARE_BACK; + } + Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION); + if (mediaPlayback != null) { + mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue(); + } + Boolean cache = features.get(CLEAR_ALL_CACHE); + if (cache != null) { + clearAllCache = cache.booleanValue(); + } else { + cache = features.get(CLEAR_SESSION_CACHE); + if (cache != null) { + clearSessionCache = cache.booleanValue(); + } + } + Boolean shouldPause = features.get(SHOULD_PAUSE); + if (shouldPause != null) { + shouldPauseInAppBrowser = shouldPause.booleanValue(); + } + Boolean wideViewPort = features.get(USER_WIDE_VIEW_PORT); + if (wideViewPort != null ) { + useWideViewPort = wideViewPort.booleanValue(); + } + } + + final CordovaWebView thatWebView = this.webView; + + // Create dialog in new thread + Runnable runnable = new Runnable() { + /** + * Convert our DIP units to Pixels + * + * @return int + */ + private int dpToPixels(int dipValue) { + int value = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + cordova.getActivity().getResources().getDisplayMetrics() + ); + + return value; + } + + @SuppressLint("NewApi") + public void run() { + + // CB-6702 InAppBrowser hangs when opening more than one instance + if (dialog != null) { + dialog.dismiss(); + }; + + // Let's create the main dialog + dialog = new InAppBrowserDialog(cordova.getActivity(), android.R.style.Theme_NoTitleBar); + dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setCancelable(true); + dialog.setInAppBroswer(getInAppBrowser()); + + // Main container layout + LinearLayout main = new LinearLayout(cordova.getActivity()); + main.setOrientation(LinearLayout.VERTICAL); + + // Toolbar layout + RelativeLayout toolbar = new RelativeLayout(cordova.getActivity()); + //Please, no more black! + toolbar.setBackgroundColor(android.graphics.Color.LTGRAY); + toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44))); + toolbar.setPadding(this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2), this.dpToPixels(2)); + toolbar.setHorizontalGravity(Gravity.LEFT); + toolbar.setVerticalGravity(Gravity.TOP); + + // Action Button Container layout + RelativeLayout actionButtonContainer = new RelativeLayout(cordova.getActivity()); + actionButtonContainer.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + actionButtonContainer.setHorizontalGravity(Gravity.LEFT); + actionButtonContainer.setVerticalGravity(Gravity.CENTER_VERTICAL); + actionButtonContainer.setId(Integer.valueOf(1)); + + // Back button + ImageButton back = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + backLayoutParams.addRule(RelativeLayout.ALIGN_LEFT); + back.setLayoutParams(backLayoutParams); + back.setContentDescription("Back Button"); + back.setId(Integer.valueOf(2)); + Resources activityRes = cordova.getActivity().getResources(); + int backResId = activityRes.getIdentifier("ic_action_previous_item", "drawable", cordova.getActivity().getPackageName()); + Drawable backIcon = activityRes.getDrawable(backResId); + if (Build.VERSION.SDK_INT >= 16) + back.setBackground(null); + else + back.setBackgroundDrawable(null); + back.setImageDrawable(backIcon); + back.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + back.getAdjustViewBounds(); + + back.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goBack(); + } + }); + + // Forward button + ImageButton forward = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + forwardLayoutParams.addRule(RelativeLayout.RIGHT_OF, 2); + forward.setLayoutParams(forwardLayoutParams); + forward.setContentDescription("Forward Button"); + forward.setId(Integer.valueOf(3)); + int fwdResId = activityRes.getIdentifier("ic_action_next_item", "drawable", cordova.getActivity().getPackageName()); + Drawable fwdIcon = activityRes.getDrawable(fwdResId); + if (Build.VERSION.SDK_INT >= 16) + forward.setBackground(null); + else + forward.setBackgroundDrawable(null); + forward.setImageDrawable(fwdIcon); + forward.setScaleType(ImageView.ScaleType.FIT_CENTER); + forward.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + forward.getAdjustViewBounds(); + + forward.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + goForward(); + } + }); + + // Edit Text Box + edittext = new EditText(cordova.getActivity()); + RelativeLayout.LayoutParams textLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + textLayoutParams.addRule(RelativeLayout.RIGHT_OF, 1); + textLayoutParams.addRule(RelativeLayout.LEFT_OF, 5); + edittext.setLayoutParams(textLayoutParams); + edittext.setId(Integer.valueOf(4)); + edittext.setSingleLine(true); + edittext.setText(url); + edittext.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + edittext.setImeOptions(EditorInfo.IME_ACTION_GO); + edittext.setInputType(InputType.TYPE_NULL); // Will not except input... Makes the text NON-EDITABLE + edittext.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + navigate(edittext.getText().toString()); + return true; + } + return false; + } + }); + + // Close/Done button + ImageButton close = new ImageButton(cordova.getActivity()); + RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); + closeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + close.setLayoutParams(closeLayoutParams); + close.setContentDescription("Close Button"); + close.setId(Integer.valueOf(5)); + int closeResId = activityRes.getIdentifier("ic_action_remove", "drawable", cordova.getActivity().getPackageName()); + Drawable closeIcon = activityRes.getDrawable(closeResId); + if (Build.VERSION.SDK_INT >= 16) + close.setBackground(null); + else + close.setBackgroundDrawable(null); + close.setImageDrawable(closeIcon); + close.setScaleType(ImageView.ScaleType.FIT_CENTER); + back.setPadding(0, this.dpToPixels(10), 0, this.dpToPixels(10)); + if (Build.VERSION.SDK_INT >= 16) + close.getAdjustViewBounds(); + + close.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + closeDialog(); + } + }); + + // WebView + inAppWebView = new WebView(cordova.getActivity()); + inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + inAppWebView.setId(Integer.valueOf(6)); + // File Chooser Implemented ChromeClient + inAppWebView.setWebChromeClient(new InAppChromeClient(thatWebView) { + // For Android 5.0+ + public boolean onShowFileChooser (WebView webView, ValueCallback filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) + { + LOG.d(LOG_TAG, "File Chooser 5.0+"); + // If callback exists, finish it. + if(mUploadCallbackLollipop != null) { + mUploadCallbackLollipop.onReceiveValue(null); + } + mUploadCallbackLollipop = filePathCallback; + + // Create File Chooser Intent + Intent content = new Intent(Intent.ACTION_GET_CONTENT); + content.addCategory(Intent.CATEGORY_OPENABLE); + content.setType("*/*"); + + // Run cordova startActivityForResult + cordova.startActivityForResult(InAppBrowser.this, Intent.createChooser(content, "Select File"), FILECHOOSER_REQUESTCODE_LOLLIPOP); + return true; + } + + // For Android 4.1+ + public void openFileChooser(ValueCallback uploadMsg, String acceptType, String capture) + { + LOG.d(LOG_TAG, "File Chooser 4.1+"); + // Call file chooser for Android 3.0+ + openFileChooser(uploadMsg, acceptType); + } + + // For Android 3.0+ + public void openFileChooser(ValueCallback uploadMsg, String acceptType) + { + LOG.d(LOG_TAG, "File Chooser 3.0+"); + mUploadCallback = uploadMsg; + Intent content = new Intent(Intent.ACTION_GET_CONTENT); + content.addCategory(Intent.CATEGORY_OPENABLE); + + // run startActivityForResult + cordova.startActivityForResult(InAppBrowser.this, Intent.createChooser(content, "Select File"), FILECHOOSER_REQUESTCODE); + } + + }); + WebViewClient client = new InAppBrowserClient(thatWebView, edittext); + inAppWebView.setWebViewClient(client); + WebSettings settings = inAppWebView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setBuiltInZoomControls(showZoomControls); + settings.setPluginState(android.webkit.WebSettings.PluginState.ON); + + if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { + settings.setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture); + } + + String overrideUserAgent = preferences.getString("OverrideUserAgent", null); + String appendUserAgent = preferences.getString("AppendUserAgent", null); + + if (overrideUserAgent != null) { + settings.setUserAgentString(overrideUserAgent); + } + if (appendUserAgent != null) { + settings.setUserAgentString(settings.getUserAgentString() + appendUserAgent); + } + + //Toggle whether this is enabled or not! + Bundle appSettings = cordova.getActivity().getIntent().getExtras(); + boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true); + if (enableDatabase) { + String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath(); + settings.setDatabasePath(databasePath); + settings.setDatabaseEnabled(true); + } + settings.setDomStorageEnabled(true); + + if (clearAllCache) { + CookieManager.getInstance().removeAllCookie(); + } else if (clearSessionCache) { + CookieManager.getInstance().removeSessionCookie(); + } + + inAppWebView.loadUrl(url); + inAppWebView.setId(Integer.valueOf(6)); + inAppWebView.getSettings().setLoadWithOverviewMode(true); + inAppWebView.getSettings().setUseWideViewPort(useWideViewPort); + inAppWebView.requestFocus(); + inAppWebView.requestFocusFromTouch(); + + // Add the back and forward buttons to our action button container layout + actionButtonContainer.addView(back); + actionButtonContainer.addView(forward); + + // Add the views to our toolbar + toolbar.addView(actionButtonContainer); + toolbar.addView(edittext); + toolbar.addView(close); + + // Don't add the toolbar if its been disabled + if (getShowLocationBar()) { + // Add our toolbar to our main view/layout + main.addView(toolbar); + } + + // Add our webview to our main view/layout + main.addView(inAppWebView); + + WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); + lp.copyFrom(dialog.getWindow().getAttributes()); + lp.width = WindowManager.LayoutParams.MATCH_PARENT; + lp.height = WindowManager.LayoutParams.MATCH_PARENT; + + dialog.setContentView(main); + dialog.show(); + dialog.getWindow().setAttributes(lp); + // the goal of openhidden is to load the url and not display it + // Show() needs to be called to cause the URL to be loaded + if(openWindowHidden) { + dialog.hide(); + } + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + return ""; + } + + /** + * Create a new plugin success result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + */ + private void sendUpdate(JSONObject obj, boolean keepCallback) { + sendUpdate(obj, keepCallback, PluginResult.Status.OK); + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param obj a JSONObject contain event payload information + * @param status the status code to return to the JavaScript environment + */ + private void sendUpdate(JSONObject obj, boolean keepCallback, PluginResult.Status status) { + if (callbackContext != null) { + PluginResult result = new PluginResult(status, obj); + result.setKeepCallback(keepCallback); + callbackContext.sendPluginResult(result); + if (!keepCallback) { + callbackContext = null; + } + } + } + + /** + * Receive File Data from File Chooser + * + * @param requestCode the requested code from chromeclient + * @param resultCode the result code returned from android system + * @param intent the data from android file chooser + */ + public void onActivityResult(int requestCode, int resultCode, Intent intent) { + // For Android >= 5.0 + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + LOG.d(LOG_TAG, "onActivityResult (For Android >= 5.0)"); + // If RequestCode or Callback is Invalid + if(requestCode != FILECHOOSER_REQUESTCODE_LOLLIPOP || mUploadCallbackLollipop == null) { + super.onActivityResult(requestCode, resultCode, intent); + return; + } + mUploadCallbackLollipop.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, intent)); + mUploadCallbackLollipop = null; + } + // For Android < 5.0 + else { + LOG.d(LOG_TAG, "onActivityResult (For Android < 5.0)"); + // If RequestCode or Callback is Invalid + if(requestCode != FILECHOOSER_REQUESTCODE || mUploadCallback == null) { + super.onActivityResult(requestCode, resultCode, intent); + return; + } + + if (null == mUploadCallback) return; + Uri result = intent == null || resultCode != cordova.getActivity().RESULT_OK ? null : intent.getData(); + + mUploadCallback.onReceiveValue(result); + mUploadCallback = null; + } + } + + /** + * The webview client receives notifications about appView + */ + public class InAppBrowserClient extends WebViewClient { + EditText edittext; + CordovaWebView webView; + + /** + * Constructor. + * + * @param webView + * @param mEditText + */ + public InAppBrowserClient(CordovaWebView webView, EditText mEditText) { + this.webView = webView; + this.edittext = mEditText; + } + + /** + * Override the URL that should be loaded + * + * This handles a small subset of all the URIs that would be encountered. + * + * @param webView + * @param url + */ + @Override + public boolean shouldOverrideUrlLoading(WebView webView, String url) { + if (url.startsWith(WebView.SCHEME_TEL)) { + try { + Intent intent = new Intent(Intent.ACTION_DIAL); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); + } + } else if (url.startsWith("geo:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith("market:") || url.startsWith("intent:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error with " + url + ": " + e.toString()); + } + } + // If sms:5551212?body=This is the message + else if (url.startsWith("sms:")) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + + // Get address + String address = null; + int parmIndex = url.indexOf('?'); + if (parmIndex == -1) { + address = url.substring(4); + } else { + address = url.substring(4, parmIndex); + + // If body, then set sms body + Uri uri = Uri.parse(url); + String query = uri.getQuery(); + if (query != null) { + if (query.startsWith("body=")) { + intent.putExtra("sms_body", query.substring(5)); + } + } + } + intent.setData(Uri.parse("sms:" + address)); + intent.putExtra("address", address); + intent.setType("vnd.android-dir/mms-sms"); + cordova.getActivity().startActivity(intent); + return true; + } catch (android.content.ActivityNotFoundException e) { + LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); + } + } + return false; + } + + + /* + * onPageStarted fires the LOAD_START_EVENT + * + * @param view + * @param url + * @param favicon + */ + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String newloc = ""; + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:")) { + newloc = url; + } + else + { + // Assume that everything is HTTP at this point, because if we don't specify, + // it really should be. Complain loudly about this!!! + LOG.e(LOG_TAG, "Possible Uncaught/Unknown URI"); + newloc = "http://" + url; + } + + // Update the UI if we haven't already + if (!newloc.equals(edittext.getText().toString())) { + edittext.setText(newloc); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_START_EVENT); + obj.put("url", newloc); + sendUpdate(obj, true); + } catch (JSONException ex) { + LOG.e(LOG_TAG, "URI passed in has caused a JSON error."); + } + } + + + + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + + // CB-10395 InAppBrowser's WebView not storing cookies reliable to local device storage + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { + CookieManager.getInstance().flush(); + } else { + CookieSyncManager.getInstance().sync(); + } + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_STOP_EVENT); + obj.put("url", url); + + sendUpdate(obj, true); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + + try { + JSONObject obj = new JSONObject(); + obj.put("type", LOAD_ERROR_EVENT); + obj.put("url", failingUrl); + obj.put("code", errorCode); + obj.put("message", description); + + sendUpdate(obj, true, PluginResult.Status.ERROR); + } catch (JSONException ex) { + LOG.d(LOG_TAG, "Should never happen"); + } + } + + /** + * On received http auth request. + */ + @Override + public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) { + + // Check if there is some plugin which can resolve this auth challenge + PluginManager pluginManager = null; + try { + Method gpm = webView.getClass().getMethod("getPluginManager"); + pluginManager = (PluginManager)gpm.invoke(webView); + } catch (NoSuchMethodException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (InvocationTargetException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + + if (pluginManager == null) { + try { + Field pmf = webView.getClass().getField("pluginManager"); + pluginManager = (PluginManager)pmf.get(webView); + } catch (NoSuchFieldException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } catch (IllegalAccessException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + } + + if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(webView, new CordovaHttpAuthHandler(handler), host, realm)) { + return; + } + + // By default handle 401 like we'd normally do! + super.onReceivedHttpAuthRequest(view, handler, host, realm); + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java new file mode 100644 index 0000000..e7b212f --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppBrowserDialog.java @@ -0,0 +1,57 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.Context; + +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Created by Oliver on 22/11/2013. + */ +public class InAppBrowserDialog extends Dialog { + Context context; + InAppBrowser inAppBrowser = null; + + public InAppBrowserDialog(Context context, int theme) { + super(context, theme); + this.context = context; + } + + public void setInAppBroswer(InAppBrowser browser) { + this.inAppBrowser = browser; + } + + public void onBackPressed () { + if (this.inAppBrowser == null) { + this.dismiss(); + } else { + // better to go through the in inAppBrowser + // because it does a clean up + if (this.inAppBrowser.hardwareBack() && this.inAppBrowser.canGoBack()) { + this.inAppBrowser.goBack(); + } else { + this.inAppBrowser.closeDialog(); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java new file mode 100644 index 0000000..a2145e6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/InAppChromeClient.java @@ -0,0 +1,133 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.inappbrowser; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; + +import android.webkit.JsPromptResult; +import android.webkit.WebChromeClient; +import android.webkit.WebStorage; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.webkit.GeolocationPermissions.Callback; + +public class InAppChromeClient extends WebChromeClient { + + private CordovaWebView webView; + private String LOG_TAG = "InAppChromeClient"; + private long MAX_QUOTA = 100 * 1024 * 1024; + + public InAppChromeClient(CordovaWebView webView) { + super(); + this.webView = webView; + } + /** + * Handle database quota exceeded notification. + * + * @param url + * @param databaseIdentifier + * @param currentQuota + * @param estimatedSize + * @param totalUsedQuota + * @param quotaUpdater + */ + @Override + public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, + long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) + { + LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota); + quotaUpdater.updateQuota(MAX_QUOTA); + } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } + + /** + * Tell the client to display a prompt dialog to the user. + * If the client returns true, WebView will assume that the client will + * handle the prompt dialog and call the appropriate JsPromptResult method. + * + * The prompt bridge provided for the InAppBrowser is capable of executing any + * oustanding callback belonging to the InAppBrowser plugin. Care has been + * taken that other callbacks cannot be triggered, and that no other code + * execution is possible. + * + * To trigger the bridge, the prompt default value should be of the form: + * + * gap-iab:// + * + * where is the string id of the callback to trigger (something + * like "InAppBrowser0123456789") + * + * If present, the prompt message is expected to be a JSON-encoded value to + * pass to the callback. A JSON_EXCEPTION is returned if the JSON is invalid. + * + * @param view + * @param url + * @param message + * @param defaultValue + * @param result + */ + @Override + public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) { + // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute. + if (defaultValue != null && defaultValue.startsWith("gap")) { + if(defaultValue.startsWith("gap-iab://")) { + PluginResult scriptResult; + String scriptCallbackId = defaultValue.substring(10); + if (scriptCallbackId.startsWith("InAppBrowser")) { + if(message == null || message.length() == 0) { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); + } else { + try { + scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message)); + } catch(JSONException e) { + scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage()); + } + } + this.webView.sendPluginResult(scriptResult, scriptCallbackId); + result.confirm(""); + return true; + } + } + else + { + // Anything else with a gap: prefix should get this message + LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); + result.cancel(); + return true; + } + } + return false; + } + +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png new file mode 100644 index 0000000..fa469d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png new file mode 100644 index 0000000..e861ecc Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png new file mode 100644 index 0000000..f889617 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-hdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png new file mode 100644 index 0000000..47365a3 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png new file mode 100644 index 0000000..4ad2df4 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png new file mode 100644 index 0000000..e84853e Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-mdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png new file mode 100644 index 0000000..5f30474 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..ed8ac91 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png new file mode 100644 index 0000000..4cd0458 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png new file mode 100644 index 0000000..51479d8 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_next_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png new file mode 100644 index 0000000..bc8ff12 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_previous_item.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png new file mode 100644 index 0000000..331c545 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/android/res/drawable-xxhdpi/ic_action_remove.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md new file mode 100644 index 0000000..f0fa860 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/README.md @@ -0,0 +1,43 @@ + +# BlackBerry 10 In-App-Browser Plugin + +The in app browser functionality is entirely contained within common js. There is no native implementation required. +To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). +./cordova-plugin-battery-status/README.md +./cordova-plugin-camera/README.md +./cordova-plugin-console/README.md +./cordova-plugin-contacts/README.md +./cordova-plugin-device/README.md +./cordova-plugin-device-motion/README.md +./cordova-plugin-device-orientation/README.md +./cordova-plugin-device-orientation/src/blackberry10/README.md +./cordova-plugin-file/README.md +./cordova-plugin-file-transfer/README.md +./cordova-plugin-geolocation/README.md +./cordova-plugin-globalization/README.md +./cordova-plugin-inappbrowser/README.md +./cordova-plugin-inappbrowser/src/blackberry10/README.md +./cordova-plugin-media/README.md +./cordova-plugin-media-capture/README.md +./cordova-plugin-network-information/README.md +./cordova-plugin-splashscreen/README.md +./cordova-plugin-vibration/README.md diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md new file mode 100644 index 0000000..e394487 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/de/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10-In-App-Browser-Plugin + +Die Funktionalität ist im app-Browser vollständig in gemeinsamen Js enthalten. Es gibt keine native Implementierung benötigt. Um dieses Plugin zu installieren, folgen Sie dem [Command-Line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Wenn Sie nicht die Cordova-Befehlszeilenschnittstelle verwenden, folgen Sie [Verwenden Plugman zu Plugins verwalten](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md new file mode 100644 index 0000000..7530336 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/es/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +El en el navegador de aplicación funcionalidad está enteramente dentro de js común. No hay ninguna aplicación nativa necesaria. Para instalar este plugin, siga la [Guía de la interfaz de línea de comandos](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si no utiliza la interfaz de línea de comandos de Cordova, siga [Usando Plugman para gestionar Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md new file mode 100644 index 0000000..179bd48 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/fr/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Le dans le navigateur de l'application, la fonctionnalité est entièrement contenue dans js commun. Il n'y a aucune implémentation native requise. Pour installer ce plugin, suivez le [Guide de l'Interface de ligne de commande](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Si vous n'utilisez pas l'Interface de ligne de commande de Cordova, suivez [Les Plugman à l'aide à gérer les Plugins](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md new file mode 100644 index 0000000..8f0623d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/it/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +Il browser app funzionalità è interamente contenuta nel comune js. Non esiste alcuna implementazione nativa richiesto. Per installare questo plugin, seguire la [Guida per l'interfaccia della riga di comando](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Se non si utilizza l'interfaccia della riga di comando di Cordova, seguire [Utilizzando Plugman per gestire i plugin](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md new file mode 100644 index 0000000..b9e4b7b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ja/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +アプリケーション ブラウザーの機能は全く一般的な js に含まれています。 ネイティブ実装する必要はありません。 このプラグインをインストールするには[コマンド ライン インターフェイス ガイド](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +コルドバのコマンド ライン インターフェイスを使用していない場合は場合、[管理のプラグインを使用して Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)に従ってください。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md new file mode 100644 index 0000000..67fb8de --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/ko/README.md @@ -0,0 +1,24 @@ + + +# 블랙베리 10 애플 리 케이 션-브라우저 플러그인 + +응용 프로그램 브라우저에서 기능은 완전히 포함 된 일반적인 js. 필요 없는 기본 구현이입니다. 이 플러그인을 설치 하려면 [명령줄 인터페이스 가이드](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) 를 따라합니다. + +코르도바 명령줄 인터페이스를 사용 하지 않는 경우 [관리 플러그인을 사용 하 여 Plugman](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)를 따르십시오. ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md new file mode 100644 index 0000000..ef199ee --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/pl/README.md @@ -0,0 +1,24 @@ + + +# BlackBerry 10 In-App-Browser Plugin + +W aplikacji Przeglądarka funkcjonalność jest całkowicie zawarty w wspólnej js. Tam jest nie native wdrażania wymagane. Aby zainstalować ten plugin, następować po ten [Przewodnik interfejsu wiersza polecenia](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +Jeśli nie używasz interfejsu wiersza polecenia Cordova, następować po [Przy użyciu Plugman do zarządzania wtyczki](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html). ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md new file mode 100644 index 0000000..241fb55 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/blackberry10/doc/zh/README.md @@ -0,0 +1,24 @@ + + +# 黑莓 10 的應用程式瀏覽器外掛程式 + +在應用程式瀏覽器功能完全包含在常見的 js。 還有沒有本機的實施所需。 若要安裝此外掛程式,請按照[命令列介面指南](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface). + +如果你不使用的科爾多瓦命令列介面,請按照[使用 Plugman 管理外掛程式](http://cordova.apache.org/docs/en/edge/guide_plugin_ref_plugman.md.html)。 ./cordova-plugin-battery-status/README.md ./cordova-plugin-camera/README.md ./cordova-plugin-console/README.md ./cordova-plugin-contacts/README.md ./cordova-plugin-device/README.md ./cordova-plugin-device-motion/README.md ./cordova-plugin-device-orientation/README.md ./cordova-plugin-device-orientation/src/blackberry10/README.md ./cordova-plugin-file/README.md ./cordova-plugin-file-transfer/README.md ./cordova-plugin-geolocation/README.md ./cordova-plugin-globalization/README.md ./cordova-plugin-inappbrowser/README.md ./cordova-plugin-inappbrowser/src/blackberry10/README.md ./cordova-plugin-media/README.md ./cordova-plugin-media-capture/README.md ./cordova-plugin-network-information/README.md ./cordova-plugin-splashscreen/README.md ./cordova-plugin-vibration/README.md \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js new file mode 100644 index 0000000..da7dacd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/browser/InAppBrowserProxy.js @@ -0,0 +1,232 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var modulemapper = require('cordova/modulemapper'); + +var browserWrap, + popup, + navigationButtonsDiv, + navigationButtonsDivInner, + backButton, + forwardButton, + closeButton; + +function attachNavigationEvents(element, callback) { + var onError = function () { + callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true}); + }; + + element.addEventListener("pageshow", function () { + callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("load", function () { + callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("error", onError); + element.addEventListener("abort", onError); +} + +var IAB = { + close: function (win, lose) { + if (browserWrap) { + if (win) win({ type: "exit" }); + + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + popup = null; + } + }, + + show: function (win, lose) { + if (browserWrap) { + browserWrap.style.display = "block"; + } + }, + + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features = args[2]; + + if (target === "_self" || !target) { + window.location = strUrl; + } else if (target === "_system") { + modulemapper.getOriginalSymbol(window, 'window.open').call(window, strUrl, "_blank"); + } else { + // "_blank" or anything else + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.top = "0"; + browserWrap.style.left = "0"; + browserWrap.style.boxSizing = "border-box"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.width = "100vw"; + browserWrap.style.height = "100vh"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(win); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + + if (features.indexOf("hidden=yes") !== -1) { + browserWrap.style.display = "none"; + } + + popup = document.createElement("iframe"); + popup.style.borderWidth = "0px"; + popup.style.width = "100%"; + + browserWrap.appendChild(popup); + + if (features.indexOf("location=yes") !== -1 || features.indexOf("location") === -1) { + popup.style.height = "calc(100% - 60px)"; + popup.style.marginBottom = "-4px"; + + navigationButtonsDiv = document.createElement("div"); + navigationButtonsDiv.style.height = "60px"; + navigationButtonsDiv.style.backgroundColor = "#404040"; + navigationButtonsDiv.style.zIndex = "999"; + navigationButtonsDiv.onclick = function (e) { + e.cancelBubble = true; + }; + + navigationButtonsDivInner = document.createElement("div"); + navigationButtonsDivInner.style.paddingTop = "10px"; + navigationButtonsDivInner.style.height = "50px"; + navigationButtonsDivInner.style.width = "160px"; + navigationButtonsDivInner.style.margin = "0 auto"; + navigationButtonsDivInner.style.backgroundColor = "#404040"; + navigationButtonsDivInner.style.zIndex = "999"; + navigationButtonsDivInner.onclick = function (e) { + e.cancelBubble = true; + }; + + + backButton = document.createElement("button"); + backButton.style.width = "40px"; + backButton.style.height = "40px"; + backButton.style.borderRadius = "40px"; + + backButton.innerHTML = "←"; + backButton.addEventListener("click", function (e) { + if (popup.canGoBack) + popup.goBack(); + }); + + forwardButton = document.createElement("button"); + forwardButton.style.marginLeft = "20px"; + forwardButton.style.width = "40px"; + forwardButton.style.height = "40px"; + forwardButton.style.borderRadius = "40px"; + + forwardButton.innerHTML = "→"; + forwardButton.addEventListener("click", function (e) { + if (popup.canGoForward) + popup.goForward(); + }); + + closeButton = document.createElement("button"); + closeButton.style.marginLeft = "20px"; + closeButton.style.width = "40px"; + closeButton.style.height = "40px"; + closeButton.style.borderRadius = "40px"; + + closeButton.innerHTML = "✖"; + closeButton.addEventListener("click", function (e) { + setTimeout(function () { + IAB.close(win); + }, 0); + }); + + // iframe navigation is not yet supported + backButton.disabled = true; + forwardButton.disabled = true; + + navigationButtonsDivInner.appendChild(backButton); + navigationButtonsDivInner.appendChild(forwardButton); + navigationButtonsDivInner.appendChild(closeButton); + navigationButtonsDiv.appendChild(navigationButtonsDivInner); + + browserWrap.appendChild(navigationButtonsDiv); + } else { + popup.style.height = "100%"; + } + + // start listening for navigation events + attachNavigationEvents(popup, win); + + popup.src = strUrl; + } + }, + + injectScriptCode: function (win, fail, args) { + var code = args[0], + hasCallback = args[1]; + + if (browserWrap && popup) { + try { + popup.contentWindow.eval(code); + if (hasCallback) { + win([]); + } + } catch(e) { + console.error('Error occured while trying to injectScriptCode: ' + JSON.stringify(e)); + } + } + }, + + injectScriptFile: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectScriptFile is not yet implemented'; + console.warn(msg); + if (fail) { + fail(msg); + } + }, + + injectStyleCode: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectStyleCode is not yet implemented'; + console.warn(msg); + if (fail) { + fail(msg); + } + }, + + injectStyleFile: function (win, fail, args) { + var msg = 'Browser cordova-plugin-inappbrowser injectStyleFile is not yet implemented'; + console.warn(msg); + if (fail) { + fail(msg); + } + } +}; + +module.exports = IAB; + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js new file mode 100644 index 0000000..33db1b9 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/firefoxos/InAppBrowserProxy.js @@ -0,0 +1,191 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// https://developer.mozilla.org/en-US/docs/WebAPI/Browser + +var modulemapper = require('cordova/modulemapper'); + +var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open'); +var browserWrap; + +var IABExecs = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + if (typeof(win) == "function") win({type:'exit'}); + } + }, + + /* + * Reveal browser if opened hidden + */ + show: function (win, lose) { + console.error('[FirefoxOS] show not implemented'); + }, + + hide: function (win, lose) { + console.error('[FirefoxOS] hide not implemented'); + }, + + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + features_string = args[2] || "location=yes", //location=yes is default + features = {}; + + var features_list = features_string.split(','); + features_list.forEach(function(feature) { + var tup = feature.split('='); + if (tup[1] == 'yes') { + tup[1] = true; + } else if (tup[1] == 'no') { + tup[1] = false; + } else { + var number = parseInt(tup[1]); + if (!isNaN(number)) { + tup[1] = number; + } + } + features[tup[0]] = tup[1]; + }); + + function updateIframeSizeNoLocation() { + browserWrap.style.width = window.innerWidth + 'px'; + browserWrap.style.height = window.innerHeight + 'px'; + browserWrap.style.zIndex = '999999999'; + browserWrap.browser.style.height = (window.innerHeight - 60) + 'px'; + browserWrap.browser.style.width = browserWrap.style.width; + } + + if (target === '_system') { + origOpenFunc.apply(window, [strUrl, '_blank']); + } else if (target === '_blank') { + var browserElem = document.createElement('iframe'); + browserElem.setAttribute('mozbrowser', true); + // make this loaded in its own child process + browserElem.setAttribute('remote', true); + browserElem.setAttribute('src', strUrl); + if (browserWrap) { + document.body.removeChild(browserWrap); + } + browserWrap = document.createElement('div'); + // assign browser element to browserWrap for future reference + browserWrap.browser = browserElem; + + browserWrap.classList.add('inAppBrowserWrap'); + // position fixed so that it works even when page is scrolled + browserWrap.style.position = 'fixed'; + browserElem.style.position = 'absolute'; + browserElem.style.border = 0; + browserElem.style.top = '60px'; + browserElem.style.left = '0px'; + updateIframeSizeNoLocation(); + + var menu = document.createElement('menu'); + menu.setAttribute('type', 'toolbar'); + var close = document.createElement('li'); + var back = document.createElement('li'); + var forward = document.createElement('li'); + + close.appendChild(document.createTextNode('×')); + back.appendChild(document.createTextNode('<')); + forward.appendChild(document.createTextNode('>')); + + close.classList.add('inAppBrowserClose'); + back.classList.add('inAppBrowserBack'); + forward.classList.add('inAppBrowserForward'); + + var checkForwardBackward = function () { + var backReq = browserElem.getCanGoBack(); + backReq.onsuccess = function() { + if (this.result) { + back.classList.remove('disabled'); + } else { + back.classList.add('disabled'); + } + }; + var forwardReq = browserElem.getCanGoForward(); + forwardReq.onsuccess = function() { + if (this.result) { + forward.classList.remove('disabled'); + } else { + forward.classList.add('disabled'); + } + }; + }; + + browserElem.addEventListener('mozbrowserloadend', checkForwardBackward); + + close.addEventListener('click', function () { + setTimeout(function () { + IABExecs.close(win, lose); + }, 0); + }, false); + + back.addEventListener('click', function () { + browserElem.goBack(); + }, false); + + forward.addEventListener('click', function () { + browserElem.goForward(); + }, false); + + menu.appendChild(back); + menu.appendChild(forward); + menu.appendChild(close); + + browserWrap.appendChild(menu); + browserWrap.appendChild(browserElem); + document.body.appendChild(browserWrap); + + //we use mozbrowserlocationchange instead of mozbrowserloadstart to get the url + browserElem.addEventListener('mozbrowserlocationchange', function(e){ + win({ + type:'loadstart', + url : e.detail + }); + }, false); + browserElem.addEventListener('mozbrowserloadend', function(e){ + win({type:'loadstop'}); + }, false); + browserElem.addEventListener('mozbrowsererror', function(e){ + win({type:'loaderror'}); + }, false); + browserElem.addEventListener('mozbrowserclose', function(e){ + win({type:'exit'}); + }, false); + } else { + window.location = strUrl; + } + }, + injectScriptCode: function (code, bCB) { + console.error('[FirefoxOS] injectScriptCode not implemented'); + }, + injectScriptFile: function (file, bCB) { + console.error('[FirefoxOS] injectScriptFile not implemented'); + } +}; + +module.exports = IABExecs; + +require('cordova/exec/proxy').add('InAppBrowser', module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h new file mode 100644 index 0000000..d258eb0 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.h @@ -0,0 +1,113 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import + +#ifdef __CORDOVA_4_0_0 + #import +#else + #import +#endif + +@class CDVInAppBrowserViewController; + +@interface CDVInAppBrowser : CDVPlugin { +} + +@property (nonatomic, retain) CDVInAppBrowserViewController* inAppBrowserViewController; +@property (nonatomic, copy) NSString* callbackId; +@property (nonatomic, copy) NSRegularExpression *callbackIdPattern; + +- (void)open:(CDVInvokedUrlCommand*)command; +- (void)close:(CDVInvokedUrlCommand*)command; +- (void)injectScriptCode:(CDVInvokedUrlCommand*)command; +- (void)show:(CDVInvokedUrlCommand*)command; +- (void)hide:(CDVInvokedUrlCommand*)command; + +@end + +@interface CDVInAppBrowserOptions : NSObject {} + +@property (nonatomic, assign) BOOL location; +@property (nonatomic, assign) BOOL toolbar; +@property (nonatomic, copy) NSString* closebuttoncaption; +@property (nonatomic, copy) NSString* toolbarposition; +@property (nonatomic, assign) BOOL clearcache; +@property (nonatomic, assign) BOOL clearsessioncache; + +@property (nonatomic, copy) NSString* presentationstyle; +@property (nonatomic, copy) NSString* transitionstyle; + +@property (nonatomic, assign) BOOL enableviewportscale; +@property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction; +@property (nonatomic, assign) BOOL allowinlinemediaplayback; +@property (nonatomic, assign) BOOL keyboarddisplayrequiresuseraction; +@property (nonatomic, assign) BOOL suppressesincrementalrendering; +@property (nonatomic, assign) BOOL hidden; +@property (nonatomic, assign) BOOL disallowoverscroll; + ++ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options; + +@end + +@interface CDVInAppBrowserViewController : UIViewController { + @private + NSString* _userAgent; + NSString* _prevUserAgent; + NSInteger _userAgentLockToken; + CDVInAppBrowserOptions *_browserOptions; + +#ifdef __CORDOVA_4_0_0 + CDVUIWebViewDelegate* _webViewDelegate; +#else + CDVWebViewDelegate* _webViewDelegate; +#endif + +} + +@property (nonatomic, strong) IBOutlet UIWebView* webView; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* closeButton; +@property (nonatomic, strong) IBOutlet UILabel* addressLabel; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* backButton; +@property (nonatomic, strong) IBOutlet UIBarButtonItem* forwardButton; +@property (nonatomic, strong) IBOutlet UIActivityIndicatorView* spinner; +@property (nonatomic, strong) IBOutlet UIToolbar* toolbar; + +@property (nonatomic, weak) id orientationDelegate; +@property (nonatomic, weak) CDVInAppBrowser* navigationDelegate; +@property (nonatomic) NSURL* currentURL; + +- (void)close; +- (void)navigateTo:(NSURL*)url; +- (void)showLocationBar:(BOOL)show; +- (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition; +- (void)setCloseButtonTitle:(NSString*)title; + +- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions; + +@end + +@interface CDVInAppBrowserNavigationController : UINavigationController + +@property (nonatomic, weak) id orientationDelegate; + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m new file mode 100644 index 0000000..c9ebad2 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ios/CDVInAppBrowser.m @@ -0,0 +1,1107 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVInAppBrowser.h" +#import +#import + +#define kInAppBrowserTargetSelf @"_self" +#define kInAppBrowserTargetSystem @"_system" +#define kInAppBrowserTargetBlank @"_blank" + +#define kInAppBrowserToolbarBarPositionBottom @"bottom" +#define kInAppBrowserToolbarBarPositionTop @"top" + +#define TOOLBAR_HEIGHT 44.0 +#define STATUSBAR_HEIGHT 20.0 +#define LOCATIONBAR_HEIGHT 21.0 +#define FOOTER_HEIGHT ((TOOLBAR_HEIGHT) + (LOCATIONBAR_HEIGHT)) + +#pragma mark CDVInAppBrowser + +@interface CDVInAppBrowser () { + NSInteger _previousStatusBarStyle; +} +@end + +@implementation CDVInAppBrowser + +- (void)pluginInitialize +{ + _previousStatusBarStyle = -1; + _callbackIdPattern = nil; +} + +- (id)settingForKey:(NSString*)key +{ + return [self.commandDelegate.settings objectForKey:[key lowercaseString]]; +} + +- (void)onReset +{ + [self close:nil]; +} + +- (void)close:(CDVInvokedUrlCommand*)command +{ + if (self.inAppBrowserViewController == nil) { + NSLog(@"IAB.close() called but it was already closed."); + return; + } + // Things are cleaned up in browserExit. + [self.inAppBrowserViewController close]; +} + +- (BOOL) isSystemUrl:(NSURL*)url +{ + if ([[url host] isEqualToString:@"itunes.apple.com"]) { + return YES; + } + + return NO; +} + +- (void)open:(CDVInvokedUrlCommand*)command +{ + CDVPluginResult* pluginResult; + + NSString* url = [command argumentAtIndex:0]; + NSString* target = [command argumentAtIndex:1 withDefault:kInAppBrowserTargetSelf]; + NSString* options = [command argumentAtIndex:2 withDefault:@"" andClass:[NSString class]]; + + self.callbackId = command.callbackId; + + if (url != nil) { +#ifdef __CORDOVA_4_0_0 + NSURL* baseUrl = [self.webViewEngine URL]; +#else + NSURL* baseUrl = [self.webView.request URL]; +#endif + NSURL* absoluteUrl = [[NSURL URLWithString:url relativeToURL:baseUrl] absoluteURL]; + + if ([self isSystemUrl:absoluteUrl]) { + target = kInAppBrowserTargetSystem; + } + + if ([target isEqualToString:kInAppBrowserTargetSelf]) { + [self openInCordovaWebView:absoluteUrl withOptions:options]; + } else if ([target isEqualToString:kInAppBrowserTargetSystem]) { + [self openInSystem:absoluteUrl]; + } else { // _blank or anything else + [self openInInAppBrowser:absoluteUrl withOptions:options]; + } + + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"incorrect number of arguments"]; + } + + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options +{ + CDVInAppBrowserOptions* browserOptions = [CDVInAppBrowserOptions parseOptions:options]; + + if (browserOptions.clearcache) { + NSHTTPCookie *cookie; + NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + for (cookie in [storage cookies]) + { + if (![cookie.domain isEqual: @".^filecookies^"]) { + [storage deleteCookie:cookie]; + } + } + } + + if (browserOptions.clearsessioncache) { + NSHTTPCookie *cookie; + NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + for (cookie in [storage cookies]) + { + if (![cookie.domain isEqual: @".^filecookies^"] && cookie.isSessionOnly) { + [storage deleteCookie:cookie]; + } + } + } + + if (self.inAppBrowserViewController == nil) { + NSString* userAgent = [CDVUserAgentUtil originalUserAgent]; + NSString* overrideUserAgent = [self settingForKey:@"OverrideUserAgent"]; + NSString* appendUserAgent = [self settingForKey:@"AppendUserAgent"]; + if(overrideUserAgent){ + userAgent = overrideUserAgent; + } + if(appendUserAgent){ + userAgent = [userAgent stringByAppendingString: appendUserAgent]; + } + self.inAppBrowserViewController = [[CDVInAppBrowserViewController alloc] initWithUserAgent:userAgent prevUserAgent:[self.commandDelegate userAgent] browserOptions: browserOptions]; + self.inAppBrowserViewController.navigationDelegate = self; + + if ([self.viewController conformsToProtocol:@protocol(CDVScreenOrientationDelegate)]) { + self.inAppBrowserViewController.orientationDelegate = (UIViewController *)self.viewController; + } + } + + [self.inAppBrowserViewController showLocationBar:browserOptions.location]; + [self.inAppBrowserViewController showToolBar:browserOptions.toolbar :browserOptions.toolbarposition]; + if (browserOptions.closebuttoncaption != nil) { + [self.inAppBrowserViewController setCloseButtonTitle:browserOptions.closebuttoncaption]; + } + // Set Presentation Style + UIModalPresentationStyle presentationStyle = UIModalPresentationFullScreen; // default + if (browserOptions.presentationstyle != nil) { + if ([[browserOptions.presentationstyle lowercaseString] isEqualToString:@"pagesheet"]) { + presentationStyle = UIModalPresentationPageSheet; + } else if ([[browserOptions.presentationstyle lowercaseString] isEqualToString:@"formsheet"]) { + presentationStyle = UIModalPresentationFormSheet; + } + } + self.inAppBrowserViewController.modalPresentationStyle = presentationStyle; + + // Set Transition Style + UIModalTransitionStyle transitionStyle = UIModalTransitionStyleCoverVertical; // default + if (browserOptions.transitionstyle != nil) { + if ([[browserOptions.transitionstyle lowercaseString] isEqualToString:@"fliphorizontal"]) { + transitionStyle = UIModalTransitionStyleFlipHorizontal; + } else if ([[browserOptions.transitionstyle lowercaseString] isEqualToString:@"crossdissolve"]) { + transitionStyle = UIModalTransitionStyleCrossDissolve; + } + } + self.inAppBrowserViewController.modalTransitionStyle = transitionStyle; + + // prevent webView from bouncing + if (browserOptions.disallowoverscroll) { + if ([self.inAppBrowserViewController.webView respondsToSelector:@selector(scrollView)]) { + ((UIScrollView*)[self.inAppBrowserViewController.webView scrollView]).bounces = NO; + } else { + for (id subview in self.inAppBrowserViewController.webView.subviews) { + if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { + ((UIScrollView*)subview).bounces = NO; + } + } + } + } + + // UIWebView options + self.inAppBrowserViewController.webView.scalesPageToFit = browserOptions.enableviewportscale; + self.inAppBrowserViewController.webView.mediaPlaybackRequiresUserAction = browserOptions.mediaplaybackrequiresuseraction; + self.inAppBrowserViewController.webView.allowsInlineMediaPlayback = browserOptions.allowinlinemediaplayback; + if (IsAtLeastiOSVersion(@"6.0")) { + self.inAppBrowserViewController.webView.keyboardDisplayRequiresUserAction = browserOptions.keyboarddisplayrequiresuseraction; + self.inAppBrowserViewController.webView.suppressesIncrementalRendering = browserOptions.suppressesincrementalrendering; + } + + [self.inAppBrowserViewController navigateTo:url]; + if (!browserOptions.hidden) { + [self show:nil]; + } +} + +- (void)show:(CDVInvokedUrlCommand*)command +{ + if (self.inAppBrowserViewController == nil) { + NSLog(@"Tried to show IAB after it was closed."); + return; + } + if (_previousStatusBarStyle != -1) { + NSLog(@"Tried to show IAB while already shown"); + return; + } + + _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; + + __block CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] + initWithRootViewController:self.inAppBrowserViewController]; + nav.orientationDelegate = self.inAppBrowserViewController; + nav.navigationBarHidden = YES; + nav.modalPresentationStyle = self.inAppBrowserViewController.modalPresentationStyle; + + __weak CDVInAppBrowser* weakSelf = self; + + // Run later to avoid the "took a long time" log message. + dispatch_async(dispatch_get_main_queue(), ^{ + if (weakSelf.inAppBrowserViewController != nil) { + CGRect frame = [[UIScreen mainScreen] bounds]; + UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:frame]; + UIViewController *tmpController = [[UIViewController alloc] init]; + [tmpWindow setRootViewController:tmpController]; + [tmpWindow setWindowLevel:UIWindowLevelNormal]; + + [tmpWindow makeKeyAndVisible]; + [tmpController presentViewController:nav animated:YES completion:nil]; + } + }); +} + +- (void)hide:(CDVInvokedUrlCommand*)command +{ + if (self.inAppBrowserViewController == nil) { + NSLog(@"Tried to hide IAB after it was closed."); + return; + + + } + if (_previousStatusBarStyle == -1) { + NSLog(@"Tried to hide IAB while already hidden"); + return; + } + + _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; + + // Run later to avoid the "took a long time" log message. + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.inAppBrowserViewController != nil) { + _previousStatusBarStyle = -1; + [self.viewController dismissViewControllerAnimated:YES completion:nil]; + } + }); +} + +- (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options +{ + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + +#ifdef __CORDOVA_4_0_0 + // the webview engine itself will filter for this according to policy + // in config.xml for cordova-ios-4.0 + [self.webViewEngine loadRequest:request]; +#else + if ([self.commandDelegate URLIsWhitelisted:url]) { + [self.webView loadRequest:request]; + } else { // this assumes the InAppBrowser can be excepted from the white-list + [self openInInAppBrowser:url withOptions:options]; + } +#endif +} + +- (void)openInSystem:(NSURL*)url +{ + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + [[UIApplication sharedApplication] openURL:url]; +} + +// This is a helper method for the inject{Script|Style}{Code|File} API calls, which +// provides a consistent method for injecting JavaScript code into the document. +// +// If a wrapper string is supplied, then the source string will be JSON-encoded (adding +// quotes) and wrapped using string formatting. (The wrapper string should have a single +// '%@' marker). +// +// If no wrapper is supplied, then the source string is executed directly. + +- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper +{ + // Ensure an iframe bridge is created to communicate with the CDVInAppBrowserViewController + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:@"(function(d){_cdvIframeBridge=d.getElementById('_cdvIframeBridge');if(!_cdvIframeBridge) {var e = _cdvIframeBridge = d.createElement('iframe');e.id='_cdvIframeBridge'; e.style.display='none';d.body.appendChild(e);}})(document)"]; + + if (jsWrapper != nil) { + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil]; + NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + if (sourceArrayString) { + NSString* sourceString = [sourceArrayString substringWithRange:NSMakeRange(1, [sourceArrayString length] - 2)]; + NSString* jsToInject = [NSString stringWithFormat:jsWrapper, sourceString]; + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:jsToInject]; + } + } else { + [self.inAppBrowserViewController.webView stringByEvaluatingJavaScriptFromString:source]; + } +} + +- (void)injectScriptCode:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper = nil; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"_cdvIframeBridge.src='gap-iab://%@/'+encodeURIComponent(JSON.stringify([eval(%%@)]));", command.callbackId]; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectScriptFile:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('script'); c.src = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectStyleCode:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('style'); c.innerHTML = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('style'); c.innerHTML = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (void)injectStyleFile:(CDVInvokedUrlCommand*)command +{ + NSString* jsWrapper; + + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { + jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%@; c.onload = function() { _cdvIframeBridge.src='gap-iab://%@'; }; d.body.appendChild(c); })(document)", command.callbackId]; + } else { + jsWrapper = @"(function(d) { var c = d.createElement('link'); c.rel='stylesheet', c.type='text/css'; c.href = %@; d.body.appendChild(c); })(document)"; + } + [self injectDeferredObject:[command argumentAtIndex:0] withWrapper:jsWrapper]; +} + +- (BOOL)isValidCallbackId:(NSString *)callbackId +{ + NSError *err = nil; + // Initialize on first use + if (self.callbackIdPattern == nil) { + self.callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"^InAppBrowser[0-9]{1,10}$" options:0 error:&err]; + if (err != nil) { + // Couldn't initialize Regex; No is safer than Yes. + return NO; + } + } + if ([self.callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) { + return YES; + } + return NO; +} + +/** + * The iframe bridge provided for the InAppBrowser is capable of executing any oustanding callback belonging + * to the InAppBrowser plugin. Care has been taken that other callbacks cannot be triggered, and that no + * other code execution is possible. + * + * To trigger the bridge, the iframe (or any other resource) should attempt to load a url of the form: + * + * gap-iab:/// + * + * where is the string id of the callback to trigger (something like "InAppBrowser0123456789") + * + * If present, the path component of the special gap-iab:// url is expected to be a URL-escaped JSON-encoded + * value to pass to the callback. [NSURL path] should take care of the URL-unescaping, and a JSON_EXCEPTION + * is returned if the JSON is invalid. + */ +- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL* url = request.URL; + BOOL isTopLevelNavigation = [request.URL isEqual:[request mainDocumentURL]]; + + // See if the url uses the 'gap-iab' protocol. If so, the host should be the id of a callback to execute, + // and the path, if present, should be a JSON-encoded value to pass to the callback. + if ([[url scheme] isEqualToString:@"gap-iab"]) { + NSString* scriptCallbackId = [url host]; + CDVPluginResult* pluginResult = nil; + + if ([self isValidCallbackId:scriptCallbackId]) { + NSString* scriptResult = [url path]; + NSError* __autoreleasing error = nil; + + // The message should be a JSON-encoded array of the result of the script which executed. + if ((scriptResult != nil) && ([scriptResult length] > 1)) { + scriptResult = [scriptResult substringFromIndex:1]; + NSData* decodedResult = [NSJSONSerialization JSONObjectWithData:[scriptResult dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error]; + if ((error == nil) && [decodedResult isKindOfClass:[NSArray class]]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:(NSArray*)decodedResult]; + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_JSON_EXCEPTION]; + } + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:@[]]; + } + [self.commandDelegate sendPluginResult:pluginResult callbackId:scriptCallbackId]; + return NO; + } + } + //if is an app store link, let the system handle it, otherwise it fails to load it + else if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) { + [theWebView stopLoading]; + [self openInSystem:url]; + return NO; + } + else if ((self.callbackId != nil) && isTopLevelNavigation) { + // Send a loadstart event for each top-level navigation (includes redirects). + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"loadstart", @"url":[url absoluteString]}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } + + return YES; +} + +- (void)webViewDidStartLoad:(UIWebView*)theWebView +{ +} + +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + if (self.callbackId != nil) { + // TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected). + NSString* url = [self.inAppBrowserViewController.currentURL absoluteString]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"loadstop", @"url":url}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } +} + +- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + if (self.callbackId != nil) { + NSString* url = [self.inAppBrowserViewController.currentURL absoluteString]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR + messageAsDictionary:@{@"type":@"loaderror", @"url":url, @"code": [NSNumber numberWithInteger:error.code], @"message": error.localizedDescription}]; + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + } +} + +- (void)browserExit +{ + if (self.callbackId != nil) { + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK + messageAsDictionary:@{@"type":@"exit"}]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + self.callbackId = nil; + } + // Set navigationDelegate to nil to ensure no callbacks are received from it. + self.inAppBrowserViewController.navigationDelegate = nil; + // Don't recycle the ViewController since it may be consuming a lot of memory. + // Also - this is required for the PDF/User-Agent bug work-around. + self.inAppBrowserViewController = nil; + + if (IsAtLeastiOSVersion(@"7.0")) { + if (_previousStatusBarStyle != -1) { + [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; + } + } + + _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7 +} + +@end + +#pragma mark CDVInAppBrowserViewController + +@implementation CDVInAppBrowserViewController + +@synthesize currentURL; + +- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions +{ + self = [super init]; + if (self != nil) { + _userAgent = userAgent; + _prevUserAgent = prevUserAgent; + _browserOptions = browserOptions; +#ifdef __CORDOVA_4_0_0 + _webViewDelegate = [[CDVUIWebViewDelegate alloc] initWithDelegate:self]; +#else + _webViewDelegate = [[CDVWebViewDelegate alloc] initWithDelegate:self]; +#endif + + [self createViews]; + } + + return self; +} + +// Prevent crashes on closing windows +-(void)dealloc { + self.webView.delegate = nil; +} + +- (void)createViews +{ + // We create the views in code for primarily for ease of upgrades and not requiring an external .xib to be included + + CGRect webViewBounds = self.view.bounds; + BOOL toolbarIsAtBottom = ![_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]; + webViewBounds.size.height -= _browserOptions.location ? FOOTER_HEIGHT : TOOLBAR_HEIGHT; + self.webView = [[UIWebView alloc] initWithFrame:webViewBounds]; + + self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + + [self.view addSubview:self.webView]; + [self.view sendSubviewToBack:self.webView]; + + self.webView.delegate = _webViewDelegate; + self.webView.backgroundColor = [UIColor whiteColor]; + + self.webView.clearsContextBeforeDrawing = YES; + self.webView.clipsToBounds = YES; + self.webView.contentMode = UIViewContentModeScaleToFill; + self.webView.multipleTouchEnabled = YES; + self.webView.opaque = YES; + self.webView.scalesPageToFit = NO; + self.webView.userInteractionEnabled = YES; + + self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; + self.spinner.alpha = 1.000; + self.spinner.autoresizesSubviews = YES; + self.spinner.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin); + self.spinner.clearsContextBeforeDrawing = NO; + self.spinner.clipsToBounds = NO; + self.spinner.contentMode = UIViewContentModeScaleToFill; + self.spinner.frame = CGRectMake(CGRectGetMidX(self.webView.frame), CGRectGetMidY(self.webView.frame), 20.0, 20.0); + self.spinner.hidden = NO; + self.spinner.hidesWhenStopped = YES; + self.spinner.multipleTouchEnabled = NO; + self.spinner.opaque = NO; + self.spinner.userInteractionEnabled = NO; + [self.spinner stopAnimating]; + + self.closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; + self.closeButton.enabled = YES; + + UIBarButtonItem* flexibleSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; + + UIBarButtonItem* fixedSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; + fixedSpaceButton.width = 20; + + float toolbarY = toolbarIsAtBottom ? self.view.bounds.size.height - TOOLBAR_HEIGHT : 0.0; + CGRect toolbarFrame = CGRectMake(0.0, toolbarY, self.view.bounds.size.width, TOOLBAR_HEIGHT); + + self.toolbar = [[UIToolbar alloc] initWithFrame:toolbarFrame]; + self.toolbar.alpha = 1.000; + self.toolbar.autoresizesSubviews = YES; + self.toolbar.autoresizingMask = toolbarIsAtBottom ? (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin) : UIViewAutoresizingFlexibleWidth; + self.toolbar.barStyle = UIBarStyleBlackOpaque; + self.toolbar.clearsContextBeforeDrawing = NO; + self.toolbar.clipsToBounds = NO; + self.toolbar.contentMode = UIViewContentModeScaleToFill; + self.toolbar.hidden = NO; + self.toolbar.multipleTouchEnabled = NO; + self.toolbar.opaque = NO; + self.toolbar.userInteractionEnabled = YES; + + CGFloat labelInset = 5.0; + float locationBarY = toolbarIsAtBottom ? self.view.bounds.size.height - FOOTER_HEIGHT : self.view.bounds.size.height - LOCATIONBAR_HEIGHT; + + self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(labelInset, locationBarY, self.view.bounds.size.width - labelInset, LOCATIONBAR_HEIGHT)]; + self.addressLabel.adjustsFontSizeToFitWidth = NO; + self.addressLabel.alpha = 1.000; + self.addressLabel.autoresizesSubviews = YES; + self.addressLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; + self.addressLabel.backgroundColor = [UIColor clearColor]; + self.addressLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; + self.addressLabel.clearsContextBeforeDrawing = YES; + self.addressLabel.clipsToBounds = YES; + self.addressLabel.contentMode = UIViewContentModeScaleToFill; + self.addressLabel.enabled = YES; + self.addressLabel.hidden = NO; + self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail; + + if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) { + [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"]; + } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) { + [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"]; + } + + self.addressLabel.multipleTouchEnabled = NO; + self.addressLabel.numberOfLines = 1; + self.addressLabel.opaque = NO; + self.addressLabel.shadowOffset = CGSizeMake(0.0, -1.0); + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); + self.addressLabel.textAlignment = NSTextAlignmentLeft; + self.addressLabel.textColor = [UIColor colorWithWhite:1.000 alpha:1.000]; + self.addressLabel.userInteractionEnabled = NO; + + NSString* frontArrowString = NSLocalizedString(@"►", nil); // create arrow from Unicode char + self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)]; + self.forwardButton.enabled = YES; + self.forwardButton.imageInsets = UIEdgeInsetsZero; + + NSString* backArrowString = NSLocalizedString(@"◄", nil); // create arrow from Unicode char + self.backButton = [[UIBarButtonItem alloc] initWithTitle:backArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goBack:)]; + self.backButton.enabled = YES; + self.backButton.imageInsets = UIEdgeInsetsZero; + + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; + + self.view.backgroundColor = [UIColor grayColor]; + [self.view addSubview:self.toolbar]; + [self.view addSubview:self.addressLabel]; + [self.view addSubview:self.spinner]; +} + +- (void) setWebViewFrame : (CGRect) frame { + NSLog(@"Setting the WebView's frame to %@", NSStringFromCGRect(frame)); + [self.webView setFrame:frame]; +} + +- (void)setCloseButtonTitle:(NSString*)title +{ + // the advantage of using UIBarButtonSystemItemDone is the system will localize it for you automatically + // but, if you want to set this yourself, knock yourself out (we can't set the title for a system Done button, so we have to create a new one) + self.closeButton = nil; + self.closeButton = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStyleBordered target:self action:@selector(close)]; + self.closeButton.enabled = YES; + self.closeButton.tintColor = [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; + + NSMutableArray* items = [self.toolbar.items mutableCopy]; + [items replaceObjectAtIndex:0 withObject:self.closeButton]; + [self.toolbar setItems:items]; +} + +- (void)showLocationBar:(BOOL)show +{ + CGRect locationbarFrame = self.addressLabel.frame; + + BOOL toolbarVisible = !self.toolbar.hidden; + + // prevent double show/hide + if (show == !(self.addressLabel.hidden)) { + return; + } + + if (show) { + self.addressLabel.hidden = NO; + + if (toolbarVisible) { + // toolBar at the bottom, leave as is + // put locationBar on top of the toolBar + + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= FOOTER_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } else { + // no toolBar, so put locationBar at the bottom + + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= LOCATIONBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } + } else { + self.addressLabel.hidden = YES; + + if (toolbarVisible) { + // locationBar is on top of toolBar, hide locationBar + + // webView take up whole height less toolBar height + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= TOOLBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + } else { + // no toolBar, expand webView to screen dimensions + [self setWebViewFrame:self.view.bounds]; + } + } +} + +- (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition +{ + CGRect toolbarFrame = self.toolbar.frame; + CGRect locationbarFrame = self.addressLabel.frame; + + BOOL locationbarVisible = !self.addressLabel.hidden; + + // prevent double show/hide + if (show == !(self.toolbar.hidden)) { + return; + } + + if (show) { + self.toolbar.hidden = NO; + CGRect webViewBounds = self.view.bounds; + + if (locationbarVisible) { + // locationBar at the bottom, move locationBar up + // put toolBar at the bottom + webViewBounds.size.height -= FOOTER_HEIGHT; + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + self.toolbar.frame = toolbarFrame; + } else { + // no locationBar, so put toolBar at the bottom + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= TOOLBAR_HEIGHT; + self.toolbar.frame = toolbarFrame; + } + + if ([toolbarPosition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { + toolbarFrame.origin.y = 0; + webViewBounds.origin.y += toolbarFrame.size.height; + [self setWebViewFrame:webViewBounds]; + } else { + toolbarFrame.origin.y = (webViewBounds.size.height + LOCATIONBAR_HEIGHT); + } + [self setWebViewFrame:webViewBounds]; + + } else { + self.toolbar.hidden = YES; + + if (locationbarVisible) { + // locationBar is on top of toolBar, hide toolBar + // put locationBar at the bottom + + // webView take up whole height less locationBar height + CGRect webViewBounds = self.view.bounds; + webViewBounds.size.height -= LOCATIONBAR_HEIGHT; + [self setWebViewFrame:webViewBounds]; + + // move locationBar down + locationbarFrame.origin.y = webViewBounds.size.height; + self.addressLabel.frame = locationbarFrame; + } else { + // no locationBar, expand webView to screen dimensions + [self setWebViewFrame:self.view.bounds]; + } + } +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; +} + +- (void)viewDidUnload +{ + [self.webView loadHTMLString:nil baseURL:nil]; + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + [super viewDidUnload]; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return UIStatusBarStyleDefault; +} + +- (BOOL)prefersStatusBarHidden { + return NO; +} + +- (void)close +{ + [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; + self.currentURL = nil; + + if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserExit)]) { + [self.navigationDelegate browserExit]; + } + + __weak UIViewController* weakSelf = self; + + // Run later to avoid the "took a long time" log message. + dispatch_async(dispatch_get_main_queue(), ^{ + if ([weakSelf respondsToSelector:@selector(presentingViewController)]) { + [[weakSelf presentingViewController] dismissViewControllerAnimated:YES completion:nil]; + } else { + [[weakSelf parentViewController] dismissViewControllerAnimated:YES completion:nil]; + } + }); +} + +- (void)navigateTo:(NSURL*)url +{ + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + + if (_userAgentLockToken != 0) { + [self.webView loadRequest:request]; + } else { + __weak CDVInAppBrowserViewController* weakSelf = self; + [CDVUserAgentUtil acquireLock:^(NSInteger lockToken) { + _userAgentLockToken = lockToken; + [CDVUserAgentUtil setUserAgent:_userAgent lockToken:lockToken]; + [weakSelf.webView loadRequest:request]; + }]; + } +} + +- (void)goBack:(id)sender +{ + [self.webView goBack]; +} + +- (void)goForward:(id)sender +{ + [self.webView goForward]; +} + +- (void)viewWillAppear:(BOOL)animated +{ + if (IsAtLeastiOSVersion(@"7.0")) { + [[UIApplication sharedApplication] setStatusBarStyle:[self preferredStatusBarStyle]]; + } + [self rePositionViews]; + + [super viewWillAppear:animated]; +} + +// +// On iOS 7 the status bar is part of the view's dimensions, therefore it's height has to be taken into account. +// The height of it could be hardcoded as 20 pixels, but that would assume that the upcoming releases of iOS won't +// change that value. +// +- (float) getStatusBarOffset { + CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; + float statusBarOffset = IsAtLeastiOSVersion(@"7.0") ? MIN(statusBarFrame.size.width, statusBarFrame.size.height) : 0.0; + return statusBarOffset; +} + +- (void) rePositionViews { + if ([_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { + [self.webView setFrame:CGRectMake(self.webView.frame.origin.x, TOOLBAR_HEIGHT, self.webView.frame.size.width, self.webView.frame.size.height)]; + [self.toolbar setFrame:CGRectMake(self.toolbar.frame.origin.x, [self getStatusBarOffset], self.toolbar.frame.size.width, self.toolbar.frame.size.height)]; + } +} + +#pragma mark UIWebViewDelegate + +- (void)webViewDidStartLoad:(UIWebView*)theWebView +{ + // loading url, start spinner, update back/forward + + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + + [self.spinner startAnimating]; + + return [self.navigationDelegate webViewDidStartLoad:theWebView]; +} + +- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + BOOL isTopLevelNavigation = [request.URL isEqual:[request mainDocumentURL]]; + + if (isTopLevelNavigation) { + self.currentURL = request.URL; + } + return [self.navigationDelegate webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; +} + +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + // update url, stop spinner, update back/forward + + self.addressLabel.text = [self.currentURL absoluteString]; + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + + [self.spinner stopAnimating]; + + // Work around a bug where the first time a PDF is opened, all UIWebViews + // reload their User-Agent from NSUserDefaults. + // This work-around makes the following assumptions: + // 1. The app has only a single Cordova Webview. If not, then the app should + // take it upon themselves to load a PDF in the background as a part of + // their start-up flow. + // 2. That the PDF does not require any additional network requests. We change + // the user-agent here back to that of the CDVViewController, so requests + // from it must pass through its white-list. This *does* break PDFs that + // contain links to other remote PDF/websites. + // More info at https://issues.apache.org/jira/browse/CB-2225 + BOOL isPDF = [@"true" isEqualToString :[theWebView stringByEvaluatingJavaScriptFromString:@"document.body==null"]]; + if (isPDF) { + [CDVUserAgentUtil setUserAgent:_prevUserAgent lockToken:_userAgentLockToken]; + } + + [self.navigationDelegate webViewDidFinishLoad:theWebView]; +} + +- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + // log fail message, stop spinner, update back/forward + NSLog(@"webView:didFailLoadWithError - %ld: %@", (long)error.code, [error localizedDescription]); + + self.backButton.enabled = theWebView.canGoBack; + self.forwardButton.enabled = theWebView.canGoForward; + [self.spinner stopAnimating]; + + self.addressLabel.text = NSLocalizedString(@"Load Error", nil); + + [self.navigationDelegate webView:theWebView didFailLoadWithError:error]; +} + +#pragma mark CDVScreenOrientationDelegate + +- (BOOL)shouldAutorotate +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) { + return [self.orientationDelegate shouldAutorotate]; + } + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { + return [self.orientationDelegate supportedInterfaceOrientations]; + } + + return 1 << UIInterfaceOrientationPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) { + return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + + return YES; +} + +@end + +@implementation CDVInAppBrowserOptions + +- (id)init +{ + if (self = [super init]) { + // default values + self.location = YES; + self.toolbar = YES; + self.closebuttoncaption = nil; + self.toolbarposition = kInAppBrowserToolbarBarPositionBottom; + self.clearcache = NO; + self.clearsessioncache = NO; + + self.enableviewportscale = NO; + self.mediaplaybackrequiresuseraction = NO; + self.allowinlinemediaplayback = NO; + self.keyboarddisplayrequiresuseraction = YES; + self.suppressesincrementalrendering = NO; + self.hidden = NO; + self.disallowoverscroll = NO; + } + + return self; +} + ++ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options +{ + CDVInAppBrowserOptions* obj = [[CDVInAppBrowserOptions alloc] init]; + + // NOTE: this parsing does not handle quotes within values + NSArray* pairs = [options componentsSeparatedByString:@","]; + + // parse keys and values, set the properties + for (NSString* pair in pairs) { + NSArray* keyvalue = [pair componentsSeparatedByString:@"="]; + + if ([keyvalue count] == 2) { + NSString* key = [[keyvalue objectAtIndex:0] lowercaseString]; + NSString* value = [keyvalue objectAtIndex:1]; + NSString* value_lc = [value lowercaseString]; + + BOOL isBoolean = [value_lc isEqualToString:@"yes"] || [value_lc isEqualToString:@"no"]; + NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; + [numberFormatter setAllowsFloats:YES]; + BOOL isNumber = [numberFormatter numberFromString:value_lc] != nil; + + // set the property according to the key name + if ([obj respondsToSelector:NSSelectorFromString(key)]) { + if (isNumber) { + [obj setValue:[numberFormatter numberFromString:value_lc] forKey:key]; + } else if (isBoolean) { + [obj setValue:[NSNumber numberWithBool:[value_lc isEqualToString:@"yes"]] forKey:key]; + } else { + [obj setValue:value forKey:key]; + } + } + } + } + + return obj; +} + +@end + +@implementation CDVInAppBrowserNavigationController : UINavigationController + +- (void) dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion { + if ( self.presentedViewController) { + [super dismissViewControllerAnimated:flag completion:completion]; + } +} + +- (void) viewDidLoad { + + CGRect statusBarFrame = [self invertFrameIfNeeded:[UIApplication sharedApplication].statusBarFrame]; + statusBarFrame.size.height = STATUSBAR_HEIGHT; + // simplified from: http://stackoverflow.com/a/25669695/219684 + + UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:statusBarFrame]; + bgToolbar.barStyle = UIBarStyleDefault; + [bgToolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; + [self.view addSubview:bgToolbar]; + + [super viewDidLoad]; +} + +- (CGRect) invertFrameIfNeeded:(CGRect)rect { + // We need to invert since on iOS 7 frames are always in Portrait context + if (!IsAtLeastiOSVersion(@"8.0")) { + if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { + CGFloat temp = rect.size.width; + rect.size.width = rect.size.height; + rect.size.height = temp; + } + rect.origin = CGPointZero; + } + return rect; +} + +#pragma mark CDVScreenOrientationDelegate + +- (BOOL)shouldAutorotate +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) { + return [self.orientationDelegate shouldAutorotate]; + } + return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { + return [self.orientationDelegate supportedInterfaceOrientations]; + } + + return 1 << UIInterfaceOrientationPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) { + return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } + + return YES; +} + + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.h new file mode 100644 index 0000000..742af70 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.h @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVInAppBrowser : CDVPlugin { +} + +@property (nonatomic, copy) NSString* callbackId; + +- (void)open:(CDVInvokedUrlCommand*)command; + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.m new file mode 100644 index 0000000..9d579e1 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/osx/CDVInAppBrowser.m @@ -0,0 +1,89 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVInAppBrowser.h" +#import + +#define kInAppBrowserTargetSelf @"_self" +#define kInAppBrowserTargetSystem @"_system" +#define kInAppBrowserTargetBlank @"_blank" + +@interface CDVInAppBrowser () { +} +@end + +@implementation CDVInAppBrowser + +- (void)pluginInitialize +{ +} + +- (BOOL) isSystemUrl:(NSURL*)url +{ + if ([[url host] isEqualToString:@"itunes.apple.com"]) { + return YES; + } + + return NO; +} + +- (void)open:(CDVInvokedUrlCommand*)command +{ + CDVPluginResult* pluginResult; + + NSString* url = [command argumentAtIndex:0]; + NSString* target = [command argumentAtIndex:1 withDefault:kInAppBrowserTargetSelf]; + + self.callbackId = command.callbackId; + + if (url != nil) { + + NSURL* baseUrl = [NSURL URLWithString:url]; + + NSURL* absoluteUrl = [[NSURL URLWithString:url relativeToURL:baseUrl] absoluteURL]; + + if ([self isSystemUrl:absoluteUrl]) { + target = kInAppBrowserTargetSystem; + } + + if ([target isEqualToString:kInAppBrowserTargetSelf]) { + //[self openInCordovaWebView:absoluteUrl withOptions:options]; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Not Yet Implemented for OSX: [self openInCordovaWebView:absoluteUrl withOptions:options]"]; + } else if ([target isEqualToString:kInAppBrowserTargetSystem]) { + [self openInSystem:absoluteUrl]; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else { // _blank or anything else + //[self openInInAppBrowser:absoluteUrl withOptions:options]; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Not Yet Implemented for OSX: [self openInInAppBrowser:absoluteUrl withOptions:options]"]; + } + + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"incorrect number of arguments"]; + } + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (void)openInSystem:(NSURL*)url +{ + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +@end + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml new file mode 100644 index 0000000..781e8a6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser.qml @@ -0,0 +1,92 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +import QtQuick 2.0 +import Ubuntu.Components.Popups 0.1 +import Ubuntu.Components 0.1 +import com.canonical.Oxide 1.0 + +Rectangle { + anchors.fill: parent + id: inappbrowser + property string url1 + Rectangle { + border.color: "black" + width: parent.width + height: urlEntry.height + color: "gray" + TextInput { + id: urlEntry + width: parent.width - closeButton.width + text: url1 + activeFocusOnPress: false + } + Image { + id: closeButton + width: height + x: parent.width - width + height: parent.height + source: "close.png" + MouseArea { + anchors.fill: parent + onClicked: { + root.exec("InAppBrowser", "close", [0, 0]) + } + } + } + } + + property string usContext: "oxide://main-world/2" + + function executeJS(scId, code) { + var req = _view.rootFrame.sendMessage(usContext, "EXECUTE", {code: code}); + + req.onreply = function(response) { + var code = 'cordova.callback(' + scId + ', JSON.parse(\'' + JSON.stringify(response.result) + '\'))'; + console.warn(code); + cordova.javaScriptExecNeeded(code); + console.warn("RESP:" + JSON.stringify(response)); + }; + } + + WebView { + width: parent.width + y: urlEntry.height + height: parent.height - y + url: url1 + id: _view + onLoadingStateChanged: { + root.exec("InAppBrowser", "loadFinished", [_view.loading]) + } + context: WebContext { + id: webcontext + + userScripts: [ + UserScript { + context: usContext + emulateGreasemonkey: true + url: "InAppBrowser_escapeScript.js" + } + ] + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js new file mode 100644 index 0000000..b01daeb --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/InAppBrowser_escapeScript.js @@ -0,0 +1,32 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint -W061 */ +/* global oxide */ + +oxide.addMessageHandler("EXECUTE", function(msg) { + var code = msg.args.code; + try { + msg.reply({result: eval(code)}); + } catch(e) { + msg.error("Code threw exception: \"" + e + "\""); + } +}); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png new file mode 100644 index 0000000..56373d1 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/close.png differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp new file mode 100644 index 0000000..a928eff --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.cpp @@ -0,0 +1,109 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +#include +#include + +#include "inappbrowser.h" +#include + +Inappbrowser::Inappbrowser(Cordova *cordova): CPlugin(cordova), _eventCb(0) { +} + +const char code[] = "\ +var component; \ +function createObject() { \ + component = Qt.createComponent(%1); \ + if (component.status == Component.Ready) \ + finishCreation(); \ + else \ + component.statusChanged.connect(finishCreation); \ +} \ +function finishCreation() { \ + CordovaWrapper.global.inappbrowser = component.createObject(root, \ + {root: root, cordova: cordova, url1: %2}); \ +} \ +createObject()"; + +const char EXIT_EVENT[] = "{type: 'exit'}"; +const char LOADSTART_EVENT[] = "{type: 'loadstart'}"; +const char LOADSTOP_EVENT[] = "{type: 'loadstop'}"; +const char LOADERROR_EVENT[] = "{type: 'loaderror'}"; + +void Inappbrowser::open(int cb, int, const QString &url, const QString &, const QString &) { + assert(_eventCb == 0); + + _eventCb = cb; + + QString path = m_cordova->get_app_dir() + "/../qml/InAppBrowser.qml"; + QString qml = QString(code) + .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(url)); + m_cordova->execQML(qml); +} + +void Inappbrowser::show(int, int) { + m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = true"); +} + +void Inappbrowser::hide(int, int) { + m_cordova->execQML("CordovaWrapper.global.inappbrowser.visible = false"); +} + +void Inappbrowser::close(int, int) { + m_cordova->execQML("CordovaWrapper.global.inappbrowser.destroy()"); + this->callbackWithoutRemove(_eventCb, EXIT_EVENT); + _eventCb = 0; +} + +void Inappbrowser::injectStyleFile(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %1; d.head.appendChild(c);})(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectStyleCode(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('style'); c.innerHTML = %1; d.body.appendChild(c); })(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectScriptFile(int scId, int ecId, const QString& src, bool b) { + QString code("(function(d) { var c = d.createElement('script'); c.src = %1; d.body.appendChild(c);})(document)"); + code = code.arg(CordovaInternal::format(src)); + + injectScriptCode(scId, ecId, code, b); +} + +void Inappbrowser::injectScriptCode(int scId, int, const QString& code, bool) { + m_cordova->execQML(QString("CordovaWrapper.global.inappbrowser.executeJS(%2, %1)").arg(CordovaInternal::format(code)).arg(scId)); +} + +void Inappbrowser::loadFinished(bool status) { + if (!status) { + this->callbackWithoutRemove(_eventCb, LOADSTOP_EVENT); + } else { + this->callbackWithoutRemove(_eventCb, LOADSTART_EVENT); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h new file mode 100644 index 0000000..9ad61ec --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/ubuntu/inappbrowser.h @@ -0,0 +1,62 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +#ifndef INAPPBROWSER_H +#define INAPPBROWSER_H + +#include +#include + +class Inappbrowser: public CPlugin { + Q_OBJECT +public: + Inappbrowser(Cordova *cordova); + + virtual const QString fullName() override { + return Inappbrowser::fullID(); + } + + virtual const QString shortName() override { + return "InAppBrowser"; + } + + static const QString fullID() { + return "InAppBrowser"; + } + +public slots: + void open(int cb, int, const QString &url, const QString &windowName, const QString &windowFeatures); + void show(int, int); + void hide(int, int); + void close(int, int); + void injectStyleFile(int cb, int, const QString&, bool); + void injectStyleCode(int cb, int, const QString&, bool); + void injectScriptFile(int cb, int, const QString&, bool); + void injectScriptCode(int cb, int, const QString&, bool); + + void loadFinished(bool status); + +private: + int _eventCb; +}; + +#endif diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js new file mode 100644 index 0000000..dec91db --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/windows/InAppBrowserProxy.js @@ -0,0 +1,386 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jslint sloppy:true */ +/* global Windows:true, setImmediate */ + +var cordova = require('cordova'), + urlutil = require('cordova/urlutil'); + +var browserWrap, + popup, + navigationButtonsDiv, + navigationButtonsDivInner, + backButton, + forwardButton, + closeButton, + bodyOverflowStyle, + navigationEventsCallback, + hardwareBackCallback; + +// x-ms-webview is available starting from Windows 8.1 (platformId is 'windows') +// http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx +var isWebViewAvailable = cordova.platformId === 'windows'; + +function attachNavigationEvents(element, callback) { + if (isWebViewAvailable) { + element.addEventListener("MSWebViewNavigationStarting", function (e) { + callback({ type: "loadstart", url: e.uri}, {keepCallback: true} ); + }); + + element.addEventListener("MSWebViewNavigationCompleted", function (e) { + if (e.isSuccess) { + callback({ type: "loadstop", url: e.uri }, { keepCallback: true }); + } else { + callback({ type: "loaderror", url: e.uri, code: e.webErrorStatus, message: "Navigation failed with error code " + e.webErrorStatus}, { keepCallback: true }); + } + }); + + element.addEventListener("MSWebViewUnviewableContentIdentified", function (e) { + // WebView found the content to be not HTML. + // http://msdn.microsoft.com/en-us/library/windows/apps/dn609716.aspx + callback({ type: "loaderror", url: e.uri, code: e.webErrorStatus, message: "Navigation failed with error code " + e.webErrorStatus}, { keepCallback: true }); + }); + + element.addEventListener("MSWebViewContentLoading", function (e) { + if (navigationButtonsDiv && popup) { + if (popup.canGoBack) { + backButton.removeAttribute("disabled"); + } else { + backButton.setAttribute("disabled", "true"); + } + + if (popup.canGoForward) { + forwardButton.removeAttribute("disabled"); + } else { + forwardButton.setAttribute("disabled", "true"); + } + } + }); + } else { + var onError = function () { + callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true}); + }; + + element.addEventListener("unload", function () { + callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("load", function () { + callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true}); + }); + + element.addEventListener("error", onError); + element.addEventListener("abort", onError); + } +} + +var IAB = { + close: function (win, lose) { + setImmediate(function () { + if (browserWrap) { + if (navigationEventsCallback) { + navigationEventsCallback({ type: "exit" }); + } + + browserWrap.parentNode.removeChild(browserWrap); + // Reset body overflow style to initial value + document.body.style.msOverflowStyle = bodyOverflowStyle; + browserWrap = null; + popup = null; + + document.removeEventListener("backbutton", hardwareBackCallback, false); + } + }); + }, + show: function (win, lose) { + setImmediate(function () { + if (browserWrap) { + browserWrap.style.display = "block"; + } + }); + }, + hide: function (win, lose) { + if (browserWrap) { + browserWrap.style.display = "none"; + } + }, + open: function (win, lose, args) { + // make function async so that we can add navigation events handlers before view is loaded and navigation occured + setImmediate(function () { + var strUrl = args[0], + target = args[1], + features = args[2], + url; + + navigationEventsCallback = win; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_self" || !target) { + window.location = strUrl; + } else { + // "_blank" or anything else + if (!browserWrap) { + var browserWrapStyle = document.createElement('link'); + browserWrapStyle.rel = "stylesheet"; + browserWrapStyle.type = "text/css"; + browserWrapStyle.href = urlutil.makeAbsolute("/www/css/inappbrowser.css"); + + document.head.appendChild(browserWrapStyle); + + browserWrap = document.createElement("div"); + browserWrap.className = "inAppBrowserWrap"; + + if (features.indexOf("fullscreen=yes") > -1) { + browserWrap.classList.add("inAppBrowserWrapFullscreen"); + } + + // Save body overflow style to be able to reset it back later + bodyOverflowStyle = document.body.style.msOverflowStyle; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(navigationEventsCallback); + }, 0); + }; + + document.body.appendChild(browserWrap); + // Hide scrollbars for the whole body while inappbrowser's window is open + document.body.style.msOverflowStyle = "none"; + } + + if (features.indexOf("hidden=yes") !== -1) { + browserWrap.style.display = "none"; + } + + popup = document.createElement(isWebViewAvailable ? "x-ms-webview" : "iframe"); + if (popup instanceof HTMLIFrameElement) { + // For iframe we need to override bacground color of parent element here + // otherwise pages without background color set will have transparent background + popup.style.backgroundColor = "white"; + } + popup.style.borderWidth = "0px"; + popup.style.width = "100%"; + popup.style.marginBottom = "-5px"; + + browserWrap.appendChild(popup); + + var closeHandler = function (e) { + setTimeout(function () { + IAB.close(navigationEventsCallback); + }, 0); + }; + + if (features.indexOf("hardwareback=yes") > -1 || features.indexOf("hardwareback") === -1) { + hardwareBackCallback = function () { + if (browserWrap.style.display === 'none') { + // NOTE: backbutton handlers have to throw an exception in order to prevent + // returning 'true' inside cordova-js, which would mean that the event is handled by user. + // Throwing an exception means that the default/system navigation behavior will take place, + // which is to exit the app if the navigation stack is empty. + throw 'Exit the app'; + } + + if (popup.canGoBack) { + popup.goBack(); + } else { + closeHandler(); + } + }; + } else if (features.indexOf("hardwareback=no") > -1) { + hardwareBackCallback = function () { + if (browserWrap.style.display === 'none') { + // See comment above + throw 'Exit the app'; + } + + closeHandler(); + }; + } + + document.addEventListener("backbutton", hardwareBackCallback, false); + + if (features.indexOf("location=yes") !== -1 || features.indexOf("location") === -1) { + popup.style.height = "calc(100% - 70px)"; + + navigationButtonsDiv = document.createElement("div"); + navigationButtonsDiv.className = "inappbrowser-app-bar"; + navigationButtonsDiv.onclick = function (e) { + e.cancelBubble = true; + }; + + navigationButtonsDivInner = document.createElement("div"); + navigationButtonsDivInner.className = "inappbrowser-app-bar-inner"; + navigationButtonsDivInner.onclick = function (e) { + e.cancelBubble = true; + }; + + backButton = document.createElement("div"); + backButton.innerText = "back"; + backButton.className = "app-bar-action action-back"; + backButton.addEventListener("click", function (e) { + if (popup.canGoBack) + popup.goBack(); + }); + + forwardButton = document.createElement("div"); + forwardButton.innerText = "forward"; + forwardButton.className = "app-bar-action action-forward"; + forwardButton.addEventListener("click", function (e) { + if (popup.canGoForward) + popup.goForward(); + }); + + closeButton = document.createElement("div"); + closeButton.innerText = "close"; + closeButton.className = "app-bar-action action-close"; + closeButton.addEventListener("click", closeHandler); + + if (!isWebViewAvailable) { + // iframe navigation is not yet supported + backButton.setAttribute("disabled", "true"); + forwardButton.setAttribute("disabled", "true"); + } + + navigationButtonsDivInner.appendChild(backButton); + navigationButtonsDivInner.appendChild(forwardButton); + navigationButtonsDivInner.appendChild(closeButton); + navigationButtonsDiv.appendChild(navigationButtonsDivInner); + + browserWrap.appendChild(navigationButtonsDiv); + } else { + popup.style.height = "100%"; + } + + // start listening for navigation events + attachNavigationEvents(popup, navigationEventsCallback); + + if (isWebViewAvailable) { + strUrl = strUrl.replace("ms-appx://", "ms-appx-web://"); + } + popup.src = strUrl; + } + }); + }, + + injectScriptCode: function (win, fail, args) { + setImmediate(function () { + var code = args[0], + hasCallback = args[1]; + + if (isWebViewAvailable && browserWrap && popup) { + var op = popup.invokeScriptAsync("eval", code); + op.oncomplete = function (e) { + if (hasCallback) { + // return null if event target is unavailable by some reason + var result = (e && e.target) ? [e.target.result] : [null]; + win(result); + } + }; + op.onerror = function () { }; + op.start(); + } + }); + }, + + injectScriptFile: function (win, fail, args) { + setImmediate(function () { + var filePath = args[0], + hasCallback = args[1]; + + if (!!filePath) { + filePath = urlutil.makeAbsolute(filePath); + } + + if (isWebViewAvailable && browserWrap && popup) { + // CB-12364 getFileFromApplicationUriAsync does not support ms-appx-web + var uri = new Windows.Foundation.Uri(filePath.replace('ms-appx-web:', 'ms-appx:')); + Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done(function (file) { + Windows.Storage.FileIO.readTextAsync(file).done(function (code) { + var op = popup.invokeScriptAsync("eval", code); + op.oncomplete = function(e) { + if (hasCallback) { + var result = [e.target.result]; + win(result); + } + }; + op.onerror = function () { }; + op.start(); + }); + }); + } + }); + }, + + injectStyleCode: function (win, fail, args) { + setImmediate(function () { + var code = args[0], + hasCallback = args[1]; + + if (isWebViewAvailable && browserWrap && popup) { + injectCSS(popup, code, hasCallback && win); + } + }); + }, + + injectStyleFile: function (win, fail, args) { + setImmediate(function () { + var filePath = args[0], + hasCallback = args[1]; + + filePath = filePath && urlutil.makeAbsolute(filePath); + + if (isWebViewAvailable && browserWrap && popup) { + // CB-12364 getFileFromApplicationUriAsync does not support ms-appx-web + var uri = new Windows.Foundation.Uri(filePath.replace('ms-appx-web:', 'ms-appx:')); + Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).then(function (file) { + return Windows.Storage.FileIO.readTextAsync(file); + }).done(function (code) { + injectCSS(popup, code, hasCallback && win); + }, function () { + // no-op, just catch an error + }); + } + }); + } +}; + +function injectCSS (webView, cssCode, callback) { + // This will automatically escape all thing that we need (quotes, slashes, etc.) + var escapedCode = JSON.stringify(cssCode); + var evalWrapper = "(function(d){var c=d.createElement('style');c.innerHTML=%s;d.head.appendChild(c);})(document)" + .replace('%s', escapedCode); + + var op = webView.invokeScriptAsync("eval", evalWrapper); + op.oncomplete = function() { + if (callback) { + callback([]); + } + }; + op.onerror = function () { }; + op.start(); +} + +module.exports = IAB; + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs new file mode 100644 index 0000000..fa6fbe4 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/src/wp/InAppBrowser.cs @@ -0,0 +1,530 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; +using System.Diagnostics; +using System.IO; +using System.Runtime.Serialization; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; + +#if WP8 +using System.Threading.Tasks; +using Windows.ApplicationModel; +using Windows.Storage; +using Windows.System; + +//Use alias in case Cordova File Plugin is enabled. Then the File class will be declared in both and error will occur. +using IOFile = System.IO.File; +#else +using Microsoft.Phone.Tasks; +#endif + +namespace WPCordovaClassLib.Cordova.Commands +{ + [DataContract] + public class BrowserOptions + { + [DataMember] + public string url; + + [DataMember] + public bool isGeolocationEnabled; + } + + public class InAppBrowser : BaseCommand + { + + private static WebBrowser browser; + private static ApplicationBarIconButton backButton; + private static ApplicationBarIconButton fwdButton; + + protected ApplicationBar AppBar; + + protected bool ShowLocation {get;set;} + protected bool StartHidden {get;set;} + + protected string NavigationCallbackId { get; set; } + + public void open(string options) + { + // reset defaults on ShowLocation + StartHidden features + ShowLocation = true; + StartHidden = false; + + string[] args = JSON.JsonHelper.Deserialize(options); + //BrowserOptions opts = JSON.JsonHelper.Deserialize(options); + string urlLoc = args[0]; + string target = args[1]; + string featString = args[2]; + this.NavigationCallbackId = args[3]; + + if (!string.IsNullOrEmpty(featString)) + { + string[] features = featString.Split(','); + foreach (string str in features) + { + try + { + string[] split = str.Split('='); + switch (split[0]) + { + case "location": + ShowLocation = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); + break; + case "hidden": + StartHidden = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase); + break; + } + } + catch (Exception) + { + // some sort of invalid param was passed, moving on ... + } + } + } + /* + _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser + _blank - always open in the InAppBrowser + _system - always open in the system web browser + */ + switch (target) + { + case "_blank": + ShowInAppBrowser(urlLoc); + break; + case "_self": + ShowCordovaBrowser(urlLoc); + break; + case "_system": + ShowSystemBrowser(urlLoc); + break; + } + } + + public void show(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + + + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + browser.Visibility = Visibility.Visible; + AppBar.IsVisible = true; + }); + } + } + + public void hide(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + + + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + browser.Visibility = Visibility.Collapsed; + AppBar.IsVisible = false; + }); + } + } + + public void injectScriptCode(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + + bool bCallback = false; + if (bool.TryParse(args[1], out bCallback)) { }; + + string callbackId = args[2]; + + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + var res = browser.InvokeScript("eval", new string[] { args[0] }); + + if (bCallback) + { + PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); + result.KeepCallback = false; + this.DispatchCommandResult(result); + } + + }); + } + } + + public void injectScriptFile(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support executeScript"); + string[] args = JSON.JsonHelper.Deserialize(options); + // throw new NotImplementedException("Windows Phone does not currently support 'executeScript'"); + } + + public void injectStyleCode(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); + return; + + //string[] args = JSON.JsonHelper.Deserialize(options); + //bool bCallback = false; + //if (bool.TryParse(args[1], out bCallback)) { }; + + //string callbackId = args[2]; + + //if (browser != null) + //{ + //Deployment.Current.Dispatcher.BeginInvoke(() => + //{ + // if (bCallback) + // { + // string cssInsertString = "try{(function(doc){var c = ''; doc.head.innerHTML += c;})(document);}catch(ex){alert('oops : ' + ex.message);}"; + // //cssInsertString = cssInsertString.Replace("_VALUE_", args[0]); + // Debug.WriteLine("cssInsertString = " + cssInsertString); + // var res = browser.InvokeScript("eval", new string[] { cssInsertString }); + // if (bCallback) + // { + // PluginResult result = new PluginResult(PluginResult.Status.OK, res.ToString()); + // result.KeepCallback = false; + // this.DispatchCommandResult(result); + // } + // } + + //}); + //} + } + + public void injectStyleFile(string options) + { + Debug.WriteLine("Error : Windows Phone cordova-plugin-inappbrowser does not currently support insertCSS"); + return; + + //string[] args = JSON.JsonHelper.Deserialize(options); + //throw new NotImplementedException("Windows Phone does not currently support 'insertCSS'"); + } + + private void ShowCordovaBrowser(string url) + { + Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + if (page != null) + { + CordovaView cView = page.FindName("CordovaView") as CordovaView; + if (cView != null) + { + WebBrowser br = cView.Browser; + br.Navigate2(loc); + } + } + + } + }); + } + +#if WP8 + private async void ShowSystemBrowser(string url) + { + var pathUri = new Uri(url, UriKind.Absolute); + if (pathUri.Scheme == Uri.UriSchemeHttp || pathUri.Scheme == Uri.UriSchemeHttps) + { + await Launcher.LaunchUriAsync(pathUri); + return; + } + + var file = await GetFile(pathUri.AbsolutePath.Replace('/', Path.DirectorySeparatorChar)); + if (file != null) + { + await Launcher.LaunchFileAsync(file); + } + else + { + Debug.WriteLine("File not found."); + } + } + + private async Task GetFile(string fileName) + { + //first try to get the file from the isolated storage + var localFolder = ApplicationData.Current.LocalFolder; + if (IOFile.Exists(Path.Combine(localFolder.Path, fileName))) + { + return await localFolder.GetFileAsync(fileName); + } + + //if file is not found try to get it from the xap + var filePath = Path.Combine(Package.Current.InstalledLocation.Path, fileName); + if (IOFile.Exists(filePath)) + { + return await StorageFile.GetFileFromPathAsync(filePath); + } + + return null; + } +#else + private void ShowSystemBrowser(string url) + { + WebBrowserTask webBrowserTask = new WebBrowserTask(); + webBrowserTask.Uri = new Uri(url, UriKind.Absolute); + webBrowserTask.Show(); + } +#endif + + private void ShowInAppBrowser(string url) + { + Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (browser != null) + { + //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; + browser.Navigate2(loc); + } + else + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + + string baseImageUrl = "Images/"; + + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + browser = new WebBrowser(); + browser.IsScriptEnabled = true; + browser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(browser_LoadCompleted); + + browser.Navigating += new EventHandler(browser_Navigating); + browser.NavigationFailed += new System.Windows.Navigation.NavigationFailedEventHandler(browser_NavigationFailed); + browser.Navigated += new EventHandler(browser_Navigated); + browser.Navigate2(loc); + + if (StartHidden) + { + browser.Visibility = Visibility.Collapsed; + } + + //browser.IsGeolocationEnabled = opts.isGeolocationEnabled; + grid.Children.Add(browser); + } + + ApplicationBar bar = new ApplicationBar(); + bar.BackgroundColor = Colors.Gray; + bar.IsMenuEnabled = false; + + backButton = new ApplicationBarIconButton(); + backButton.Text = "Back"; + + backButton.IconUri = new Uri(baseImageUrl + "appbar.back.rest.png", UriKind.Relative); + backButton.Click += new EventHandler(backButton_Click); + bar.Buttons.Add(backButton); + + + fwdButton = new ApplicationBarIconButton(); + fwdButton.Text = "Forward"; + fwdButton.IconUri = new Uri(baseImageUrl + "appbar.next.rest.png", UriKind.Relative); + fwdButton.Click += new EventHandler(fwdButton_Click); + bar.Buttons.Add(fwdButton); + + ApplicationBarIconButton closeBtn = new ApplicationBarIconButton(); + closeBtn.Text = "Close"; + closeBtn.IconUri = new Uri(baseImageUrl + "appbar.close.rest.png", UriKind.Relative); + closeBtn.Click += new EventHandler(closeBtn_Click); + bar.Buttons.Add(closeBtn); + + page.ApplicationBar = bar; + bar.IsVisible = !StartHidden; + AppBar = bar; + + page.BackKeyPress += page_BackKeyPress; + + } + + } + } + }); + } + + void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) + { +#if WP8 + if (browser.CanGoBack) + { + browser.GoBack(); + } + else + { + close(); + } + e.Cancel = true; +#else + browser.InvokeScript("execScript", "history.back();"); +#endif + } + + void browser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) + { + + } + + void fwdButton_Click(object sender, EventArgs e) + { + if (browser != null) + { + try + { +#if WP8 + browser.GoForward(); +#else + browser.InvokeScript("execScript", "history.forward();"); +#endif + } + catch (Exception) + { + + } + } + } + + void backButton_Click(object sender, EventArgs e) + { + if (browser != null) + { + try + { +#if WP8 + browser.GoBack(); +#else + browser.InvokeScript("execScript", "history.back();"); +#endif + } + catch (Exception) + { + + } + } + } + + void closeBtn_Click(object sender, EventArgs e) + { + this.close(); + } + + + public void close(string options = "") + { + if (browser != null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(browser); + } + page.ApplicationBar = null; + page.BackKeyPress -= page_BackKeyPress; + } + } + + browser = null; + string message = "{\"type\":\"exit\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = false; + this.DispatchCommandResult(result, NavigationCallbackId); + }); + } + } + + void browser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) + { +#if WP8 + if (browser != null) + { + backButton.IsEnabled = browser.CanGoBack; + fwdButton.IsEnabled = browser.CanGoForward; + + } +#endif + string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e) + { + string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.ERROR, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + void browser_Navigating(object sender, NavigatingEventArgs e) + { + string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString + "\"}"; + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.KeepCallback = true; + this.DispatchCommandResult(result, NavigationCallbackId); + } + + } + + internal static class WebBrowserExtensions + { + /// + /// Improved method to initiate request to the provided URI. Supports 'data:text/html' urls. + /// + /// The browser instance + /// The requested uri + internal static void Navigate2(this WebBrowser browser, Uri uri) + { + // IE10 does not support data uri so we use NavigateToString method instead + if (uri.Scheme == "data") + { + // we should remove the scheme identifier and unescape the uri + string uriString = Uri.UnescapeDataString(uri.AbsoluteUri); + // format is 'data:text/html, ...' + string html = new System.Text.RegularExpressions.Regex("^data:text/html,").Replace(uriString, ""); + browser.NavigateToString(html); + } + else + { + browser.Navigate(uri); + } + } + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml new file mode 100644 index 0000000..90525ce --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/plugin.xml @@ -0,0 +1,33 @@ + + + + + Cordova InAppBrowser Plugin Tests + Apache 2.0 + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css new file mode 100644 index 0000000..3f6e41c --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.css @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +#style-update-file { + display: block !important; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html new file mode 100644 index 0000000..3004b35 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.html @@ -0,0 +1,44 @@ + + + + + + + + + Cordova Mobile Spec + + + +

    InAppBrowser - Script / Style Injection Test

    + + +
    User-Agent:
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js new file mode 100644 index 0000000..a89a421 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/inject.js @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ +var d = document.getElementById("header"); +d.innerHTML = "Script file successfully injected"; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.html new file mode 100644 index 0000000..d23a714 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.html @@ -0,0 +1,67 @@ + + + + + + + + + IAB test page + + + + + +

    Local URL

    +
    + You have successfully loaded a local URL: + +
    +
    +
    User-Agent =
    +
    +
    Likely running inAppBrowser: Device version from Cordova=not found, Back link should not work, toolbar may be present, logcat should show failed 'gap:' calls.
    +
    +
    Visit Google (whitelisted)
    +
    Visit Yahoo (not whitelisted)
    + + +

    Back +

    + +

    tall div with border
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf new file mode 100644 index 0000000..b54f1b7 Binary files /dev/null and b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/local.pdf differ diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/video.html b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/video.html new file mode 100644 index 0000000..4f167f8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/resources/video.html @@ -0,0 +1,45 @@ + + + + + + + + + Cordova Mobile Spec + + + + +
    + + +
    + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/tests.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/tests.js new file mode 100644 index 0000000..84cdee8 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/tests/tests.js @@ -0,0 +1,689 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint jasmine: true */ +/* global MSApp */ + +var cordova = require('cordova'); +var isWindows = cordova.platformId == 'windows'; + +window.alert = window.alert || navigator.notification.alert; +if (isWindows && navigator && navigator.notification && navigator.notification.alert) { + // window.alert is defined but not functional on UWP + window.alert = navigator.notification.alert; +} + +exports.defineAutoTests = function () { + + describe('cordova.InAppBrowser', function () { + + it("inappbrowser.spec.1 should exist", function () { + expect(cordova.InAppBrowser).toBeDefined(); + }); + + it("inappbrowser.spec.2 should contain open function", function () { + expect(cordova.InAppBrowser.open).toBeDefined(); + expect(cordova.InAppBrowser.open).toEqual(jasmine.any(Function)); + }); + }); + + describe('open method', function () { + + if (cordova.platformId == 'osx') { + pending('Open method not fully supported on OSX.'); + return; + } + + var iabInstance; + var originalTimeout; + var url = 'https://dist.apache.org/repos/dist/dev/cordova/'; + var badUrl = 'http://bad-uri/'; + + beforeEach(function () { + // increase timeout to ensure test url could be loaded within test time + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000; + + iabInstance = null; + }); + + afterEach(function (done) { + // restore original timeout + jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + + if (iabInstance !== null && iabInstance.close) { + iabInstance.close(); + } + iabInstance = null; + // add some extra time so that iab dialog is closed + setTimeout(done, 2000); + }); + + function verifyEvent(evt, type) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual(type); + if (type !== 'exit') { // `exit` event does not have url field + expect(evt.url).toEqual(url); + } + } + + function verifyLoadErrorEvent(evt) { + expect(evt).toBeDefined(); + expect(evt.type).toEqual('loaderror'); + expect(evt.url).toEqual(badUrl); + expect(evt.code).toEqual(jasmine.any(Number)); + expect(evt.message).toEqual(jasmine.any(String)); + } + + it("inappbrowser.spec.3 should retun InAppBrowser instance with required methods", function () { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + + expect(iabInstance).toBeDefined(); + + expect(iabInstance.addEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.removeEventListener).toEqual(jasmine.any(Function)); + expect(iabInstance.close).toEqual(jasmine.any(Function)); + expect(iabInstance.show).toEqual(jasmine.any(Function)); + expect(iabInstance.hide).toEqual(jasmine.any(Function)); + expect(iabInstance.executeScript).toEqual(jasmine.any(Function)); + expect(iabInstance.insertCSS).toEqual(jasmine.any(Function)); + }); + + it("inappbrowser.spec.4 should support loadstart and loadstop events", function (done) { + var onLoadStart = jasmine.createSpy('loadstart event callback').and.callFake(function (evt) { + verifyEvent(evt, 'loadstart'); + }); + + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('loadstart', onLoadStart); + iabInstance.addEventListener('loadstop', function (evt) { + verifyEvent(evt, 'loadstop'); + expect(onLoadStart).toHaveBeenCalled(); + done(); + }); + }); + + it("inappbrowser.spec.5 should support exit event", function (done) { + iabInstance = cordova.InAppBrowser.open(url, '_blank'); + iabInstance.addEventListener('exit', function (evt) { + verifyEvent(evt, 'exit'); + done(); + }); + iabInstance.close(); + iabInstance = null; + }); + + it("inappbrowser.spec.6 should support loaderror event", function (done) { + iabInstance = cordova.InAppBrowser.open(badUrl, '_blank'); + iabInstance.addEventListener('loaderror', function (evt) { + verifyLoadErrorEvent(evt); + done(); + }); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + + function doOpen(url, target, params, numExpectedRedirects, useWindowOpen) { + numExpectedRedirects = numExpectedRedirects || 0; + useWindowOpen = useWindowOpen || false; + console.log("Opening " + url); + + var counts; + var lastLoadStartURL; + var wasReset = false; + function reset() { + counts = { + 'loaderror': 0, + 'loadstart': 0, + 'loadstop': 0, + 'exit': 0 + }; + lastLoadStartURL = ''; + } + reset(); + + var iab; + var callbacks = { + loaderror: logEvent, + loadstart: logEvent, + loadstop: logEvent, + exit: logEvent + }; + if (useWindowOpen) { + console.log('Use window.open() for url'); + iab = window.open(url, target, params, callbacks); + } + else { + iab = cordova.InAppBrowser.open(url, target, params, callbacks); + } + if (!iab) { + alert('open returned ' + iab); + return; + } + + function logEvent(e) { + console.log('IAB event=' + JSON.stringify(e)); + counts[e.type]++; + // Verify that event.url gets updated on redirects. + if (e.type == 'loadstart') { + if (e.url == lastLoadStartURL) { + alert('Unexpected: loadstart fired multiple times for the same URL.'); + } + lastLoadStartURL = e.url; + } + // Verify the right number of loadstart events were fired. + if (e.type == 'loadstop' || e.type == 'loaderror') { + if (e.url != lastLoadStartURL) { + alert('Unexpected: ' + e.type + ' event.url != loadstart\'s event.url'); + } + if (numExpectedRedirects === 0 && counts.loadstart !== 1) { + // Do allow a loaderror without a loadstart (e.g. in the case of an invalid URL). + if (!(e.type == 'loaderror' && counts.loadstart === 0)) { + alert('Unexpected: got multiple loadstart events. (' + counts.loadstart + ')'); + } + } else if (numExpectedRedirects > 0 && counts.loadstart < (numExpectedRedirects + 1)) { + alert('Unexpected: should have got at least ' + (numExpectedRedirects + 1) + ' loadstart events, but got ' + counts.loadstart); + } + wasReset = true; + numExpectedRedirects = 0; + reset(); + } + // Verify that loadend / loaderror was called. + if (e.type == 'exit') { + var numStopEvents = counts.loadstop + counts.loaderror; + if (numStopEvents === 0 && !wasReset) { + alert('Unexpected: browser closed without a loadstop or loaderror.'); + } else if (numStopEvents > 1) { + alert('Unexpected: got multiple loadstop/loaderror events.'); + } + } + } + + return iab; + } + + function doHookOpen(url, target, params, numExpectedRedirects) { + var originalFunc = window.open; + var wasClobbered = window.hasOwnProperty('open'); + window.open = cordova.InAppBrowser.open; + + try { + doOpen(url, target, params, numExpectedRedirects, true); + } + finally { + if (wasClobbered) { + window.open = originalFunc; + } + else { + console.log('just delete, to restore open from prototype'); + delete window.open; + } + } + } + + function openWithStyle(url, cssUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + var callback = function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }; + if (cssUrl) { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ file: cssUrl }, useCallback && callback); + }); + } else { + iab.addEventListener('loadstop', function (event) { + iab.insertCSS({ code: '#style-update-literal { \ndisplay: block !important; \n}' }, + useCallback && callback); + }); + } + } + + function openWithScript(url, jsUrl, useCallback) { + var iab = doOpen(url, '_blank', 'location=yes'); + if (jsUrl) { + iab.addEventListener('loadstop', function (event) { + iab.executeScript({ file: jsUrl }, useCallback && function (results) { + if (results && results.length === 0) { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } else { + iab.addEventListener('loadstop', function (event) { + var code = '(function(){\n' + + ' var header = document.getElementById("header");\n' + + ' header.innerHTML = "Script literal successfully injected";\n' + + ' return "abc";\n' + + '})()'; + iab.executeScript({ code: code }, useCallback && function (results) { + if (results && results.length === 1 && results[0] === 'abc') { + alert('Results verified'); + } else { + console.log(results); + alert('Got: ' + typeof (results) + '\n' + JSON.stringify(results)); + } + }); + }); + } + } + var hiddenwnd = null; + var loadlistener = function (event) { alert('background window loaded '); }; + function openHidden(url, startHidden) { + var shopt = (startHidden) ? 'hidden=yes' : ''; + hiddenwnd = cordova.InAppBrowser.open(url, 'random_string', shopt); + if (!hiddenwnd) { + alert('cordova.InAppBrowser.open returned ' + hiddenwnd); + return; + } + if (startHidden) hiddenwnd.addEventListener('loadstop', loadlistener); + } + function showHidden() { + if (!!hiddenwnd) { + hiddenwnd.show(); + } + } + function closeHidden() { + if (!!hiddenwnd) { + hiddenwnd.removeEventListener('loadstop', loadlistener); + hiddenwnd.close(); + hiddenwnd = null; + } + } + + var info_div = '

    InAppBrowser

    ' + + '
    ' + + 'Make sure http://cordova.apache.org and http://google.co.uk and https://www.google.co.uk are white listed.
    ' + + 'Make sure http://www.apple.com is not in the white list.
    ' + + 'In iOS, starred * tests will put the app in a state with no way to return.
    ' + + '

    User-Agent: ' + + '

    '; + + var local_tests = '

    Local URL

    ' + + '
    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView (using hook of window.open()).' + + '

    ' + + 'Expected result: opens successfully in CordovaWebView.' + + '

    ' + + 'Expected result: fails to open' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar at top.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser without locationBar.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the bottom.' + + '

    ' + + 'Expected result: opens successfully in InAppBrowser with locationBar. On iOS the toolbar is at the top.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with no locationBar. On iOS the toolbar is at the top.'; + + var white_listed_tests = '

    White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org (using hook of window.open())' + + '

    ' + + 'Expected result: open successfully in CordovaWebView to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in system browser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to cordova.apache.org with no location bar.'; + + var non_white_listed_tests = '

    Non White Listed URL

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (using hook of window.open()).' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com (_self enforces whitelist).' + + '

    ' + + 'Expected result: open successfully in system browser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to apple.com without locationBar.'; + + var page_with_redirects_tests = '

    Page with redirect

    ' + + '
    ' + + 'Expected result: should 301 and open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.'; + + var pdf_url_tests = '

    PDF URL

    ' + + '
    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.' + + '

    ' + + 'Expected result: InAppBrowser opens. PDF should render on iOS.'; + + var invalid_url_tests = '

    Invalid URL

    ' + + '
    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser.' + + '

    ' + + 'Expected result: fail to load in InAppBrowser (404).'; + + var css_js_injection_tests = '

    CSS / JS Injection

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser without text "Style updated from..."' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from file", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with "Style updated from literal", and alert dialog with text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with text "Script file successfully injected" and alert dialog with the text "Results verified".' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" .' + + '

    ' + + 'Expected result: open successfully in InAppBrowser with the text "Script literal successfully injected" and alert dialog with the text "Results verified".'; + + var open_hidden_tests = '

    Open Hidden

    ' + + '
    ' + + 'Expected result: no additional browser window. Alert appears with the text "background window loaded".' + + '

    ' + + 'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to https://www.google.co.uk.' + + '

    ' + + 'Expected result: no output. But click on "show hidden" again and nothing should be shown.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to https://www.google.co.uk' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to https://www.google.co.uk. Hide after 2 seconds'; + + var clearing_cache_tests = '

    Clearing Cache

    ' + + '
    ' + + 'Expected result: ?' + + '

    ' + + 'Expected result: ?'; + + var video_tag_tests = '

    Video tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video plays automatically on iOS and Android.' + + '
    ' + + 'Expected result: open successfully in InAppBrowser with an embedded video does not play automatically on iOS and Android but rather works after clicking the "play" button.'; + + var local_with_anchor_tag_tests = '

    Local with anchor tag

    ' + + '
    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the top as normal.' + + '

    ' + + 'Expected result: open successfully in InAppBrowser to the local page, scrolled to the beginning of the tall div with border.'; + + var hardwareback_tests = '

    HardwareBack

    ' + + '

    ' + + 'Expected result: By default hardwareback is yes so pressing back button should navigate backwards in history then close InAppBrowser' + + '

    ' + + 'Expected result: hardwareback=yes pressing back button should navigate backwards in history then close InAppBrowser' + + '

    ' + + 'Expected result: hardwareback=no pressing back button should close InAppBrowser regardless history' + + '

    ' + + 'Expected result: consistently open browsers with with the appropriate option: hardwareback=defaults to yes then hardwareback=no then hardwareback=defaults to yes. By default hardwareback is yes so pressing back button should navigate backwards in history then close InAppBrowser'; + + // CB-7490 We need to wrap this code due to Windows security restrictions + // see http://msdn.microsoft.com/en-us/library/windows/apps/hh465380.aspx#differences for details + if (window.MSApp && window.MSApp.execUnsafeLocalFunction) { + MSApp.execUnsafeLocalFunction(function() { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests + hardwareback_tests; + }); + } else { + contentEl.innerHTML = info_div + local_tests + white_listed_tests + non_white_listed_tests + page_with_redirects_tests + pdf_url_tests + invalid_url_tests + + css_js_injection_tests + open_hidden_tests + clearing_cache_tests + video_tag_tests + local_with_anchor_tag_tests + hardwareback_tests; + } + + document.getElementById("user-agent").textContent = navigator.userAgent; + + // we are already in cdvtests directory + var basePath = 'iab-resources/'; + var localhtml = basePath + 'local.html', + localpdf = basePath + 'local.pdf', + injecthtml = basePath + 'inject.html', + injectjs = isWindows ? basePath + 'inject.js' : 'inject.js', + injectcss = isWindows ? basePath + 'inject.css' : 'inject.css', + videohtml = basePath + 'video.html'; + + //Local + createActionButton('target=Default', function () { + doOpen(localhtml); + }, 'openLocal'); + createActionButton('target=Default (window.open)', function () { + doHookOpen(localhtml); + }, 'openLocalHook'); + createActionButton('target=_self', function () { + doOpen(localhtml, '_self'); + }, 'openLocalSelf'); + createActionButton('target=_system', function () { + doOpen(localhtml, '_system'); + }, 'openLocalSystem'); + createActionButton('target=_blank', function () { + doOpen(localhtml, '_blank'); + }, 'openLocalBlank'); + createActionButton('target=Random, location=no, disallowoverscroll=yes', function () { + doOpen(localhtml, 'random_string', 'location=no, disallowoverscroll=yes'); + }, 'openLocalRandomNoLocation'); + createActionButton('target=Random, toolbarposition=bottom', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=bottom'); + }, 'openLocalRandomToolBarBottom'); + createActionButton('target=Random, toolbarposition=top', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top'); + }, 'openLocalRandomToolBarTop'); + createActionButton('target=Random, toolbarposition=top, location=no', function () { + doOpen(localhtml, 'random_string', 'toolbarposition=top,location=no'); + }, 'openLocalRandomToolBarTopNoLocation'); + + //White Listed + createActionButton('* target=Default', function () { + doOpen('http://cordova.apache.org'); + }, 'openWhiteListed'); + createActionButton('* target=Default (window.open)', function () { + doHookOpen('http://cordova.apache.org'); + }, 'openWhiteListedHook'); + createActionButton('* target=_self', function () { + doOpen('http://cordova.apache.org', '_self'); + }, 'openWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://cordova.apache.org', '_system'); + }, 'openWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://cordova.apache.org', '_blank'); + }, 'openWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://cordova.apache.org', 'random_string'); + }, 'openWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://cordova.apache.org', 'random_string', 'location=no'); + }, 'openWhiteListedRandomNoLocation'); + + //Non White Listed + createActionButton('target=Default', function () { + doOpen('http://www.apple.com'); + }, 'openNonWhiteListed'); + createActionButton('target=Default (window.open)', function () { + doHookOpen('http://www.apple.com'); + }, 'openNonWhiteListedHook'); + createActionButton('target=_self', function () { + doOpen('http://www.apple.com', '_self'); + }, 'openNonWhiteListedSelf'); + createActionButton('target=_system', function () { + doOpen('http://www.apple.com', '_system'); + }, 'openNonWhiteListedSystem'); + createActionButton('target=_blank', function () { + doOpen('http://www.apple.com', '_blank'); + }, 'openNonWhiteListedBlank'); + createActionButton('target=Random', function () { + doOpen('http://www.apple.com', 'random_string'); + }, 'openNonWhiteListedRandom'); + createActionButton('* target=Random, no location bar', function () { + doOpen('http://www.apple.com', 'random_string', 'location=no'); + }, 'openNonWhiteListedRandomNoLocation'); + + //Page with redirect + createActionButton('http://google.co.uk', function () { + doOpen('http://google.co.uk', 'random_string', '', 1); + }, 'openRedirect301'); + createActionButton('http://goo.gl/pUFqg', function () { + doOpen('http://goo.gl/pUFqg', 'random_string', '', 2); + }, 'openRedirect302'); + + //PDF URL + createActionButton('Remote URL', function () { + doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf'); + }, 'openPDF'); + createActionButton('Local URL', function () { + doOpen(localpdf, '_blank'); + }, 'openPDFBlank'); + + //Invalid URL + createActionButton('Invalid Scheme', function () { + doOpen('x-ttp://www.invalid.com/', '_blank'); + }, 'openInvalidScheme'); + createActionButton('Invalid Host', function () { + doOpen('http://www.inv;alid.com/', '_blank'); + }, 'openInvalidHost'); + createActionButton('Missing Local File', function () { + doOpen('nonexistent.html', '_blank'); + }, 'openInvalidMissing'); + + //CSS / JS injection + createActionButton('Original Document', function () { + doOpen(injecthtml, '_blank'); + }, 'openOriginalDocument'); + createActionButton('CSS File Injection', function () { + openWithStyle(injecthtml, injectcss); + }, 'openCSSInjection'); + createActionButton('CSS File Injection (callback)', function () { + openWithStyle(injecthtml, injectcss, true); + }, 'openCSSInjectionCallback'); + createActionButton('CSS Literal Injection', function () { + openWithStyle(injecthtml); + }, 'openCSSLiteralInjection'); + createActionButton('CSS Literal Injection (callback)', function () { + openWithStyle(injecthtml, null, true); + }, 'openCSSLiteralInjectionCallback'); + createActionButton('Script File Injection', function () { + openWithScript(injecthtml, injectjs); + }, 'openScriptInjection'); + createActionButton('Script File Injection (callback)', function () { + openWithScript(injecthtml, injectjs, true); + }, 'openScriptInjectionCallback'); + createActionButton('Script Literal Injection', function () { + openWithScript(injecthtml); + }, 'openScriptLiteralInjection'); + createActionButton('Script Literal Injection (callback)', function () { + openWithScript(injecthtml, null, true); + }, 'openScriptLiteralInjectionCallback'); + + //Open hidden + createActionButton('Create Hidden', function () { + openHidden('https://www.google.co.uk', true); + }, 'openHidden'); + createActionButton('Show Hidden', function () { + showHidden(); + }, 'showHidden'); + createActionButton('Close Hidden', function () { + closeHidden(); + }, 'closeHidden'); + createActionButton('google.co.uk Not Hidden', function () { + openHidden('https://www.google.co.uk', false); + }, 'openHiddenShow'); + createActionButton('google.co.uk shown for 2 seconds than hidden', function () { + var iab = doOpen('https://www.google.co.uk/', 'random_sting'); + setTimeout(function () { + iab.hide(); + }, 2000); + }, 'openVisibleAndHide'); + + //Clearing cache + createActionButton('Clear Browser Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearcache=yes'); + }, 'openClearCache'); + createActionButton('Clear Session Cache', function () { + doOpen('https://www.google.co.uk', '_blank', 'clearsessioncache=yes'); + }, 'openClearSessionCache'); + + //Video tag + createActionButton('Remote Video', function () { + doOpen(videohtml, '_blank'); + }, 'openRemoteVideo'); + createActionButton('Remote Need User No Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=no'); + }, 'openRemoteNeedUserNoVideo'); + createActionButton('Remote Need User Yes Video', function () { + doOpen(videohtml, '_blank', 'mediaPlaybackRequiresUserAction=yes'); + }, 'openRemoteNeedUserYesVideo'); + + //Local With Anchor Tag + createActionButton('Anchor1', function () { + doOpen(localhtml + '#bogusanchor', '_blank'); + }, 'openAnchor1'); + createActionButton('Anchor2', function () { + doOpen(localhtml + '#anchor2', '_blank'); + }, 'openAnchor2'); + + // Hardwareback + createActionButton('no hardwareback (defaults to yes)', function () { + doOpen('http://cordova.apache.org', '_blank'); + }, 'openHardwareBackDefault'); + createActionButton('hardwareback=yes', function () { + doOpen('http://cordova.apache.org', '_blank', 'hardwareback=yes'); + }, 'openHardwareBackYes'); + createActionButton('hardwareback=no', function () { + doOpen('http://cordova.apache.org', '_blank', 'hardwareback=no'); + }, 'openHardwareBackNo'); + createActionButton('no hardwareback -> hardwareback=no -> no hardwareback', function() { + var ref = cordova.InAppBrowser.open('https://google.com', '_blank', 'location=yes'); + ref.addEventListener('loadstop', function() { + ref.close(); + }); + ref.addEventListener('exit', function() { + var ref2 = cordova.InAppBrowser.open('https://google.com', '_blank', 'location=yes,hardwareback=no'); + ref2.addEventListener('loadstop', function() { + ref2.close(); + }); + ref2.addEventListener('exit', function() { + cordova.InAppBrowser.open('https://google.com', '_blank', 'location=yes'); + }); + }); + }, 'openHardwareBackDefaultAfterNo'); +}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/types/index.d.ts b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/types/index.d.ts new file mode 100644 index 0000000..d5e221b --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/types/index.d.ts @@ -0,0 +1,219 @@ +// Type definitions for Apache Cordova InAppBrowser plugin +// Project: https://github.com/apache/cordova-plugin-inappbrowser +// Definitions by: Microsoft Open Technologies Inc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies Inc +// Licensed under the MIT license. + +interface Window { + /** + * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. + * @param url The URL to load. + * @param target The target in which to load the URL, an optional parameter that defaults to _self. + * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. + * The options string must not contain any blank space, and each feature's + * name/value pairs must be separated by a comma. Feature names are case insensitive. + */ + open(url: string, target?: "_self", options?: string): InAppBrowser; + /** + * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. + * @param url The URL to load. + * @param target The target in which to load the URL, an optional parameter that defaults to _self. + * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. + * The options string must not contain any blank space, and each feature's + * name/value pairs must be separated by a comma. Feature names are case insensitive. + */ + open(url: string, target?: "_blank", options?: string): InAppBrowser; + /** + * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. + * @param url The URL to load. + * @param target The target in which to load the URL, an optional parameter that defaults to _self. + * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. + * The options string must not contain any blank space, and each feature's + * name/value pairs must be separated by a comma. Feature names are case insensitive. + */ + open(url: string, target?: "_system", options?: string): InAppBrowser; + /** + * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. + * @param url The URL to load. + * @param target The target in which to load the URL, an optional parameter that defaults to _self. + * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. + * The options string must not contain any blank space, and each feature's + * name/value pairs must be separated by a comma. Feature names are case insensitive. + */ + open(url: string, target?: string, options?: string, replace?: boolean): InAppBrowser; +} + +/** + * The object returned from a call to window.open. + * NOTE: The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. + */ +interface InAppBrowser extends Window { + onloadstart: (type: InAppBrowserEvent) => void; + onloadstop: (type: InAppBrowserEvent) => void; + onloaderror: (type: InAppBrowserEvent) => void; + onexit: (type: InAppBrowserEvent) => void; + // addEventListener overloads + /** + * Adds a listener for an event from the InAppBrowser. + * @param type the event to listen for + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + addEventListener(type: "loadstart", callback: (event: InAppBrowserEvent) => void): void; + /** + * Adds a listener for an event from the InAppBrowser. + * @param type the event to listen for + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + addEventListener(type: "loadstop", callback: (event: InAppBrowserEvent) => void): void; + /** + * Adds a listener for an event from the InAppBrowser. + * @param type the event to listen for + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + addEventListener(type: "loaderror", callback: (event: InAppBrowserEvent) => void): void; + /** + * Adds a listener for an event from the InAppBrowser. + * @param type the event to listen for + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + addEventListener(type: "exit", callback: (event: InAppBrowserEvent) => void): void; + /** + * Adds a listener for an event from the InAppBrowser. + * @param type the event to listen for + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an Event object as a parameter. + */ + addEventListener(type: string, callback: (event: Event) => void): void; + // removeEventListener overloads + /** + * Removes a listener for an event from the InAppBrowser. + * @param type The event to stop listening for. + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + removeEventListener(type: "loadstart", callback: (event: InAppBrowserEvent) => void): void; + /** + * Removes a listener for an event from the InAppBrowser. + * @param type The event to stop listening for. + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + removeEventListener(type: "loadstop", callback: (event: InAppBrowserEvent) => void): void; + /** + * Removes a listener for an event from the InAppBrowser. + * @param type The event to stop listening for. + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + removeEventListener(type: "loaderror", callback: (event: InAppBrowserEvent) => void): void; + /** + * Removes a listener for an event from the InAppBrowser. + * @param type The event to stop listening for. + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an InAppBrowserEvent object as a parameter. + */ + removeEventListener(type: "exit", callback: (event: InAppBrowserEvent) => void): void; + /** + * Removes a listener for an event from the InAppBrowser. + * @param type The event to stop listening for. + * loadstart: event fires when the InAppBrowser starts to load a URL. + * loadstop: event fires when the InAppBrowser finishes loading a URL. + * loaderror: event fires when the InAppBrowser encounters an error when loading a URL. + * exit: event fires when the InAppBrowser window is closed. + * @param callback the function that executes when the event fires. The function is + * passed an Event object as a parameter. + */ + removeEventListener(type: string, callback: (event: Event) => void): void; + /** Closes the InAppBrowser window. */ + close(): void; + /** + * Displays an InAppBrowser window that was opened hidden. Calling this has no effect + * if the InAppBrowser was already visible. + */ + show(): void; + /** + * Injects JavaScript code into the InAppBrowser window. + * @param script Details of the script to run, specifying either a file or code key. + * @param callback The function that executes after the JavaScript code is injected. + * If the injected script is of type code, the callback executes with + * a single parameter, which is the return value of the script, wrapped in an Array. + * For multi-line scripts, this is the return value of the last statement, + * or the last expression evaluated. + */ + executeScript(script: { code: string }, callback: (result: any) => void): void; + /** + * Injects JavaScript code into the InAppBrowser window. + * @param script Details of the script to run, specifying either a file or code key. + * @param callback The function that executes after the JavaScript code is injected. + * If the injected script is of type code, the callback executes with + * a single parameter, which is the return value of the script, wrapped in an Array. + * For multi-line scripts, this is the return value of the last statement, + * or the last expression evaluated. + */ + executeScript(script: { file: string }, callback: (result: any) => void): void; + /** + * Injects CSS into the InAppBrowser window. + * @param css Details of the script to run, specifying either a file or code key. + * @param callback The function that executes after the CSS is injected. + */ + insertCSS(css: { code: string }, callback: () => void): void; + /** + * Injects CSS into the InAppBrowser window. + * @param css Details of the script to run, specifying either a file or code key. + * @param callback The function that executes after the CSS is injected. + */ + insertCSS(css: { file: string }, callback: () => void): void; +} + +interface InAppBrowserEvent extends Event { + /** the eventname, either loadstart, loadstop, loaderror, or exit. */ + type: string; + /** the URL that was loaded. */ + url: string; + /** the error code, only in the case of loaderror. */ + code: number; + /** the error message, only in the case of loaderror. */ + message: string; +} \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css new file mode 100644 index 0000000..5762c74 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.inAppBrowserWrap { + margin: 0; + padding: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: 0 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9999999; + box-sizing: border-box; + border: 40px solid #bfbfbf; + border: 40px solid rgba(0, 0, 0, 0.25); +} + +.inAppBrowserWrapFullscreen { + border: 0; +} + +.inappbrowser-app-bar { + height: 70px; + background-color: #404040; + z-index: 9999999; +} + +.inappbrowser-app-bar-inner { + padding-top: 10px; + height: 60px; + width: 155px; + margin: 0 auto; + background-color: #404040; + z-index: 9999999; +} + +.app-bar-action { + width: auto; + height: 40px; + margin-left: 20px; + font-family: "Segoe UI Symbol"; + float: left; + color: white; + font-size: 12px; + text-transform: lowercase; + text-align: center; + cursor: default; +} + +.app-bar-action[disabled] { + color: gray; + /*disable click*/ + pointer-events: none; +} + +.app-bar-action::before { + font-size: 28px; + display: block; + height: 36px; +} + +/* Back */ +.action-back { + margin-left: 0px; +} + +.action-back::before { + content: "\E0BA"; +} + +.action-back:not([disabled]):hover::before { + content: "\E0B3"; +} + +/* Forward */ +.action-forward::before { + content: "\E0AC"; +} + +.action-forward:not([disabled]):hover::before { + content: "\E0AF"; +} + +/* Close */ +.action-close::before { + content: "\E0C7"; + /* close icon is larger so we re-size it to fit other icons */ + font-size: 20px; + line-height: 40px; +} + +.action-close:not([disabled]):hover::before { + content: "\E0CA"; +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..983dbba --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,114 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } + + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + hide: function (eventname) { + exec(null, null, "InAppBrowser", "hide", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function(eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ""; + + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js new file mode 100644 index 0000000..d780fcd --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -0,0 +1,130 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +/*jslint sloppy:true */ +/*global Windows:true, require, document, setTimeout, window, module */ + +var browserWrap; + +var IAB = { + + close: function (win, lose) { + if (browserWrap) { + browserWrap.parentNode.removeChild(browserWrap); + browserWrap = null; + } + }, + show: function (win, lose) { + /* empty block, ran out of bacon? + if (browserWrap) { + + }*/ + }, + hide: function (win, lose) { + /* empty block, ran out of bacon? + if (browserWrap) { + + }*/ + }, + open: function (win, lose, args) { + var strUrl = args[0], + target = args[1], + url, + elem; + + if (target === "_system") { + url = new Windows.Foundation.Uri(strUrl); + Windows.System.Launcher.launchUriAsync(url); + } else if (target === "_blank") { + if (!browserWrap) { + browserWrap = document.createElement("div"); + browserWrap.style.position = "absolute"; + browserWrap.style.width = (window.innerWidth - 80) + "px"; + browserWrap.style.height = (window.innerHeight - 80) + "px"; + browserWrap.style.borderWidth = "40px"; + browserWrap.style.borderStyle = "solid"; + browserWrap.style.borderColor = "rgba(0,0,0,0.25)"; + browserWrap.style.zIndex = "9999999"; + + browserWrap.onclick = function () { + setTimeout(function () { + IAB.close(); + }, 0); + }; + + document.body.appendChild(browserWrap); + } + var localFile = (strUrl.indexOf('ms-appdata:///') > -1); + if (localFile) { + elem = document.createElement("x-ms-webview"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + + } else { + elem = document.createElement("iframe"); + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + elem.style.borderWidth = "0px"; + elem.name = "targetFrame"; + elem.src = strUrl; + + + window.addEventListener("resize", function () { + if (browserWrap && elem) { + elem.style.width = (window.innerWidth - 80) + "px"; + elem.style.height = (window.innerHeight - 80) + "px"; + } + }); + } + + browserWrap.appendChild(elem); + } else { + window.location = strUrl; + } + + //var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl }); + + }, + + injectScriptCode: function (code, bCB) { + + // "(function(d) { var c = d.createElement('script'); c.src = %@; d.body.appendChild(c); })(document)" + }, + + injectScriptFile: function (file, bCB) { + + } +}; + +module.exports = IAB; + + +require("cordova/exec/proxy").add("InAppBrowser", module.exports); diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/README.md new file mode 100644 index 0000000..002e0c5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/README.md @@ -0,0 +1,39 @@ +PrivacyScreenPlugin +================== + +Both iOS (as of iOS 7) and Android have app switchers that display a screenshot of your app. + +This is a lovely feature for most apps, but if your app displays sensitive information this is a possible privacy risk. + +This plugin flags your app so that it doesn't show your users' sensitive data in the task switcher. It sets the [FLAG_SECURE](http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE) flag in Android (which also prevents manual screenshots from being taken) and hides the window in iOS. + +On iOS this plugin will try to show your splashscreen in the app switcher. It will search for splashscreens prefixed by `Default` or the value of the key `UILaunchImageFile` in your .plist file. +If it fails to find a splashscreen for a specific device or orientation (portrait or landscape), a black screen is shown instead. + +Installation +------------ + +For Cordova 3.x.x: + +1. To add this plugin just type: `cordova plugin add cordova-plugin-privacyscreen` or `phonegap local plugin add cordova-plugin-privacyscreen` +2. To remove this plugin type: `cordova plugin remove cordova-plugin-privacyscreen` or `phonegap local plugin remove cordova-plugin-privacyscreen` + +Usage: +------ + +This plugin exposes no interface, it simply sets your app to be private. You don't need to do anything except install the plugin. + +Test this plugin on a real device because the iOS simulator (7.1 at least) does a poor job hiding your app. + +## License + +The MIT License + +Copyright (c) 2014 Tommy-Carlos Williams (http://github.com/devgeeks) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/package.json b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/package.json new file mode 100644 index 0000000..e4f1ced --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/package.json @@ -0,0 +1,29 @@ +{ + "name": "cordova-plugin-privacyscreen", + "version": "0.3.1", + "description": "Secures your app from displaying a screenshot in task switchers under Android and iOS. Keeps sensitive information private.", + "cordova": { + "id": "cordova-plugin-privacyscreen", + "platforms": [ + "android", + "ios" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/devgeeks/PrivacyScreenPlugin.git" + }, + "keywords": [ + "privacy", + "cordova", + "ecosystem:cordova", + "cordova-android", + "cordova-ios" + ], + "author": "Tommy-Carlos Willaims ", + "license": "MIT", + "bugs": { + "url": "https://github.com/devgeeks/PrivacyScreenPlugin/issues" + }, + "homepage": "https://github.com/devgeeks/PrivacyScreenPlugin#readme" +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/plugin.xml b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/plugin.xml new file mode 100644 index 0000000..99d0576 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/plugin.xml @@ -0,0 +1,31 @@ + + + + PrivacyScreenPlugin + Secures your app from displaying a screenshot in task switchers under Android and iOS. Keeps sensitive information private. + MIT + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/android/PrivacyScreenPlugin.java b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/android/PrivacyScreenPlugin.java new file mode 100644 index 0000000..691f5a6 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/android/PrivacyScreenPlugin.java @@ -0,0 +1,37 @@ +/** + * PrivacyScreenPlugin.java Cordova Plugin Implementation + * Created by Tommy-Carlos Williams on 18/07/14. + * Copyright (c) 2014 Tommy-Carlos Williams. All rights reserved. + * MIT Licensed + */ +package org.devgeeks.privacyscreen; + +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaWebView; + +import android.app.Activity; +import android.view.Window; +import android.view.WindowManager; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.content.Context; +import android.os.Bundle; + +/** + * This class sets the FLAG_SECURE flag on the window to make the app + * private when shown in the task switcher + */ +public class PrivacyScreenPlugin extends CordovaPlugin { + + @Override + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + Activity activity = this.cordova.getActivity(); + activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); + } +} diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.h b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.h new file mode 100644 index 0000000..6ce5c3a --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.h @@ -0,0 +1,23 @@ +/** + * PrivacyScreenPlugin.h + * Created by Tommy-Carlos Williams on 18/07/2014 + * Copyright (c) 2014 Tommy-Carlos Williams. All rights reserved. + * MIT Licensed + */ +#import +#import + +typedef struct { + BOOL iPhone; + BOOL iPad; + BOOL iPhone4; + BOOL iPhone5; + BOOL iPhone6; + BOOL iPhone6Plus; + BOOL retina; + +} CDV_iOSDevice; + +@interface PrivacyScreenPlugin : CDVPlugin + +@end \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.m b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.m new file mode 100644 index 0000000..2424449 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/src/ios/PrivacyScreenPlugin.m @@ -0,0 +1,154 @@ +/** + * PrivacyScreenPlugin.m + * Created by Tommy-Carlos Williams on 18/07/2014 + * Copyright (c) 2014 Tommy-Carlos Williams. All rights reserved. + * MIT Licensed + */ +#import "PrivacyScreenPlugin.h" + +UIImageView *imageView; + +@implementation PrivacyScreenPlugin + +- (void)pluginInitialize +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:) + name:UIApplicationDidBecomeActiveNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:) + name:UIApplicationWillResignActiveNotification object:nil]; +} + +- (void)onAppDidBecomeActive:(UIApplication *)application +{ + if (imageView == NULL) { + self.viewController.view.window.hidden = NO; + } else { + [imageView removeFromSuperview]; + } +} + +- (void)onAppWillResignActive:(UIApplication *)application +{ + CDVViewController *vc = (CDVViewController*)self.viewController; + NSString *imgName = [self getImageName:self.viewController.interfaceOrientation delegate:(id)vc device:[self getCurrentDevice]]; + UIImage *splash = [UIImage imageNamed:imgName]; + if (splash == NULL) { + self.viewController.view.window.hidden = YES; + } else { + imageView = [[UIImageView alloc]initWithFrame:[self.viewController.view bounds]]; + [imageView setImage:splash]; + + #ifdef __CORDOVA_4_0_0 + [[UIApplication sharedApplication].keyWindow addSubview:imageView]; + #else + [self.viewController.view addSubview:imageView]; + #endif + } +} + +// Code below borrowed from the CDV splashscreen plugin @ https://github.com/apache/cordova-plugin-splashscreen +// Made some adjustments though, becuase landscape splashscreens are not available for iphone < 6 plus +- (CDV_iOSDevice) getCurrentDevice +{ + CDV_iOSDevice device; + + UIScreen* mainScreen = [UIScreen mainScreen]; + CGFloat mainScreenHeight = mainScreen.bounds.size.height; + CGFloat mainScreenWidth = mainScreen.bounds.size.width; + + int limit = MAX(mainScreenHeight,mainScreenWidth); + + device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); + device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); + device.retina = ([mainScreen scale] == 2.0); + device.iPhone4 = (device.iPhone && limit == 480.0); + device.iPhone5 = (device.iPhone && limit == 568.0); + // note these below is not a true device detect, for example if you are on an + // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but + // this is appropriate for detecting the runtime screen environment + device.iPhone6 = (device.iPhone && limit == 667.0); + device.iPhone6Plus = (device.iPhone && limit == 736.0); + + return device; +} + +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device +{ + // Use UILaunchImageFile if specified in plist. Otherwise, use Default. + NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; + + NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; + + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape + BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); + BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); + // this means there are no mixed orientations in there + BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); + + if (imageName) { + imageName = [imageName stringByDeletingPathExtension]; + } else { + imageName = @"Default"; + } + + // Add Asset Catalog specific prefixes + if ([imageName isEqualToString:@"LaunchImage"]) + { + if(device.iPhone4 || device.iPhone5 || device.iPad) { + imageName = [imageName stringByAppendingString:@"-700"]; + } else if(device.iPhone6) { + imageName = [imageName stringByAppendingString:@"-800"]; + } else if(device.iPhone6Plus) { + imageName = [imageName stringByAppendingString:@"-800"]; + if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown) { + imageName = [imageName stringByAppendingString:@"-Portrait"]; + } + } + } + + BOOL isLandscape = supportsLandscape && + (currentOrientation == UIInterfaceOrientationLandscapeLeft || currentOrientation == UIInterfaceOrientationLandscapeRight); + + if (device.iPhone5) { // does not support landscape + imageName = isLandscape ? nil : [imageName stringByAppendingString:@"-568h"]; + } else if (device.iPhone6) { // does not support landscape + imageName = isLandscape ? nil : [imageName stringByAppendingString:@"-667h"]; + } else if (device.iPhone6Plus) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + default: + break; + } + } + imageName = [imageName stringByAppendingString:@"-736h"]; + + } else if (device.iPad) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationPortraitUpsideDown: + default: + imageName = [imageName stringByAppendingString:@"-Portrait"]; + break; + } + } + } + + return imageName; +} + +@end \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/www/PrivacyScreenPlugin.js b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/www/PrivacyScreenPlugin.js new file mode 100644 index 0000000..ae80e7d --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-privacyscreen/www/PrivacyScreenPlugin.js @@ -0,0 +1,8 @@ +//var exec = require('cordova/exec'); + +/** + * Not sure this will even have a JS API + */ +//exports.activate = function(arg, success, error) { + //exec(success, error, "PrivacyScreenPlugin", "activate", [arg]); +//}; diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/CONTRIBUTING.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/CONTRIBUTING.md new file mode 100644 index 0000000..7de4c64 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/LICENSE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/LICENSE new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/NOTICE b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/NOTICE new file mode 100644 index 0000000..8ec56a5 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/README.md b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/README.md new file mode 100644 index 0000000..e19d230 --- /dev/null +++ b/MOLPayXDKExample/plugins/molpay-mobile-xdk-cordova/MOLPayXDKExample/plugins/cordova-plugin-whitelist/README.md @@ -0,0 +1,163 @@ +--- +title: Whitelist +description: Whitelist external content accessible by your app. +--- + + +# cordova-plugin-whitelist + +This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0 + +:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Whitelist%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + +## Installation + +You can install whitelist plugin with Cordova CLI, from npm: + +``` +$ cordova plugin add cordova-plugin-whitelist +$ cordova prepare +``` + +## Supported Cordova Platforms + +* Android 4.0.0 or above + +## Navigation Whitelist +Controls which URLs the WebView itself can be navigated to. Applies to +top-level navigations only. + +Quirks: on Android it also applies to iframes for non-http(s) schemes. + +By default, navigations only to `file://` URLs, are allowed. To allow others URLs, you must add `` tags to your `config.xml`: + + + + + + + + + + + + + + + +## Intent Whitelist +Controls which URLs the app is allowed to ask the system to open. +By default, no external URLs are allowed. + +On Android, this equates to sending an intent of type BROWSEABLE. + +This whitelist does not apply to plugins, only hyperlinks and calls to `window.open()`. + +In `config.xml`, add `` tags, like this: + + + + + + + + + + + + + + + + + + + + + + + +## Network Request Whitelist +Controls which network requests (images, XHRs, etc) are allowed to be made (via cordova native hooks). + +Note: We suggest you use a Content Security Policy (see below), which is more secure. This whitelist is mostly historical for webviews which do not support CSP. + +In `config.xml`, add `` tags, like this: + + + + + + + + + + + + + + + + + +Without any `` tags, only requests to `file://` URLs are allowed. However, the default Cordova application includes `` by default. + + +Note: Whitelist cannot block network redirects from a whitelisted remote website (i.e. http or https) to a non-whitelisted website. Use CSP rules to mitigate redirects to non-whitelisted websites for webviews that support CSP. + +Quirk: Android also allows requests to https://ssl.gstatic.com/accessibility/javascript/android/ by default, since this is required for TalkBack to function properly. + +### Content Security Policy +Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly). + +On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. `